Commit Graph

30400 Commits

Author SHA1 Message Date
Tom Lane
3613d0893f Further fixes to the pg_get_expr() security fix in back branches.
It now emerges that the JDBC driver expects to be able to use pg_get_expr()
on an output of a sub-SELECT.  So extend the check logic to be able to recurse
into a sub-SELECT to see if the argument is ultimately coming from an
appropriate column.  Per report from Thomas Kellerer.
2010-09-25 15:57:05 -04:00
Peter Eisentraut
f27860dba3 Fix man page markup for <cmdsynopsis> with multiple variants
Command synopses using <cmdsynopsis> with multiple variants previously used
<sbr> to break lines between variants.  The new man page toolchain introduced
in 9.0 makes a mess out of that, and that markup was probably wrong all along,
because <sbr> is supposed to break lines within a synopsis, not between them.
So fix that by using multiple <cmdsynopsis> elements inside <refsynopsisdiv>.

backpatched to 9.0
2010-09-25 16:47:58 +03:00
Tom Lane
4afd557901 Still more .gitignore cleanup.
Fix overly-enthusiastic ignores, as identified by
git ls-files -i --exclude-standard
2010-09-24 13:48:20 -04:00
Robert Haas
7ffb4d6c53 Add contrib/xml2/pgxml.sql to .gitignore
Kevin Grittner
2010-09-23 22:08:25 -04:00
Tom Lane
c825a15700 ProcessIncomingNotify *must* reset notifyInterruptOccurred when called.
This was broken in 9.0 by careless addition of an early-exit path.
Bug report and diagnosis by Jeff Davis.
2010-09-23 17:17:02 -04:00
Tom Lane
f73ccedcf8 Prevent show_session_authorization from crashing when session_authorization
hasn't been set.

The only known case where this can happen is when show_session_authorization
is invoked in an autovacuum process, which is possible if an index function
calls it, as for example in bug #5669 from Andrew Geery.  We could perhaps
try to return a sensible value, such as the name of the cluster-owning
superuser; but that seems like much more trouble than the case is worth,
and in any case it could create new possible failure modes.  Simply
returning an empty string seems like the most appropriate fix.

Back-patch to all supported versions, even those before autovacuum, just
in case there's another way to provoke this crash.
2010-09-23 16:53:22 -04:00
Tom Lane
b74ecb9194 Avoid sharing subpath list structure when flattening nested AppendRels.
In some situations the original coding led to corrupting the child AppendRel's
subpaths list, effectively adding other members of the parent's list to it.
This was usually masked because we never made any further use of the child's
list, but given the right combination of circumstances, we could do so.  The
visible symptom would be a relation getting scanned twice, as in bug #5673
from David Schmitt.

Backpatch to 8.2, which is as far back as the risky coding appears.  The
example submitted by David only fails in 8.4 and later, but I'm not convinced
that there aren't any even-more-obscure cases where 8.2 and 8.3 would fail.
2010-09-23 15:37:27 -04:00
Heikki Linnakangas
0e6519e115 Initialize tableoid field correctly when dumping foreign data wrappers and
servers. AFAICT it's harmless at the moment because nothing can depend on
either, but as soon as we introduce an object type with such dependencies,
tableoid needs to be set or pg_dump will fail to interpret the dependencies
correctly. In theory, I guess the uninitialized garbage in tableoid could
cause the object to be mistaken for some other object with same OID as well.
2010-09-23 15:00:04 +03:00
Tom Lane
6f664c1af4 Re-allow input of Julian dates prior to 0001-01-01 AD.
This was unintentionally broken in 8.4 while tightening up checking of
ordinary non-Julian date inputs to forbid references to "year zero".
Per bug #5672 from Benjamin Gigot.
2010-09-22 23:48:14 -04:00
Tom Lane
e482ebdf0b More fixes for libpq's .gitignore file.
The previous patches failed to cover a lot of symlinks that are only
added in platform-specific cases.  Make the lists match what's in the
Makefile for each branch.
2010-09-22 22:32:19 -04:00
Tom Lane
535c611f76 Do some copy-editing on the Git usage docs. 2010-09-22 20:22:35 -04:00
Tom Lane
5074f68848 Fix remaining stray references to CVS.
These are just cosmetic and don't seem worth back-patching far.
I put them into 9.0 just because it was trivial to do so.
2010-09-22 19:51:46 -04:00
Tom Lane
f3a838bb76 Add assorted other documentation build targets to documentation gitignore. 2010-09-22 18:08:53 -04:00
Tom Lane
8d0b5d8971 Some more gitignore cleanups: cover contrib and PL regression test outputs.
Also do some further work in the back branches, where quite a bit wasn't
covered by Magnus' original back-patch.
2010-09-22 17:22:53 -04:00
Magnus Hagander
f23bc1e8a4 Add gitignore files for ecpg regression tests.
Backpatch to 8.2 as that's how far the structure looks the same.
2010-09-22 21:49:07 +02:00
Magnus Hagander
bbf84ac000 Remove anonymous cvs instructions, and replace them with instructions
for git. Change other references from cvs to git as well.
2010-09-22 20:10:29 +02:00
Magnus Hagander
a692359411 Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02:00
Tom Lane
dcd9dcdeeb Fix a missed explanation of auto-analyze threshold, per Joe Miller. 2010-09-21 16:40:50 -04:00
Tom Lane
829f5b3571 Back-patch replacement of README.CVS with README.git.
In older branches, also git-ify the "make distdir" rule.
2010-09-21 14:42:58 -04:00
Robert Haas
c6f6db5fdf Move pg_db_role_setting docs to correct place in alphabetical order. 2010-09-17 18:50:22 +00:00
Marc G. Fournier
861861edcc tag v9.0.0 ... the big day approaches 2010-09-17 01:18:41 +00:00
Magnus Hagander
ec6fca101e Treat exit code 128 (ERROR_WAIT_NO_CHILDREN) as non-fatal on Win32,
since it can happen when a process fails to start when the system
is under high load.

Per several bug reports and many peoples investigation.

Back-patch to 8.4, which is as far back as the "deadman-switch"
for shared memory access exists.
2010-09-16 20:37:18 +00:00
Peter Eisentraut
765b69ddb1 Translation updates for 9.0.0 2010-09-16 19:09:39 +00:00
Tom Lane
57d115c449 Stamp 9.0 release notes with expected release date; also some last-minute
copy-editing.
2010-09-16 18:15:28 +00:00
Tom Lane
a59eaf28cc Fix bad grammar. 2010-09-16 14:31:26 +00:00
Tom Lane
c5ed269164 Fix two new-in-9.0 bugs in hstore.
There was an incorrect Assert in hstoreValidOldFormat(), which would cause
immediate core dumps when attempting to work with pre-9.0 hstore data,
but of course only in an assert-enabled build.

Also, ghstore_decompress() incorrectly applied DatumGetHStoreP() to a datum
that wasn't actually an hstore, but rather a ghstore (ie, a gist signature
bitstring).  That used to be harmless, but could now result in misbehavior
if the hstore format conversion code happened to trigger.  In reality,
since ghstore is not marked toastable (and doesn't need to be), this
function is useless anyway; we can lobotomize it down to returning the
passed-in pointer.

Both bugs found by Andrew Gierth, though this isn't exactly his proposed
patch.
2010-09-16 02:54:07 +00:00
Tom Lane
e3171be674 Add a compatibility note about plpgsql's treatment of SELECT INTO rec.fld
when fld is of composite type.  Per discussion of bug #5644 from Valentine
Gogichashvili.
2010-09-15 17:46:02 +00:00
Tom Lane
bab9f1d585 Fix join-removal logic for pseudoconstant and outerjoin-delayed quals.
In these cases a qual can get marked with the removable rel in its
required_relids, but this is just to schedule its evaluation correctly, not
because it really depends on the rel.  We were assuming that, in effect,
we could throw away *all* quals so marked, which is nonsense.  Tighten up
the logic to be a little more paranoid about which quals belong to the
outer join being considered for removal, and arrange for all quals that
don't belong to be updated so they will still get evaluated correctly.

Also fix another problem that happened to be exposed by this test case,
which was that make_join_rel() was failing to notice some cases where
a constant-false qual could be used to prove a join relation empty.  If it's
a pushed-down constant false, then the relation is empty even if it's an
outer join, because the qual applies after the outer join expansion.

Per report from Nathan Grange.  Back-patch into 9.0.
2010-09-14 23:15:37 +00:00
Heikki Linnakangas
105faeb356 Don't warn about an in-progress online backup, when we're recovering from
an online backup instead of performing one. pg_ctl can detect that by
checking if recovery.conf exists.

Backup label file is renamed away early in recovery, so the window where
backup label exists during recovery is normally very small, but you can run
into it e.g if restore_command is set incorrectly and the startup process
never finds even the first WAL segment containing the checkpoint record to
start recovery from.

Fujii Masao with comments by me.
2010-09-14 08:05:54 +00:00
Robert Haas
3b08e09fe7 Elaborate on what gets stored in pg_authid.rolpasswd.
Also, add cross-reference from pg_shadow.passwd to pg_authid.rolpasswd and
fix a bit of markup I muffed in my previous commit.

Per discussion with Josh Kupershmidt.
2010-09-13 17:03:23 +00:00
Heikki Linnakangas
d9ac2fdaa9 Remove prototype for non-existent function from walreceiver.h. Tidy up by
separating prototypes for functions in walreceiver.c and walreceiverfuncs.c
with comments.
2010-09-13 10:14:30 +00:00
Heikki Linnakangas
035081676b Process options from the startup packed in walsender. Only few options
make sense for walsender, but for example application_name and client_encoding
do. We still don't apply per-role settings from pg_db_role_setting, because
that would require connecting to a database to read the table.

Fujii Masao
2010-09-13 09:00:35 +00:00
Bruce Momjian
6bb4a7b305 Don't try aligning comments for new archive_command Win32 doc example;
it doesn't work.

Backpatch to 9.0.X.
2010-09-13 01:35:54 +00:00
Robert Haas
1cdf188aa6 Link from pg_shadow docs to pg_authid docs.
Per discussion with Josh Kupershmidt.
2010-09-13 01:25:12 +00:00
Bruce Momjian
f499c211d8 Re-add documentation for Win32 copy syntax for archive_command.
Backpatch to 9.0.X.
2010-09-12 13:47:19 +00:00
Tom Lane
e266be9110 Remove obsolete claim that gzip is needed while installing PG's documentation.
It isn't, now that we ship the docs as loose files rather than a sub-tarball.

Also adjust the wording in a couple of places to make the lists of required
software read more consistently.
2010-09-09 17:19:46 +00:00
Bruce Momjian
a8745a9afd Doc fixes:
- remove excessive table cells
- moving function parameters into function tags rather than having
  them being considered separate
- add return type column on XML2 contrib module functions list and
  removing return types from function
- add table header to XML2 contrib parameter table

Thom Brown

Backpatch to 9.0.X.
2010-09-09 00:48:29 +00:00
Peter Eisentraut
83756a241a Add tip about building plpython 2 and 3. Fix link to Python docs. 2010-09-08 20:35:53 +00:00
Peter Eisentraut
f48fb5d823 Clarify that surrogate pairs are not encoded in UTF-8 directly 2010-09-07 18:54:08 +00:00
Bruce Momjian
d3581d3161 Modify pg_upgrade to set/restore all environment variables related to
collation/encoding to match English when reading controldata.  This now
matches the English variable setting used by pg_regress.c.

Backpatch to 9.0.X.
2010-09-07 14:10:39 +00:00
Tom Lane
b74f775142 Pad the ps_status display with nulls, not blanks, on Darwin.
A long time ago, this didn't work nicely, but it seems to work on all recent
versions of OS X.  The blank-pad method is less desirable since it results
in lots of extra space in ps' output.  Per Alexey Klyukin.
2010-09-04 17:46:03 +00:00
Tom Lane
a2145a5b43 Clean up description of ecpg's dtcvfmtasc function.
Per KOIZUMI Satoru.
2010-09-02 14:57:09 +00:00
Tom Lane
ec3747f77e Clean up some bad grammar and punctuation in description of ecpg's decimal
type.  Per KOIZUMI Satoru.
2010-09-02 14:46:51 +00:00
Tom Lane
7c18d3f1e0 Fix up flushing of composite-type typcache entries to be driven directly by
SI invalidation events, rather than indirectly through the relcache.

In the previous coding, we had to flush a composite-type typcache entry
whenever we discarded the corresponding relcache entry.  This caused problems
at least when testing with RELCACHE_FORCE_RELEASE, as shown in recent report
from Jeff Davis, and might result in real-world problems given the kind of
unexpected relcache flush that that test mechanism is intended to model.

The new coding decouples relcache and typcache management, which is a good
thing anyway from a structural perspective.  The cost is that we have to
search the typcache linearly to find entries that need to be flushed.  There
are a couple of ways we could avoid that, but at the moment it's not clear
it's worth any extra trouble, because the typcache contains very few entries
in typical operation.

Back-patch to 8.2, the same as some other recent fixes in this general area.
The patch could be carried back to 8.0 with some additional work, but given
that it's only hypothetical whether we're fixing any problem observable in
the field, it doesn't seem worth the work now.
2010-09-02 03:16:52 +00:00
Tom Lane
43e48de4a5 Clarify documentation of handling of null arguments for aggregates.
Per discussion.
2010-09-01 18:22:35 +00:00
Tom Lane
41c8287de0 Improve release notes' description of Teodor's fixes for polygon overlaps
and contains operators.
2010-09-01 15:14:48 +00:00
Alvaro Herrera
9602630f40 Add missing markup for translatability 2010-08-31 05:57:56 +00:00
Tom Lane
bdf6b6a573 Cosmetic fixes for KnownAssignedXidsGetOldestXmin, per Fujii Masao. 2010-08-30 17:30:49 +00:00
Simon Riggs
34a7ee82c4 Fix misleading DEBUG2 issued during RemoveOldXlogFiles() 2010-08-30 15:38:17 +00:00
Simon Riggs
4c5fb76c39 Truncate subtrans after each restartpoint.
Issue reported by Harald Kolb, patch by Fujii Masao, review by me.
2010-08-30 15:21:18 +00:00