Stamp 9.2.0.
commit : ef47adb414e46099155c34529a2a5caeea02fc41
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 6 Sep 2012 17:26:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 6 Sep 2012 17:26:17 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Fix "too many arguments" messages not to index off the end of argv[].
commit : ee121a6473c00d0c791e3ed1c2f8e555e66a0ea0
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Sep 2012 15:43:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Sep 2012 15:43:46 -0400
This affects initdb, clusterdb, reindexdb, and vacuumdb in master
and 9.2; in earlier branches, only initdb is affected.
M src/bin/initdb/initdb.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
Translation updates
commit : 1bc414ca7642bf32be80fcbe4760fca0307d2e12
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 5 Sep 2012 23:33:52 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 5 Sep 2012 23:33:52 -0400
M src/backend/nls.mk
M src/backend/po/de.po
M src/backend/po/fr.po
M src/backend/po/ru.po
D src/backend/po/tr.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/pt_BR.po
D src/bin/initdb/po/ta.po
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/fr.po
M src/bin/pg_basebackup/po/ru.po
M src/bin/pg_controldata/nls.mk
D src/bin/pg_controldata/po/it.po
D src/bin/pg_controldata/po/ko.po
D src/bin/pg_controldata/po/sv.po
D src/bin/pg_controldata/po/ta.po
M src/bin/pg_ctl/nls.mk
D src/bin/pg_ctl/po/it.po
D src/bin/pg_ctl/po/ko.po
D src/bin/pg_ctl/po/sv.po
D src/bin/pg_ctl/po/ta.po
D src/bin/pg_ctl/po/tr.po
D src/bin/pg_ctl/po/zh_CN.po
M src/bin/pg_dump/nls.mk
D src/bin/pg_dump/po/it.po
D src/bin/pg_dump/po/ko.po
D src/bin/pg_dump/po/pt_BR.po
D src/bin/pg_dump/po/sv.po
D src/bin/pg_dump/po/tr.po
D src/bin/pg_dump/po/zh_CN.po
D src/bin/pg_dump/po/zh_TW.po
M src/bin/pg_resetxlog/nls.mk
D src/bin/pg_resetxlog/po/sv.po
D src/bin/pg_resetxlog/po/ta.po
M src/bin/psql/nls.mk
D src/bin/psql/po/sv.po
D src/bin/psql/po/tr.po
M src/bin/scripts/nls.mk
D src/bin/scripts/po/ta.po
M src/interfaces/libpq/nls.mk
D src/interfaces/libpq/po/it.po
D src/interfaces/libpq/po/ko.po
D src/interfaces/libpq/po/sv.po
D src/interfaces/libpq/po/ta.po
M src/pl/plperl/nls.mk
D src/pl/plperl/po/it.po
M src/pl/plpgsql/src/nls.mk
D src/pl/plpgsql/src/po/it.po
D src/pl/plpgsql/src/po/ko.po
M src/pl/plpython/nls.mk
D src/pl/plpython/po/it.po
D src/pl/plpython/po/tr.po
D src/pl/plpython/po/zh_CN.po
D src/pl/plpython/po/zh_TW.po
Fix typo in information_schema documentation.
commit : 6acf90bc6e2bbd03a931d4edfa5fbe580df41515
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 23:37:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 23:37:45 -0400
Shigeru Hanada
M doc/src/sgml/information_schema.sgml
In pg_upgrade, try a few times to open a log file.
commit : bdf8f58397dc83618dccd8f85a46a02933a7f86f
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 23:13:14 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 23:13:14 -0400
If we call pg_ctl stop, the server might continue and thus
hold a log file for a short time after it has deleted its pid file,
(which is when pg_ctl will exit), and so a subsequent attempt to
open the log file might fail.
We therefore try to open it a few times, sleeping one second between
tries, to give the server time to exit.
This corrects an error that was observed on the buildfarm.
Backpatched to 9.2,
M contrib/pg_upgrade/exec.c
Fix WAL file replacement during cascading replication on Windows.
commit : 4b8dacfcef7ad16939ec8695019747fb45a80847
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 5 Sep 2012 18:10:15 -0700
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 5 Sep 2012 18:10:15 -0700
When the startup process restores a WAL file from the archive, it deletes
any old file with the same name and renames the new file in its place. On
Windows, however, when a file is deleted, it still lingers as long as a
process holds a file handle open on it. With cascading replication, a
walsender process can hold the old file open, so the rename() in the startup
process would fail. To fix that, rename the old file to a temporary name, to
make the original file name available for reuse, before deleting the old
file.
M src/backend/access/transam/xlog.c
Fix inappropriate error messages for Hot Standby misconfiguration errors.
commit : 308d4ec4c677a2ced29b82dde811b1cbba8c3201
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 21:49:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 21:49:11 -0400
Give the correct name of the GUC parameter being complained of.
Also, emit a more suitable SQLSTATE (INVALID_PARAMETER_VALUE,
not the default INTERNAL_ERROR).
Gurjeet Singh, errcode adjustment by me
M src/backend/access/transam/xlog.c
Make one last copy-editing pass over the 9.2 release notes.
commit : 8a66a37d6df5a27cc2b5ec3b59322c974e0b1ef6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 21:28:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 21:28:27 -0400
Also, set the release date to 2012-09-10, since we're pretty well
committed to that now.
M doc/src/sgml/release-9.2.sgml
Fix pg_upgrade test script's line end handling on Windows.
commit : 216c0e30076aa6abecc6ab013b45e9567fcdff45
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 17:55:47 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 17:55:47 -0400
Call pg_dumpall using -f switch instead of redirection, to avoid
writing the output in text mode and generating spurious carriage
returns. Remove to carriage return ignoring hack introduced by
commit e442b0f0c6fd26738bafdeb5222511b586dfe4b9.
Backpatch to 9.2.
M contrib/pg_upgrade/test.sh
Fix line end mishandling in pg_upgrade on Windows.
commit : 5654fd1771398c9f85f91aef53361c96f4eef49c
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 17:48:06 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 5 Sep 2012 17:48:06 -0400
pg_upgrade opened the output from pg_dumpall in text mode and
wrote the split files in text mode. This caused unwanted eating
of intended carriage returns on input and production of spurious
carriage returns on output. To avoid this, open all these files
in binary mode. On non-Windows platforms, this change has no
effect.
Backpatch to 9.0. On 9.0 and 9.1, we also switch from redirecting
pg_dumpall's output to using pg_dumpall's -f switch, for the same
reason.
M contrib/pg_upgrade/dump.c
Restore SIGFPE handler after initializing PL/Perl.
commit : 8e6f6b8ef2b990712d999f2f32c610376c1ebf57
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 16:43:41 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 16:43:41 -0400
Perl, for some unaccountable reason, believes it's a good idea to reset
SIGFPE handling to SIG_IGN. Which wouldn't be a good idea even if it
worked; but on some platforms (Linux at least) it doesn't work at all,
instead resulting in forced process termination if the signal occurs.
Given the lack of other complaints, it seems safe to assume that Perl
never actually provokes SIGFPE and so there is no value in the setting
anyway. Hence, reset it to our normal handler after initializing Perl.
Report, analysis and patch by Andres Freund.
M src/pl/plperl/plperl.c
Silence -Wunused-result warning in contrib/pg_upgrade.
commit : 970212f911728097b44ac231438c5cf4d45b2089
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 14:36:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Sep 2012 14:36:51 -0400
This is just neatnik-ism, but since we do it for comparable code in elog.c,
we may as well do it here.
M contrib/pg_upgrade/util.c
Fix compiler warnings about unused variables, caused by my previous commit.
commit : 3d975d0fc5d7fd28839e3cf1871a479bfc0bcd28
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 4 Sep 2012 22:07:35 -0700
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 4 Sep 2012 22:07:35 -0700
Reported by Peter Eisentraut.
M src/backend/access/transam/xlog.c
In pg_upgrade, document why we can't issue \n\n in the command logfile on Windows. Slightly cleanup log output on Windows given this restriction.
commit : c4f18483b69830c725a9d45332144eb1926c5c26
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 5 Sep 2012 00:01:13 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 5 Sep 2012 00:01:13 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.h
Fix bugs in cascading replication with recovery_target_timeline='latest'
commit : af35e66f04fe7e0430046e0bc83d8d117e95ba2f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 4 Sep 2012 18:47:03 -0700
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 4 Sep 2012 18:47:03 -0700
The cascading replication code assumed that the current RecoveryTargetTLI
never changes, but that's not true with recovery_target_timeline='latest'.
The obvious upshot of that is that RecoveryTargetTLI in shared memory needs
to be protected by a lock. A less obvious consequence is that when a
cascading standby is connected, and the standby switches to a new target
timeline after scanning the archive, it will continue to stream WAL to the
cascading standby, but from a wrong file, ie. the file of the previous
timeline. For example, if the standby is currently streaming from the middle
of file 000000010000000000000005, and the timeline changes, the standby
will continue to stream from that file. However, the WAL on the new
timeline is in file 000000020000000000000005, so the standby sends garbage
from 000000010000000000000005 to the cascading standby, instead of the
correct WAL from file 000000020000000000000005.
This also fixes a related bug where a partial WAL segment is restored from
the archive and streamed to a cascading standby. The code assumed that when
a WAL segment is copied from the archive, it can immediately be fully
streamed to a cascading standby. However, if the segment is only partially
filled, ie. has the right size, but only N first bytes contain valid WAL,
that's not safe. That can happen if a partial WAL segment is manually copied
to the archive, or if a partial WAL segment is archived because a server is
started up on a new timeline within that segment. The cascading standby will
get confused if the WAL it received is not valid, and will get stuck until
it's restarted. This patch fixes that problem by not allowing WAL restored
from the archive to be streamed to a cascading standby until it's been
replayed, and thus validated.
M src/backend/access/transam/xlog.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
Fix serializable mode with index-only scans.
commit : 3e22659e0cb2181d71818eea96dc831a7e37cd69
author : Kevin Grittner <kgrittn@postgresql.org>
date : Tue, 4 Sep 2012 21:14:25 -0500
committer: Kevin Grittner <kgrittn@postgresql.org>
date : Tue, 4 Sep 2012 21:14:25 -0500
Serializable Snapshot Isolation used for serializable transactions
depends on acquiring SIRead locks on all heap relation tuples which
are used to generate the query result, so that a later delete or
update of any of the tuples can flag a read-write conflict between
transactions. This is normally handled in heapam.c, with tuple level
locking. Since an index-only scan avoids heap access in many cases,
building the result from the index tuple, the necessary predicate
locks were not being acquired for all tuples in an index-only scan.
To prevent problems with tuple IDs which are vacuumed and re-used
while the transaction still matters, the xmin of the tuple is part of
the tag for the tuple lock. Since xmin is not available to the
index-only scan for result rows generated from the index tuples, it
is not possible to acquire a tuple-level predicate lock in such
cases, in spite of having the tid. If we went to the heap to get the
xmin value, it would no longer be an index-only scan. Rather than
prohibit index-only scans under serializable transaction isolation,
we acquire an SIRead lock on the page containing the tuple, when it
was not necessary to visit the heap for other reasons.
Backpatch to 9.2.
Kevin Grittner and Tom Lane
M src/backend/executor/nodeIndexonlyscan.c
A src/test/isolation/expected/index-only-scan.out
M src/test/isolation/isolation_schedule
A src/test/isolation/specs/index-only-scan.spec
Allow isolation tests to specify multiple setup blocks.
commit : 8e39fd97f1566820f7dfd2b4d36dc6bd41211747
author : Kevin Grittner <kgrittn@postgresql.org>
date : Tue, 4 Sep 2012 20:40:48 -0500
committer: Kevin Grittner <kgrittn@postgresql.org>
date : Tue, 4 Sep 2012 20:40:48 -0500
Each setup block is run as a single PQexec submission, and some
statements such as VACUUM cannot be combined with others in such a
block.
Backpatch to 9.2.
Kevin Grittner and Tom Lane
M src/test/isolation/README
M src/test/isolation/isolationtester.c
M src/test/isolation/isolationtester.h
M src/test/isolation/specparse.y
Fix transcription error.
commit : fb18e4dd078eb2c114276ab6cb880a4f5f2e0d9f
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 4 Sep 2012 09:40:49 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 4 Sep 2012 09:40:49 -0400
M contrib/pg_upgrade/check.c
Document that pg_upgrade requires PGHOST be set for any pre-9.1 servers with a socket directory mismatch with the new server.
commit : 469530b37094515717947a997e7e77737bb70a60
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Sep 2012 09:17:19 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Sep 2012 09:17:19 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Mention basebackup-from-slave next to cascading replication
commit : ee7a48c5b37a3e37b0c2a934c86c9385c5ad8caf
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 4 Sep 2012 14:37:14 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 4 Sep 2012 14:37:14 +0200
M doc/src/sgml/release-9.2.sgml
Fix command echoing in pg_upgade's analyze script for Windows.
commit : 14fd5b3b9e396ce29d1f9e5b983081f77460b996
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 4 Sep 2012 05:51:44 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 4 Sep 2012 05:51:44 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
Indent fix_path_separator() header properly.
commit : b5d437c011e9d739b79aa37ca19baca56b334ab7
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 22:58:38 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 22:58:38 -0400
M contrib/pg_upgrade/check.c
Allow pg_upgrade "make check" to run on Windows/MSys.
commit : 765b5c41ba70098086988b4c7ba84162cd88e1de
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 22:32:56 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 22:32:56 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/test.sh
In pg_upgrade, pull the port number from postmaster.pid, like we do for socket location. Also, prevent putting the socket in the current directory for pre-9.1 servers in live check and non-live check mode, because pre-9.1 pg_ctl -w can't handle it.
commit : d0a51117da92efd8cba426f6591fc1cfe6a497a3
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 3 Sep 2012 22:15:09 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 3 Sep 2012 22:15:09 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
Use correct path separator for Windows builtin commands.
commit : f88ad86fba2a1700c96953ee26ed700f08fa5d7e
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 18:11:02 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 18:11:02 -0400
pg_upgrade produces a platform-specific script to remove the old
directory, but on Windows it has not been making sure that the
paths it writes as arguments for rmdir and del use the backslash
path separator, which will cause these scripts to fail.
The fix is backpatched to Release 9.0.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
Fix bugs in exec.c that prevented pg_upgrade working in Windows.
commit : c879e82b3746150171fcec605a6d5b2b21e5c6cf
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 15:32:58 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 3 Sep 2012 15:32:58 -0400
Backpatch to 9.2 - code before that is quite different and should
not have these defects.
M contrib/pg_upgrade/exec.c
Back-patch recent pg_upgrade fixes into 9.2.
commit : 5c7e91e9c3d6716641ba52286c6d3daa6b1c13c0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Sep 2012 15:03:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Sep 2012 15:03:08 -0400
This syncs contrib/pg_upgrade in the 9.2 branch with HEAD, except for the
HEAD changes related to converting XLogRecPtr to 64-bit int. It includes
back-patching these commits:
666d494d19dbd5dc7a177709a2f7069913f8ab89
pg_upgrade: abstract out copying of files from old cluster to new
7afa8bed65ea925208f128048f3a528a64e1319a
pg_upgrade: Run the created scripts in the test suite
ab577e63faf792593ca728625a8ef0b1dfaf7500
Remove analyze_new_cluster.sh on make clean, too
34c02044ed7e7defde5a853b26dcd806c872d974
Fix thinko in comment
088c065ce8e405fafbfa966937184ece9defcf20
pg_upgrade: Fix exec_prog API to be less flaky
f763b77193b04eba03a1f4ce46df34dc0348419e
Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.
M contrib/pg_upgrade/Makefile
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/test.sh
M doc/src/sgml/pgupgrade.sgml
Make psql's \d+ show reloptions for all relkinds.
commit : b681a874d97a16693c59228660f8d8a75f723bf3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Sep 2012 11:24:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Sep 2012 11:24:36 -0400
Formerly it would only show them for relkinds 'r' and 'f' (plain tables
and foreign tables). However, as of 9.2, views can also have reloptions,
namely security_barrier. The relkind restriction seems pointless and
not at all future-proof, so just print reloptions whenever there are any.
In passing, make some cosmetic improvements to the code that pulls the
"tableinfo" fields out of the PGresult.
Noted and patched by Dean Rasheed, with adjustment for all relkinds by me.
M src/bin/psql/describe.c
Restore setting of _USE_32BIT_TIME_T to 32 bit MSVC builds.
commit : 2d038749017de2d293a524b3f9df7eaae30dbf6a
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 31 Aug 2012 20:50:31 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 31 Aug 2012 20:50:31 -0400
This was removed in commit cd004067742ee16ee63e55abfb4acbd5f09fbaab,
we're not quite sure why, but there have been reports of crashes due
to AS Perl being built with it when we are not, and it certainly
seems like the right thing to do. There is still some uncertainty
as to why it sometimes fails and sometimes doesn't.
Original patch from Owais Khani, substantially reworked and
extended by Andrew Dunstan.
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/VCBuildProject.pm
Make configure probe for mbstowcs_l as well as wcstombs_l.
commit : e46794420ee37f15d3a6da771b7703fcd9b1ea91
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 31 Aug 2012 14:18:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 31 Aug 2012 14:18:02 -0400
We previously supposed that any given platform would supply both or neither
of these functions, so that one configure test would be sufficient. It now
appears that at least on AIX this is not the case ... which is likely an
AIX bug, but nonetheless we need to cope with it. So use separate tests.
Per bug #6758; thanks to Andrew Hastie for doing the followup testing
needed to confirm what was happening.
Backpatch to 9.1, where we began using these functions.
M configure
M configure.in
M src/backend/utils/adt/pg_locale.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Back-patch recent fixes for gistchoose and gistRelocateBuildBuffersOnSplit.
commit : d2528e5dbf1ad6e391f40712a27d4d199b43100d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 30 Aug 2012 23:47:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 30 Aug 2012 23:47:46 -0400
This back-ports commits c8ba697a4bdb934f0c51424c654e8db6133ea255 and
e5db11c5582b469c04a11f217a0f32c827da5dd7, which fix one definite and one
speculative bug in gistchoose, and make the code a lot more intelligible as
well. In 9.2 only, this also affects the largely-copied-and-pasted logic
in gistRelocateBuildBuffersOnSplit.
The impact of the bugs was that the functions might make poor decisions
as to which index tree branch to push a new entry down into, resulting in
GiST index bloat and poor performance. The fixes rectify these decisions
for future insertions, but a REINDEX would be needed to clean up any
existing index bloat.
Alexander Korotkov, Robert Haas, Tom Lane
M src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistutil.c
Fix checkpoint_timeout documentation to reflect current behavior.
commit : d561fc5396e537452065c3531cb43edf11a8dbf0
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 15:06:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 15:06:55 -0400
Jeff Janes
M doc/src/sgml/wal.sgml
Document how to prevent PostgreSQL itself from exhausting memory.
commit : 36bffe4ffa5a7492d78a889e7feb0838be5449f1
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 14:14:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 14:14:22 -0400
The existing documentation in Linux Memory Overcommit seemed to
assume that PostgreSQL itself could never be the problem, or at
least it didn't tell you what to do about it.
Per discussion with Craig Ringer and Kevin Grittner.
M doc/src/sgml/runtime.sgml
Add missing period to detail message.
commit : 640393080d863c69ae65ba0205e05cd3d4d438b0
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 13:26:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 30 Aug 2012 13:26:45 -0400
Per note from Peter Eisentraut.
M src/backend/storage/lmgr/proc.c
add #includes to plpy_subxactobject.h to make it compile standalone
commit : dc1a36f11ad629808795785fc55c495510db40a9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Aug 2012 16:11:44 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Aug 2012 16:11:44 -0400
M src/pl/plpython/plpy_subxactobject.h
syncrep.h must include xlogdefs.h
commit : 3ca1d62080a9e148b71a2aaa4ee1d210ce92ad68
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Aug 2012 09:46:08 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Aug 2012 09:46:08 -0400
M src/include/replication/syncrep.h
Small punctuation fixes
commit : 53c0ccc8d520ce1a65bc81edbef78223d8222124
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Aug 2012 03:10:04 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Aug 2012 03:10:04 -0400
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Improve a couple of 9.2 release note entries.
commit : a63b7744fa4abdabc977dd4525d0444ddf10f9ed
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 20:54:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 20:54:00 -0400
Clarify the compatibility notes about EXTRACT() and about statistics
timing columns.
M doc/src/sgml/release-9.2.sgml
Add section IDs to subsections of syntax.sgml that lacked them.
commit : 60888e232f0a0264ab5c8bb2bf8860932f58723d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 20:17:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 20:17:16 -0400
This is so that these sections will have stable HTML tags that one can
link to, rather than things like "AEN1902". Perhaps we should mount a
campaign to do this everywhere, but I've found myself pointing at
syntax.sgml subsections often enough to be sure it's useful here.
M doc/src/sgml/syntax.sgml
Fix DROP INDEX CONCURRENTLY IF EXISTS.
commit : a6f43529ea6c3abd9207cea140ab231ac078746a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 12:45:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 27 Aug 2012 12:45:51 -0400
This threw ERROR, not the expected NOTICE, if the index didn't exist.
The bug was actually visible in not-as-expected regression test output,
so somebody wasn't paying too close attention in commit
8cb53654dbdb4c386369eb988062d0bbb6de725e.
Per report from Brendan Byrd.
M src/backend/parser/gram.y
M src/test/regress/expected/create_index.out
pg_basebackup: Correct error message
commit : 81bcc8bc4ca6335f0b5b2029ebe84fbd788556fe
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Aug 2012 00:49:39 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Aug 2012 00:49:39 -0400
It still thought that the --xlog-method option argument could be
empty, as in a previous version of this feature.
M src/bin/pg_basebackup/pg_basebackup.c
Some spelling adjustments in release notes
commit : 019498f0c8f00138eadc98ecda69645929011364
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 22:36:24 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 22:36:24 -0400
M doc/src/sgml/release-9.2.sgml
Normalize some British spellings
commit : 2e435eb38a9a01894bff6eb2c627083133d729ee
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 22:35:53 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 22:35:53 -0400
M doc/src/sgml/high-availability.sgml
Fix issues with checks for unsupported transaction states in Hot Standby.
commit : c3ca786df656d447ca02d51ed3a888468ed6e88d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Aug 2012 13:09:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Aug 2012 13:09:12 -0400
The GUC check hooks for transaction_read_only and transaction_isolation
tried to check RecoveryInProgress(), so as to disallow setting read/write
mode or serializable isolation level (respectively) in hot standby
sessions. However, GUC check hooks can be called in many situations where
we're not connected to shared memory at all, resulting in a crash in
RecoveryInProgress(). Among other cases, this results in EXEC_BACKEND
builds crashing during child process start if default_transaction_isolation
is serializable, as reported by Heikki Linnakangas. Protect those calls
by silently allowing any setting when not inside a transaction; which is
okay anyway since these GUCs are always reset at start of transaction.
Also, add a check to GetSerializableTransactionSnapshot() to complain
if we are in hot standby. We need that check despite the one in
check_XactIsoLevel() because default_transaction_isolation could be
serializable. We don't want to complain any sooner than this in such
cases, since that would prevent running transactions at all in such a
state; but a transaction can be run, if SET TRANSACTION ISOLATION is done
before setting a snapshot. Per report some months ago from Robert Haas.
Back-patch to 9.1, since these problems were introduced by the SSI patch.
Kevin Grittner and Tom Lane, with ideas from Heikki Linnakangas
M src/backend/commands/variable.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/init/postinit.c
Put options on man page and in help output in slightly better order
commit : 5171a400cb15a94b6a2aa8ea2ad7a0128d080830
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 00:06:59 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Aug 2012 00:06:59 -0400
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
libpq: Fix memory leak in URI parser
commit : 1c8c084cdc136388835e0d703a5e26272e0a8f2f
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Aug 2012 22:33:04 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Aug 2012 22:33:04 -0400
When an invalid query parameter is reported, some memory leaks.
found by Coverity
M src/interfaces/libpq/fe-connect.c
Translation updates
commit : f3df4cd22c45057bd24acec4efd21896b892c65e
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Aug 2012 21:24:06 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Aug 2012 21:24:06 -0400
M src/backend/po/de.po
M src/bin/pg_config/po/pt_BR.po
M src/bin/pg_ctl/po/pt_BR.po
M src/bin/pg_dump/po/de.po
M src/bin/psql/po/de.po
M src/bin/scripts/po/de.po
M src/bin/scripts/po/pt_BR.po
M src/interfaces/ecpg/preproc/po/pt_BR.po
M src/pl/plpgsql/src/po/pt_BR.po
M src/pl/plpython/po/de.po
M src/pl/plpython/po/pt_BR.po
Stamp 9.2rc1.
commit : e8c736ca71b3d7aa65ea05a133b4f2a65a11e812
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Aug 2012 18:06:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Aug 2012 18:06:49 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Fix cascading privilege revoke to notice when privileges are still held.
commit : fb7b6197b9ed2fe9813ccc0cb4ff548ae255d80d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Aug 2012 17:25:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Aug 2012 17:25:17 -0400
If we revoke a grant option from some role X, but X still holds the option
via another grant, we should not recursively revoke the privilege from
role(s) Y that X had granted it to. This was supposedly fixed as one
aspect of commit 4b2dafcc0b1a579ef5daaa2728223006d1ff98e9, but I must not
have tested it, because in fact that code never worked: it forgot to shift
the grant-option bits back over when masking the bits being revoked.
Per bug #6728 from Daniel German. Back-patch to all active branches,
since this has been wrong since 8.0.
M src/backend/utils/adt/acl.c
M src/test/regress/expected/privileges.out
M src/test/regress/sql/privileges.sql
Fix typo in example.
commit : ebcc0158f174336fc50ad33fe4cfa642bdff64a8
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 23 Aug 2012 11:57:34 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 23 Aug 2012 11:57:34 +0300
M doc/src/sgml/rangetypes.sgml
Remove overly-pessimistic statement about constraint exclusion.
commit : ead31d1a72b1a99b2741c42adc951564992fb24f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 23:55:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 23:55:34 -0400
As of 9.2, constraint exclusion should work okay with prepared statements:
the planner will try custom plans with actual values of the parameters,
and observe that they are a lot cheaper than the generic plan, and thus
never fall back to using the generic plan. Noted by Tatsuhito Kasahara.
M doc/src/sgml/ddl.sgml
Make a cut at a major-features list for 9.2.
commit : d3337731277c3f65209fc39986627c66033812e9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 17:58:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 17:58:06 -0400
This is open to debate of course, but it's past time we had *something*
here.
M doc/src/sgml/release-9.2.sgml
Make an editorial pass over the 9.2 release notes.
commit : a902d46475e702eb37a5dff51f68948d6d5536f7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 17:37:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 17:37:02 -0400
A very large number of small improvements ...
M doc/src/sgml/datatype.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/release-9.2.sgml
Fix erroneous documentation of synchronous_commit = remote_write.
commit : 9e8f8ef1f072c6d990f334ffbb977eb7486c54f6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 14:04:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Aug 2012 14:04:02 -0400
The docs claimed that this mode only waits for the standby to receive WAL
data, but actually it waits for the data to be written out to the standby's
OS; which is a pretty significant difference because it removes the risk of
crash of the walreceiver process.
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
Update 9.2 release notes to reflect commits to date.
commit : 3f9abab59021fff43dade76bfeea139ccbbb38dc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Aug 2012 22:56:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Aug 2012 22:56:10 -0400
I was unable to entirely resist the temptation to copy-edit related
entries, but will save most of that for a separate pass.
M doc/src/sgml/release-9.2.sgml
Fix dumping of security_barrier views with circular dependencies.
commit : 1ace786878b7f71547faa427c323fffb29cefea6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Aug 2012 15:18:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Aug 2012 15:18:36 -0400
If a view has circular dependencies, pg_dump splits it into a CREATE TABLE
and a CREATE RULE command to break the dependency loop. However, if the
view has reloptions, those options cannot be applied in the CREATE TABLE
command, because views and tables have different allowed reloptions so
CREATE TABLE would reject them. Instead apply the reloptions after the
CREATE RULE, using ALTER VIEW SET.
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
Fix bugs in contrib/pg_trgm's LIKE pattern analysis code.
commit : e0badf67e9cd409ea35f2c2d5e3ca36ffecb47d7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Aug 2012 13:24:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Aug 2012 13:24:58 -0400
Extraction of trigrams did not process LIKE escape sequences properly,
leading to possible misidentification of trigrams near escapes, resulting
in incorrect index search results.
Fujii Masao
M contrib/pg_trgm/expected/pg_trgm.out
M contrib/pg_trgm/sql/pg_trgm.sql
M contrib/pg_trgm/trgm_op.c
Check LIBXML_VERSION instead of testing in configure script.
commit : 33f40976a716287ecddfb01f446797d8df215125
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Aug 2012 00:05:33 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Aug 2012 00:05:33 -0400
We had put a test for libxml2's xmlStructuredErrorContext variable in
configure, but of course that doesn't work on Windows builds. The next
best alternative seems to be to test the LIBXML_VERSION symbol provided
by xmlversion.h.
Per report from Talha Bin Rizwan, though this fixes it in a different way
than his proposed patch.
M configure
M configure.in
M src/backend/utils/adt/xml.c
M src/include/pg_config.h.in
Allow create_index_paths() to consider multiple join bitmapscan paths.
commit : 26893906896d25b0119c57c90474c153bb8083c9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Aug 2012 13:04:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Aug 2012 13:04:03 -0400
In the initial cut at the "parameterized paths" feature, I'd simplified
create_index_paths() to the point where it would only generate a single
parameterized bitmap path per relation. Experimentation with an example
supplied by Josh Berkus convinces me that that's not good enough: we really
need to consider a bitmap path for each possible outer relation. Otherwise
we have regressions relative to pre-9.2 versions, in which the planner
picks a plain indexscan where it should have used a bitmap scan in queries
involving three or more tables. Indeed, after fixing this, several queries
in the regression tests show improved plans as a result of using bitmap not
plain indexscans.
M src/backend/optimizer/path/indxpath.c
M src/test/regress/expected/join.out
Fix GiST buffering build bug, which caused "failed to re-find parent" errors.
commit : d6524697dba5967c7951c9a47107054660804900
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Aug 2012 12:42:11 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Aug 2012 12:42:11 +0300
We use a hash table to track the parents of inner pages, but when inserting
to a leaf page, the caller of gistbufferinginserttuples() must pass a
correct block number of the leaf's parent page. Before gistProcessItup()
descends to a child page, it checks if the downlink needs to be adjusted to
accommodate the new tuple, and updates the downlink if necessary. However,
updating the downlink might require splitting the page, which might move the
downlink to a page to the right. gistProcessItup() doesn't realize that, so
when it descends to the leaf page, it might pass an out-of-date parent block
number as a result. Fix that by returning the block a tuple was inserted to
from gistbufferinginserttuples().
This fixes the bug reported by Zdeněk Jílovec.
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/include/access/gist_private.h
Fix rescan logic in nodeCtescan.
commit : caf97eb72e2e08378aefdd8f75c10b73fd04172b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 19:01:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 19:01:23 -0400
The previous coding essentially assumed that nodes would be rescanned in
the same order they were initialized in; or at least that the "leader" of
a group of CTEscans would be rescanned before any others were required to
execute. Unfortunately, that isn't even a little bit true. It's possible
to devise queries in which the leader isn't rescanned until other CTEscans
on the same CTE have run to completion, or even in which the leader never
gets a rescan call at all.
The fix makes the leader specially responsible only for initial creation
and final destruction of the tuplestore; rescan resets are now a
symmetrically shared responsibility. This means that we might reset the
tuplestore multiple times when restarting a plan subtree containing
multiple CTEscans; but resetting an already-empty tuplestore is cheap
enough that that doesn't seem like a problem.
Per report from Adam Mackler; the new regression test cases are based on
his example query.
Back-patch to 8.4 where CTE scans were introduced.
M src/backend/executor/nodeCtescan.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Disallow extensions from owning the schema they are assigned to.
commit : 82634a88d1ba2fdc3308d589b0b8f3bfdbd880f1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 11:27:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 11:27:00 -0400
This situation creates a dependency loop that confuses pg_dump and probably
other things. Moreover, since the mental model is that the extension
"contains" schemas it owns, but "is contained in" its extschema (even
though neither is strictly true), having both true at once is confusing for
people too. So prevent the situation from being set up.
Reported and patched by Thom Brown. Back-patch to 9.1 where extensions
were added.
M src/backend/commands/extension.c
Resurrect the "last ditch" code path in join_search_one_level().
commit : 43ccd309cbf4e9b09ac59130c9b31a1c58a9ff2d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 00:07:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Aug 2012 00:07:15 -0400
This essentially reverts commit e54b10a62db2991235fe800c629baef4531a6d67,
in which I'd decided that the "last ditch" join logic was useless. The
folly of that is now exposed by a report from Pavel Stehule: although the
function should always find at least one join in a self-contained join
problem, it can still fail to do so in a sub-problem created by artificial
from_collapse_limit or join_collapse_limit constraints. Adjust the
comments to describe this, and simplify the code a bit to match the new
coding of the earlier loop in the function.
I'm not terribly happy about this: I still subscribe to the opinion stated
in the previous commit message that the "last ditch" code can obscure logic
bugs elsewhere. But the alternative seems to be to complicate the earlier
tests for does-this-relation-have-a-join-clause to the point where they can
tell whether the join clauses link outside the current join sub-problem.
And that looks messy, slow, and possibly a source of bugs in itself.
In any case, now is not the time to be inserting experimental code into
9.2, so let's just go back to the time-tested solution.
M src/backend/optimizer/path/joinrels.c
Stamp 9.2beta4.
commit : d5bcb33603a8ef1ac7779ff0e7d4550ce522673e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:38:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:38:49 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Update release notes for 9.1.5, 9.0.9, 8.4.13, 8.3.20.
commit : 333a54a584c6f85d586ea0ee36013c1506892dd6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:24:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:24:11 -0400
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
Prevent access to external files/URLs via contrib/xml2's xslt_process().
commit : 2ec75967d9ddd20378e03a5e7c46cb126972747c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:28:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:28:37 -0400
libxslt offers the ability to read and write both files and URLs through
stylesheet commands, thus allowing unprivileged database users to both read
and write data with the privileges of the database server. Disable that
through proper use of libxslt's security options.
Also, remove xslt_process()'s ability to fetch documents and stylesheets
from external files/URLs. While this was a documented "feature", it was
long regarded as a terrible idea. The fix for CVE-2012-3489 broke that
capability, and rather than expend effort on trying to fix it, we're just
going to summarily remove it.
While the ability to write as well as read makes this security hole
considerably worse than CVE-2012-3489, the problem is mitigated by the fact
that xslt_process() is not available unless contrib/xml2 is installed,
and the longstanding warnings about security risks from that should have
discouraged prudent DBAs from installing it in security-exposed databases.
Reported and fixed by Peter Eisentraut.
Security: CVE-2012-3488
M contrib/xml2/expected/xml2.out
M contrib/xml2/expected/xml2_1.out
M contrib/xml2/sql/xml2.sql
M contrib/xml2/xslt_proc.c
M doc/src/sgml/xml2.sgml
Prevent access to external files/URLs via XML entity references.
commit : aa2bc1f23f84924da20551a7338c0aaa743d490d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:25:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 18:25:39 -0400
xml_parse() would attempt to fetch external files or URLs as needed to
resolve DTD and entity references in an XML value, thus allowing
unprivileged database users to attempt to fetch data with the privileges
of the database server. While the external data wouldn't get returned
directly to the user, portions of it could be exposed in error messages
if the data didn't parse as valid XML; and in any case the mere ability
to check existence of a file might be useful to an attacker.
The ideal solution to this would still allow fetching of references that
are listed in the host system's XML catalogs, so that documents can be
validated according to installed DTDs. However, doing that with the
available libxml2 APIs appears complex and error-prone, so we're not going
to risk it in a security patch that necessarily hasn't gotten wide review.
So this patch merely shuts off all access, causing any external fetch to
silently expand to an empty string. A future patch may improve this.
In HEAD and 9.2, also suppress warnings about undefined entities, which
would otherwise occur as a result of not loading referenced DTDs. Previous
branches don't show such warnings anyway, due to different error handling
arrangements.
Credit to Noah Misch for first reporting the problem, and for much work
towards a solution, though this simplistic approach was not his preference.
Also thanks to Daniel Veillard for consultation.
Security: CVE-2012-3489
M src/backend/utils/adt/xml.c
M src/test/regress/expected/xml.out
M src/test/regress/expected/xml_1.out
M src/test/regress/sql/xml.sql
Translation updates
commit : 2152001773ecddb838b4c7566e332dd184e7d769
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Aug 2012 16:37:40 -0400
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Aug 2012 16:37:40 -0400
M src/backend/po/es.po
M src/backend/po/fr.po
M src/backend/po/ja.po
M src/backend/po/ru.po
M src/bin/initdb/po/es.po
M src/bin/initdb/po/ja.po
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_basebackup/po/es.po
M src/bin/pg_basebackup/po/fr.po
M src/bin/pg_basebackup/po/ja.po
A src/bin/pg_basebackup/po/ru.po
M src/bin/pg_config/po/es.po
M src/bin/pg_config/po/ja.po
M src/bin/pg_controldata/po/es.po
M src/bin/pg_controldata/po/ja.po
M src/bin/pg_ctl/po/es.po
M src/bin/pg_ctl/po/ja.po
M src/bin/pg_dump/po/es.po
M src/bin/pg_dump/po/ja.po
M src/bin/pg_dump/po/ru.po
M src/bin/pg_resetxlog/po/es.po
M src/bin/pg_resetxlog/po/ja.po
M src/bin/psql/po/es.po
M src/bin/psql/po/ja.po
M src/bin/scripts/po/es.po
M src/bin/scripts/po/ja.po
M src/interfaces/ecpg/preproc/po/es.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/ja.po
M src/pl/plperl/po/ja.po
M src/pl/plpgsql/src/po/es.po
M src/pl/plpgsql/src/po/ja.po
M src/pl/plpython/po/es.po
M src/pl/plpython/po/fr.po
M src/pl/plpython/po/ja.po
M src/pl/plpython/po/ru.po
In documentation, change "recommendable" to "recommended", per consultation with word definitions.
commit : 30f891151ed63db9434170aa17da8f4179ae4fb0
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Aug 2012 12:36:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Aug 2012 12:36:34 -0400
Backpatch to 9.2.
M doc/src/sgml/charset.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/manage-ag.sgml
M doc/src/sgml/passwordcheck.sgml
M doc/src/sgml/queries.sgml
Update time zone data files to tzdata release 2012e.
commit : dabbd3ee4174a1ca9458a3b387840a9571089a18
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 10:54:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Aug 2012 10:54:30 -0400
DST law changes in Morocco; Tokelau has relocated to the other side of
the International Date Line; and apparently Olson had Tokelau's GMT
offset wrong by an hour even before that.
There are also a large number of non-significant changes in this update.
Upstream took the opportunity to remove trailing whitespace, and the
SCCS-style version numbers on the individual files are gone too.
M src/timezone/data/africa
M src/timezone/data/antarctica
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/backward
M src/timezone/data/etcetera
M src/timezone/data/europe
M src/timezone/data/factory
M src/timezone/data/iso3166.tab
M src/timezone/data/leapseconds
M src/timezone/data/northamerica
M src/timezone/data/pacificnew
M src/timezone/data/solar87
M src/timezone/data/solar88
M src/timezone/data/solar89
M src/timezone/data/southamerica
M src/timezone/data/systemv
M src/timezone/data/yearistype.sh
M src/timezone/data/zone.tab
Add link from COPY ref page to psql \copy.
commit : ce36ecda518397122045e1a0953c465446b19d47
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Aug 2012 13:51:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Aug 2012 13:51:22 -0400
Jeff Janes
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/psql-ref.sgml
Fix dependencies generated during ALTER TABLE ADD CONSTRAINT USING INDEX.
commit : ca07d7ebe04de9225e7f14c8504539869c7e3ff0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Aug 2012 12:51:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Aug 2012 12:51:30 -0400
This command generated new pg_depend entries linking the index to the
constraint and the constraint to the table, which match the entries made
when a unique or primary key constraint is built de novo. However, it did
not bother to get rid of the entries linking the index directly to the
table. We had considered the issue when the ADD CONSTRAINT USING INDEX
patch was written, and concluded that we didn't need to get rid of the
extra entries. But this is wrong: ALTER COLUMN TYPE wasn't expecting such
redundant dependencies to exist, as reported by Hubert Depesz Lubaczewski.
On reflection it seems rather likely to break other things as well, since
there are many bits of code that crawl pg_depend for one purpose or
another, and most of them are pretty naive about what relationships they're
expecting to find. Fortunately it's not that hard to get rid of the extra
dependency entries, so let's do that.
Back-patch to 9.1, where ALTER TABLE ADD CONSTRAINT USING INDEX was added.
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/include/catalog/index.h
Prevent pg_upgrade from crashing if it can't write to the current directory.
commit : e2af6537b5c81d9354e08896012cdd5c38bea311
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 10 Aug 2012 17:14:47 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 10 Aug 2012 17:14:47 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/util.c
Fix upper limit of superuser_reserved_connections, add limit for wal_senders
commit : 63e719ec511f99eeb4f237366ef633cd264e40da
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 10 Aug 2012 14:49:03 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 10 Aug 2012 14:49:03 +0200
Should be limited to the maximum number of connections excluding
autovacuum workers, not including.
Add similar check for max_wal_senders, which should never be higher than
max_connections.
M doc/src/sgml/config.sgml
M src/backend/postmaster/postmaster.c
Turn off WalSender keepalives by default, users can enable if desired
commit : 86ece4bff648364ece3cf03c0e7bfbe9fb3fc8cd
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 9 Aug 2012 17:06:47 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 9 Aug 2012 17:06:47 +0100
M src/backend/replication/walsender.c
M src/include/replication/walsender_private.h
Ensure all replication message info is available and correct via WalRcv
commit : 6a2cbe12358d3e3c356d863c8fc40c5f8daadb2a
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 9 Aug 2012 17:03:10 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 9 Aug 2012 17:03:10 +0100
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/include/replication/walreceiver.h
Force archive_status of .done for xlogs created by dearchival/replication. This prevents spurious attempts to archive xlog files after promotion of standby, a bug introduced by cascading replication patch in 9.2.
commit : 6f4b8a4f4f7a2d683ff79ab59d3693714b965e3d
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 23:58:49 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 23:58:49 +0100
Fujii Masao, simplified and extended to cover streaming by Simon Riggs
M src/backend/access/transam/xlog.c
M src/backend/replication/walreceiver.c
M src/include/access/xlog_internal.h
Fix typo in comment
commit : 7c055d64a6c541f8480abd5833321e1661e10bce
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 8 Aug 2012 17:34:20 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 8 Aug 2012 17:34:20 -0400
M src/backend/commands/tablecmds.c
Doc correction to point out that 9.2+ can overwrite pg_xlog files.
commit : cc23119af5c6142a81af07ce7dae339b9869e725
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 22:36:55 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 22:36:55 +0100
Noted by Noah Misch, patch by Fujii Masao
M doc/src/sgml/backup.sgml
Fix minor bug in XLogFileRead() that accidentally worked. Cascading replication copied the incoming file into pg_xlog but didn't set path correctly, so the first attempt to open file failed causing it to loop around and look for file in pg_xlog. So the earlier coding worked, but accidentally rather than by design.
commit : df09dbbcaa546350a78ce9f096b872fa3a28cafb
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 21:28:41 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 8 Aug 2012 21:28:41 +0100
Spotted by Fujii Masao, fix by Fujii Masao and Simon Riggs
M src/backend/access/transam/xlog.c
Update isolation tests' README file.
commit : 4bf70f22296596a1b67eac92aa6a5fc367b37cb3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Aug 2012 12:02:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Aug 2012 12:02:11 -0400
The directions explaining about running the prepared-transactions test
were not updated in commit ae55d9fbe3871a5e6309d9b91629f1b0ff2b8cba.
M src/test/isolation/README
Fix TwoPhaseGetDummyBackendId().
commit : 5cf2307c98f6daeac3d42e74f4e2d46ab3bf0a80
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Aug 2012 11:52:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Aug 2012 11:52:06 -0400
This was broken in commit ed0b409d22346b1b027a4c2099ca66984d94b6dd,
which revised the GlobalTransactionData struct to not include the
associated PGPROC as its first member, but overlooked one place where
a cast was used in reliance on that equivalence.
The most effective way of fixing this seems to be to create a new function
that looks up the GlobalTransactionData struct given the XID, and make
both TwoPhaseGetDummyBackendId and TwoPhaseGetDummyProc rely on that.
Per report from Robert Ross.
M src/backend/access/transam/twophase.c
Fix pg_upgrade file share violation on Windows created by the commit 4741e9afb93f0d769655b2d18c2b73b86f281010. This was done by adding an optional second log file parameter to exec_prog(), and closing and reopening the log file between system() calls.
commit : 7d947ec82ac8a7d6a6ce8acf08067dd69098d6cd
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 7 Aug 2012 13:10:44 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 7 Aug 2012 13:10:44 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
Fix redundant wording
commit : 4d06811ef9ed2593292f859292f61d10b38be352
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 7 Aug 2012 11:02:53 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 7 Aug 2012 11:02:53 -0400
M src/backend/utils/adt/misc.c
fsync backup_label after pg_start_backup()
commit : 393b07004e2e9bac6d3b7cad2c4d555516237d90
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 7 Aug 2012 16:20:32 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 7 Aug 2012 16:20:32 +0100
Dave Kerr
M src/backend/access/transam/xlog.c
Typo fixes for previous commit.
commit : 73a7a6460ee47c13c5bea99c16b4e8756fb85dec
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Aug 2012 16:12:17 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Aug 2012 16:12:17 -0400
Noted by Thom Brown.
M doc/src/sgml/datatype.sgml
Warn more vigorously about the non-transactional behavior of sequences.
commit : e022ed91d73cf1db1951f417b33a9a15a35bdd9e
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Aug 2012 15:18:00 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Aug 2012 15:18:00 -0400
Craig Ringer, edited fairly heavily by me
M doc/src/sgml/datatype.sgml
M doc/src/sgml/func.sgml
Make strings identical
commit : da003a5ab1197a39c62d304bd0fc5b4e21ec6b0b
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 6 Aug 2012 12:45:08 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 6 Aug 2012 12:45:08 -0400
M src/backend/utils/adt/rangetypes.c
Complain with proper error message if streaming stops prematurely
commit : 0b4660b539821ccdef99e43e79deb023a68db34e
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 6 Aug 2012 13:53:46 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 6 Aug 2012 13:53:46 +0200
In particular, with a controlled shutdown of the master, pg_basebackup
with streaming log could terminate without an error message, even though
the backup is not consistent.
In passing, fix a few cases where walfile wasn't properly set to -1 after
closing.
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
Perform conversion from Python unicode to string/bytes object via UTF-8.
commit : d9c77e249339ec3a49731be55ff22bbdd5a1fcf0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 6 Aug 2012 13:02:15 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 6 Aug 2012 13:02:15 +0300
We used to convert the unicode object directly to a string in the server
encoding by calling Python's PyUnicode_AsEncodedString function. In other
words, we used Python's routines to do the encoding. However, that has a
few problems. First of all, it required keeping a mapping table of Python
encoding names and PostgreSQL encodings. But the real killer was that Python
doesn't support EUC_TW and MULE_INTERNAL encodings at all.
Instead, convert the Python unicode object to UTF-8, and use PostgreSQL's
encoding conversion functions to convert from UTF-8 to server encoding. We
were already doing the same in the other direction in PLyUnicode_FromString,
so this is more consistent, too.
Note: This makes SQL_ASCII to behave more leniently. We used to map
SQL_ASCII to Python's 'ascii', which on Python means strict 7-bit ASCII
only, so you got an error if the python string contained anything but pure
ASCII. You no longer get an error; you get the UTF-8 representation of the
string instead.
Backpatch to 9.0, where these conversions were introduced.
Jan Urbański
D src/pl/plpython/expected/plpython_unicode_3.out
M src/pl/plpython/plpy_util.c
Reword documentation for concurrent index rebuilds to be clearer.
commit : a411f7e770895b34035727bc44866e550cca892f
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 4 Aug 2012 10:35:37 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 4 Aug 2012 10:35:37 -0400
Backpatch to 9.1 and 9.2.
M doc/src/sgml/ref/create_index.sgml
Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input.
commit : 225fe68c19c7baf02aff9b2ea83027091f95ee38
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 17:39:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 17:39:45 -0400
DecodeInterval() failed to honor the "range" parameter (the special SQL
syntax for indicating which fields appear in the literal string) if the
time was signed. This seems inappropriate, so make it work like the
not-signed case. The inconsistency was introduced in my commit
f867339c0148381eb1d01f93ab5c79f9d10211de, which as noted in its log message
was only really focused on making SQL-compliant literals work per spec.
Including a sign here is not per spec, but if we're going to allow it
then it's reasonable to expect it to work like the not-signed case.
Also, remove bogus setting of tmask, which caused subsequent processing to
think that what had been given was a timezone and not an hh:mm(:ss) field,
thus confusing checks for redundant fields. This seems to be an aboriginal
mistake in Lockhart's commit 2cf1642461536d0d8f3a1cf124ead0eac04eb760.
Add regression test cases to illustrate the changed behaviors.
Back-patch as far as 8.4, where support for spec-compliant interval
literals was added.
Range problem reported and diagnosed by Amit Kapila, tmask problem by me.
M src/backend/utils/adt/datetime.c
M src/test/regress/expected/interval.out
M src/test/regress/sql/interval.sql
Add link to synchronous_commit variables in high availability docs.
commit : bf92fb6c2de488d94ac4ad6ec0f78e7f133efac5
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 16:33:09 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 16:33:09 -0400
Backpatch to 9.2
Erik Rijkers
M doc/src/sgml/high-availability.sgml
Improve underdocumented btree_xlog_delete_get_latestRemovedXid() code.
commit : 11de73b25dbeea012ae61e8f1dcf939f6b737286
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 15:41:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 15:41:23 -0400
As noted by Noah Misch, btree_xlog_delete_get_latestRemovedXid is
critically dependent on the assumption that it's examining a consistent
state of the database. This was undocumented though, so the
seemingly-unrelated check for no active HS sessions might be thought to be
merely an optional optimization. Improve comments, and add an explicit
check of reachedConsistency just to be sure.
This function returns InvalidTransactionId (thereby killing all HS
transactions) in several cases that are not nearly unlikely enough for my
taste. This commit doesn't attempt to fix those deficiencies, just
document them.
Back-patch to 9.2, not from any real functional need but just to keep the
branches more closely synced to simplify possible future back-patching.
M src/backend/access/nbtree/nbtxlog.c
In SPGiST replay, do conflict resolution before modifying the page.
commit : dd6947aae8cd05809f03c9aae1908f5c70f0dd7d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 15:22:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 3 Aug 2012 15:22:47 -0400
In yesterday's commit 962e0cc71e839c58fb9125fa85511b8bbb8bdbee, I added the
ResolveRecoveryConflictWithSnapshot call in the wrong place. I correctly
put it before spgRedoVacuumRedirect itself would modify the index page ---
but not before RestoreBkpBlocks, so replay of a record with a full-page
image would modify the page before kicking off any conflicting HS
transactions. Oops.
M src/backend/access/spgist/spgxlog.c
Document that trying to exceed temp_file_limit causes a query cancel.
commit : e7d9f26a6008c61ea388f1324176cf45b94e2337
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 15:15:27 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 15:15:27 -0400
Backpatch to 9.2.
M doc/src/sgml/config.sgml
Document that, for psql -c, only the result of the last command is returned, per report from Aleksey Tsalolikhin
commit : 91668fcc318cac9d980f076dee9258cd76904e9f
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 14:02:22 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 14:02:22 -0400
Backpatch to 9.2 and 9.1.
M doc/src/sgml/ref/psql-ref.sgml
In pg_upgrade, use pg_log() instead of prep_status() for newline-terminated messages, per suggestion from Tom.
commit : 51ec1d3d486fa4b88d3d9382a7699f980fcaec65
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 12:43:37 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 3 Aug 2012 12:43:37 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/util.c
Stamp 9.2beta3.
commit : f30b05b8a468d0240d18251dbf2907793da676ba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 18:23:20 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 18:23:20 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Translation updates
commit : 095bcf93a8cdf71b7809877a14f94c9cbf7c47fd
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 2 Aug 2012 23:01:01 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 2 Aug 2012 23:01:01 +0300
M src/backend/nls.mk
M src/backend/po/de.po
M src/backend/po/es.po
M src/backend/po/fr.po
A src/backend/po/pl.po
M src/backend/po/pt_BR.po
A src/backend/po/ru.po
M src/backend/po/zh_CN.po
M src/backend/po/zh_TW.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/cs.po
M src/bin/initdb/po/de.po
M src/bin/initdb/po/es.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/ja.po
A src/bin/initdb/po/pl.po
M src/bin/initdb/po/pt_BR.po
M src/bin/initdb/po/ro.po
M src/bin/initdb/po/ru.po
M src/bin/initdb/po/tr.po
M src/bin/initdb/po/zh_CN.po
M src/bin/pg_basebackup/po/fr.po
M src/bin/pg_config/nls.mk
A src/bin/pg_config/po/cs.po
M src/bin/pg_config/po/de.po
M src/bin/pg_config/po/es.po
M src/bin/pg_config/po/fr.po
M src/bin/pg_config/po/ja.po
A src/bin/pg_config/po/pl.po
M src/bin/pg_config/po/pt_BR.po
M src/bin/pg_config/po/ru.po
M src/bin/pg_controldata/nls.mk
M src/bin/pg_controldata/po/de.po
M src/bin/pg_controldata/po/es.po
M src/bin/pg_controldata/po/fr.po
M src/bin/pg_controldata/po/ja.po
A src/bin/pg_controldata/po/pl.po
M src/bin/pg_controldata/po/pt_BR.po
M src/bin/pg_controldata/po/ru.po
M src/bin/pg_controldata/po/tr.po
M src/bin/pg_ctl/nls.mk
A src/bin/pg_ctl/po/cs.po
M src/bin/pg_ctl/po/de.po
M src/bin/pg_ctl/po/es.po
M src/bin/pg_ctl/po/fr.po
M src/bin/pg_ctl/po/ja.po
A src/bin/pg_ctl/po/pl.po
M src/bin/pg_ctl/po/pt_BR.po
M src/bin/pg_ctl/po/ru.po
M src/bin/pg_dump/nls.mk
M src/bin/pg_dump/po/de.po
M src/bin/pg_dump/po/fr.po
A src/bin/pg_dump/po/ru.po
M src/bin/pg_resetxlog/nls.mk
A src/bin/pg_resetxlog/po/cs.po
M src/bin/pg_resetxlog/po/de.po
M src/bin/pg_resetxlog/po/es.po
M src/bin/pg_resetxlog/po/fr.po
M src/bin/pg_resetxlog/po/ja.po
A src/bin/pg_resetxlog/po/pl.po
M src/bin/pg_resetxlog/po/pt_BR.po
M src/bin/pg_resetxlog/po/ru.po
M src/bin/psql/nls.mk
M src/bin/psql/po/cs.po
M src/bin/psql/po/de.po
M src/bin/psql/po/es.po
M src/bin/psql/po/fr.po
A src/bin/psql/po/it.po
M src/bin/psql/po/ja.po
A src/bin/psql/po/pl.po
M src/bin/psql/po/pt_BR.po
A src/bin/psql/po/ru.po
M src/bin/psql/po/zh_TW.po
M src/bin/scripts/nls.mk
M src/bin/scripts/po/cs.po
M src/bin/scripts/po/de.po
M src/bin/scripts/po/es.po
M src/bin/scripts/po/fr.po
A src/bin/scripts/po/pl.po
M src/bin/scripts/po/pt_BR.po
A src/bin/scripts/po/ru.po
M src/interfaces/ecpg/ecpglib/nls.mk
A src/interfaces/ecpg/ecpglib/po/cs.po
M src/interfaces/ecpg/ecpglib/po/de.po
M src/interfaces/ecpg/ecpglib/po/es.po
M src/interfaces/ecpg/ecpglib/po/fr.po
A src/interfaces/ecpg/ecpglib/po/pl.po
M src/interfaces/ecpg/ecpglib/po/pt_BR.po
A src/interfaces/ecpg/ecpglib/po/ru.po
M src/interfaces/ecpg/preproc/nls.mk
A src/interfaces/ecpg/preproc/po/cs.po
M src/interfaces/ecpg/preproc/po/de.po
M src/interfaces/ecpg/preproc/po/es.po
M src/interfaces/ecpg/preproc/po/fr.po
A src/interfaces/ecpg/preproc/po/pl.po
M src/interfaces/ecpg/preproc/po/pt_BR.po
A src/interfaces/ecpg/preproc/po/ru.po
M src/interfaces/libpq/nls.mk
M src/interfaces/libpq/po/cs.po
M src/interfaces/libpq/po/de.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/fr.po
A src/interfaces/libpq/po/pl.po
M src/interfaces/libpq/po/pt_BR.po
M src/interfaces/libpq/po/ru.po
M src/interfaces/libpq/po/tr.po
M src/interfaces/libpq/po/zh_CN.po
M src/interfaces/libpq/po/zh_TW.po
M src/pl/plperl/nls.mk
A src/pl/plperl/po/cs.po
M src/pl/plperl/po/de.po
M src/pl/plperl/po/es.po
M src/pl/plperl/po/fr.po
A src/pl/plperl/po/pl.po
M src/pl/plperl/po/pt_BR.po
M src/pl/plperl/po/ro.po
A src/pl/plperl/po/ru.po
M src/pl/plperl/po/tr.po
M src/pl/plpgsql/src/nls.mk
A src/pl/plpgsql/src/po/cs.po
M src/pl/plpgsql/src/po/de.po
M src/pl/plpgsql/src/po/es.po
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/ja.po
M src/pl/plpgsql/src/po/pl.po
M src/pl/plpgsql/src/po/pt_BR.po
M src/pl/plpgsql/src/po/ro.po
A src/pl/plpgsql/src/po/ru.po
M src/pl/plpython/nls.mk
A src/pl/plpython/po/cs.po
M src/pl/plpython/po/de.po
M src/pl/plpython/po/es.po
M src/pl/plpython/po/fr.po
A src/pl/plpython/po/pl.po
M src/pl/plpython/po/pt_BR.po
M src/pl/plpython/po/ro.po
A src/pl/plpython/po/ru.po
M src/pl/tcl/nls.mk
A src/pl/tcl/po/cs.po
M src/pl/tcl/po/de.po
M src/pl/tcl/po/es.po
M src/pl/tcl/po/fr.po
A src/pl/tcl/po/pl.po
M src/pl/tcl/po/pt_BR.po
A src/pl/tcl/po/ru.po
Fix race conditions associated with SPGiST redirection tuples.
commit : 7f7c93f85f5fb7fa86c525e04f3de031f3dde794
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 15:34:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 15:34:21 -0400
The correct test for whether a redirection tuple is removable is whether
tuple's xid < RecentGlobalXmin, not OldestXmin; the previous coding
failed to protect index searches being done in concurrent transactions that
have no XID. This mirrors the recent fix in btree's page recycling logic
made in commit d3abbbebe52eb1e59e621c880ad57df9d40d13f2.
Also, WAL-log the newest XID of any removed redirection tuple on an index
page, and apply ResolveRecoveryConflictWithSnapshot during InHotStandby WAL
replay. This protects against concurrent Hot Standby transactions possibly
needing to see the redirection tuple(s).
Per my query of 2012-03-12 and subsequent discussion.
M src/backend/access/spgist/spgutils.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/include/access/spgist_private.h
Update release notes for libpq feature change.
commit : 87a237956860c05c6c0d64a7f443b338d99ee38e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 13:21:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 13:21:24 -0400
M doc/src/sgml/release-9.2.sgml
Replace libpq's "row processor" API with a "single row" mode.
commit : ea56ed9a1e2b5164b02f4a030fb327346612b2d9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 13:10:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 2 Aug 2012 13:10:36 -0400
After taking awhile to digest the row-processor feature that was added to
libpq in commit 92785dac2ee7026948962cd61c4cd84a2d052772, we've concluded
it is over-complicated and too hard to use. Leave the core infrastructure
changes in place (that is, there's still a row processor function inside
libpq), but remove the exposed API pieces, and instead provide a "single
row" mode switch that causes PQgetResult to return one row at a time in
separate PGresult objects.
This approach incurs more overhead than proper use of a row processor
callback would, since construction of a PGresult per row adds extra cycles.
However, it is far easier to use and harder to break. The single-row mode
still affords applications the primary benefit that the row processor API
was meant to provide, namely not having to accumulate large result sets in
memory before processing them. Preliminary testing suggests that we can
probably buy back most of the extra cycles by micro-optimizing construction
of the extra results, but that task will be left for another day.
Marko Kreen
M contrib/dblink/dblink.c
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/exports.txt
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-lobj.c
M src/interfaces/libpq/fe-protocol2.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
Add documentation cross-reference for JSON functions.
commit : f6fb9f103ff534193f4132e0c6a47bf441cfad42
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Aug 2012 00:41:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Aug 2012 00:41:45 -0400
Thom Brown
M doc/src/sgml/datatype.sgml
Fix WITH attached to a nested set operation (UNION/INTERSECT/EXCEPT).
commit : 3786b9b4668743b99e837fe276e14be1f1bdfde9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 31 Jul 2012 17:56:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 31 Jul 2012 17:56:27 -0400
Parse analysis neglected to cover the case of a WITH clause attached to an
intermediate-level set operation; it only handled WITH at the top level
or WITH attached to a leaf-level SELECT. Per report from Adam Mackler.
In HEAD, I rearranged the order of SelectStmt's fields to put withClause
with the other fields that can appear on non-leaf SelectStmts. In back
branches, leave it alone to avoid a possible ABI break for third-party
code.
Back-patch to 8.4 where WITH support was added.
M src/backend/parser/analyze.c
M src/backend/parser/parse_cte.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Fix syslogger so that log_truncate_on_rotation works in the first rotation.
commit : 63aba79c7f1f06422b22e2b44fdcb563bbc3f7a5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 31 Jul 2012 14:36:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 31 Jul 2012 14:36:58 -0400
In the original coding of the log rotation stuff, we did not bother to make
the truncation logic work for the very first rotation after postmaster
start (or after a syslogger crash and restart). It just always appended
in that case. It did not seem terribly important at the time, but we've
recently had two separate complaints from people who expected it to work
unsurprisingly. (Both users tend to restart the postmaster about as often
as a log rotation is configured to happen, which is maybe not typical use,
but still...) Since the initial log file is opened in the postmaster,
fixing this requires passing down some more state to the syslogger child
process.
It's always been like this, so back-patch to all supported branches.
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
pg_basebackup: stylistic adjustments
commit : 65f33352494cccf70ab512c5c6d1637b31a13364
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 31 Jul 2012 10:09:16 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 31 Jul 2012 10:09:16 -0400
The most user-visible part of this is to change the long options
--statusint and --noloop to --status-interval and --no-loop,
respectively, per discussion.
Also, consistently enclose file names in double quotes, per our
conventions; and consistently use the term "transaction log file" to
talk about WAL segments. (Someday we may need to go over this
terminology and make it consistent across the whole source code.)
Finally, reflow the code to better fit in 80 columns, and have pgindent
fix it up some more.
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
Fix memory and file descriptor leaks in pg_receivexlog/pg_basebackup
commit : 776bdc4c5c019a9556a6622a01a406c6c0fec4c9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 31 Jul 2012 09:00:23 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 31 Jul 2012 09:00:23 -0400
When the internal loop mode was added, freeing memory and closing
filedescriptors before returning became important, and a few cases
in the code missed that.
This is a backpatch of commit 058a050e to the 9.2 branch, which seems to
have been neglected (in error, because the bugs it fixes were introduced
in commit 16282ae6 which is present in both master and 9.2).
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
Now that the diskchecker.pl author has updated the download link on his website, revert the separate link to the download git repository.
commit : 99dd2a390f8b0129092fe62a303b0cd1df547691
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 30 Jul 2012 10:15:57 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 30 Jul 2012 10:15:57 -0400
Backpatch from 9.0 to current.
M doc/src/sgml/wal.sgml
Improve reporting of error situations in find_other_exec().
commit : 62d69045dd1c41bbcd8a7f78c7a4170e8381ca76
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jul 2012 19:31:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jul 2012 19:31:19 -0400
This function suppressed any stderr output from the called program, which
is unnecessary in the normal case and unhelpful in error cases. It also
gave a rather opaque message along the lines of "fgets failure: Success"
in case the called program failed to return anything on stdout. Since
we've seen multiple reports of people not understanding what's wrong when
pg_ctl reports this, improve the message.
Back-patch to all active branches.
M src/port/exec.c
Update doc mention of diskchecker.pl to add URL for script; retain URL for description.
commit : 9ebe82bd48e63081382641027dd0f16b00bca25f
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 21:25:26 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 21:25:26 -0400
Patch to 9.0 and later, where script is mentioned.
M doc/src/sgml/wal.sgml
Document that the pg_upgrade user of rsync might want to skip some files, like postmaster.pid.
commit : 54e3c4af2340bcfbd203e60c05b5e2bb9ad1108d
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 14:30:07 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 14:30:07 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Only allow autovacuum to be auto-canceled by a directly blocked process.
commit : 07399f447a6d8851c0b067d691394adf7dcca56c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Jul 2012 14:29:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Jul 2012 14:29:32 -0400
In the original coding of the autovacuum cancel feature, commit
acac68b2bcae818bc8803b8cb8cbb17eee8d5e2b, an autovacuum process was
considered a target for cancellation if it was found to hard-block any
process examined in the deadlock search. This patch tightens the test so
that the autovacuum must directly hard-block the current process. This
should make the behavior more predictable in general, and in particular
it ensures that an autovacuum will not be canceled with less than
deadlock_timeout grace period. In the old coding, it was possible for an
autovacuum to be canceled almost instantly, given unfortunate timing of two
or more other processes' lock attempts.
This also justifies the logging methodology in the recent commit
d7318d43d891bd63e82dcfc27948113ed7b1db80; without this restriction, that
patch isn't providing enough information to see the connection of the
canceling process to the autovacuum. Like that one, patch all the way
back.
M src/backend/storage/lmgr/deadlock.c
Log a better message when canceling autovacuum.
commit : a5bca2487244e48de1ece92d4c6a1ff330d5333c
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jul 2012 09:18:32 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jul 2012 09:18:32 -0400
The old message was at DEBUG2, so typically it didn't show up in the
log at all. As a result, in most cases where autovacuum was canceled,
the only information that was logged was the table being vacuumed,
with no indication as to what problem caused the cancel. Crank up
the level to LOG and add some more details to assist with debugging.
Back-patch all the way, per discussion on pgsql-hackers.
M src/backend/storage/lmgr/proc.c
Simplify pg_upgrade's handling when returning directory listings.
commit : ba98239dcacb276929e5447473dcaa713e643913
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 06:22:06 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jul 2012 06:22:06 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Fix longstanding crash-safety bug with newly-created-or-reset sequences.
commit : a4a7eb37d4c067f3d8d76338cda1bb33722e50ec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Jul 2012 17:40:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Jul 2012 17:40:43 -0400
If a crash occurred immediately after the first nextval() call for a serial
column, WAL replay would restore the sequence to a state in which it
appeared that no nextval() had been done, thus allowing the first sequence
value to be returned again by the next nextval() call; as reported in
bug #6748 from Xiangming Mei.
More generally, the problem would occur if an ALTER SEQUENCE was executed
on a freshly created or reset sequence. (The manifestation with serial
columns was introduced in 8.2 when we added an ALTER SEQUENCE OWNED BY step
to serial column creation.) The cause is that sequence creation attempted
to save one WAL entry by writing out a WAL record that made it appear that
the first nextval() had already happened (viz, with is_called = true),
while marking the sequence's in-database state with log_cnt = 1 to show
that the first nextval() need not emit a WAL record. However, ALTER
SEQUENCE would emit a new WAL entry reflecting the actual in-database state
(with is_called = false). Then, nextval would allocate the first sequence
value and set is_called = true, but it would trust the log_cnt value and
not emit any WAL record. A crash at this point would thus restore the
sequence to its post-ALTER state, causing the next nextval() call to return
the first sequence value again.
To fix, get rid of the idea of logging an is_called status different from
reality. This means that the first nextval-driven WAL record will happen
at the first nextval call not the second, but the marginal cost of that is
pretty negligible. In addition, make sure that ALTER SEQUENCE resets
log_cnt to zero in any case where it touches sequence parameters that
affect future nextval results. This will result in some user-visible
changes in the contents of a sequence's log_cnt column, as reflected in the
patch's regression test changes; but no application should be depending on
that anyway, since it was already true that log_cnt changes rather
unpredictably depending on checkpoint timing.
In addition, make some basically-cosmetic improvements to get rid of
sequence.c's undesirable intimacy with page layout details. It was always
really trying to WAL-log the contents of the sequence tuple, so we should
have it do that directly using a HeapTuple's t_data and t_len, rather than
backing into it with some magic assumptions about where the tuple would be
on the sequence's page.
Back-patch to all supported branches.
M src/backend/commands/sequence.c
M src/test/regress/expected/sequence.out
M src/test/regress/expected/sequence_1.out
Document that pg_basebackup will create its output directory
commit : 7332aa6c79f857248fb74dc8f982bf4562dfc194
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 25 Jul 2012 22:00:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 25 Jul 2012 22:00:00 +0300
M doc/src/sgml/ref/pg_basebackup.sgml
Add translator comments to module names
commit : 408e82c23479dec38f0ea3f32c24090a9d9aea89
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jul 2012 00:02:49 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jul 2012 00:02:49 -0400
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump_sort.c
Change syntax of new CHECK NO INHERIT constraints
commit : 68043258ac54b09565e9bebadb16214d9b6df933
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 24 Jul 2012 15:49:54 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 24 Jul 2012 15:49:54 -0400
The initially implemented syntax, "CHECK NO INHERIT (expr)" was not
deemed very good, so switch to "CHECK (expr) NO INHERIT" instead. This
way it looks similar to SQL-standards compliant constraint attribute.
Backport to 9.2 where the new syntax and feature was introduced.
Per discussion.
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/release-9.2.sgml
M src/backend/commands/typecmds.c
M src/backend/parser/gram.y
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/inherit.out
M src/test/regress/input/constraints.source
M src/test/regress/output/constraints.source
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/inherit.sql
Fix name collision between concurrent regression tests.
commit : d86fb72c5c7ebf71e238ac87daa0c1f8043a1717
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 22 Jul 2012 00:01:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 22 Jul 2012 00:01:26 -0400
Commit f5bcd398addcbeb785f0513cf28cba5d1ecd2c8a introduced a test using
a table named "circles" in inherit.sql. Unfortunately, the concurrently
executed constraints test was already using that table name, so the
parallel regression tests would sometimes fail. Rename table to dodge
the problem. Per buildfarm.
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Account for SRFs in targetlists in planner rowcount estimates.
commit : 641054ad7882a701cf3ac4c5666f6ee59103d3a7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 21 Jul 2012 17:45:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 21 Jul 2012 17:45:15 -0400
We made use of the ROWS estimate for set-returning functions used in FROM,
but not for those used in SELECT targetlists; which is a bit of an
oversight considering there are common usages that require the latter
approach. Improve that. (I had initially thought it might be worth
folding this into cost_qual_eval, but after investigation concluded that
that wouldn't be very helpful, so just do it separately.) Per complaint
from David Johnston.
Back-patch to 9.2, but not further, for fear of destabilizing plan choices
in existing releases.
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/clauses.c
M src/include/optimizer/clauses.h
M src/include/optimizer/planner.h
Remove now unneeded results file for disabled prepared transactions case.
commit : c6c6f2192dfd7d4e77bd00b698feef284ddabfaa
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 20 Jul 2012 16:28:24 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 20 Jul 2012 16:28:24 -0400
D src/test/isolation/expected/prepared-transactions_1.out
Remove prepared transactions from main isolation test schedule.
commit : a8f0f98f9b9332f6dcd5bcbc0491de4410868622
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 20 Jul 2012 16:02:51 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 20 Jul 2012 16:02:51 -0400
There is no point in running this test when prepared transactions are disabled,
which is the default. New make targets that include the test are provided. This
will save some useless waste of cycles on buildfarm machines.
Backpatch to 9.1 where these tests were introduced.
M src/test/isolation/Makefile
M src/test/isolation/isolation_schedule
pg_dump: Simplify mkdir() error checking
commit : 1247ebffba13478184b0f09dfb7c474ff2ae1475
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 20 Jul 2012 22:34:11 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 20 Jul 2012 22:34:11 +0300
mkdir() can check for errors itself. We don't need to code that
ourselves again.
M src/bin/pg_dump/pg_backup_directory.c
connoinherit may be true only for CHECK constraints
commit : d721f208afeac72a943dc88d072ff3df05f53fef
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 20 Jul 2012 12:33:34 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 20 Jul 2012 12:33:34 -0400
The code was setting it true for other constraints, which is
bogus. Doing so caused bogus catalog entries for such constraints, and
in particular caused an error to be raised when trying to drop a
constraint of types other than CHECK from a table that has children,
such as reported in bug #6712.
In 9.2, additionally ignore connoinherit=true for other constraint
types, to avoid having to force initdb; existing databases might already
contain bogus catalog entries.
Includes a catversion bump (in HEAD only).
Bug report from Miroslav Šulc
Analysis from Amit Kapila and Noah Misch; Amit also contributed the patch.
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Fix whole-row Var evaluation to cope with resjunk columns (again).
commit : d7991a13d86e2b94b0ca3d087fdad8a840ebf025
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 20 Jul 2012 13:09:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 20 Jul 2012 13:09:10 -0400
When a whole-row Var is reading the result of a subquery, we need it to
ignore any "resjunk" columns that the subquery might have evaluated for
GROUP BY or ORDER BY purposes. We've hacked this area before, in commit
68e40998d058c1f6662800a648ff1e1ce5d99cba, but that fix only covered
whole-row Vars of named composite types, not those of RECORD type; and it
was mighty klugy anyway, since it just assumed without checking that any
extra columns in the result must be resjunk. A proper fix requires getting
hold of the subquery's targetlist so we can actually see which columns are
resjunk (whereupon we can use a JunkFilter to get rid of them). So bite
the bullet and add some infrastructure to make that possible.
Per report from Andrew Dunstan and additional testing by Merlin Moncure.
Back-patch to all supported branches. In 8.3, also back-patch commit
292176a118da6979e5d368a4baf27f26896c99a5, which for some reason I had
not done at the time, but it's a prerequisite for this change.
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/include/nodes/execnodes.h
M src/include/nodes/nodes.h
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
Rethink checkpointer's fsync-request table representation.
commit : e3981da37a2f071951e54d74d45ad47733cc74a6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Jul 2012 19:28:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Jul 2012 19:28:27 -0400
Instead of having one hash table entry per relation/fork/segment, just have
one per relation, and use bitmapsets to represent which specific segments
need to be fsync'd. This eliminates the need to scan the whole hash table
to implement FORGET_RELATION_FSYNC, which fixes the O(N^2) behavior
recently demonstrated by Jeff Janes for cases involving lots of TRUNCATE or
DROP TABLE operations during a single checkpoint cycle. Per an idea from
Robert Haas.
(FORGET_DATABASE_FSYNC still sucks, but since dropping a database is a
pretty expensive operation anyway, we'll live with that.)
In passing, improve the delayed-unlink code: remove the pass over the list
in mdpreckpt, since it wasn't doing anything for us except supporting a
useless Assert in mdpostckpt, and fix mdpostckpt so that it will absorb
fsync requests every so often when clearing a large backlog of deletion
requests.
M src/backend/storage/smgr/md.c
Send only one FORGET_RELATION_FSYNC request when dropping a relation.
commit : 2bc30516c728fddf791ec508056a9c92c65025af
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Jul 2012 13:07:41 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Jul 2012 13:07:41 -0400
We were sending one per fork, but a little bit of refactoring allows us
to send just one request with forknum == InvalidForkNumber. This not only
reduces pressure on the shared-memory request queue, but saves repeated
traversals of the checkpointer's hash table.
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
Refactor the way code is shared between some range type functions.
commit : 79c49131fa59069c70bda107c082199e9f8bd880
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 18 Jul 2012 22:34:06 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 18 Jul 2012 22:34:06 +0300
Functions like range_eq, range_before etc. are exposed at the SQL-level, but
they're also used internally by the GiST consistent support function. The
code sharing was done by a hack, TrickFunctionCall2, which relied on the
knowledge that all the functions used fn_extra the same way. This commit
splits the functions into internal versions that take a TypeCacheEntry as
argument, and thin wrappers to expose the functions at the SQL-level. The
internal versions can then be called directly and in a less hacky way from
the GiST consistent function.
This is just cosmetic, but backpatch to 9.2 anyway, to avoid having a
different version of this code in the 9.2 branch. That would make
backpatching fixes in this area more difficult.
Alexander Korotkov
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/utils/rangetypes.h
Fix statistics breakage from bgwriter/checkpointer process split.
commit : 1e9326d6a3efcb5648a85c1653cc263bc787efa0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 15:40:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 15:40:35 -0400
ForwardFsyncRequest() supposed that it could only be called in regular
backends, which used to be true; but since the splitup of bgwriter and
checkpointer, it is also called in the bgwriter. We do not want to count
such calls in pg_stat_bgwriter.buffers_backend statistics, so fix things
so that they aren't.
(It's worth noting here that this implies an alarmingly large increase in
the expected amount of cross-process fsync request traffic, which may well
mean that the process splitup was not such a hot idea.)
M src/backend/postmaster/checkpointer.c
Fix management of pendingOpsTable in auxiliary processes.
commit : d843589e5ab361dd4738dab5c9016e704faf4153
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 15:28:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 15:28:17 -0400
mdinit() was misusing IsBootstrapProcessingMode() to decide whether to
create an fsync pending-operations table in the current process. This led
to creating a table not only in the startup and checkpointer processes as
intended, but also in the bgwriter process, not to mention other auxiliary
processes such as walwriter and walreceiver. Creation of the table in the
bgwriter is fatal, because it absorbs fsync requests that should have gone
to the checkpointer; instead they just sit in bgwriter local memory and are
never acted on. So writes performed by the bgwriter were not being fsync'd
which could result in data loss after an OS crash. I think there is no
live bug with respect to walwriter and walreceiver because those never
perform any writes of shared buffers; but the potential is there for
future breakage in those processes too.
To fix, make AuxiliaryProcessMain() export the current process's
AuxProcType as a global variable, and then make mdinit() test directly for
the types of aux process that should have a pendingOpsTable. Having done
that, we might as well also get rid of the random bool flags such as
am_walreceiver that some of the aux processes had grown. (Note that we
could not have fixed the bug by examining those variables in mdinit(),
because it's called from BaseInit() which is run by AuxiliaryProcessMain()
before entering any of the process-type-specific code.)
Back-patch to 9.2, where the problem was introduced by the split-up of
bgwriter and checkpointer processes. The bogus pendingOpsTable exists
in walwriter and walreceiver processes in earlier branches, but absent
any evidence that it causes actual problems there, I'll leave the older
branches alone.
M src/backend/access/transam/xlog.c
M src/backend/bootstrap/bootstrap.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/walwriter.c
M src/backend/replication/walreceiver.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/smgr/md.c
M src/include/bootstrap/bootstrap.h
M src/include/miscadmin.h
M src/include/replication/walreceiver.h
Get rid of useless global variable in pg_upgrade.
commit : ebd9e26daa3df6518e3d403ef94a86e33168eae3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 01:23:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 01:23:16 -0400
Since the scandir() emulation was taken out of pg_upgrade, there's
no longer any need for scandir_file_pattern to exist as a global
variable. Replace it with a local in the one remaining function
that was making use of it.
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Improve pg_upgrade's load_directory() function.
commit : 3d929dc7b8e982f12c62fecba7d5122bb22fa497
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 01:13:25 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 18 Jul 2012 01:13:25 -0400
Error out on out-of-memory, rather than returning -1, which the sole
existing caller wasn't checking for anyway. There doesn't seem to be
any use-case for making the caller check for failure here.
Detect failure return from readdir().
Use a less platform-dependent method of calculating the entrysize.
It's possible, but not yet confirmed, that this explains bug #6733,
in which Mike Wilson reports a pg_upgrade crash that did not occur
in 9.1. (Note that load_directory is effectively new code in 9.2,
at least on platforms that have scandir().)
Fix up comments, avoid uselessly using two counters, reduce the number
of realloc calls to something sane.
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/util.c
Improve coding around the fsync request queue.
commit : 4abcce8cabe3845140f9a7cd8470e27e44f208bb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 17 Jul 2012 16:55:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 17 Jul 2012 16:55:44 -0400
In all branches back to 8.3, this patch fixes a questionable assumption in
CompactCheckpointerRequestQueue/CompactBgwriterRequestQueue that there are
no uninitialized pad bytes in the request queue structs. This would only
cause trouble if (a) there were such pad bytes, which could happen in 8.4
and up if the compiler makes enum ForkNumber narrower than 32 bits, but
otherwise would require not-currently-planned changes in the widths of
other typedefs; and (b) the kernel has not uniformly initialized the
contents of shared memory to zeroes. Still, it seems a tad risky, and we
can easily remove any risk by pre-zeroing the request array for ourselves.
In addition to that, we need to establish a coding rule that struct
RelFileNode can't contain any padding bytes, since such structs are copied
into the request array verbatim. (There are other places that are assuming
this anyway, it turns out.)
In 9.1 and up, the risk was a bit larger because we were also effectively
assuming that struct RelFileNodeBackend contained no pad bytes, and with
fields of different types in there, that would be much easier to break.
However, there is no good reason to ever transmit fsync or delete requests
for temp files to the bgwriter/checkpointer, so we can revert the request
structs to plain RelFileNode, getting rid of the padding risk and saving
some marginal number of bytes and cycles in fsync queue manipulation while
we are at it. The savings might be more than marginal during deletion of
a temp relation, because the old code transmitted an entirely useless but
nonetheless expensive-to-process ForgetRelationFsync request to the
background process, and also had the background process perform the file
deletion even though that can safely be done immediately.
In addition, make some cleanup of nearby comments and small improvements to
the code in CompactCheckpointerRequestQueue/CompactBgwriterRequestQueue.
M src/backend/postmaster/checkpointer.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/smgr/md.c
M src/include/postmaster/bgwriter.h
M src/include/storage/relfilenode.h
M src/include/storage/smgr.h
Show step titles in the pg_upgrade man page
commit : 3d03c97a45b6904704e1ed2a4856a55396cb23b0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 17 Jul 2012 21:34:22 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 17 Jul 2012 21:34:22 +0300
The upstream XSLT stylesheets missed that case.
found by Álvaro Herrera
M doc/src/sgml/stylesheet-man.xsl
Remove recently added PL/Perl encoding tests
commit : 82b7faa3b207193dc98d9dd5a5c8b64710ebc1a4
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 17 Jul 2012 12:31:48 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 17 Jul 2012 12:31:48 -0400
These only pass cleanly on UTF8 and SQL_ASCII encodings, besides the
Japanese encoding in which they were originally written, which is clearly
not good enough. Since the functionality they test has not ever been
tested from PL/Perl, the best answer seems to be to remove the new tests
completely.
Per buildfarm results and ensuing discussion.
M src/pl/plperl/expected/plperl_lc.out
M src/pl/plperl/expected/plperl_lc_1.out
M src/pl/plperl/sql/plperl_lc.sql
Avoid pre-determining index names during CREATE TABLE LIKE parsing.
commit : 3727240d01c4e7980ff9fe754e6524636edeaea7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 16 Jul 2012 13:25:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 16 Jul 2012 13:25:26 -0400
Formerly, when trying to copy both indexes and comments, CREATE TABLE LIKE
had to pre-assign names to indexes that had comments, because it made up an
explicit CommentStmt command to apply the comment and so it had to know the
name for the index. This creates bad interactions with other indexes, as
shown in bug #6734 from Daniele Varrazzo: the preassignment logic couldn't
take any other indexes into account so it could choose a conflicting name.
To fix, add a field to IndexStmt that allows it to carry a comment to be
assigned to the new index. (This isn't a user-exposed feature of CREATE
INDEX, only an internal option.) Now we don't need preassignment of index
names in any situation.
I also took the opportunity to refactor DefineIndex to accept the IndexStmt
as such, rather than passing all its fields individually in a mile-long
parameter list.
Back-patch to 9.2, but no further, because it seems too dangerous to change
IndexStmt or DefineIndex's API in released branches. The bug exists back
to 9.0 where CREATE TABLE LIKE grew the ability to copy comments, but given
the lack of prior complaints we'll just let it go unfixed before 9.2.
M src/backend/bootstrap/bootparse.y
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/tcop/utility.c
M src/include/commands/defrem.h
M src/include/nodes/parsenodes.h
Prevent corner-case core dump in rfree().
commit : 1116c9d1e7a5c06636b172bb49bbe1e91edb6076
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 15 Jul 2012 13:28:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 15 Jul 2012 13:28:01 -0400
rfree() failed to cope with the case that pg_regcomp() had initialized the
regex_t struct but then failed to allocate any memory for re->re_guts (ie,
the first malloc call in pg_regcomp() failed). It would try to touch the
guts struct anyway, and thus dump core. This is a sufficiently narrow
corner case that it's not surprising it's never been seen in the field;
but still a bug is a bug, so patch all active branches.
Noted while investigating whether we need to call pg_regfree after a
failure return from pg_regcomp. Other than this bug, it turns out we
don't, so adjust comments appropriately.
M src/backend/regex/regcomp.c
M src/backend/utils/adt/regexp.c
Add link to PEP 394 regarding python2 vs python3 naming
commit : eb972f3eca22858683a6b40466f6d561262b268b
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Jul 2012 13:06:09 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Jul 2012 13:06:09 +0300
M doc/src/sgml/plpython.sgml
Fix walsender processes to establish a SIGALRM handler.
commit : 0bf8eb2a15875bc3f4d5638da73cb34ee9ca868e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jul 2012 14:29:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jul 2012 14:29:58 -0400
Walsenders must have working SIGALRM handling during InitPostgres,
but they set the handler to SIG_IGN so that nothing would happen
if a timeout was reached. This could result in two failure modes:
* If a walsender participated in a deadlock during its authentication
transaction, and was the last to wait in the deadly embrace, the deadlock
would not get cleared automatically. This would require somebody to be
trying to take out AccessExclusiveLock on multiple system catalogs, so
it's not very probable.
* If a client failed to respond to a walsender's authentication challenge,
the intended disconnect after AuthenticationTimeout wouldn't happen, and
the walsender would wait indefinitely for the client.
For the moment, fix in back branches only, since this is fixed in a
different way in the timeout-infrastructure patch that's awaiting
application to HEAD. If we choose not to apply that, then we'll need
to do this in HEAD as well.
M src/backend/replication/walsender.c
Document that Log-Shipping Standby Servers cannot be upgraded by pg_upgrade.
commit : 4810ebe1037e5d9847a0e0ee4ec2fae026ef55f6
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 10 Jul 2012 23:08:19 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 10 Jul 2012 23:08:19 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Back-patch fix for extraction of fixed prefixes from regular expressions.
commit : 18c8dc32ce6759a8837f01e3dd0036cd19ee8683
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Jul 2012 18:00:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Jul 2012 18:00:39 -0400
Back-patch of commits 628cbb50ba80c83917b07a7609ddec12cda172d0 and
c6aae3042be5249e672b731ebeb21875b5343010. This has been broken since
7.3, so back-patch to all supported branches.
M src/backend/regex/Makefile
M src/backend/regex/README
M src/backend/regex/regc_color.c
M src/backend/regex/regc_nfa.c
M src/backend/regex/regcomp.c
M src/backend/regex/rege_dfa.c
A src/backend/regex/regprefix.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/selfuncs.c
M src/include/regex/regex.h
M src/include/regex/regguts.h
M src/include/utils/builtins.h
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Back-patch addition of pg_wchar-to-multibyte conversion functionality.
commit : f12960d8c9ce454a37c2082549b7766ce36627d2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Jul 2012 16:52:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Jul 2012 16:52:36 -0400
Back-patch of commits 72dd6291f216440f6bb61a8733729a37c7e3b2d2,
f6a05fd973a102f7e66c491d3f854864b8d24844, and
60e9c224a197aa37abb1aa3aefa3aad42da61f7f.
This is needed to support fixing the regex prefix extraction bug in
back branches.
M src/backend/utils/mb/mbutils.c
M src/backend/utils/mb/wchar.c
M src/include/mb/pg_wchar.h
plperl: Skip setting UTF8 flag when in SQL_ASCII encoding
commit : 7c460f0ba745611f4dadf413daa4ed9059951f92
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 9 Jul 2012 17:36:29 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 9 Jul 2012 17:36:29 -0400
When in SQL_ASCII encoding, strings passed around are not necessarily
UTF8-safe. We had already fixed this in some places, but it looks like
we missed some.
I had to backpatch Peter Eisentraut's a8b92b60 to 9.1 in order for this
patch to cherry-pick more cleanly.
Patch from Alex Hunsaker, tweaked by Kyotaro HORIGUCHI and myself.
Some desultory cleanup and comment addition by me, during patch review.
Per bug report from Christoph Berg in
20120209102116.GA14429@msgid.df7cb.de
M src/pl/plperl/GNUmakefile
M src/pl/plperl/Util.xs
M src/pl/plperl/expected/plperl.out
A src/pl/plperl/expected/plperl_lc.out
A src/pl/plperl/expected/plperl_lc_1.out
M src/pl/plperl/plperl_helpers.h
M src/pl/plperl/sql/plperl.sql
A src/pl/plperl/sql/plperl_lc.sql
Refactor pattern_fixed_prefix() to avoid dealing in incomplete patterns.
commit : 8fc7b07b64d4f14b1738ce725f23f4903fce18f7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Jul 2012 23:23:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Jul 2012 23:23:02 -0400
Previously, pattern_fixed_prefix() was defined to return whatever fixed
prefix it could extract from the pattern, plus the "rest" of the pattern.
That definition was sensible for LIKE patterns, but not so much for
regexes, where reconstituting a valid pattern minus the prefix could be
quite tricky (certainly the existing code wasn't doing that correctly).
Since the only thing that callers ever did with the "rest" of the pattern
was to pass it to like_selectivity() or regex_selectivity(), let's cut out
the middle-man and just have pattern_fixed_prefix's subroutines do this
directly. Then pattern_fixed_prefix can return a simple selectivity
number, and the question of how to cope with partial patterns is removed
from its API specification.
While at it, adjust the API spec so that callers who don't actually care
about the pattern's selectivity (which is a lot of them) can pass NULL for
the selectivity pointer to skip doing the work of computing a selectivity
estimate.
This patch is only an API refactoring that doesn't actually change any
processing, other than allowing a little bit of useless work to be skipped.
However, it's necessary infrastructure for my upcoming fix to regex prefix
extraction, because after that change there won't be any simple way to
identify the "rest" of the regex, not even to the low level of fidelity
needed by regex_selectivity. We can cope with that if regex_fixed_prefix
and regex_selectivity communicate directly, but not if we have to work
within the old API. Hence, back-patch to all active branches.
M src/backend/optimizer/path/indxpath.c
M src/backend/utils/adt/selfuncs.c
M src/include/utils/selfuncs.h
Fix planner to pass correct collation to operator selectivity estimators.
commit : eb1b48816ba4e8f8e37bd25cd6e760034c0078fe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 8 Jul 2012 23:51:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 8 Jul 2012 23:51:13 -0400
We can do this without creating an API break for estimation functions
by passing the collation using the existing fmgr functionality for
passing an input collation as a hidden parameter.
The need for this was foreseen at the outset, but we didn't get around to
making it happen in 9.1 because of the decision to sort all pg_statistic
histograms according to the database's default collation. That meant that
selectivity estimators generally need to use the default collation too,
even if they're estimating for an operator that will do something
different. The reason it's suddenly become more interesting is that
regexp interpretation also uses a collation (for its LC_TYPE not LC_COLLATE
property), and we no longer want to use the wrong collation when examining
regexps during planning. It's not that the selectivity estimate is likely
to change much from this; rather that we are thinking of caching compiled
regexps during planner estimation, and we won't get the intended benefit
if we cache them with a different collation than the executor will use.
Back-patch to 9.1, both because the regexp change is likely to get
back-patched and because we might as well get this right in all
collation-supporting branches, in case any third-party code wants to
rely on getting the collation. The patch turns out to be minuscule
now that I've done it ...
M src/backend/optimizer/path/clausesel.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/optimizer/plancat.h
Update libpq test expected output
commit : 3295387b1a63646736dae6bc1bb51293cdaf0309
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 6 Jul 2012 16:23:30 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 6 Jul 2012 16:23:30 -0400
Commit 2b443063 changed wording for some of the error messages, but
neglected updating the regress output to match.
M src/interfaces/libpq/test/expected.out
Run updated copyright.pl on HEAD and 9.2 trees, updating the psql \copyright output to 2012.
commit : 81aa2a5d1ca84fd56d17bb3dfd36ae1faaa666d5
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 12:28:18 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 12:28:18 -0400
Backpatch to 9.2.
M src/backend/catalog/genbki.pl
M src/backend/utils/Gen_fmgrtab.pl
M src/bin/psql/help.c
M src/tools/copyright.pl
Have copyright.pl skip updating something that is just the current year, to avoid producing dups, e.g. 2012-2012
commit : c99882a2857daab32b402a815ab8df4870f7e79e
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 12:21:43 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 12:21:43 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Modify copyright.pl so all lines are processed, not just the first match, so files that contain embedded copyrights are updated, e.g. pgsql/help.c.
commit : efd07bd1364267c7e223d9e8bdcad1a201809ed8
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 11:58:55 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 11:58:55 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Fix copyright.pl to properly skip the .git directory by adding a basename() qualification.
commit : 59076b2c7651c1c5f2f61d4af0e33403ccacf1df
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 11:43:59 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 11:43:59 -0400
M src/tools/copyright.pl
Fix spacing in copyright.pl after being run with missing regex slash (now added).
commit : 06850473fb7f8ef0b8be31ec4602fcc161ad0b36
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 10:57:08 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 10:57:08 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Update pg_upgrade comments for recent configpath fix.
commit : 75d5e54f78e9a230855e018b2b38a22a65341511
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 09:39:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 6 Jul 2012 09:39:21 -0400
M contrib/pg_upgrade/option.c
Fix PGDATAOLD and PGDATANEW to properly set pgconfig location, per report from Tom.
commit : 11da73ad9e2ab9b70fbc245f1830058c08cc2a60
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 5 Jul 2012 23:36:30 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 5 Jul 2012 23:36:30 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/option.c
Don't try to trim "../" in join_path_components().
commit : f882084dea25a64769006e7c991723a4bdcf9a6b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 5 Jul 2012 17:15:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 5 Jul 2012 17:15:11 -0400
join_path_components() tried to remove leading ".." components from its
tail argument, but it was not nearly bright enough to do so correctly
unless the head argument was (a) absolute and (b) canonicalized.
Rather than try to fix that logic, let's just get rid of it: there is no
correctness reason to remove "..", and cosmetic concerns can be taken
care of by a subsequent canonicalize_path() call. Per bug #6715 from
Greg Davidson.
Back-patch to all supported branches. It appears that pre-9.2, this
function is only used with absolute paths as head arguments, which is why
we'd not noticed the breakage before. However, third-party code might be
expecting this function to work in more general cases, so it seems wise
to back-patch.
In HEAD and 9.2, also make some minor cosmetic improvements to callers.
M src/bin/initdb/initdb.c
M src/bin/psql/command.c
M src/port/path.c
Revert part of the previous patch that avoided using PLy_elog().
commit : 7c58a5f246dfab299e6c73c5ed9b04e7dc8d1745
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 5 Jul 2012 23:40:25 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 5 Jul 2012 23:40:25 +0300
That caused the plpython_unicode regression test to fail on SQL_ASCII
encoding, as evidenced by the buildfarm. The reason is that with the patch,
you don't get the detail in the error message that you got before. That
detail is actually very informative, so rather than just adjust the expected
output, let's revert that part of the patch for now to make the buildfarm
green again, and figure out some other way to avoid the recursion of
PLy_elog() that doesn't lose the detail.
M src/pl/plpython/plpy_util.c
Fix mapping of PostgreSQL encodings to Python encodings.
commit : 773288016d00bd72e8e2bcb5b1eec67abb2d9e00
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 5 Jul 2012 21:45:24 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 5 Jul 2012 21:45:24 +0300
Windows encodings, "win1252" and so forth, are named differently in Python,
like "cp1252". Also, if the PyUnicode_AsEncodedString() function call fails
for some reason, use a plain ereport(), not a PLy_elog(), to report that
error. That avoids recursion and crash, if PLy_elog() tries to call
PLyUnicode_Bytes() again.
This fixes bug reported by Asif Naeem. Backpatch down to 9.0, before that
plpython didn't even try these conversions.
Jan Urbański, with minor comment improvements by me.
M src/pl/plpython/plpy_util.c
Fix missing regex slash that caused perltidy to get confused on copyright.pl.
commit : 071589cb3f6b4e259d3b87f228fd1c69b8189037
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 21:58:48 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 21:58:48 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Run newly-configured perltidy script on Perl files.
commit : 2bc09ff4994fbeecef9601b8654f3f94b55bc81a
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 21:47:48 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 21:47:48 -0400
Run on HEAD and 9.2.
M contrib/intarray/bench/bench.pl
M contrib/intarray/bench/create_test.pl
M contrib/seg/seg-validate.pl
M contrib/seg/sort-segments.pl
M doc/src/sgml/generate-errcodes-table.pl
M doc/src/sgml/generate_history.pl
M doc/src/sgml/mk_feature_tables.pl
M src/backend/catalog/Catalog.pm
M src/backend/catalog/genbki.pl
M src/backend/utils/Gen_fmgrtab.pl
M src/backend/utils/generate-errcodes.pl
M src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
M src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
M src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
M src/backend/utils/mb/Unicode/UCS_to_most.pl
M src/backend/utils/mb/Unicode/ucs2utf.pl
M src/backend/utils/sort/gen_qsort_tuple.pl
M src/bin/psql/create_help.pl
M src/interfaces/ecpg/preproc/check_rules.pl
M src/interfaces/ecpg/preproc/parse.pl
M src/pl/plperl/plc_perlboot.pl
M src/pl/plperl/plperl_opmask.pl
M src/pl/plperl/text2macro.pl
M src/pl/plpgsql/src/generate-plerrcodes.pl
M src/pl/plpython/generate-spiexceptions.pl
M src/test/locale/sort-test.pl
M src/test/performance/runtests.pl
M src/tools/check_bison_recursion.pl
M src/tools/check_keywords.pl
M src/tools/copyright.pl
M src/tools/msvc/Install.pm
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/VCBuildProject.pm
M src/tools/msvc/VSObjectFactory.pm
M src/tools/msvc/build.pl
M src/tools/msvc/builddoc.pl
M src/tools/msvc/config_default.pl
M src/tools/msvc/gendef.pl
M src/tools/msvc/mkvcbuild.pl
M src/tools/msvc/pgbison.pl
M src/tools/msvc/pgflex.pl
M src/tools/msvc/vcregress.pl
M src/tools/version_stamp.pl
M src/tools/win32tzlist.pl
Have pg_dump in binary-upgrade mode properly drop user-created extensions that might exist in the new empty cluster databases, like plpgsql.
commit : 9c6f8be2b14c170b589fdbd48e3db42c45efb2cc
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 17:36:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 4 Jul 2012 17:36:50 -0400
Backpatch to 9.2.
M src/bin/pg_dump/pg_dump.c
Set the write location in the pg_receivexlog status messages
commit : d3341d4121305fe1b6d666471d4cf040bb103083
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 15:13:09 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 15:13:09 +0200
This makes it possible for the master to track how much data has
actually been written my pg_receivexlog - and not just how much
has been sent towards it.
M src/bin/pg_basebackup/receivelog.c
Always treat a standby returning an an invalid flush location as async
commit : 8c8adf4aa43d6c0da2243aea65d3dc508c79a933
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 15:10:46 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 15:10:46 +0200
This ensures that a standby such as pg_receivexlog will not be selected
as sync standby - which would cause the master to block waiting for
a location that could never happen.
Fujii Masao
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
Remove reference to default wal_buffers being 8
commit : 5c5d54870f5ea7d9254e46a2497f6fa6f2309517
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 09:22:21 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 09:22:21 +0200
This hasn't been true since 9.1, when the default was changed to -1.
Remove the reference completely, keeping the discussion of the parameter
and it's shared memory effects on the config page.
M doc/src/sgml/wal.sgml
Remove references to PostgreSQL bundled on Solaris
commit : a963e06c0c046a3408c4c11e794d39b2a9046ab4
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 08:58:31 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 08:58:31 +0200
Also remove special references to downloads off pgfoundry since they are
not correct - downloads are done through the main website.
M doc/src/sgml/installation.sgml
Fix typo
commit : ed4cd4b6644cfc9e0d952b85449f04437d0387e8
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 09:06:02 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 09:06:02 +0200
gabrielle
M doc/src/sgml/wal.sgml
Remove references to pgfoundry as recommended hosting platform
commit : 5f2fa7f5616fac9ca5570d033e2b66ed5c8da595
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 08:59:35 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 4 Jul 2012 08:59:35 +0200
pgfoundry is deprectaed and no longer accepting new projects,
so we really shouldn't be directing people there.
M doc/src/sgml/external-projects.sgml
Forgot an #include in the previous patch :-(
commit : c602b42982537409c9120ec38158878e238b3594
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 3 Jul 2012 16:40:15 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 3 Jul 2012 16:40:15 -0400
M src/backend/catalog/pg_shdepend.c
Have REASSIGN OWNED work on extensions, too
commit : 6416895cc6b95636138338da7854fc1b27930726
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 3 Jul 2012 15:18:40 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 3 Jul 2012 15:18:40 -0400
Per bug #6593, REASSIGN OWNED fails when the affected role has created
an extension. Even though the user related to the extension is not
nominally the owner, its OID appears on pg_shdepend and thus causes
problems when the user is to be dropped.
This commit adds code to change the "ownership" of the extension itself,
not of the contained objects. This is fine because it's currently only
called from REASSIGN OWNED, which would also modify the ownership of the
contained objects. However, this is not sufficient for a working ALTER
OWNER implementation extension.
Back-patch to 9.1, where extensions were introduced.
Bug #6593 reported by Emiliano Leporati.
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/extension.c
M src/include/commands/extension.h
Assorted message style improvements
commit : 5e59e6a6483ea9ec8149f3ca2a37959115216852
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jul 2012 21:12:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jul 2012 21:12:46 +0300
M src/backend/access/spgist/spgutils.c
M src/backend/access/transam/xlog.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/misc/guc.c
M src/backend/utils/time/snapmgr.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/psql/common.c
M src/bin/psql/variables.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/win32.c
M src/pl/plpgsql/src/gram.y
M src/test/regress/expected/plpgsql.out
Add missing space in event_source GUC description.
commit : 2a15249956b741afafb9f7b581a752bd236db40c
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jul 2012 21:02:05 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jul 2012 21:02:05 +0300
This has apparently been wrong since event_source was added.
Alexander Lakhin
M src/backend/utils/misc/guc.c
Fix to_date's handling of year 519.
commit : 8400d313290d293c02eb1bc4eb4422de3077aa34
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jul 2012 11:35:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jul 2012 11:35:24 -0400
A thinko in commit 029dfdf1157b6d837a7b7211cd35b00c6bcd767c caused the year
519 to be handled differently from either adjacent year, which was not the
intention AFAICS. Report and diagnosis by Marc Cousin.
In passing, remove redundant re-tests of year value.
M src/backend/utils/adt/formatting.c
Fix race condition in enum value comparisons.
commit : 972e066638dff29cf9288fed8f983a43ec942e77
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jul 2012 17:12:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jul 2012 17:12:54 -0400
When (re) loading the typcache comparison cache for an enum type's values,
use an up-to-date MVCC snapshot, not the transaction's existing snapshot.
This avoids problems if we encounter an enum OID that was created since our
transaction started. Per report from Andres Freund and diagnosis by Robert
Haas.
To ensure this is safe even if enum comparison manages to get invoked
before we've set a transaction snapshot, tweak GetLatestSnapshot to
redirect to GetTransactionSnapshot instead of throwing error when
FirstSnapshotSet is false. The existing uses of GetLatestSnapshot (in
ri_triggers.c) don't care since they couldn't be invoked except in a
transaction that's already done some work --- but it seems just conceivable
that this might not be true of enums, especially if we ever choose to use
enums in system catalogs.
Note that the comparable coding in enum_endpoint and enum_range_internal
remains GetTransactionSnapshot; this is perhaps debatable, but if we
changed it those functions would have to be marked volatile, which doesn't
seem attractive.
Back-patch to 9.1 where ALTER TYPE ADD VALUE was added.
M src/backend/utils/cache/typcache.c
M src/backend/utils/time/snapmgr.c
Remove inappropriate semicolons after function definitions.
commit : 4f1e0e402018c92030f33f2b48974c3a8ab212d1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 30 Jun 2012 17:29:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 30 Jun 2012 17:29:45 -0400
Solaris Studio warns about this, and some compilers might think it's an
outright syntax error.
M src/backend/utils/adt/json.c
Prevent CREATE TABLE LIKE/INHERITS from (mis) copying whole-row Vars.
commit : 52336a47024e8212be619fcfe28d384777ed7b72
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 30 Jun 2012 16:43:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 30 Jun 2012 16:43:58 -0400
If a CHECK constraint or index definition contained a whole-row Var (that
is, "table.*"), an attempt to copy that definition via CREATE TABLE LIKE or
table inheritance produced incorrect results: the copied Var still claimed
to have the rowtype of the source table, rather than the created table.
For the LIKE case, it seems reasonable to just throw error for this
situation, since the point of LIKE is that the new table is not permanently
coupled to the old, so there's no reason to assume its rowtype will stay
compatible. In the inheritance case, we should ideally allow such
constraints, but doing so will require nontrivial refactoring of CREATE
TABLE processing (because we'd need to know the OID of the new table's
rowtype before we adjust inherited CHECK constraints). In view of the lack
of previous complaints, that doesn't seem worth the risk in a back-patched
bug fix, so just make it throw error for the inheritance case as well.
Along the way, replace change_varattnos_of_a_node() with a more robust
function map_variable_attnos(), which is capable of being extended to
handle insertion of ConvertRowtypeExpr whenever we get around to fixing
the inheritance case nicely, and in the meantime it returns a failure
indication to the caller so that a helpful message with some context can be
thrown. Also, this code will do the right thing with subselects (if we
ever allow them in CHECK or indexes), and it range-checks varattnos before
using them to index into the map array.
Per report from Sergey Konoplev. Back-patch to all supported branches.
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/rewrite/rewriteManip.c
M src/include/commands/tablecmds.h
M src/include/rewrite/rewriteManip.h
initdb: Update check_need_password for new options
commit : 31fff64ef522abeda9c26c0be7ffee32d27a1b3c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 30 Jun 2012 15:39:16 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 30 Jun 2012 15:39:16 +0300
Change things so that something like initdb --auth-local=peer
--auth-host=md5 does not cause a "must specify a password" error,
like initdb -A md5 does.
M src/bin/initdb/initdb.c
Initialize shared memory copy of ckptXidEpoch correctly when not in recovery.
commit : 214fa27e9296fa74955a0682a8bea4d6d42c4b13
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 29 Jun 2012 19:19:29 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 29 Jun 2012 19:19:29 +0300
This bug was introduced by commit 20d98ab6e4110087d1816cd105a40fcc8ce0a307,
so backpatch this to 9.0-9.2 like that one.
This fixes bug #6710, reported by Tarvi Pillessaar
M src/backend/access/transam/xlog.c
Make the pg_upgrade log files contain actual commands
commit : 90c85e473bd807171b5b5da4032bbf9c0abe1103
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 28 Jun 2012 23:27:00 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 28 Jun 2012 23:27:00 -0400
Now the log file not only contains the output from commands executed by
system(), but also what command it was in the first place. This
arrangement makes debugging a lot simpler.
M contrib/pg_upgrade/exec.c
pg_dump: Fix verbosity level in LO progress messages
commit : fe9912270dfe06cdce4d20bfdd3685b3cb8f23fb
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 18 Jun 2012 16:37:49 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 18 Jun 2012 16:37:49 -0400
In passing, reword another instance of the same message that was
gratuitously different.
Author: Josh Kupershmidt
after a bug report by Bosco Rama
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_tar.c
Fix NOTIFY to cope with I/O problems, such as out-of-disk-space.
commit : f374098e8c5f58b95e03b923c8a808cdeeea93e7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 29 Jun 2012 00:51:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 29 Jun 2012 00:51:40 -0400
The LISTEN/NOTIFY subsystem got confused if SimpleLruZeroPage failed,
which would typically happen as a result of a write() failure while
attempting to dump a dirty pg_notify page out of memory. Subsequently,
all attempts to send more NOTIFY messages would fail with messages like
"Could not read from file "pg_notify/nnnn" at offset nnnnn: Success".
Only restarting the server would clear this condition. Per reports from
Kevin Grittner and Christoph Berg.
Back-patch to 9.0, where the problem was introduced during the
LISTEN/NOTIFY rewrite.
M src/backend/commands/async.c
Make UtilityContainsQuery recurse until it finds a non-utility Query.
commit : c8967e38a65e4afac7027d570136ca6dac5cacc1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 27 Jun 2012 23:18:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 27 Jun 2012 23:18:37 -0400
The callers of UtilityContainsQuery want it to return a non-utility Query
if it returns anything at all. However, since we made CREATE TABLE
AS/SELECT INTO into a utility command instead of a variant of SELECT,
a command like "EXPLAIN SELECT INTO" results in two nested utility
statements. So what we need UtilityContainsQuery to do is drill down
to the bottom non-utility Query.
I had thought of this possibility in setrefs.c, and fixed it there by
looping around the UtilityContainsQuery call; but overlooked that the call
sites in plancache.c have a similar issue. In those cases it's
notationally inconvenient to provide an external loop, so let's redefine
UtilityContainsQuery as recursing down to a non-utility Query instead.
Noted by Rushabh Lathia. This is a somewhat cleaned-up version of his
proposed patch.
M src/backend/optimizer/plan/setrefs.c
M src/backend/tcop/utility.c
Update release notes for pg_terminate_backend changes.
commit : 5ff9ad664745b5cb2c6562ff2691b9418cd59c88
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 27 Jun 2012 08:44:50 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 27 Jun 2012 08:44:50 -0400
M doc/src/sgml/release-9.2.sgml
Allow pg_terminate_backend() to be used on backends with matching role.
commit : eee5088e538be24f6c42e758ef27cecc2b2579f1
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jun 2012 16:16:52 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jun 2012 16:16:52 -0400
A similar change was made previously for pg_cancel_backend, so now it
all matches again.
Dan Farina, reviewed by Fujii Masao, Noah Misch, and Jeff Davis,
with slight kibitzing on the doc changes by me.
M doc/src/sgml/func.sgml
M doc/src/sgml/high-availability.sgml
M src/backend/utils/adt/misc.c
Cope with smaller-than-normal BLCKSZ setting in SPGiST indexes on text.
commit : 00e5844592a8c51ceee1682013b94ac50031a9ac
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 26 Jun 2012 14:36:29 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 26 Jun 2012 14:36:29 -0400
The original coding failed miserably for BLCKSZ of 4K or less, as reported
by Josh Kupershmidt. With the present design for text indexes, a given
inner tuple could have up to 256 labels (requiring either 3K or 4K bytes
depending on MAXALIGN), which means that we can't positively guarantee no
failures for smaller blocksizes. But we can at least make it behave sanely
so long as there are few enough labels to fit on a page. Considering that
btree is also more prone to "index tuple too large" failures when BLCKSZ is
small, it's not clear that we should expend more work than this on this
case.
M src/backend/access/spgist/spgtextproc.c
Make pg_dump emit more accurate dependency information.
commit : 2b79c6ffcfd586667c60d04b5df69695915c4ee2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 25 Jun 2012 21:20:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 25 Jun 2012 21:20:31 -0400
While pg_dump has included dependency information in archive-format output
ever since 7.3, it never made any large effort to ensure that that
information was actually useful. In particular, in common situations where
dependency chains include objects that aren't separately emitted in the
dump, the dependencies shown for objects that were emitted would reference
the dump IDs of these un-dumped objects, leaving no clue about which other
objects the visible objects indirectly depend on. So far, parallel
pg_restore has managed to avoid tripping over this misfeature, but only
by dint of some crude hacks like not trusting dependency information in
the pre-data section of the archive.
It seems prudent to do something about this before it rises up to bite us,
so instead of emitting the "raw" dependencies of each dumped object,
recursively search for its actual dependencies among the subset of objects
that are being dumped.
Back-patch to 9.2, since that code hasn't yet diverged materially from
HEAD. At some point we might need to back-patch further, but right now
there are no known cases where this is actively necessary. (The one known
case, bug #6699, is fixed in a different way by my previous patch.) Since
this patch depends on 9.2 changes that made TOC entries be marked before
output commences as to whether they'll be dumped, back-patching further
would require additional surgery; and as of now there's no evidence that
it's worth the risk.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
Improve pg_dump's dependency-sorting logic to enforce section dump order.
commit : 835a251b00e8f8c66586f0308db71299ee73dc05
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 25 Jun 2012 21:19:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 25 Jun 2012 21:19:19 -0400
As of 9.2, with the --section option, it is very important that the concept
of "pre data", "data", and "post data" sections of the output be honored
strictly; else a dump divided into separate sectional files might be
unrestorable. However, the dependency-sorting logic knew nothing of
sections and would happily select output orderings that didn't fit that
structure. Doing so was mostly harmless before 9.2, but now we need to be
sure it doesn't do that. To fix, create dummy objects representing the
section boundaries and add dependencies between them and all the normal
objects. (This might sound expensive but it seems to only add a percent or
two to pg_dump's runtime.)
This also fixes a problem introduced in 9.1 by the feature that allows
incomplete GROUP BY lists when a primary key is given in GROUP BY.
That means that views can depend on primary key constraints. Previously,
pg_dump would deal with that by simply emitting the primary key constraint
before the view definition (and hence before the data section of the
output). That's bad enough for simple serial restores, where creating an
index before the data is loaded works, but is undesirable for speed
reasons. But it could lead to outright failure of parallel restores, as
seen in bug #6699 from Joe Van Dyk. That happened because pg_restore would
switch into parallel mode as soon as it reached the constraint, and then
very possibly would try to emit the view definition before the primary key
was committed (as a consequence of another bug that causes the view not to
be correctly marked as depending on the constraint). Adding the section
boundary constraints forces the dependency-sorting code to break the view
into separate table and rule declarations, allowing the rule, and hence the
primary key constraint it depends on, to revert to their intended location
in the post-data section. This also somewhat accidentally works around the
bogus-dependency-marking problem, because the rule will be correctly shown
as depending on the constraint, so parallel pg_restore will now do the
right thing. (We will fix the bogus-dependency problem for real in a
separate patch, but that patch is not easily back-portable to 9.1, so the
fact that this patch is enough to dodge the only known symptom is
fortunate.)
Back-patch to 9.1, except for the hunk that adds verification that the
finished archive TOC list is in correct section order; the place where
it was convenient to add that doesn't exist in 9.1.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
Make placeholders in SQL command help more consistent and precise
commit : 1178fdfb80aef3332ba9e9653e84de07dd7f029b
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 22 Jun 2012 01:06:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 22 Jun 2012 01:06:14 +0300
To avoid divergent names on related pages, avoid ambiguities, and
reduce translation work a little.
M doc/src/sgml/ref/alter_aggregate.sgml
M doc/src/sgml/ref/alter_extension.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_sequence.sgml
M doc/src/sgml/ref/alter_server.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_trigger.sgml
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/analyze.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/create_database.sgml
M doc/src/sgml/ref/create_extension.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/create_sequence.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/create_trigger.sgml
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/drop_aggregate.sgml
M doc/src/sgml/ref/drop_extension.sgml
M doc/src/sgml/ref/drop_rule.sgml
M doc/src/sgml/ref/drop_server.sgml
M doc/src/sgml/ref/drop_tablespace.sgml
M doc/src/sgml/ref/drop_trigger.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/insert.sgml
M doc/src/sgml/ref/revoke.sgml
M doc/src/sgml/ref/update.sgml
M doc/src/sgml/ref/vacuum.sgml
Fix memory leak in ARRAY(SELECT ...) subqueries.
commit : 66567ab2c674b958ac7fec47f0c830018245e04a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jun 2012 17:26:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jun 2012 17:26:13 -0400
Repeated execution of an uncorrelated ARRAY_SUBLINK sub-select (which
I think can only happen if the sub-select is embedded in a larger,
correlated subquery) would leak memory for the duration of the query,
due to not reclaiming the array generated in the previous execution.
Per bug #6698 from Armando Miraglia. Diagnosis and fix idea by Heikki,
patch itself by me.
This has been like this all along, so back-patch to all supported versions.
M src/backend/executor/nodeSubplan.c
M src/include/nodes/execnodes.h
Remove confusing half sentence from legal notice
commit : e1a1e6e19840576e563c5c92bb4cbad621e23170
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 20 Jun 2012 00:07:58 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 20 Jun 2012 00:07:58 +0300
pointed out by Stefan Kaltenbrunner
M doc/src/sgml/legal.sgml
pg_dump: Add missing newlines at end of messages
commit : 2610cb3f7cb3227a520b60de37c74e1f99259c3c
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jun 2012 23:57:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jun 2012 23:57:00 +0300
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_dump.c
Make documentation of --help and --version options more consistent
commit : 03132da3b65eb44e65fe26267b73c101d6a2113a
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jun 2012 02:44:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jun 2012 02:44:00 +0300
Before, some places didn't document the short options (-? and -V),
some documented both, some documented nothing, and they were listed in
various orders. Now this is hopefully more consistent and complete.
M contrib/oid2name/oid2name.c
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
M contrib/pg_upgrade/option.c
M contrib/pgbench/pgbench.c
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/oid2name.sgml
M doc/src/sgml/pgarchivecleanup.sgml
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/pgstandby.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/pgtesttiming.sgml
M doc/src/sgml/ref/createuser.sgml
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/dropuser.sgml
M doc/src/sgml/ref/ecpg-ref.sgml
M doc/src/sgml/ref/initdb.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_config-ref.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/vacuumlo.sgml
M src/backend/main/main.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_config/pg_config.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/psql/help.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/createdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/createuser.c
M src/bin/scripts/dropdb.c
M src/bin/scripts/droplang.c
M src/bin/scripts/dropuser.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
M src/interfaces/ecpg/preproc/ecpg.c
Reorder basebackup options, to list pg_basebackup first
commit : 3cdd19b0a66fc8845282d4012b0fcf3e94515e7b
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 17 Jun 2012 21:18:02 +0800
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 17 Jun 2012 21:18:02 +0800
Since this is the easy way of doing it, it should be listed first. All
the old information is retained for those who want the more advanced way.
Also adds a subheading for compressing logs, that seems to have been missing
M doc/src/sgml/backup.sgml
Remove 'for' loop perltidy argument, and move args to perltidyrc file.
commit : a22cba0e6cd0b26124184b0c71b87d85acbd0e84
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 16 Jun 2012 10:12:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 16 Jun 2012 10:12:50 -0400
Backpatch to 9.2.
Per suggestion from Noah Misch
M src/tools/pgindent/README
A src/tools/pgindent/perltidyrc
In pgindent, suppress reading the perltidy RC file using --noprofile.
commit : 8f466a28da28235fe2b3e919ae8267f8eef1db64
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 22:50:02 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 22:50:02 -0400
M src/tools/pgindent/README
Update pgindent Perl indentation instructions based on feedback from Àlvaro and Noah Misch.
commit : baac19bdddaf6d0b8a0e6ff693d87404b2a69832
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 22:43:22 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 22:43:22 -0400
Backpatch to 9.2.
M src/tools/pgindent/README
Improve pg_upgrade wording for pg_ctl start failure; could be connection failure.
commit : a88242067dc5f7e2e58a205a1ab7c8ee002d47fa
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 19:57:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jun 2012 19:57:01 -0400
Backpatch to 9.2.
Per report from Evan D. Hoffman
M contrib/pg_upgrade/server.c
Improve reporting of permission errors for array types
commit : 0b847cba696b0426694e5f48aa95455269624e87
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jun 2012 22:55:03 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jun 2012 22:55:03 +0300
Because permissions are assigned to element types, not array types,
complaining about permission denied on an array type would be
misleading to users. So adjust the reporting to refer to the element
type instead.
In order not to duplicate the required logic in two dozen places,
refactor the permission denied reporting for types a bit.
pointed out by Yeb Havinga during the review of the type privilege
feature
M src/backend/access/common/tupdesc.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_aggregate.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/include/utils/acl.h
M src/test/regress/expected/privileges.out
Add more message pluralization
commit : ccc65b710ef119237fe5469634cf7589c13b365f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jun 2012 02:01:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jun 2012 02:01:00 +0300
Even though we can't do much about the case with multiple plurals in
one sentence, we can fix the other cases.
M src/backend/commands/dbcommands.c
Revisit error message details for JSON input parsing.
commit : 80edfd76591fdb9beec061de3c05ef4e9d96ce56
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 19:43:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 19:43:35 -0400
Instead of identifying error locations only by line number (which could
be entirely unhelpful with long input lines), provide a fragment of the
input text too, placing this info in a new CONTEXT entry. Make the
error detail messages conform more closely to style guidelines, fix
failure to expose some of them for translation, ensure compiler can
check formats against supplied parameters.
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
Remove release note entry for reverted patch.
commit : 0f0fba1794c72dfbc0f82c18f50d2cb0dd82e480
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:57:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:57:28 -0400
M doc/src/sgml/release-9.2.sgml
Revert "Reduce checkpoints and WAL traffic on low activity database server"
commit : b8b69d89905e04b910bcd65efce1791477b45d35
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:17:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:17:09 -0400
This reverts commit 18fb9d8d21a28caddb72c7ffbdd7b96d52ff9724. Per
discussion, it does not seem like a good idea to allow committed changes to
go un-checkpointed indefinitely, as could happen in a low-traffic server;
that makes us entirely reliant on the WAL stream with no redundancy that
might aid data recovery in case of disk failure.
This re-introduces the original problem of hot-standby setups generating a
small continuing stream of WAL traffic even when idle, but there are other
ways to address that without compromising crash recovery, so we'll revisit
that issue in a future release cycle.
M src/backend/access/transam/xlog.c
Fix description of SQL-standard meaning of CREATE LOCAL TEMP TABLE.
commit : 8b23db944b9d7f051e2f986cc1f55ade82621218
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:47:53 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 18:47:53 -0400
I had this slightly wrong, as noted by Noah Misch.
M doc/src/sgml/ref/create_table.sgml
Deprecate use of GLOBAL and LOCAL in temp table creation.
commit : c3bc76bdb0ac600e6b4d1e594e1a077c1efc5154
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 17:48:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 17:48:42 -0400
Aside from adjusting the documentation to say that these are deprecated,
we now report a warning (not an error) for use of GLOBAL, since it seems
fairly likely that we might change that to request SQL-spec-compliant temp
table behavior in the foreseeable future. Although our handling of LOCAL
is equally nonstandard, there is no evident interest in ever implementing
SQL modules, and furthermore some other products interpret LOCAL as
behaving the same way we do. So no expectation of change and no warning
for LOCAL; but it still seems a good idea to deprecate writing it.
Noah Misch
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_table_as.sgml
M src/backend/parser/gram.y
Support Linux's oom_score_adj API as well as the older oom_adj API.
commit : 93f4d7f806613d28842f956a84f31cc41d825503
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 15:34:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jun 2012 15:34:57 -0400
The simplest way to handle this is just to copy-and-paste the relevant
code block in fork_process.c, so that's what I did. (It's possible that
something more complicated would be useful to packagers who want to work
with either the old or the new API; but at this point the number of such
people is rapidly approaching zero, so let's just get the minimal thing
done.) Update relevant documentation as well.
M contrib/start-scripts/linux
M doc/src/sgml/runtime.sgml
M src/backend/postmaster/fork_process.c
In pg_upgrade, verify that the install user has the same oid on both clusters, and make sure the new cluster has no additional users.
commit : b9212e379c55564c8b6cdc8585b74606e90ec1ea
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 13 Jun 2012 12:19:18 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 13 Jun 2012 12:19:18 -0400
Backpatch to 9.1.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
Improve documentation of postgres -C option
commit : c0a6f9c84bedc745af2a3bf1dee5e2a4e79b46af
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 13 Jun 2012 13:41:25 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 13 Jun 2012 13:41:25 +0300
Clarify help (s/return/print/), and explain that this option is for
use by other programs, not for user-facing use (it does not print
units).
M doc/src/sgml/ref/postgres-ref.sgml
M src/backend/main/main.c
Minor code review for json.c.
commit : f871ef74a5560377d541e6d94704f30bcbcdb779
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 12 Jun 2012 16:23:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 12 Jun 2012 16:23:45 -0400
Improve commenting, conform to project style for use of ++ etc.
No functional changes.
M src/backend/utils/adt/json.c
Mark JSON error detail messages for translation.
commit : 36b7e3da17bcca4efe5584d95c386cec2a221a13
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 12 Jun 2012 10:41:38 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 12 Jun 2012 10:41:38 -0400
Per gripe from Tom Lane.
M src/backend/utils/adt/json.c
Copy-editing of release notes.
commit : 99b3135e33949da601014800694ae6905ed1075f
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 12 Jun 2012 09:51:48 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 12 Jun 2012 09:51:48 -0400
Remove a couple of items that were actually back-patched bug fixes.
Add additional details to a couple of items which lacked a description.
Improve attributions for a couple of items I was involved with.
A few other miscellaneous corrections.
M doc/src/sgml/release-9.2.sgml
Ensure pg_ctl behaves sanely when data directory is not specified.
commit : 51e61b04f8040f627e7605594095b06c10582fd0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 11 Jun 2012 22:47:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 11 Jun 2012 22:47:16 -0400
Commit aaa6e1def292cdacb6b27088898793b1b879fedf introduced multiple hazards
in the case where pg_ctl is executed with neither a -D switch nor any
PGDATA environment variable. It would dump core on machines which are
unforgiving about printf("%s", NULL), or failing that possibly give a
rather unhelpful complaint about being unable to execute "postgres -C",
rather than the logically prior complaint about not being told where the
data directory is.
Edmund Horner's report suggests that there is another, Windows-specific
hazard here, but I'm not the person to fix that; it would in any case only
be significant when trying to use a config-only PGDATA pointer.
M src/bin/pg_ctl/pg_ctl.c
Fix pg_dump output to a named tar-file archive.
commit : bf0945e8636bf0390ef4569bbbf9763573211e03
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 11 Jun 2012 21:55:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 11 Jun 2012 21:55:48 -0400
"pg_dump -Ft -f filename ..." got broken by my recent commit
4317e0246c645f60c39e6572644cff1cb03b4c65, which I fear I only tested
in the output-to-stdout variant.
Report and fix by Muhammad Asif Naeem.
M src/bin/pg_dump/pg_backup_tar.c
pg_receivexlog: Rename option --dir to --directory
commit : 7d754961f799634128fb2d77632e2b53b736ae21
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 12 Jun 2012 00:55:27 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 12 Jun 2012 00:55:27 +0300
getopt_long() allows abbreviating long options, so we might as well
give the option the full name, and users can abbreviate it how they
like.
Do some general polishing of the --help output at the same time.
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_receivexlog.c
Prevent non-streaming replication connections from being selected sync slave
commit : 3595a71e9ce90a2d4c812a9bb34dc24ffc492c2b
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 11 Jun 2012 15:07:55 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 11 Jun 2012 15:07:55 +0200
This prevents a pg_basebackup backup session that just does a base
backup (no xlog involved at all) from becoming the synchronous slave
and thus blocking all access while it runs.
Also fixes the problem when a higher priority slave shows up it would
become the sync standby before it has reached the STREAMING state, by
making sure we can only switch to a walsender that's actually STREAMING.
Fujii Masao
M src/backend/replication/syncrep.c
Revert behaviour of -x/--xlog to 9.1 semantics
commit : 9af34cdec87d8e60f200ccd5b1b695880412c62b
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 10 Jun 2012 13:43:51 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 10 Jun 2012 13:43:51 +0200
To replace it, add -X/--xlog-method that allows the specification
of fetch or stream.
Do this to avoid unnecessary backwards-incompatiblity. Spotted and
suggested by Peter Eisentraut.
M doc/src/sgml/ref/pg_basebackup.sgml
M src/bin/pg_basebackup/pg_basebackup.c
Run pgindent on 9.2 source tree in preparation for first 9.3 commit-fest.
commit : 927d61eeff78363ea3938c818d07e511ebaf75cf
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 10 Jun 2012 15:20:04 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 10 Jun 2012 15:20:04 -0400
M contrib/auto_explain/auto_explain.c
M contrib/dblink/dblink.c
M contrib/file_fdw/file_fdw.c
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_test_fsync/pg_test_fsync.c
M contrib/pg_test_timing/pg_test_timing.c
M contrib/pg_trgm/trgm_gist.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/function.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/tablespace.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pgbench/pgbench.c
M contrib/pgcrypto/crypt-md5.c
M contrib/pgcrypto/px.h
M contrib/pgstattuple/pgstatindex.c
M contrib/pgstattuple/pgstattuple.c
M contrib/sepgsql/database.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/uavc.c
M contrib/spi/refint.c
M contrib/vacuumlo/vacuumlo.c
M contrib/xml2/xpath.c
M contrib/xml2/xslt_proc.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistproc.c
M src/backend/access/gist/gistscan.c
M src/backend/access/gist/gistsplit.c
M src/backend/access/hash/hashovfl.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/tuptoaster.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/index/genam.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtcompare.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/spgist/spgkdtreeproc.c
M src/backend/access/spgist/spgquadtreeproc.c
M src/backend/access/spgist/spgscan.c
M src/backend/access/spgist/spgtextproc.c
M src/backend/access/spgist/spgutils.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogutils.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/storage.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/copy.c
M src/backend/commands/createas.c
M src/backend/commands/dbcommands.c
M src/backend/commands/dropcmds.c
M src/backend/commands/explain.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/lockcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/prepare.c
M src/backend/commands/proclang.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/view.c
M src/backend/executor/execCurrent.c
M src/backend/executor/execMain.c
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeIndexonlyscan.c
M src/backend/executor/nodeMaterial.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/spi.c
M src/backend/libpq/auth.c
M src/backend/libpq/be-secure.c
M src/backend/libpq/hba.c
M src/backend/libpq/pqcomm.c
M src/backend/nodes/bitmapset.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/list.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/print.c
M src/backend/nodes/readfuncs.c
M src/backend/nodes/tidbitmap.c
M src/backend/optimizer/geqo/geqo_selection.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/orindxpath.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/plancat.c
M src/backend/optimizer/util/predtest.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_type.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/darwin/system.c
M src/backend/port/dynloader/aix.h
M src/backend/port/dynloader/cygwin.h
M src/backend/port/dynloader/freebsd.h
M src/backend/port/dynloader/irix.h
M src/backend/port/dynloader/linux.h
M src/backend/port/dynloader/netbsd.h
M src/backend/port/dynloader/openbsd.h
M src/backend/port/dynloader/osf.h
M src/backend/port/dynloader/sco.h
M src/backend/port/dynloader/solaris.h
M src/backend/port/dynloader/unixware.h
M src/backend/port/dynloader/win32.h
M src/backend/port/unix_latch.c
M src/backend/port/win32/mingwcompat.c
M src/backend/port/win32/socket.c
M src/backend/port/win32/timer.c
M src/backend/port/win32_latch.c
M src/backend/port/win32_sema.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
M src/backend/postmaster/walwriter.c
M src/backend/regex/regc_locale.c
M src/backend/regex/regc_pg_locale.c
M src/backend/regex/regcomp.c
M src/backend/regex/rege_dfa.c
M src/backend/regex/regerror.c
M src/backend/regex/regexec.c
M src/backend/replication/basebackup.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/freelist.c
M src/backend/storage/file/fd.c
M src/backend/storage/ipc/pmsignal.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/sinval.c
M src/backend/storage/ipc/sinvaladt.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/storage/lmgr/s_lock.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/backend/tcop/postgres.c
M src/backend/tcop/utility.c
M src/backend/tsearch/dict_thesaurus.c
M src/backend/tsearch/spell.c
M src/backend/tsearch/to_tsany.c
M src/backend/tsearch/ts_utils.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/array_selfuncs.c
M src/backend/utils/adt/array_typanalyze.c
M src/backend/utils/adt/cash.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/inet_net_pton.c
M src/backend/utils/adt/json.c
M src/backend/utils/adt/lockfuncs.c
M src/backend/utils/adt/mac.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/tsgistidx.c
M src/backend/utils/adt/tsquery_util.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/varbit.c
M src/backend/utils/adt/varchar.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/error/elog.c
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/mb/wchar.c
M src/backend/utils/misc/guc.c
M src/backend/utils/mmgr/portalmem.c
M src/backend/utils/sort/sortsupport.c
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/sort/tuplestore.c
M src/backend/utils/time/snapmgr.c
M src/backend/utils/time/tqual.c
M src/bin/initdb/findtimezone.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/receivelog.h
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/common.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pgevent/pgevent.c
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/copy.c
M src/bin/psql/describe.c
M src/bin/psql/help.c
M src/bin/psql/input.c
M src/bin/psql/print.c
M src/bin/psql/print.h
M src/bin/psql/startup.c
M src/bin/psql/stringutils.c
M src/bin/psql/tab-complete.c
M src/bin/psql/variables.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/common.c
M src/bin/scripts/common.h
M src/bin/scripts/createlang.c
M src/bin/scripts/dropdb.c
M src/bin/scripts/droplang.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
M src/include/access/gist_private.h
M src/include/access/heapam.h
M src/include/access/htup.h
M src/include/access/nbtree.h
M src/include/access/slru.h
M src/include/access/spgist.h
M src/include/access/spgist_private.h
M src/include/access/xact.h
M src/include/access/xlog_internal.h
M src/include/catalog/catalog.h
M src/include/catalog/genbki.h
M src/include/catalog/index.h
M src/include/catalog/namespace.h
M src/include/catalog/objectaccess.h
M src/include/catalog/objectaddress.h
M src/include/catalog/pg_aggregate.h
M src/include/catalog/pg_attrdef.h
M src/include/catalog/pg_attribute.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_database.h
M src/include/catalog/pg_db_role_setting.h
M src/include/catalog/pg_default_acl.h
M src/include/catalog/pg_description.h
M src/include/catalog/pg_extension.h
M src/include/catalog/pg_foreign_data_wrapper.h
M src/include/catalog/pg_foreign_server.h
M src/include/catalog/pg_foreign_table.h
M src/include/catalog/pg_index.h
M src/include/catalog/pg_language.h
M src/include/catalog/pg_largeobject.h
M src/include/catalog/pg_largeobject_metadata.h
M src/include/catalog/pg_namespace.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_pltemplate.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_range.h
M src/include/catalog/pg_rewrite.h
M src/include/catalog/pg_seclabel.h
M src/include/catalog/pg_shdescription.h
M src/include/catalog/pg_shseclabel.h
M src/include/catalog/pg_statistic.h
M src/include/catalog/pg_tablespace.h
M src/include/catalog/pg_trigger.h
M src/include/catalog/pg_ts_dict.h
M src/include/catalog/pg_type.h
M src/include/commands/createas.h
M src/include/commands/defrem.h
M src/include/commands/explain.h
M src/include/commands/tablecmds.h
M src/include/commands/typecmds.h
M src/include/commands/vacuum.h
M src/include/datatype/timestamp.h
M src/include/executor/executor.h
M src/include/executor/instrument.h
M src/include/executor/spi_priv.h
M src/include/foreign/fdwapi.h
M src/include/lib/stringinfo.h
M src/include/libpq/hba.h
M src/include/libpq/ip.h
M src/include/nodes/execnodes.h
M src/include/nodes/parsenodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/paths.h
M src/include/optimizer/prep.h
M src/include/optimizer/subselect.h
M src/include/parser/analyze.h
M src/include/pg_config_manual.h
M src/include/pg_trace.h
M src/include/pgstat.h
M src/include/port.h
M src/include/port/win32.h
M src/include/postgres.h
M src/include/postmaster/postmaster.h
M src/include/regex/regguts.h
M src/include/replication/walprotocol.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender_private.h
M src/include/rewrite/rewriteSupport.h
M src/include/snowball/header.h
M src/include/storage/barrier.h
M src/include/storage/latch.h
M src/include/storage/lock.h
M src/include/storage/lwlock.h
M src/include/storage/predicate.h
M src/include/storage/proc.h
M src/include/storage/procarray.h
M src/include/storage/sinval.h
M src/include/storage/smgr.h
M src/include/tsearch/ts_public.h
M src/include/utils/acl.h
M src/include/utils/builtins.h
M src/include/utils/guc.h
M src/include/utils/guc_tables.h
M src/include/utils/json.h
M src/include/utils/lsyscache.h
M src/include/utils/memutils.h
M src/include/utils/pg_crc_tables.h
M src/include/utils/plancache.h
M src/include/utils/rangetypes.h
M src/include/utils/rel.h
M src/include/utils/selfuncs.h
M src/include/utils/sortsupport.h
M src/include/utils/timestamp.h
M src/include/utils/tqual.h
M src/include/utils/typcache.h
M src/include/utils/xml.h
M src/interfaces/ecpg/ecpglib/connect.c
M src/interfaces/ecpg/ecpglib/execute.c
M src/interfaces/ecpg/ecpglib/extern.h
M src/interfaces/ecpg/pgtypeslib/dt.h
M src/interfaces/ecpg/preproc/type.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-protocol2.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/fe-secure.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/interfaces/libpq/test/uri-regress.c
M src/pl/plperl/plperl.c
M src/pl/plperl/plperl_helpers.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpy_cursorobject.c
M src/pl/plpython/plpy_cursorobject.h
M src/pl/plpython/plpy_elog.c
M src/pl/plpython/plpy_elog.h
M src/pl/plpython/plpy_exec.c
M src/pl/plpython/plpy_exec.h
M src/pl/plpython/plpy_main.c
M src/pl/plpython/plpy_main.h
M src/pl/plpython/plpy_planobject.h
M src/pl/plpython/plpy_plpymodule.c
M src/pl/plpython/plpy_plpymodule.h
M src/pl/plpython/plpy_procedure.h
M src/pl/plpython/plpy_resultobject.c
M src/pl/plpython/plpy_resultobject.h
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/plpy_spi.h
M src/pl/plpython/plpy_subxactobject.c
M src/pl/plpython/plpy_subxactobject.h
M src/pl/plpython/plpy_typeio.c
M src/pl/plpython/plpy_typeio.h
M src/pl/plpython/plpy_util.c
M src/pl/plpython/plpy_util.h
M src/pl/plpython/plpython.h
M src/port/erand48.c
M src/port/fls.c
M src/port/getaddrinfo.c
M src/port/path.c
M src/port/win32setlocale.c
M src/test/isolation/isolationtester.c
M src/test/regress/pg_regress.c
M src/test/thread/thread_test.c
M src/timezone/pgtz.c
M src/tools/msvc/Install.pm
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/VCBuildProject.pm
M src/tools/msvc/VSObjectFactory.pm
M src/tools/msvc/build.pl
M src/tools/msvc/builddoc.pl
M src/tools/msvc/config_default.pl
M src/tools/msvc/gendef.pl
M src/tools/msvc/install.pl
M src/tools/msvc/pgbison.pl
M src/tools/msvc/pgflex.pl
M src/tools/msvc/vcregress.pl
Update pgindent install instructions and update typedef list.
commit : 60801944fa105252b48ea5688d47dfc05c695042
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 10 Jun 2012 15:15:31 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 10 Jun 2012 15:15:31 -0400
M src/tools/pgindent/README
M src/tools/pgindent/typedefs.list
Fix pg_basebackup/pg_receivexlog for floating point timestamps
commit : a0b4c5a20a5e5076225ba440a921f4b46f1159ee
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 10 Jun 2012 12:12:36 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 10 Jun 2012 12:12:36 +0200
Since the replication protocol deals with TimestampTz, we need to
care for the floating point case as well in the frontend tools.
Fujii Masao, with changes from Magnus Hagander
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Error message capitalization fix
commit : 7c1abc00fa1f469a2805e88abac0fa8b094b4427
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 7 Jun 2012 11:30:31 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 7 Jun 2012 11:30:31 +0200
M src/bin/pg_basebackup/receivelog.c
Make include files work without having to include other ones first
commit : 8570114dc1a7a655043d94a6eb1ebf295f1d3647
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 10 Jun 2012 12:43:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 10 Jun 2012 12:43:00 +0300
M src/include/access/hio.h
M src/include/utils/json.h
Revert error message on GLOBAL/LOCAL pending further discussion
commit : 28ac7972873bd314d4837807396fe44571b5cb50
author : Simon Riggs <simon@2ndQuadrant.com>
date : Sun, 10 Jun 2012 08:41:01 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Sun, 10 Jun 2012 08:41:01 +0100
M src/backend/parser/gram.y
M src/test/regress/expected/create_table.out
M src/test/regress/sql/create_table.sql
Add ERROR msg for GLOBAL/LOCAL TEMP is not yet implemented
commit : 72335a20156b19be3a53ef686e0b31140c6f38e5
author : Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 9 Jun 2012 16:35:26 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 9 Jun 2012 16:35:26 +0100
M src/backend/parser/gram.y
M src/test/regress/expected/create_table.out
M src/test/regress/sql/create_table.sql
Fix bug in early startup of Hot Standby with subtransactions. When HS startup is deferred because of overflowed subtransactions, ensure that we re-initialize KnownAssignedXids for when both existing and incoming snapshots have non-zero qualifying xids.
commit : 37255705399b57b2e413814799f0bc9b94fda14a
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 8 Jun 2012 17:34:04 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 8 Jun 2012 17:34:04 +0100
Fixes bug #6661 reported by Valentine Gogichashvili.
Analysis and fix by Andres Freund
M src/backend/storage/ipc/procarray.c
When using libpq URI syntax, error out on invalid parameter names.
commit : 3b5548a3d524e3b37d49f79f707d2119ecdfa303
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 8 Jun 2012 08:46:39 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 8 Jun 2012 08:46:39 -0400
Dan Farina
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/test/expected.out
Documentation style improvements
commit : f1438cf5c6f54d0a887c7fbef91163efda5daa0f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jun 2012 10:28:32 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jun 2012 10:28:32 +0300
M doc/src/sgml/rangetypes.sgml
Scan the buffer pool just once, not once per fork, during relation drop.
commit : ece01aae479227d9836294b287d872c5a6146a11
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jun 2012 17:42:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jun 2012 17:42:27 -0400
This provides a speedup of about 4X when NBuffers is large enough.
There is also a useful reduction in sinval traffic, since we
only do CacheInvalidateSmgr() once not once per fork.
Simon Riggs, reviewed and somewhat revised by Tom Lane
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/catalog/storage.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/buf_internals.h
M src/include/storage/bufmgr.h
M src/include/storage/smgr.h
Documentation spell and markup checking
commit : 5baf6da71701abcb76487d9de68f7d7dc6c365e9
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jun 2012 00:06:20 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jun 2012 00:06:20 +0300
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/docguide.sgml
M doc/src/sgml/ecpg.sgml
M doc/src/sgml/fdwhandler.sgml
M doc/src/sgml/file-fdw.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/gin.sgml
M doc/src/sgml/gist.sgml
M doc/src/sgml/indexam.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/maintenance.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/perform.sgml
M doc/src/sgml/pgrowlocks.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/pgtesttiming.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/rangetypes.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/rules.sgml
M doc/src/sgml/sepgsql.sgml
M doc/src/sgml/spgist.sgml
M doc/src/sgml/textsearch.sgml
M doc/src/sgml/xfunc.sgml
Message style improvements
commit : 5d0109bd2776ce918821f360e951270caa96ba8a
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 7 Jun 2012 23:35:33 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 7 Jun 2012 23:35:33 +0300
M src/bin/initdb/initdb.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/psql/command.c
Do unlocked prechecks in bufmgr.c loops that scan the whole buffer pool.
commit : e8d029a30b5a5fb74b848a8697b1dfa3f66d9697
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jun 2012 16:46:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jun 2012 16:46:26 -0400
DropRelFileNodeBuffers, DropDatabaseBuffers, FlushRelationBuffers, and
FlushDatabaseBuffers have to scan the whole shared_buffers pool because
we have no index structure that would find the target buffers any more
efficiently than that. This gets expensive with large NBuffers. We can
shave some cycles from these loops by prechecking to see if the current
buffer is interesting before we acquire the buffer header lock.
Ordinarily such a test would be unsafe, but in these cases it should be
safe because we are already assuming that the caller holds a lock that
prevents any new target pages from being loaded into the buffer pool
concurrently. Therefore, no buffer tag should be changing to a value of
interest, only away from a value of interest. So a false negative match
is impossible, while a false positive is safe because we'll recheck after
acquiring the buffer lock. Initial testing says that this speeds these
loops by a factor of 2X to 3X on common Intel hardware.
Patch for DropRelFileNodeBuffers by Jeff Janes (based on an idea of
Heikki's); extended to the remaining sequential scans by Tom Lane
M src/backend/storage/buffer/bufmgr.c
Wake WALSender to reduce data loss at failover for async commit. WALSender now woken up after each background flush by WALwriter, avoiding multi-second replication delay for an all-async commit workload. Replication delay reduced from 7s with default settings to 200ms and often much less, allowing significantly reduced data loss at failover.
commit : 2c8a4e9be2730342cbca85150a2a9d876aa77ff6
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 7 Jun 2012 19:22:47 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 7 Jun 2012 19:22:47 +0100
Andres Freund and Simon Riggs
M src/backend/access/transam/xlog.c
Fix more crash-safe visibility map bugs, and improve comments.
commit : b50991eedb458a81d875d049f48fb62ab1685c0d
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 7 Jun 2012 12:25:41 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 7 Jun 2012 12:25:41 -0400
In lazy_scan_heap, we could issue bogus warnings about incorrect
information in the visibility map, because we checked the visibility
map bit before locking the heap page, creating a race condition. Fix
by rechecking the visibility map bit before we complain. Rejigger
some related logic so that we rely on the possibly-outdated
all_visible_according_to_vm value as little as possible.
In heap_multi_insert, it's not safe to clear the visibility map bit
before beginning the critical section. The visibility map is not
crash-safe unless we treat clearing the bit as a critical operation.
Specifically, if the transaction were to error out after we set the
bit and before entering the critical section, we could end up writing
the heap page to disk (with the bit cleared) and crashing before the
visibility map page made it to disk. That would be bad. heap_insert
has this correct, but somehow the order of operations got rearranged
when heap_multi_insert was added.
Also, add some more comments to visibilitymap_test, lazy_scan_heap,
and IndexOnlyNext, expounding on concurrency issues.
Per extensive code review by Andres Freund, and further review by Tom
Lane, who also made the original report about the bogus warnings.
M src/backend/access/heap/heapam.c
M src/backend/access/heap/visibilitymap.c
M src/backend/commands/vacuumlazy.c
M src/backend/executor/nodeIndexonlyscan.c
Use strerror(errno) instead of %m
commit : 92135ea0ed8f75daa86cd94301cedc7f5b714e3c
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 15:51:30 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 15:51:30 +0200
Found by Fujii Masao
M src/bin/pg_basebackup/receivelog.c
Fix typo
commit : 1e57c2c5b2e8fdd1e233454b21c60e1600464728
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 14:08:56 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 14:08:56 +0200
Noted by Erik Rijkers
M doc/src/sgml/ref/pg_receivexlog.sgml
Add example of archive_command to use with pg_receivexlog
commit : 778201200b4a5b287fe931e20ae804e8398d4872
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 13:48:18 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jun 2012 13:48:18 +0200
M doc/src/sgml/ref/pg_receivexlog.sgml
Fix bogus handling of control characters in json_lex_string().
commit : 3dd8e596812e3adb72aecafb23fbb6a30836c475
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jun 2012 20:43:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jun 2012 20:43:57 -0400
The original coding misbehaved if "char" is signed, and also made the
extremely poor decision to print control characters literally when trying
to complain about them. Report and patch by Shigeru Hanada.
In passing, also fix core dump risk in report_parse_error() should the
parse state be something other than what it expects.
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
Fix some more bugs in contrib/xml2's xslt_process().
commit : d9b31e4859df5325b7d3d2cc94b0e907f1cf1d3e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jun 2012 20:12:50 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jun 2012 20:12:50 -0400
It failed to check for error return from xsltApplyStylesheet(), as reported
by Peter Gagarinov. (So far as I can tell, libxslt provides no convenient
way to get a useful error message in failure cases. There might be some
inconvenient way, but considering that this code is deprecated it's hard to
get enthusiastic about putting lots of work into it. So I just made it say
"failed to apply stylesheet", in line with the existing error checks.)
While looking at the code I also noticed that the string returned by
xsltSaveResultToString was never freed, resulting in a session-lifespan
memory leak.
Back-patch to all supported versions.
M contrib/xml2/xslt_proc.c
Fix memory leaks in failure paths in buildACLCommands and parseAclItem.
commit : d73b7f973db5ec7e44813141741d3e0d318eef69
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jun 2012 11:52:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jun 2012 11:52:52 -0400
This is currently only cosmetic, since all the call sites just curl up
and die in event of a failure return. It might be important for some
future use-case, though, and in any case it quiets warnings from the
clang static analyzer (as reported by Anna Zaks).
Josh Kupershmidt
M src/bin/pg_dump/dumputils.c
In pg_upgrade, report pre-PG 8.1 plpython helper functions left in the public schema that no longer point to valid shared object libraries, and suggest a solution.
commit : 8fcbfea7885f53b5a16610f7f03c276df49ef3d4
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jun 2012 11:40:04 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jun 2012 11:40:04 -0400
M contrib/pg_upgrade/function.c
Avoid early reuse of btree pages, causing incorrect query results. When we allowed read-only transactions to skip assigning XIDs we introduced the possibility that a fully deleted btree page could be reused. This broke the index link sequence which could then lead to indexscans silently returning fewer rows than would have been correct. The actual incidence of silent errors from this is thought to be very low because of the exact workload required and locking pre-conditions. Fix is to remove pages only if index page opaque->btpo.xact precedes RecentGlobalXmin.
commit : d3abbbebe52eb1e59e621c880ad57df9d40d13f2
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 12:21:45 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 12:21:45 +0100
Noah Misch, reviewed by Simon Riggs
M src/backend/access/nbtree/README
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtxlog.c
Improve description of pg_stat_statements normalisation in release notes.
commit : 3e4d3a32b2f5c225a42f6fd4b09a7db64eea0a9b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:49:14 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:49:14 +0100
M doc/src/sgml/release-9.2.sgml
Clarify description of covering indexes in release notes
commit : 56b62cbd01f2857a1f7e72614922b62148350a75
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:35:27 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:35:27 +0100
M doc/src/sgml/release-9.2.sgml
Copy editing of release notes for couple of my items.
commit : a6e1d7b5fb2ac117acd83aa690767410521cb46b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:33:16 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 11:33:16 +0100
M doc/src/sgml/release-9.2.sgml
After any checkpoint, close all smgr files handles in bgwriter
commit : 055c352abbf764a08496e94054137da9e26dac04
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 09:24:53 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 09:24:53 +0100
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/include/postmaster/bgwriter.h
Checkpointer starts before bgwriter to avoid missing fsync requests. Noted while testing Hot Standby startup.
commit : a297d64d9223f6bd9c495ff5726a3c99080c2a4a
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 08:25:17 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 08:25:17 +0100
M src/backend/postmaster/postmaster.c
Provide interim statistics while in mid-checkpoint. Re-implements similar functionality in 9.1 and previously which was removed during split of checkpointer and bgwriter.
commit : 1ec6a2bbc966a05acf10a6753d8ec7db83f43f4c
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 08:19:06 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 1 Jun 2012 08:19:06 +0100
Requested/spotted by Magnus Hagander
M src/backend/postmaster/checkpointer.c
Stamp 9.2beta2.
commit : 4bec93ac0f8341ee150d96ad5d2324f477adbfe8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 19:16:55 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 19:16:55 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Update release notes for 9.1.4, 9.0.8, 8.4.12, 8.3.19.
commit : 51ecf52c0137f694816dcd59e140c89f2ba7f283
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 19:03:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 19:03:32 -0400
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
Improve comment for GetStableLatestTransactionId().
commit : a04dc87db140ddfb86008f424b8c4b2b6eeaa4cf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 11:20:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 11:20:02 -0400
M src/backend/access/transam/xact.c
Only throw recovery conflicts when InHotStandby. Bug fix to recent patch to allow Index Only Scans on Hot Standby.
commit : a2b516dab9b90007c1b65988d91222c4582adea8
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 31 May 2012 13:11:47 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 31 May 2012 13:11:47 +0100
Bug report from Jaime Casanova
M src/backend/access/heap/heapam.c
Update time zone data files to tzdata release 2012c.
commit : c8105e62bbd7e873f6db5d79617ac66ef5169853
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 00:47:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 31 May 2012 00:47:57 -0400
DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands,
Gaza, Haiti, Hebron, Morocco, Syria, Tokelau Islands.
Historical corrections for Canada.
M src/timezone/data/africa
M src/timezone/data/antarctica
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/europe
M src/timezone/data/leapseconds
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab
Force PL and range-type support functions to be owned by a superuser.
commit : ad0009e7be27489f5acc0a36217d9ea8f3db2b14
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 23:47:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 23:47:57 -0400
We allow non-superusers to create procedural languages (with restrictions)
and range datatypes. Previously, the automatically-created support
functions for these objects ended up owned by the creating user. This
represents a rather considerable security hazard, because the owning user
might be able to alter a support function's definition in such a way as to
crash the server, inject trojan-horse SQL code, or even execute arbitrary
C code directly. It appears that right now the only actually exploitable
problem is the infinite-recursion bug fixed in the previous patch for
CVE-2012-2655. However, it's not hard to imagine that future additions of
more ALTER FUNCTION capability might unintentionally open up new hazards.
To forestall future problems, cause these support functions to be owned by
the bootstrap superuser, not the user creating the parent object.
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_proc.c
M src/backend/commands/functioncmds.c
M src/backend/commands/proclang.c
M src/backend/commands/typecmds.c
M src/include/catalog/pg_proc_fn.h
Ignore SECURITY DEFINER and SET attributes for a PL's call handler.
commit : 33c6eaf78e692c0699e74a3883780d2edb68e4d7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 23:27:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 23:27:57 -0400
It's not very sensible to set such attributes on a handler function;
but if one were to do so, fmgr.c went into infinite recursion because
it would call fmgr_security_definer instead of the handler function proper.
There is no way for fmgr_security_definer to know that it ought to call the
handler and not the original function referenced by the FmgrInfo's fn_oid,
so it tries to do the latter, causing the whole process to start over
again.
Ordinarily such misconfiguration of a procedural language's handler could
be written off as superuser error. However, because we allow non-superuser
database owners to create procedural languages and the handler for such a
language becomes owned by the database owner, it is possible for a database
owner to crash the backend, which ideally shouldn't be possible without
superuser privileges. In 9.2 and up we will adjust things so that the
handler functions are always owned by superusers, but in existing branches
this is a minor security fix.
Problem noted by Noah Misch (after several of us had failed to detect
it :-(). This is CVE-2012-2655.
M src/backend/utils/fmgr/fmgr.c
Expand the allowed range of timezone offsets to +/-15:59:59 from Greenwich.
commit : cd0ff9c0f47784b428981280cd9564bb79a8266a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 19:58:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 19:58:35 -0400
We used to only allow offsets less than +/-13 hours, then it was +/14,
then it was +/-15. That's still not good enough though, as per today's bug
report from Patric Bechtel. This time I actually looked through the Olson
timezone database to find the largest offsets used anywhere. The winners
are Asia/Manila, at -15:56:00 until 1844, and America/Metlakatla, at
+15:13:42 until 1867. So we'd better allow offsets less than +/-16 hours.
Given the history, we are way overdue to have some greppable #define
symbols controlling this, so make some ... and also remove an obsolete
comment that didn't get fixed the last time.
Back-patch to all supported branches.
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/include/datatype/timestamp.h
Fix two more bugs in fast-path relation locking.
commit : 07ab1383e3be9e6f368e2ceb11bf7697d88260f9
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 30 May 2012 16:17:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 30 May 2012 16:17:46 -0400
First, the previous code failed to account for the fact that, during Hot
Standby operation, the startup process takes AccessExclusiveLocks on
relations without setting MyDatabaseId. This resulted in fast path
strong lock counts failing to be incremented with the startup process
took locks, which in turn allowed conflicting lock requests to succeed
when they should not have. Report by Erik Rijkers, diagnosis by Heikki
Linnakangas.
Second, LockReleaseAll() failed to honor the allLocks and lockmethodid
restrictions with respect to fast-path locks. It's not clear to me
whether this produces any user-visible breakage at the moment, but it's
certainly wrong. Rearrange order of operations in LockReleaseAll to fix.
Noted by Tom Lane.
M src/backend/storage/lmgr/lock.c
Fix incorrect password transformation in contrib/pgcrypto's DES crypt().
commit : 932ded2ed51e8333852e370c7a6dad75d9f236f9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 10:53:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 May 2012 10:53:30 -0400
Overly tight coding caused the password transformation loop to stop
examining input once it had processed a byte equal to 0x80. Thus, if the
given password string contained such a byte (which is possible though not
highly likely in UTF8, and perhaps also in other non-ASCII encodings), all
subsequent characters would not contribute to the hash, making the password
much weaker than it appears on the surface.
This would only affect cases where applications used DES crypt() to encode
passwords before storing them in the database. If a weak password has been
created in this fashion, the hash will stop matching after this update has
been applied, so it will be easy to tell if any passwords were unexpectedly
weak. Changing to a different password would be a good idea in such a case.
(Since DES has been considered inadequately secure for some time, changing
to a different encryption algorithm can also be recommended.)
This code, and the bug, are shared with at least PHP, FreeBSD, and OpenBSD.
Since the other projects have already published their fixes, there is no
point in trying to keep this commit private.
This bug has been assigned CVE-2012-2143, and credit for its discovery goes
to Rubin Xu and Joseph Bonneau.
M contrib/pgcrypto/crypt-des.c
Change the way parent pages are tracked during buffered GiST build.
commit : d1996ed5e8bfaf1314e7817015668029c07d3b9b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 30 May 2012 11:59:14 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 30 May 2012 11:59:14 +0300
We used to mimic the way a stack is constructed when descending the tree
during normal GiST inserts, but that was quite complicated during a buffered
build. It was also wrong: in GiST, the left-to-right relationships on
different levels might not match each other, so that when you know the
parent of a child page, you won't necessarily find the parent of the page to
the right of the child page by following the rightlinks at the parent level.
This sometimes led to "could not re-find parent" errors while building a
GiST index.
We now use a simple hash table to track the parent of every internal page.
Whenever a page is split, and downlinks are moved from one page to another,
we update the hash table accordingly. This is also better for performance
than the old method, as we never need to move right to re-find the parent
page, which could take a significant amount of time for buffers that were
created much earlier in the index build.
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistbuildbuffers.c
M src/include/access/gist_private.h
Delete the temporary file used in buffered GiST build, after the build.
commit : be02b16826ec9789ed3cb06e4e7531c94e497118
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 30 May 2012 11:58:54 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 30 May 2012 11:58:54 +0300
There were two bugs here: We forgot to call gistFreeBuildBuffers() function
at the end of build, and we passed interXact == true to BufFileCreateTemp,
so the file wasn't automatically cleaned up at end-of-transaction either.
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistbuildbuffers.c
Rewrite --section option to decouple it from --schema-only/--data-only.
commit : 4317e0246c645f60c39e6572644cff1cb03b4c65
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 May 2012 23:22:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 May 2012 23:22:14 -0400
The initial implementation of pg_dump's --section option supposed that the
existing --schema-only and --data-only options could be made equivalent to
--section settings. This is wrong, though, due to dubious but long since
set-in-stone decisions about where to dump SEQUENCE SET items, as seen in
bug report from Martin Pitt. (And I'm not totally convinced there weren't
other bugs, either.) Undo that coupling and instead drive --section
filtering off current-section state tracked as we scan through the TOC
list to call _tocEntryRequired().
To make sure those decisions don't shift around and hopefully save a few
cycles, run _tocEntryRequired() only once per TOC entry and save the result
in a new TOC field. This required minor rejiggering of ACL handling but
also allows a far cleaner implementation of inhibit_data_for_failed_table.
Also, to ensure that pg_dump and pg_restore have the same behavior with
respect to the --section switches, add _tocEntryRequired() filtering to
WriteToc() and WriteDataChunks(), rather than trying to implement section
filtering in an entirely orthogonal way in dumpDumpableObject(). This
required adjusting the handling of the special ENCODING and STDSTRINGS
items, but they were pretty weird before anyway.
Minor other code review for the patch, too.
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_restore.c
Fix integer overflow bug in GiST buffering build calculations.
commit : 4bc6fb57f774ea18187fd8565aad9994160bfc17
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 29 May 2012 22:22:43 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 29 May 2012 22:22:43 +0300
The result of (maintenance_work_mem * 1024) / BLCKSZ doesn't fit in a signed
32-bit integer, if maintenance_work_mem >= 2GB. Use double instead. And
while we're at it, write the calculations in an easier to understand form,
with the intermediary steps written out and commented.
M src/backend/access/gist/gistbuild.c
Teach AbortOutOfAnyTransaction to clean up partially-started transactions.
commit : 2755abf386e6572bad15cb6a032e504ad32308cc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 May 2012 23:57:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 May 2012 23:57:06 -0400
AbortOutOfAnyTransaction failed to do anything if the state it saw on
entry corresponded to failing partway through StartTransaction. I fixed
AbortCurrentTransaction to cope with that case way back in commit
60b2444cc3ba037630c9b940c3c9ef01b954b87b, but evidently overlooked that
AbortOutOfAnyTransaction should do likewise.
Back-patch to all supported branches. It's not clear that this omission
has any more-than-cosmetic consequences, but it's also not clear that it
doesn't, so back-patching seems the least risky choice.
M src/backend/access/transam/xact.c
Eliminate some more O(N^2) behaviors in pg_dump/pg_restore.
commit : c89bdf769065981e6948c94da8c0b96737bb8462
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 May 2012 20:38:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 May 2012 20:38:28 -0400
This patch fixes three places (which AFAICT is all of them) where runtime
was O(N^2) in the number of TOC entries, by using an index array to replace
linear searches of the TOC list. This performance issue is a bit less bad
than those recently fixed, because it depends on the number of items dumped
not the number in the source database, so the problem can be dodged by
doing partial dumps.
The previous coding already had an instance of one of the two index arrays
needed, but it was only calculated in parallel-restore cases; now we need
it all the time. I also chose to move the arrays into the ArchiveHandle
data structure, to make this code a bit more ready for the day that we
try to sling multiple ArchiveHandles around in pg_dump or pg_restore.
Since we still need some server-side work before pg_dump can really cope
nicely with tens of thousands of tables, there's probably little point in
back-patching.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
libpq: URI parsing fixes
commit : 2d612abd4d330cd9d3f5a3f5936b20a6e837a69c
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 28 May 2012 22:44:34 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 28 May 2012 22:44:34 +0300
Drop special handling of host component with slashes to mean
Unix-domain socket. Specify it as separate parameter or using
percent-encoding now.
Allow omitting username, password, and port even if the corresponding
designators are present in URI.
Handle percent-encoding in query parameter keywords.
Alex Shulgin
some documentation improvements by myself
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/test/expected.out
M src/interfaces/libpq/test/regress.in
Update SQL features list
commit : 388d2516792bb22d461d0b2af38730bfdcbf9027
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 23:34:16 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 23:34:16 +0300
Set E081 Basic Privileges to supported, since by the letter of it, we
support it, even though not all possible forms of USAGE privileges are
implemented.
M src/backend/catalog/sql_features.txt
psql: Remove notice about readline from --version output
commit : 8e497c731b481aac15fed5cd006fcd64f2f00de0
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:48:20 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:48:20 +0300
This was from a time when readline support wasn't standard. And it
doesn't help analyzing current line editing library problems.
M src/bin/psql/startup.c
Suppress -Wunused-result warning about write()
commit : 27314d32a883e3c4667d8249c3d4760fed917a12
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:35:01 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:35:01 +0300
This is related to aa90e148ca70a235897b1227f1a7cd1c66bc5368, but this
code is only used under -DLINUX_OOM_ADJ, so it was apparently
overlooked then.
M src/backend/postmaster/fork_process.c
PL/Perl: Avoid compiler warning from clang
commit : a8b92b6090f14a3a84d2b904eff1794e21047fae
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:30:34 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 May 2012 22:30:34 +0300
Use SvREFCNT_inc_simple_void() instead of SvREFCNT_inc() to avoid
warning about unused return value.
M src/pl/plperl/plperl_helpers.h
Improve pg_upgrade C comment.
commit : 4498a3407acfff83ab791d0d9764c70566ab840f
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:45:29 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:45:29 -0400
M contrib/pg_upgrade/function.c
Add C comment explaining why we can't exclude checking functions in the pg_catalog schema, even though they are not explicitly dumped (they are implicitly dumped, e.g. create language plperl).
commit : 20a3830b81d07aca1b8c3e954b4bc49d0847c51d
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:35:10 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:35:10 -0400
M contrib/pg_upgrade/function.c
Add pg_update C comment about problems with plpython_call_handler().
commit : d4696fa68f88f371e9da77cc0319fa0b947fd911
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:29:45 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 27 May 2012 06:29:45 -0400
M contrib/pg_upgrade/function.c
Make pg_recievexlog by default loop on connection failures
commit : 16282ae688de2b320cf176e9be8a89e4dfc60698
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 27 May 2012 11:05:24 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 27 May 2012 11:05:24 +0200
Avoids the need for an external script in the most common
scenario. Behavior can be overridden using the -n/--noloop
commandline parameter.
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/streamutil.c
Fix handling of pg_stat_statements.stat temporary file
commit : 2b97db61dd0bffb0843eb2ea9be054d925e88ef1
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 27 May 2012 10:54:31 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 27 May 2012 10:54:31 +0200
Write the file to a temporary name and then rename() it into the
permanent name, to ensure it can't end up half-written and corrupt
in case of a crash during shutdown.
Unlink the file after it has been read so it's removed from the data
directory and not included in base backups going to replication slaves.
M contrib/pg_stat_statements/pg_stat_statements.c
Prevent synchronized scanning when systable_beginscan chooses a heapscan.
commit : 532fe28dade9291b7a7f7de3920a4d997bbd86a1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 May 2012 19:09:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 May 2012 19:09:52 -0400
The only interesting-for-performance case wherein we force heapscan here
is when we're rebuilding the relcache init file, and the only such case
that is likely to be examining a catalog big enough to be syncscanned is
RelationBuildTupleDesc. But the early-exit optimization in that code gets
broken if we start the scan at a random place within the catalog, so that
allowing syncscan is actually a big deoptimization if pg_attribute is large
(at least for the normal case where the rows for core system catalogs have
never been changed since initdb). Hence, prevent syncscan here. Per my
testing pursuant to complaints from Jeff Frost and Greg Sabino Mullane,
though neither of them seem to have actually hit this specific problem.
Back-patch to 8.3, where syncscan was introduced.
M src/backend/access/index/genam.c
Fix string truncation to be multibyte-aware in text_name and bpchar_name.
commit : d3b97d1488ba868f6bab12eeaf0b9ae75fad2566
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 May 2012 17:34:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 May 2012 17:34:51 -0400
Previously, casts to name could generate invalidly-encoded results.
Also, make these functions match namein() more exactly, by consistently
using palloc0() instead of ad-hoc zeroing code.
Back-patch to all supported branches.
Karl Schnaitter and Tom Lane
M src/backend/utils/adt/name.c
M src/backend/utils/adt/varchar.c
M src/backend/utils/adt/varlena.c
Use binary search instead of brute-force scan in findNamespace().
commit : 73cc7d3b240e1d46b1996382e5735a820f8bc3f7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 May 2012 14:35:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 May 2012 14:35:37 -0400
The previous coding presented a significant bottleneck when dumping
databases containing many thousands of schemas, since the total time
spent searching would increase roughly as O(N^2) in the number of objects.
Noted by Jeff Janes, though I rewrote his proposed patch to use the
existing findObjectByOid infrastructure.
Since this is a longstanding performance bug, backpatch to all supported
versions.
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
Have pg_upgrade only use one extra log file for Win32, not two.
commit : 45ca31d6a7eaf91dc65fd5cf2b140320feb3fa3f
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 25 May 2012 09:09:51 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 25 May 2012 09:09:51 -0400
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
Fix base backup streaming xlog from standby
commit : 31d965819bdaa971ae007a67611e78ec1d185f14
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 25 May 2012 11:36:22 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 25 May 2012 11:36:22 +0200
When backing up from a standby server, the backup process
will not automatically switch xlog segment. So we must
accept a partially transferred xlog file in this case, but
rename it into position anyway.
In passing, merge the two callbacks for segment end and
stop stream into a single callback, since their implementations
were close to identical, and rename this callback to
reflect that it stops streaming rather than continues it.
Patch by Magnus Hagander, review by Fujii Masao
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/receivelog.h
On Windows, have pg_upgrade use different two files to log pg_ctl start/stop output, to fix file share error reported by Edmund Horner
commit : d226e236c6ccdd27f1fd42aaab070762d1b70275
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 20:30:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 20:30:39 -0400
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
Clarify 9.2 release notes items about pg_stat_statements, to better document fix of double counting and read/write count addition, per Peter Geoghegan
commit : 32cebaaed5127c1dd2ad616051065bf4c7652afa
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 19:10:06 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 19:10:06 -0400
M doc/src/sgml/release-9.2.sgml
Change pg_stat_statements order of release note items, per Peter Geoghegan
commit : 7672366a89dcccd0ba14eecdbc41b641480eb1e0
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 17:51:56 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 17:51:56 -0400
M doc/src/sgml/release-9.2.sgml
Remove PL/Perl null array 9.2 release note item, per Andrew Dunstan
commit : eeef7bd2da8f99a5f5abd9d495663001c2fccd12
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 17:35:53 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 24 May 2012 17:35:53 -0400
M doc/src/sgml/release-9.2.sgml
Fix array overrun in regex code.
commit : 2a4c46e0baf2d51117cd4468b28705d01ffcbff9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 24 May 2012 13:56:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 24 May 2012 13:56:16 -0400
zaptreesubs() was coded to unconditionally reset a capture subre's
corresponding pmatch[] entry. However, in regexes without backrefs, that
array is caller-supplied and might not have as many entries as the regex
has capturing parens. So check the array length and do nothing if there
is no corresponding entry, much as subset() does. Failure to check this
resulted in a stack clobber in the case reported by Marko Kreen.
This bug appears to have been latent in the regex library from the
beginning. It was not exposed because find() called dissect() not
cdissect(), and the dissect() code path didn't ever call zaptreesubs()
(formerly zapmem()). When I unified dissect() and cdissect() in commit
4dd78bf37aa29d04b3f358b08c4a2fa43cf828e7, the problem was exposed.
Now that I've seen this, I'm rather suspicious that we might need to
back-patch it; but will refrain for now, for lack of evidence that
the case can be hit in the previous coding.
M src/backend/regex/regexec.c
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Update SQL key word list to SQL:2011
commit : ace397e9d24eddc56e7dffa921f506117b602d78
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 24 May 2012 20:06:25 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 24 May 2012 20:06:25 +0300
For space reasons, drop SQL:1999 and SQL:2003. Only keep the latest
two and SQL-92 for historical comparison.
M doc/src/sgml/keywords.sgml
Adjust pg_upgrade to output a separate log file for pg_ctl output on Windows, to avoid opening a file by multiple processes.
commit : 476291bef0985e242685fcd37866fec7ab1b97c7
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 20:19:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 20:19:21 -0400
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
Add missing PQfinish() calls
commit : 77f93cb32d8711926b07030c1c73a57a7bc66911
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 23 May 2012 21:52:23 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 23 May 2012 21:52:23 +0200
Fujii Masao
M src/bin/pg_basebackup/streamutil.c
pg_standby: Remove tabs from string literals
commit : 72155b29a864d3621795f6cd1528d8e54cc3c671
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 23 May 2012 19:58:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 23 May 2012 19:58:17 +0300
And align a bit better with the rest of the debug output.
M contrib/pg_standby/pg_standby.c
Mention Peter Geoghegan as primary author of pg_stat_statements changes.
commit : db2cd074824d1cd3c7b7397b7c7230100d7a78a3
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 10:12:44 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 10:12:44 -0400
M doc/src/sgml/release-9.2.sgml
Improve wording of 9.2 clog release note item.
commit : 13477c0197cb4826b03c559a23f4bc838e61d4fb
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 09:29:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 23 May 2012 09:29:39 -0400
M doc/src/sgml/release-9.2.sgml
Add 9.2 release note authorship mentions for Heikki and Alexander Korotkov, per Alexander Korotkov.
commit : b9c895ee6f336084048f4c8cc76b81afb4535e58
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 22:59:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 22:59:21 -0400
M doc/src/sgml/release-9.2.sgml
Ensure that seqscans check for interrupts at least once per page.
commit : ed962fd712bbc0836437c8f789d9152aca5711b5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 May 2012 19:42:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 May 2012 19:42:05 -0400
If a seqscan encounters many consecutive pages containing only dead tuples,
it can remain in the loop in heapgettup for a long time, and there was no
CHECK_FOR_INTERRUPTS anywhere in that loop. This meant there were
real-world situations where a query would be effectively uncancelable for
long stretches. Add a check placed to occur once per page, which should be
enough to provide reasonable response time without adding any measurable
overhead.
Report and patch by Merlin Moncure (though I tweaked it a bit).
Back-patch to all supported branches.
M src/backend/access/heap/heapam.c
Add small example about pg_archivecleanup -x option
commit : 92a953fbf8c90c3b316fbc275767efb6994f1589
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 23 May 2012 00:29:20 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 23 May 2012 00:29:20 +0300
Every time I read this I had doubts about whether the argument to the
-x option should include the dot (yes). A small example should
clarify this.
M doc/src/sgml/pgarchivecleanup.sgml
Fix markup for HISTORY generation.
commit : 0013a665b75a62f6110bff99273b1015b4aa60fe
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:36:33 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:36:33 -0400
M doc/src/sgml/release-9.2.sgml
Fix reindexdb manual page to say --maintenance-db controls what is reindexed, not vacuumed (typo). Per report from Thomas REISS
commit : e6b7170c33b4795cc519137528523bd3c4933edb
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:31:46 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:31:46 -0400
M doc/src/sgml/ref/reindexdb.sgml
9.2 release notes: GiST index improvements are for all geometric index types, per Alexander Korotkov
commit : 007522e6b4c32d7ae67a2ff7f568eb2f0bd257f6
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:26:42 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:26:42 -0400
M doc/src/sgml/release-9.2.sgml
Remove reviewers from 9.2 release notes; improve attributions.
commit : 8a46e25189b428e1ff8af5ba19c6f32287277575
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:17:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 22 May 2012 17:17:01 -0400
M doc/src/sgml/release-9.2.sgml
Fix error message for COMMENT/SECURITY LABEL ON COLUMN xxx IS 'yyy'
commit : 8fbe5a317de6c91826ae2c91f73f780bb0d6489e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 11:19:33 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 11:19:33 -0400
When the column name is an unqualified name, rather than table.column,
the error message complains about too many dotted names, which is
wrong. Report by Peter Eisentraut based on examination of the
sepgsql regression test output, but the problem also affects COMMENT.
New wording as suggested by Tom Lane.
M contrib/sepgsql/expected/label.out
M src/backend/catalog/objectaddress.c
M src/test/regress/input/security_label.source
M src/test/regress/output/security_label.source
Release note improvements.
commit : b536458e73a8d9294817228f06961913f6faa551
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 10:20:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 10:20:25 -0400
Document some more things as incompatibilities, and improve wording of
another item.
Noah Misch
M doc/src/sgml/release-9.2.sgml
Prevent pg_basebackup when integer_datetimes flag doesn't match.
commit : 304aa339b20df9f9ba6f4d93175e05098f6fd1c1
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 10:02:47 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 10:02:47 -0400
Magnus Hagander, reviewed by Fujii Masao, with slight wording changes
by me.
M src/bin/pg_basebackup/streamutil.c
Repair out-of-date information in src/backend/storage/buffer/README.
commit : 219c024c64ced7ce497fe455b1e3dd7b70012775
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 09:30:59 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 22 May 2012 09:30:59 -0400
In commit d526575f893c1a4e05ebd307e80203536b213a6d, we changed things so
that buffer usage counts are incremented when the buffer is pinned, rather
than when it is unpinned, but the README file didn't get the memo.
Report by Amit Kapila.
M src/backend/storage/buffer/README
Move postmaster's RemovePgTempFiles call to a less randomly chosen place.
commit : b94ce6e807ce5685bda1dcd36027091ceec6b5a0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 22:50:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 22:50:30 -0400
There is no reason to do this as early as possible in postmaster startup,
and good reason not to do it until we have completely created the
postmaster's lock file, namely that it might contribute to pg_ctl thinking
that postmaster startup has timed out. (This would require a rather
unusual amount of time to be spent scanning temp file directories, but we
have at least one field report of it happening reproducibly.)
Back-patch to 9.1. Before that, pg_ctl didn't wait for additional info to
be added to the lock file, so it wasn't a problem.
Note that this is not a complete fix to the slow-start issue in 9.1,
because we still had identify_system_timezone being run during postmaster
start in 9.1. But that's at least a reasonably well-defined delay, with
an easy workaround if needed, whereas the temp-files scan is not so
predictable and cannot be avoided.
M src/backend/postmaster/postmaster.c
Update woefully-obsolete comment.
commit : efae4653c98fd201a8a723bceabf182a1005ac0f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 22:10:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 22:10:40 -0400
The accurate info about what's in a lock file has been in miscadmin.h
for some time, so let's just make this comment point there instead of
maintaining a duplicative copy.
M src/backend/utils/init/miscinit.c
pg_ctl: Sort signal list in --help output
commit : cdf8bcb8d93b4365f124e994c31687b39b619253
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 21 May 2012 20:12:30 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 21 May 2012 20:12:30 +0300
The list was neither logical nor numerical nor alphabetical. Let's go
with alphabetical.
M src/bin/pg_ctl/pg_ctl.c
libpq: Add missing file to GETTEXT_FILES list
commit : 4c39a09089130fb2eeccd6eacdc3d12aa69f84de
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 21 May 2012 20:08:50 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 21 May 2012 20:08:50 +0300
For the record, fe-print.c is also missing, but it's sort of
deprecated, and the string internationalization there has some issues,
and it doesn't seem worth fixing that. So let's leave that out.
M src/interfaces/libpq/nls.mk
Adjust documentation of ALTER TABLE CLUSTER ON for more consistency.
commit : e79da56b85fa69055e872bdb79fb20f800175bc6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 12:06:56 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 12:06:56 -0400
Josh Kupershmidt
M doc/src/sgml/ref/alter_table.sgml
Document that we deviate from ISO 8601 by not using 'T' on output.
commit : 8be950f5c0a2d8591cfc9955ad4ee4baf50d6131
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 11:56:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 May 2012 11:56:00 -0400
Per discussion, we should explain that we follow RFC 3339 and not really
the letter of the ISO 8601 spec for timestamp output format. Mostly
Brendan Jurd's wording, though I tweaked it to clarify that we do take 'T'
on input. Minor additional copy-editing and markup-tweaking, too.
M doc/src/sgml/datatype.sgml
Fix incorrect logic in JSON number lexer
commit : f1f6737e154f9d00f1565fc08fd7ac677b380822
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 02:24:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 02:24:46 +0300
Detectable by gcc -Wlogical-op.
Add two regression test cases that would previously allow incorrect
values to pass.
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
Some reference page improvements
commit : fe2534e534c0572a71d6f0d2d51a2d058fc3524c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 01:15:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 01:15:55 +0300
initdb: Add -T option
oid2name: Put options in some non-random order
pg_dump: Put --section option in the right place
And some additional markup and terminology improvements.
M doc/src/sgml/oid2name.sgml
M doc/src/sgml/ref/initdb.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_controldata.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/ref/pg_resetxlog.sgml
Small cleanups of contrib --help output
commit : 510860a6a5e4b66091353e7b0d619f71f6bec789
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 01:14:25 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 20 May 2012 01:14:25 +0300
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
M contrib/pgbench/pgbench.c
Put back word that was mysteriously lost in man page conversion
commit : 9c64f395578d98e6e988c378b6056ef787ff349d
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 19 May 2012 20:26:53 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 19 May 2012 20:26:53 +0300
M doc/src/sgml/pgupgrade.sgml
Reworded sentence as suggested by Stephen Frost.
commit : c1ba858c6d49ae100f6e343932aa99c7a61e3f06
author : Michael Meskes <meskes@postgresql.org>
date : Sat, 19 May 2012 14:42:47 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Sat, 19 May 2012 14:42:47 +0200
M doc/src/sgml/ref/create_type.sgml
Realign some --help output to have better spacing between columns
commit : 2273a50364cf4a098d7ee4b5aa7e88c5cc5777ad
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 18 May 2012 20:34:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 18 May 2012 20:34:14 +0300
M src/backend/main/main.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/bin/pg_resetxlog/pg_resetxlog.c
Fix bug in gistRelocateBuildBuffersOnSplit().
commit : 1d27dcf5781ac7baeda0584fd016efc8eab718b3
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 18 May 2012 19:31:36 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 18 May 2012 19:31:36 +0300
When we create a temporary copy of the old node buffer, in stack, we mustn't
leak that into any of the long-lived data structures. Before this patch,
when we called gistPopItupFromNodeBuffer(), it got added to the array of
"loaded buffers". After gistRelocateBuildBuffersOnSplit() exits, the
pointer added to the loaded buffers array points to garbage. Often that goes
unnotied, because when we go through the array of loaded buffers to unload
them, buffers with a NULL pageBuffer are ignored, which can often happen by
accident even if the pointer points to garbage.
This patch fixes that by marking the temporary copy in stack explicitly as
temporary, and refrain from adding buffers marked as temporary to the array
of loaded buffers.
While we're at it, initialize nodeBuffer->pageBlocknum to InvalidBlockNumber
and improve comments a bit. This isn't strictly necessary, but makes
debugging easier.
M src/backend/access/gist/gistbuildbuffers.c
M src/include/access/gist_private.h
file_fdw: Improve error message
commit : 8402fab4112144a039157583b7e3368b8e31db3a
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 20:20:33 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 20:20:33 +0300
The hint looked a bit confusing when there were no valid options to
hint about.
M contrib/file_fdw/file_fdw.c
M contrib/file_fdw/output/file_fdw.source
Update key words table for 9.2
commit : 4ad5cbedf6ea3186a286c61a164703b107f6a138
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 19:27:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 19:27:55 +0300
M doc/src/sgml/keywords.sgml
Update SQL features/conformance information to SQL:2011
commit : 939ec9b8a4cdd0c9ed9d1d85390d44942cd2edf6
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 09:50:04 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 17 May 2012 09:50:04 +0300
M doc/src/sgml/features.sgml
M src/backend/catalog/sql_features.txt
Change COLLATION keyword category
commit : be6d1c88a4e6f563adac54483f3fc07ed8d8d99e
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 16 May 2012 20:19:44 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 16 May 2012 20:19:44 +0300
It was changed from unreserved to reserved as part of the COLLATION
FOR syntax, but it turns out that type_func_name_keyword is
sufficient.
M src/backend/parser/gram.y
M src/include/parser/kwlist.h
Improve error message for ALTER COLUMN TYPE coercion failure.
commit : 488c6dd1708a2c4a9e9f307001f28c05c48651bd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 May 2012 12:12:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 May 2012 12:12:40 -0400
Per recent discussion, the error message for this was actually a trifle
inaccurate, since it said "cannot be cast" which might be incorrect.
Adjust that wording, and add a HINT suggesting that a USING clause might
be needed.
M src/backend/commands/tablecmds.c
M src/test/regress/expected/alter_table.out
Fix bug in freespace calculation in heap_multi_insert().
commit : 6593c5b5dc39b179b1b7a3c947df2596af3e70c9
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 16 May 2012 14:10:29 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 16 May 2012 14:10:29 +0300
If the amount of freespace on page was less than the amount reserved by
fillfactor, the calculation would underflow.
This fixes bug #6643 reported by Tomonari Katsumata.
M src/backend/access/heap/heapam.c
Fix a whitespace issue with the man pages
commit : 00b0c73f1f2b98a7d09de63aaa14d6498ac521ae
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 22:55:13 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 22:55:13 +0300
See 6ef24487967692604b07a4a54e71821a60fb729a for an explanation. This
is the same for the new man pages.
M doc/src/sgml/pgarchivecleanup.sgml
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/pgtesttiming.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/ref/psql-ref.sgml
Remove whitespace from end of lines
commit : c8e086795a7ffc5244e03ffc2c92a3ae915a5055
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 22:19:04 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 22:19:04 +0300
pgindent and perltidy should clean up the rest.
M contrib/pg_upgrade/TESTING
M doc/src/sgml/client-auth.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
M doc/src/sgml/release.sgml
M src/backend/utils/misc/guc-file.l
M src/interfaces/libpq/Makefile
M src/pl/plperl/expected/plperl_array.out
M src/pl/plperl/sql/plperl_array.sql
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/create_function_3.out
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/json.out
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/create_function_3.sql
M src/test/regress/sql/foreign_data.sql
M src/test/regress/sql/json.sql
M src/tools/copyright.pl
M src/tools/msvc/README
M src/tools/msvc/install.bat
M src/tools/pginclude/pgrminclude
Make xrefs to tables instead of assuming they appear below
commit : 131b4d647388cb756e5aab1f1462c8b46125d89c
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 21:53:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 21:53:07 +0300
M doc/src/sgml/func.sgml
M doc/src/sgml/plpgsql.sgml
Remove stray nbsp character
commit : 8afb026e57e746b8748d01798c0940ba02aaedde
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 21:38:59 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 15 May 2012 21:38:59 +0300
M src/backend/catalog/heap.c
Fix bug in to_tsquery().
commit : d2495f272cd164ff075bee5c4ce95aed11338a36
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 15 May 2012 19:22:56 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 15 May 2012 19:22:56 +0300
We were using memcpy() to copy to a possibly overlapping memory region,
which is a no-no. Use memmove() instead.
M src/backend/tsearch/to_tsany.c
In pgstat.c, use a timeout in WaitLatchOrSocket only on Windows.
commit : 9b63e9869ffaa4d6d3e8bf45086a765d8f310f1c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:51:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:51:34 -0400
We have no need for a timeout here really, but some broken products from
Redmond seem to lose FD_READ events occasionally, and waking up and
retrying the recv() is the only known way to work around that. Perhaps
somebody will be motivated to figure out a better answer here; but not I.
M src/backend/postmaster/pgstat.c
Revert "Add some temporary instrumentation to pgstat.c."
commit : 5a2bb060121f574d6587e5fc6c7f1d4e3a759351
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:08:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:08:10 -0400
This reverts commit 7d88bb73f755f7fb5d847ef2319c21076054fb0e.
That instrumentation has served its purpose.
M src/backend/postmaster/pgstat.c
Put back AC_REQUIRE([AC_STRUCT_TM]).
commit : f667747b6d30c524c210501f5a2ca8e543a1bb67
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:06:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 23:06:48 -0400
The BSD-ish members of the buildfarm all seem to think removing this
was a bad idea. It looks to me like it resulted in omitting the system
header inclusion necessary to detect the fields of struct tm correctly.
M config/c-library.m4
M configure
M src/include/pg_config.h.in
Assert that WaitLatchOrSocket callers cannot wait only for writability.
commit : e42a21b9e6c9b9e6346a34b62628d48ff2fc6ddf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 16:11:59 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 16:11:59 -0400
Since we have chosen to report socket EOF and error conditions via the
WL_SOCKET_READABLE flag bit, it's unsafe to wait only for
WL_SOCKET_WRITEABLE; the caller would never be notified of the socket
condition, and in some of these implementations WaitLatchOrSocket would
busy-wait until something else happens. Add this restriction to the API
specification, and add Asserts to check that callers don't try to do that.
At some point we might want to consider adjusting the API to relax this
restriction, but until we have an actual use case for waiting on a
write-only socket, it seems premature to design a solution.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
Remove unused AC_DEFINE symbols
commit : ff4628f37a1e700d1fe716d0c271f68d8aa1e4ea
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 22:51:21 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 22:51:21 +0300
ENABLE_DTRACE unused as of a7b7b07af340c73adee9959edf260695591a9496
HAVE_ERR_SET_MARK unused as of 4ed4b6c54e5fab24ab2624d80e26f7546edc88ad
HAVE_FCVT unused as of 4553e1d80f824291932cfde30aa24a76dd8f1941
HAVE_STRUCT_SOCKADDR_UN unused as of b4cea00a1fc9d2270bfe9aeeee44915378d5f733
HAVE_SYSCONF unused as of f83356c7f574bc69969f29dc7b430b286a0cd9f4
TM_IN_SYS_TIME never used, obsolescent per Autoconf documentation
M config/c-library.m4
M configure
M configure.in
M src/include/pg_config.h.in
For testing purposes, reinsert a timeout in pgstat.c's wait call.
commit : d461d0502b6e20c6d4ec326ba2faec8212fd5dee
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 15:03:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 15:03:14 -0400
Test results from buildfarm members mastodon/narwhal (Windows Server 2003)
make it look like that platform just plain loses FD_READ events
occasionally, and the only reason our previous coding seemed to work was
that it timed out every couple of seconds and retried the whole operation.
Try to verify this by reinserting a finite timeout into the pgstat loop.
This isn't meant to be a permanent patch either, just to confirm or
disprove a theory.
M src/backend/postmaster/pgstat.c
Force pgwin32_recv into nonblock mode when called from pgstat.c.
commit : f1ca51549e9e7045a2db95a61744334f1dbb4d64
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 10:57:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 May 2012 10:57:07 -0400
This should get rid of the usage of pgwin32_waitforsinglesocket entirely,
and perhaps thereby remove the race condition that's evidently still
present on some versions of Windows. The previous arrangement was a bit
unsafe anyway, since waiting at the recv() would not allow pgstat to notice
postmaster death.
M src/backend/postmaster/pgstat.c
Remove unnecessary pg_verifymbstr() calls from tsvector/query in functions.
commit : f15c2eae9c2f36830fae40935bd8cdcede4b75a0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 14 May 2012 14:30:32 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 14 May 2012 14:30:32 +0300
The input should've been validated well before it hits the input function.
Doing so again is a waste of cycles.
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsvector.c
Update comments that became out-of-date with the PGXACT struct.
commit : 9e4637bf89ef9fbc89a45dc4b421fa6740accd41
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 14 May 2012 10:22:44 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 14 May 2012 10:22:44 +0300
When the "hot" members of PGPROC were split off to separate PGXACT structs,
many PGPROC fields referred to in comments were moved to PGXACT, but the
comments were neglected in the commit. Mostly this is just a search/replace
of PGPROC with PGXACT, but the way the dummy PGPROC entries are created for
prepared transactions changed more, making some of the comments totally
bogus.
Noah Misch
M src/backend/access/transam/README
M src/backend/access/transam/twophase.c
M src/backend/access/transam/varsup.c
M src/backend/commands/analyze.c
M src/backend/commands/vacuum.c
M src/backend/postmaster/autovacuum.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/time/snapmgr.c
M src/backend/utils/time/tqual.c
M src/include/storage/proc.h
Remove leftovers of BeOS port
commit : 64f09ca38600ef0471683491f7735001b72c0f39
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 04:47:48 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 04:47:48 +0300
These should have been removed when the BeOS port was removed in
44f90212236bfb6fc1279e95dc8fa315104d964e.
M configure
M configure.in
M src/backend/port/sysv_sema.c
M src/backend/port/sysv_shmem.c
M src/include/c.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Small punctuation editing of postgresql.conf.sample
commit : 6bf1e7668dbdb5f97ae3b06f63bc0525be9d5387
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 04:14:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 04:14:35 +0300
M src/backend/utils/misc/postgresql.conf.sample
pg_ctl: Improve --help output
commit : 2a7f6366409d54e9a61e2b7ba0277b7cdf15dbdc
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 03:54:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 14 May 2012 03:54:17 +0300
All other --help output has = signs between long options and their
arguments, so do it here as well.
M src/bin/pg_ctl/pg_ctl.c
Add some temporary instrumentation to pgstat.c.
commit : 7d88bb73f755f7fb5d847ef2319c21076054fb0e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 21:11:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 21:11:31 -0400
Log main-loop blocking events and the results of inquiry messages.
This is to get some clarity as to what's happening on those Windows
buildfarm members that still don't like the latch-ified stats collector.
This bulks up the postmaster log a tad, so I won't leave it in place for
long.
M src/backend/postmaster/pgstat.c
Fix DROP TABLESPACE to unlink symlink when directory is not there.
commit : b8347138e94c4e712334508c460cbe0062d21e70
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 18:06:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 18:06:52 -0400
If the tablespace directory is missing entirely, we allow DROP TABLESPACE
to go through, on the grounds that it should be possible to clean up the
catalog entry in such a situation. However, we forgot that the pg_tblspc
symlink might still be there. We should try to remove the symlink too
(but not fail if it's no longer there), since not doing so can lead to
weird behavior subsequently, as per report from Michael Nolan.
There was some discussion of adding dependency links to prevent DROP
TABLESPACE when the catalogs still contain references to the tablespace.
That might be worth doing too, but it's an orthogonal question, and in
any case wouldn't be back-patchable.
Back-patch to 9.0, which is as far back as the logic looks like this.
We could possibly do something similar in 8.x, but given the lack of
reports I'm not sure it's worth the trouble, and anyway the case could
not arise in the form the logic is meant to cover (namely, a post-DROP
transaction rollback having resurrected the pg_tablespace entry after
some or all of the filesystem infrastructure is gone).
M src/backend/commands/tablespace.c
Re-revert stats collector latch changes.
commit : 966970ed636586b80739c0d21aec7561f0fafedd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 14:44:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 14:44:39 -0400
This reverts commit cb2f2873d6b81ad7f0a9733ba738bfac0746fb7b, restoring
the latch-ified stats collector logic. We'll soon see if this works any
better on the Windows buildfarm machines.
M src/backend/postmaster/pgstat.c
Attempt to fix some issues in our Windows socket code.
commit : b85427f2276d02756b558c0024949305ea65aca5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 14:35:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 14:35:40 -0400
Make sure WaitLatchOrSocket regards FD_CLOSE as a read-ready condition.
We might want to tweak this further, but it was surely wrong as-is.
Make pgwin32_waitforsinglesocket detach its private event object from the
passed socket before returning. I suspect that failure to do so leads
to race conditions when other code (such as WaitLatchOrSocket) attaches
a different event object to the same socket. Moreover, the existing
coding meant that repeated calls to pgwin32_waitforsinglesocket would
perform ResetEvent on an event actively connected to a socket, which
is rumored to be an unsafe practice; the WSAEventSelect documentation
appears to recommend against this, though it does not say not to do it
in so many words.
Also, uniformly use the coding pattern "WSAEventSelect(s, NULL, 0)" to
detach events from sockets, rather than passing the event in the second
parameter. The WSAEventSelect documentation says that the second parameter
is ignored if the third is 0, so theoretically this should make no
difference. However, elsewhere on the same reference page the use of NULL
in this context is recommended, and I have found suggestions on the net
that some versions of Windows have bugs with a non-NULL second parameter
in this usage.
Some other mostly-cosmetic cleanup, such as using the right one of
WSAGetLastError and GetLastError for reporting errors from these functions.
M src/backend/port/win32/socket.c
M src/backend/port/win32_latch.c
Fix bogus declaration of local variable.
commit : fd350ef395b59e39bf419bd47e820b94dff23971
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 00:30:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 13 May 2012 00:30:32 -0400
rc should be an int here, not a pgsocket. Fairly harmless as long as
pgsocket is an integer type, but nonetheless wrong. Error introduced
in commit 87091cb1f1ed914e2ddca424fa28f94fdf8461d2.
M src/backend/libpq/auth.c
Avoid unnecessary process wakeups in the log collector.
commit : 398b240151708d7e971631875760ddbad3a63e0e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 May 2012 19:21:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 May 2012 19:21:54 -0400
syslogger was coded to wake up once per second whether there was anything
useful to do or not. As part of our campaign to reduce the server's idle
power consumption, change it to use a latch for waiting. Now, in the
absence of any data to log or any signals to service, it will only wake up
at the programmed logfile rotation times (if any).
M src/backend/postmaster/syslogger.c
Remove unused AC_SUBST variables
commit : 7b85527eaee2cdcfc33d9f8c6c8e4a4908f7f58d
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 May 2012 23:29:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 May 2012 23:29:07 +0300
These were apparently never used. The AC_SUBST was probably just
added in a copy-and-paste manner. (The shell variables continue to be
used inside configure. The change is just that we don't need them
outside of configure.)
M configure
M configure.in
Fix WaitLatchOrSocket to handle EOF on socket correctly.
commit : 31ad6553646c81f3ce8fccf8aef1a1134a7864c7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 May 2012 16:36:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 May 2012 16:36:47 -0400
When using poll(), EOF on a socket is reported with the POLLHUP not
POLLIN flag (at least on Linux). WaitLatchOrSocket failed to check
this bit, causing it to go into a busy-wait loop if EOF occurs.
We earlier fixed the same mistake in the test for the state of the
postmaster_alive socket, but missed it for the caller-supplied socket.
Fortunately, this error is new in 9.2, since 9.1 only had a select()
based code path not a poll() based one.
M src/backend/port/unix_latch.c
Update group commit release note item.
commit : d36eaa2167c4baaa654a19432035f47fdf6fbe7d
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 12 May 2012 08:55:07 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 12 May 2012 08:55:07 -0400
M doc/src/sgml/release-9.2.sgml
Ensure backwards compatibility for GetStableLatestTransactionId()
commit : 867540b49cd248ea867cfcf04d3dbb2ba4f506b8
author : Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 12 May 2012 13:26:10 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 12 May 2012 13:26:10 +0100
M src/backend/access/transam/xact.c
Fix obsolescent C declaration syntax
commit : afe86a9e73b0d30f34dfdc196a6b52ce1306a95e
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 May 2012 12:52:02 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 May 2012 12:52:02 +0300
gcc -Wextra/-Wold-style-declaration thinks that "inline" should go
before the function return type.
M src/backend/access/gist/gistproc.c
Explain compatibility item about language names a bit more.
commit : a5985a96a82d96704984377a96c1945bcf914646
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 18:53:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 18:53:12 -0400
Since we've got an "open items" list item about this, apparently some
people are pretty worried about it.
In passing remove a lot of trailing whitespace.
M doc/src/sgml/release-9.2.sgml
Update example of process titles shown by "ps".
commit : f35ebd2aa1a2c5d99e859abed488b67c4e3694ff
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 18:33:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 18:33:39 -0400
This example was quite old: it lacked the WAL writer and autovac launcher
as well as the more recently added checkpointer. Linux "ps" seems to show
slightly different stuff now too.
M doc/src/sgml/monitoring.sgml
Cosmetic adjustments for postmaster's handling of checkpointer.
commit : d0c231d13224621c2bd1e7e0466dd8000bdc1a02
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 17:46:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 17:46:08 -0400
Correct some comments, order some operations a bit more consistently.
No functional changes.
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/postmaster.c
PL/Python: Adjust the regression tests for Python 3.3
commit : 2cfb1c6f77734db81b6e74bcae630f93b94f69be
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 11 May 2012 23:01:15 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 11 May 2012 23:01:15 +0300
The string representation of ImportError changed. Remove printing
that; it's not necessary for the test.
The order in which members of a dict are printed changed. But this
was always implementation-dependent, so we have just been lucky for a
long time. Do the printing the hard way to ensure sorted order.
M src/pl/plpython/expected/plpython_import.out
M src/pl/plpython/expected/plpython_params.out
M src/pl/plpython/expected/plpython_trigger.out
M src/pl/plpython/sql/plpython_import.sql
M src/pl/plpython/sql/plpython_params.sql
M src/pl/plpython/sql/plpython_trigger.sql
Fix contrib/citext's upgrade script to handle array and domain cases.
commit : 63fecc91770f3d494b6fe993bdc198a9faf6fe2d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 15:22:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 11 May 2012 15:22:30 -0400
We previously recognized that citext wouldn't get marked as collatable
during pg_upgrade from a pre-9.1 installation, and hacked its
create-from-unpackaged script to manually perform the necessary catalog
adjustments. However, we overlooked the fact that domains over citext,
as well as the citext[] array type, need the same adjustments. Extend
the script to handle those cases.
Also, the documentation suggested that this was only an issue in pg_upgrade
scenarios, which is quite wrong; loading any dump containing citext from a
pre-9.1 server will also result in the type being wrongly marked.
I approached the documentation problem by changing the 9.1.2 release note
paragraphs about this issue, which is historically inaccurate. But it
seems better than having the information scattered in multiple places, and
leaving incorrect info in the 9.1.2 notes would be bad anyway. We'll still
need to mention the issue again in the 9.1.4 notes, but perhaps they can
just reference 9.1.2 for fix instructions.
Per report from Evan Carroll. Back-patch into 9.1.
M contrib/citext/citext–unpackaged–1.0.sql
M doc/src/sgml/release-9.1.sgml
Prevent loss of init fork when truncating an unlogged table.
commit : 1331cc6c1ad2beba7985523508d6722dc865c337
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 11 May 2012 09:46:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 11 May 2012 09:46:42 -0400
Fixes bug #6635, reported by Akira Kurosawa.
M src/backend/catalog/heap.c
M src/backend/commands/tablecmds.c
M src/include/catalog/heap.h
Remove extraneous #include "storage/proc.h"
commit : b762e8f50b3edefc0b8597dda46a18dc5e22b056
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 11 May 2012 14:46:46 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 11 May 2012 14:46:46 +0100
M src/backend/utils/adt/xid.c
Ensure age() returns a stable value rather than the latest value
commit : b06679e01244d33304b71a6a44c7cc86173617b3
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 11 May 2012 14:36:24 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 11 May 2012 14:36:24 +0100
M src/backend/access/transam/xact.c
M src/backend/utils/adt/xid.c
M src/include/access/xact.h
On GiST page split, release the locks on child pages before recursing up.
commit : 3652d72dd45b3ef2ca5e83e8cbd09f78696ad4c4
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 11 May 2012 12:35:28 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 11 May 2012 12:35:28 +0300
When inserting the downlinks for a split gist page, we used hold the locks
on the child pages until the insertion into the parent - and recursively its
parent if it had to be split too - were all completed. Change that so that
the locks on child pages are released after the insertion in the immediate
parent is done, before recursing further up the tree.
This reduces the number of lwlocks that are held simultaneously. Holding
many locks is bad for concurrency, and in extreme cases you can even hit
the limit of 100 simultaneously held lwlocks in a backend. If you're really
unlucky, you can hit the limit while in a critical section, which brings
down the whole system.
This fixes bug #6629 reported by Tom Forbes. Backpatch to 9.1. The page
splitting code was rewritten in 9.1, and the old code did not have this
problem.
M src/backend/access/gist/gist.c
Improve discussion of setting server parameters.
commit : 817ec1bc8227eb0d7f3bbb5725ea1de0ec73c1ea
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 23:01:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 23:01:28 -0400
Rewrite description of "include_if_exists" for clarity. Add subsection
headings to make the structure of the page a little clearer. A couple
other minor improvements too.
Josh Kupershmidt and Tom Lane
M doc/src/sgml/config.sgml
Revert catalog bump; was post-beta1, and unnecessary.
commit : ee24de40018fe5b6f8dc015e56e41c7889622c33
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 18:44:47 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 18:44:47 -0400
M src/include/catalog/catversion.h
Update comment for 'name' data type to say 63 "bytes".
commit : d2fe836cd28dbaff86f63b77da8d7ea0efa9a9c3
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 18:40:40 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 18:40:40 -0400
Catalog version bump so everyone has the same comment for beta1.
M src/include/catalog/catversion.h
M src/include/catalog/pg_type.h
Stamp 9.2beta1.
commit : f70fa835e08eee4cb2dc0f72d66cf633089c37e8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 18:35:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 18:35:09 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Tweak documentation wording to avoid "pdfendlink" failure.
commit : e3cdc1532caaec4652b41d1114c71aa3872a8f6f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 18:02:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 18:02:37 -0400
HEAD documentation was failing to build as US PDF for me, because a link
to "CREATE CAST" was getting split across pages. Adjust wording to
remove this rather gratuitous cross-reference.
M doc/src/sgml/catalogs.sgml
Temporarily revert stats collector latch changes so we can ship beta1.
commit : cb2f2873d6b81ad7f0a9733ba738bfac0746fb7b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 17:26:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 17:26:08 -0400
This patch reverts commit 49340037ee3ab46cb24144a86705e35f272c24d5 and some
follow-on tweaking in pgstat.c. While the basic scheme of latch-ifying the
stats collector seems sound enough, it's failing on most Windows buildfarm
members for unknown reasons, and there's no time left to debug that before
9.2beta1. Better to ship a beta version without this improvement. I hope
to re-revert this once beta1 is out, though.
M src/backend/postmaster/pgstat.c
Merge visibility map crash-safety into index-only scan release note item, per Robert Haas.
commit : 5428ff4af84e488c7f0629108cd12ff51125e09f
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 16:50:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 16:50:34 -0400
M doc/src/sgml/release-9.2.sgml
Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplify callers.
commit : f40022f1adaeff85b01d98fea38cf5aa16814aa7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 14:34:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 14:34:22 -0400
Per a suggestion from Peter Geoghegan, make WaitLatch responsible for
verifying that the WL_POSTMASTER_DEATH bit it returns is truthful (by
testing PostmasterIsAlive). Then simplify its callers, who no longer
need to do that for themselves. Remove weasel wording about falsely-set
result bits from WaitLatch's API contract.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/walwriter.c
Properly capitalize the TimeZone parameter
commit : 586d356bc5af1aa61f965f6ba1cbeb1533ec8c99
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:55:49 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:55:49 +0300
For better or worse, it is implemented in mixed case, so document it
as such, at least in the main listing, like DateStyle.
Josh Kupershmidt
M doc/src/sgml/config.sgml
Add comma after "Previously" as suggested by Josh Kupershmidt
commit : 45f6fb2713feb21bc24fa907bad575008fd680ef
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:47:49 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:47:49 -0400
M doc/src/sgml/release-9.2.sgml
PL/Python: Fix slicing support for result objects for Python 3
commit : a97207b6908f1d4a7d19b37b818367bb0171039f
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:38:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:38:17 +0300
The old way of implementing slicing support by implementing
PySequenceMethods.sq_slice no longer works in Python 3. You now have
to implement PyMappingMethods.mp_subscript. Do this by simply
proxying the call to the wrapped list of result dictionaries.
Consolidate some of the subscripting regression tests.
Jan Urbański
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/plpy_resultobject.c
M src/pl/plpython/sql/plpython_spi.sql
PL/Python: Update incorrect comment
commit : 1540d3bf4d405278533377ba81dbbf1c857eaec0
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:07:56 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 20:07:56 +0300
Jan Urbański
M src/pl/plpython/plpy_resultobject.h
9.2 release note updates from Peter Geoghegan
commit : ffda90f3afe3f4db10127d2b853dfe4230720873
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:38:05 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:38:05 -0400
M doc/src/sgml/release-9.2.sgml
Fix Windows implementation of PGSemaphoreLock.
commit : ada8fa08fc6cf5f199b6df935b4d0a730aaa4fec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 13:36:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 13:36:14 -0400
The original coding failed to reset ImmediateInterruptOK before returning,
which would potentially allow a subsequent query-cancel interrupt to be
accepted at an unsafe point. This is a really nasty bug since it's so hard
to predict the consequences, but they could be unpleasant.
Also, ensure that signal handlers are serviced before this function
returns, even if the semaphore is already set. This should make the
behavior more like Unix.
Back-patch to all supported versions.
M src/backend/port/win32_sema.c
Improve Windows implementation of WaitLatch/WaitLatchOrSocket.
commit : 8ebc908c575b3378c9d4096412d16d91d107311c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 13:26:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 13:26:47 -0400
Ensure that signal handlers are serviced before this function returns.
This should make the behavior more like Unix. Also, add some more
error checking, and make some other cosmetic improvements.
No back-patch since it's not clear whether this is fixing any live bug
that would affect 9.1. I'm more concerned about 9.2 anyway given our
considerable recent expansions in the usage of WaitLatch.
M src/backend/port/win32_latch.c
New 9.2 SSL parameters are GUC, not libpq, per Magnus's observation.
commit : 53216e3992665eda1570650f4047efa4202e7173
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:16:10 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:16:10 -0400
M doc/src/sgml/release-9.2.sgml
Add 9.2 release note suggestions from Heikki,
commit : deb2c6e381e26b4e3c042b16990dd3821f6757b3
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:13:05 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:13:05 -0400
M doc/src/sgml/release-9.2.sgml
Python 2.2 is no longer supported
commit : 1d158d7f9841d7993f7b5990f311e3595db7960b
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 19:58:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 19:58:35 +0300
It was already on its last legs, and it turns out that it was
accidentally broken in commit 89e850e6fda9e4e441712012abe971fe938d595a
and no one cared. So remove the rest the support for it and update
the documentation to indicate that Python 2.3 is now required.
M doc/src/sgml/installation.sgml
M src/pl/plpython/expected/README
M src/pl/plpython/plpython.h
Whitespace cleanup
commit : d9bb75dd37ae1642392b8638c99bfeb9f9890c0a
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 19:53:41 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 May 2012 19:53:41 +0300
M doc/src/sgml/pgtesttiming.sgml
9.2 release note adjustments from Robert Haas.
commit : 1908a6796a2e61e78c9a31807076746c34ea6a15
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:00:18 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 13:00:18 -0400
M doc/src/sgml/release-9.2.sgml
Another doc fix for HTML entities.
commit : d413efe9e14357577a3b7537784eb856ab6525ba
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:54:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:54:39 -0400
M doc/src/sgml/release.sgml
Update entitiy escapes docs; must be Latin1.
commit : 77bfdb11d09a3adef1f9310201e1b2fe38ee47bd
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:53:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:53:21 -0400
M doc/src/sgml/release.sgml
Remove URL that suggested numeric HTML entities.
commit : 38cd7cc0bcd6fcbfa8942e28f6aee84ab9fbb651
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:33:54 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 12:33:54 -0400
M doc/src/sgml/release.sgml
Remove unportable use of SGML character-code entity.
commit : 47ce4c36a721b621b6b0ddcba9d02ccd0af5b3aa
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 12:22:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 12:22:22 -0400
It'd be nice to be able to spell Jan Urbanski's name with the correct
accent marks, but we haven't yet found a way that works in everybody's
docs toolchain. This way definitely doesn't.
M doc/src/sgml/release-9.2.sgml
M doc/src/sgml/release.sgml
Release notes adjustments from Erik Rijkers
commit : 1ee90397f498141abf0c77b4d3c9ea26babc072d
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 11:21:13 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 11:21:13 -0400
M doc/src/sgml/release-9.2.sgml
Improve two 9.2 release note items.
commit : 5d258fe90cbd6a0efd68e057697f85a1f961c42d
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 10:29:49 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 10:29:49 -0400
M doc/src/sgml/release-9.2.sgml
Fix a couple of typos in 9.2 release notes.
commit : 386bb92f6348bf8a6f5ebd39122161e190e464c2
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 15:41:31 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 15:41:31 +0300
Thom Brown
M doc/src/sgml/release-9.2.sgml
Copy-editing 9.2 release notes.
commit : 3e8e692bbc829f48c8c1accbeed9284735f9a88c
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 10:44:31 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 10:44:31 +0300
Fix a couple of typos, add missing filename tags, and add a link to the doc
section on timezone guc.
M doc/src/sgml/release-9.2.sgml
Only attempt to show collations on servers >= 9.1.
commit : f33c5d471ccdf33ac413d49b32a898eeab13538b
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 10 May 2012 09:11:38 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 10 May 2012 09:11:38 +0200
Show a proper error message instead of a SQL error.
Josh Kupershmidt
M src/bin/psql/describe.c
Fix outdated comment.
commit : 60a3dffb724c49c60d9ba921929bfa49ec21dd00
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 09:55:48 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 May 2012 09:55:48 +0300
Multi-insert records observe XLOG_HEAP_INIT_PAGE flag too, as Andres Freund
pointed out.
M src/include/access/htup.h
PL/pgSQL RETURN NEXT was leaking converted tuples, causing out of memory when looping through large numbers of rows. Flag the converted tuples to be freed. Complaint and patch by Joe.
commit : b58bacdacbb15948cf24c786ebbb92213a2fe013
author : Joe Conway <mail@joeconway.com>
date : Wed, 9 May 2012 22:57:19 -0700
committer: Joe Conway <mail@joeconway.com>
date : Wed, 9 May 2012 22:57:19 -0700
M src/pl/plpgsql/src/pl_exec.c
Improve tests for postmaster death in auxiliary processes.
commit : fd71421b0187de0e2bf76ff66b4a9433bd96c4a0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 00:54:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 00:54:32 -0400
In checkpointer and walwriter, avoid calling PostmasterIsAlive unless
WaitLatch has reported WL_POSTMASTER_DEATH. This saves a kernel call per
iteration of the process's outer loop, which is not all that much, but a
cycle shaved is a cycle earned. I had already removed the unconditional
PostmasterIsAlive calls in bgwriter and pgstat in previous patches, but
forgot that WL_POSTMASTER_DEATH is supposed to be treated as untrustworthy
(per comment in unix_latch.c); so adjust those two cases to match.
There are a few other places where the same idea might be applied, but only
after substantial code rearrangement, so I didn't bother.
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/walwriter.c
Update 9.2 SSL release note links.
commit : e78cc624e87709e04960966c97a8d9f927f3d2f7
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 00:32:08 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 May 2012 00:32:08 -0400
M doc/src/sgml/release-9.2.sgml
Further tweaking of nomenclature in checkpointer.c.
commit : d3ae406f54d6f0d90b15f9e388025ef5a481e2c3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 00:01:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 May 2012 00:01:10 -0400
Get rid of some more naming choices that only make sense if you know that
this code used to be in the bgwriter, as well as some stray comments
referencing the bgwriter.
M src/backend/postmaster/checkpointer.c
Improve control logic for bgwriter hibernation mode.
commit : 6308ba05a7a24b5137d97508300131ffa42051c2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 9 May 2012 23:36:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 9 May 2012 23:36:01 -0400
Commit 6d90eaaa89a007e0d365f49d6436f35d2392cfeb added a hibernation mode
to the bgwriter to reduce the server's idle-power consumption. However,
its interaction with the detailed behavior of BgBufferSync's feedback
control loop wasn't very well thought out. That control loop depends
primarily on the rate of buffer allocation, not the rate of buffer
dirtying, so the hibernation mode has to be designed to operate only when
no new buffer allocations are happening. Also, the check for whether the
system is effectively idle was not quite right and would fail to detect
a constant low level of activity, thus allowing the bgwriter to go into
hibernation mode in a way that would let the cycle time vary quite a bit,
possibly further confusing the feedback loop. To fix, move the wakeup
support from MarkBufferDirty and SetBufferCommitInfoNeedsSave into
StrategyGetBuffer, and prevent the bgwriter from entering hibernation mode
unless no buffer allocations have happened recently.
In addition, fix the delaying logic to remove the problem of possibly not
responding to signals promptly, which was basically caused by trying to use
the process latch's is_set flag for multiple purposes. I can't prove it
but I'm suspicious that that hack was responsible for the intermittent
"postmaster does not shut down" failures we've been seeing in the buildfarm
lately. In any case it did nothing to improve the readability or
robustness of the code.
In passing, express the hibernation sleep time as a multiplier on
BgWriterDelay, not a constant. I'm not sure whether there's any value in
exposing the longer sleep time as an independently configurable setting,
but we can at least make it act like this for little extra code.
M src/backend/postmaster/bgwriter.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/freelist.c
M src/backend/storage/lmgr/proc.c
M src/include/postmaster/bgwriter.h
M src/include/storage/buf_internals.h
M src/include/storage/proc.h
Publish draft version of Postgres 9.2 release notes.
commit : 668f959dcb7786654943d4726d1af07ad468a5be
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 9 May 2012 22:25:43 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 9 May 2012 22:25:43 -0400
M doc/src/sgml/filelist.sgml
A doc/src/sgml/release-9.2.sgml
M doc/src/sgml/release.sgml
Add make dependency so that postgres.bki is rebuilt in major version change
commit : 5d39807a008a5a73999477a7b3c21b2165fee549
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:45:56 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:45:56 +0300
Every time since the current rule for postgres.bki was put in place
when we change the major version, people complain that their tests
fail in strange ways. This is because the version number in
postgres.bki is not updated, because it has no dependency for that.
And you can't even force the rebuild manually if you don't happen to
know which file has the problem. Fix that now before it will happen
again.
The only remaining problem with switching major versions, as far as
the regression tests are concerned, is that contrib needs to be
rebuilt. But that's easily invoked, and in any case the failure modes
are more friendly if you forget that.
M src/backend/catalog/Makefile
Split contrib documentation into extensions and programs
commit : 1c882e07da553d792f479beb92b4729a4c0bd8de
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:39:53 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:39:53 +0300
Create separate appendixes for contrib extensions and other server
plugins on the one hand, and utility programs on the other. Recast
the documentation of the latter as refentries, so that man pages are
generated.
M doc/src/sgml/contrib.sgml
M doc/src/sgml/docguide.sgml
M doc/src/sgml/oid2name.sgml
M doc/src/sgml/pgarchivecleanup.sgml
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/pgstandby.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/pgtesttiming.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/stylesheet-man.xsl
M doc/src/sgml/vacuumlo.sgml
Update documentation to say that gmake check in contrib is supported
commit : 4f696030ab1bbe950765d2687adb1d18a1358e15
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:37:09 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 May 2012 20:37:09 +0300
M doc/src/sgml/contrib.sgml
Rename BgWriterShmem/Request to CheckpointerShmem/Request
commit : 8f28789bffd03e6d865039aff00c68db54d9f574
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 14:23:45 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 14:23:45 +0100
M src/backend/postmaster/checkpointer.c
M src/backend/storage/ipc/ipci.c
M src/include/postmaster/bgwriter.h
Rename BgWriterCommLock to CheckpointerCommLock
commit : bbd3ec9dce0eca289c7a5d70fb754c8a7762180b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 14:11:48 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 14:11:48 +0100
M src/backend/postmaster/checkpointer.c
M src/include/storage/lwlock.h
Avoid xid error from age() function when run on Hot Standby
commit : 5829387381d2e4edf84652bb5a712f6185860670
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 13:56:24 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 9 May 2012 13:56:24 +0100
M src/backend/utils/adt/xid.c
Add another URL for HTML entity codes.
commit : 773b5e0efa409d06113c3654f53da511de673a51
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 8 May 2012 23:17:43 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 8 May 2012 23:17:43 -0400
M doc/src/sgml/release.sgml
Fix an issue in recent walwriter hibernation patch.
commit : acd4c7d58baf09fc278a0f8c1170fba2d56ccdd5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 23:05:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 23:05:58 -0400
Users of asynchronous-commit mode expect there to be a guaranteed maximum
delay before an async commit's WAL records get flushed to disk. The
original version of the walwriter hibernation patch broke that. Add an
extra shared-memory flag to allow async commits to kick the walwriter out
of hibernation mode, without adding any noticeable overhead in cases where
no action is needed.
M src/backend/access/transam/xlog.c
M src/backend/postmaster/walwriter.c
M src/include/access/xlog.h
Document how to find non-ASCII characters in the release notes.
commit : 8b77e226fbf4834a03fcef2fa31aa85dac40c941
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 8 May 2012 22:51:17 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 8 May 2012 22:51:17 -0400
M doc/src/sgml/release.sgml
Reduce idle power consumption of stats collector process.
commit : 49340037ee3ab46cb24144a86705e35f272c24d5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 21:26:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 21:26:46 -0400
Latch-ify the stats collector, so that it does not need an arbitrary wakeup
cycle to check for postmaster death. The incremental savings in idle power
is pretty marginal, since we only had it waking every two seconds; but I
believe that this patch may also improve the collector's performance under
load, by reducing the number of kernel calls made per message when messages
are arriving constantly (we now avoid a select/poll call except when we
need to sleep). The change also reduces the time needed for a normal
database shutdown on platforms where signals don't interrupt select().
M src/backend/postmaster/pgstat.c
Reduce idle power consumption of walwriter and checkpointer processes.
commit : 5461564a9dfd73f12a21f2aff5d7b3678c7afc25
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 20:03:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 May 2012 20:03:26 -0400
This patch modifies the walwriter process so that, when it has not found
anything useful to do for many consecutive wakeup cycles, it extends its
sleep time to reduce the server's idle power consumption. It reverts to
normal as soon as it's done any successful flushes. It's still true that
during any async commit, backends check for completed, unflushed pages of
WAL and signal the walwriter if there are any; so that in practice the
walwriter can get awakened and returned to normal operation sooner than the
sleep time might suggest.
Also, improve the checkpointer so that it uses a latch and a computed delay
time to not wake up at all except when it has something to do, replacing a
previous hardcoded 0.5 sec wakeup cycle. This also is primarily useful for
reducing the server's power consumption when idle.
In passing, get rid of the dedicated latch for signaling the walwriter in
favor of using its procLatch, since that comports better with possible
generic signal handlers using that latch. Also, fix a pre-existing bug
with failure to save/restore errno in walwriter's signal handlers.
Peter Geoghegan, somewhat simplified by Tom
M src/backend/access/transam/xlog.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/walwriter.c
M src/backend/storage/lmgr/proc.c
M src/include/access/xlog.h
M src/include/storage/latch.h
M src/include/storage/proc.h
Tweak contrib --help output to match common style
commit : 081ca7a0d1991abe7ba6c3c219119335903c4111
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 21:55:05 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 21:55:05 +0300
Placeholders such as OPTION are typically kept in singular.
M contrib/oid2name/oid2name.c
M contrib/pg_upgrade/option.c
M contrib/pgbench/pgbench.c
psql: Add variable to control keyword case in tab completion
commit : db84ba65ab5c0ad0b34d68ab5a687bc5f4ca3ba6
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 21:03:45 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 21:03:45 +0300
This adds the variable COMP_KEYWORD_CASE, which controls in what case
keywords are completed. This is partially to let users configure the
change from commit 69f4f1c3576abc535871c6cfa95539e32a36120f, but it
also offers more behaviors than were available before.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/tab-complete.c
Update config.guess and config.sub
commit : cf09230e1992a81e8e17441104d3c8a558abec04
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 20:46:13 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 20:46:13 +0300
M config/config.guess
M config/config.sub
Fix dependency tracking for src/port/%_srv.o files
commit : 3420b241a7dbad8e5fe62395054bf8596f33d143
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 20:08:53 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 20:08:53 +0300
Because they use their own compilation rule, they don't use the
dependency tracking logic from Makefile.global. To make sure that
dependency tracking works anyway for the *_srv.o files, depend on
their *.o siblings as well, which do have proper dependencies. It's a
hack that might fail someday if there is a *_srv.o without a
corresponding *.o, but it works for now (and those would probably go
into src/backend/port/ anyway).
M src/port/Makefile
Fix misleading comments
commit : dcb2c5838183d3d305dbf713d4519d094f835b2f
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 19:35:22 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 May 2012 19:35:22 +0300
Josh Kupershmidt
M contrib/pgcrypto/pgp-compress.c
M src/pl/plperl/plperl_helpers.h
Remove strdup, strtol, strtoul from libpgport
commit : 3284e03d5d791e953e8c7eba25f1afb00c62e4a4
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 7 May 2012 23:10:28 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 7 May 2012 23:10:28 +0300
These should not be needed anymore, at least after the recent port
removals. So let's see whether we can do without them.
M configure
M configure.in
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
M src/include/port.h
D src/port/strdup.c
D src/port/strtol.c
D src/port/strtoul.c
Fix pg_config.h make rule
commit : d7b2cd9d40e858778ca93b59383d280e510a01e7
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 7 May 2012 21:28:38 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 7 May 2012 21:28:38 +0300
According to the Autoconf documentation, there should be a make rule
pg_config.h: stamp-h
so that with the right setup around this, a change in pg_config.h.in
will trigger a rebuild of everything that depends on pg_config.h. But
this doesn't always work, sometimes you need to run make twice to get
everything up to date after a change of pg_config.h.in.
The fix is to write the rule as
pg_config.h: stamp-h ;
instead (with an empty command instead of no command). This is what
Automake-generated makefiles effectively do, so it seems safe to be on
this side.
It's not actually clear why this is (apparently) more correct. It's
been posted to
<http://lists.gnu.org/archive/html/help-make/2012-04/msg00058.html>
without response so far.
M src/Makefile.global.in
Make "unexpected EOF" messages DEBUG1 unless in an open transaction
commit : 916d589a10185bb30fc77923029d806f5907ab1e
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 7 May 2012 18:39:37 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 7 May 2012 18:39:37 +0200
"Unexpected EOF on client connection" without an open transaction
is mostly noise, so turn it into DEBUG1. With an open transaction it's
still indicating a problem, so keep those as ERROR, and change the message
to indicate that it happened in a transaction.
M src/backend/commands/copy.c
M src/backend/tcop/fastpath.c
M src/backend/tcop/postgres.c
Document that it is the pgsql version we are matching for psqlrc version-specific files, not the server version.
commit : 65b110703b798cdbfa568aa3583caba0ed51b33a
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 6 May 2012 21:43:55 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 6 May 2012 21:43:55 -0400
M doc/src/sgml/ref/psql-ref.sgml
Revert typo fix 768c3affd44d1dcb4e43e2e006c642524714c2a4; I was wrong.
commit : 0a3a674b98ebb47e2f4b539a0e284744a7871987
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 6 May 2012 08:10:55 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 6 May 2012 08:10:55 -0400
M doc/src/sgml/ref/psql-ref.sgml
Fix psql doc typo.
commit : 768c3affd44d1dcb4e43e2e006c642524714c2a4
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 5 May 2012 11:59:53 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 5 May 2012 11:59:53 -0400
M doc/src/sgml/ref/psql-ref.sgml
Overdue code review for transaction-level advisory locks patch.
commit : 71b9549d053b2f0a9e76e829c917385841f84bee
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 May 2012 17:43:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 May 2012 17:43:27 -0400
Commit 62c7bd31c8878dd45c9b9b2429ab7a12103f3590 had assorted problems, most
visibly that it broke PREPARE TRANSACTION in the presence of session-level
advisory locks (which should be ignored by PREPARE), as per a recent
complaint from Stephen Rees. More abstractly, the patch made the
LockMethodData.transactional flag not merely useless but outright
dangerous, because in point of fact that flag no longer tells you anything
at all about whether a lock is held transactionally. This fix therefore
removes that flag altogether. We now rely entirely on the convention
already in use in lock.c that transactional lock holds must be owned by
some ResourceOwner, while session holds are never so owned. Setting the
locallock struct's owner link to NULL thus denotes a session hold, and
there is no redundant marker for that.
PREPARE TRANSACTION now works again when there are session-level advisory
locks, and it is also able to transfer transactional advisory locks to the
prepared transaction, but for implementation reasons it throws an error if
we hold both types of lock on a single lockable object. Perhaps it will be
worth improving that someday.
Assorted other minor cleanup and documentation editing, as well.
Back-patch to 9.1, except that in the 9.1 branch I did not remove the
LockMethodData.transactional flag for fear of causing an ABI break for
any external code that might be examining those structs.
M doc/src/sgml/func.sgml
M doc/src/sgml/mvcc.sgml
M src/backend/storage/lmgr/README
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/lock.h
doc: Fix for too many brackets in command synopses on man pages
commit : 1715ff112809bca5218ddb6eccfda2c20dc420b5
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 3 May 2012 22:50:04 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 3 May 2012 22:50:04 +0300
The default for the choice attribute of the <arg> element is "opt",
which would normally put the argument inside brackets. But the DSSSL
stylesheets contain a hack that treats <arg> directly inside <group>
specially, so that <group><arg>-x</arg><arg>-y</arg></group> comes out
as [ -x | -y ] rather than [ [-x] | [-y] ], which it would technically
be. But when building man pages, this doesn't work, and so the
command synopses on the man pages contain lots of extra brackets.
By putting choice="opt" or choice="plain" explicitly on every <arg>
and <group> element, we avoid any toolchain dependencies like that,
and it also makes it clearer in the source code what is meant.
In passing, make some small corrections in the documentation about
which arguments are really optional or not.
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/createdb.sgml
M doc/src/sgml/ref/createlang.sgml
M doc/src/sgml/ref/createuser.sgml
M doc/src/sgml/ref/droplang.sgml
M doc/src/sgml/ref/dropuser.sgml
M doc/src/sgml/ref/initdb.sgml
M doc/src/sgml/ref/pg_controldata.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_resetxlog.sgml
M doc/src/sgml/ref/pg_restore.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/vacuumdb.sgml
M doc/src/sgml/sql.sgml
Remove BSD/OS (BSDi) port. There are no known users upgrading to Postgres 9.2, and perhaps no existing users either.
commit : ebcaa5fcde8411786e3765414465174e6d31c8e6
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 3 May 2012 10:58:44 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 3 May 2012 10:58:44 -0400
M configure
M configure.in
M doc/src/sgml/dfunc.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/runtime.sgml
M src/Makefile.shlib
D src/backend/port/dynloader/bsdi.c
D src/backend/port/dynloader/bsdi.h
M src/backend/utils/misc/ps_status.c
M src/include/port.h
D src/include/port/bsdi.h
D src/makefiles/Makefile.bsdi
M src/port/fseeko.c
D src/template/bsdi
M src/tools/find_typedef
Mark git_changelog examples with the proper executable names.
commit : 7490c48f1e2c51dce77d33f7fd464e72713679a5
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 2 May 2012 20:42:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 2 May 2012 20:42:21 -0400
M src/tools/git_changelog
Add missing parenthesis in comment.
commit : 8e0c5195dff70ffc9c132716d0cf7f3eff45e302
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 14:30:58 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 14:30:58 -0400
M src/include/storage/proc.h
PL/Python: Improve test coverage
commit : e6c2e8cb87846161033e1f215876c4b95f631df0
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 21:09:03 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 21:09:03 +0300
Add test cases for inline handler of plython2u (when using that
language name), and for result object element assignment. There is
now at least one test case for every top-level functionality, except
plpy.Fatal (annoying to use in regression tests) and result object
slice retrieval and slice assignment (which are somewhat broken).
M src/pl/plpython/expected/plpython_do.out
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/sql/plpython_do.sql
M src/pl/plpython/sql/plpython_spi.sql
PL/Python: Fix crash in functions returning SETOF and using SPI
commit : 52aa334fcd5a9d230be7e8fb964d94c6c4e63dc7
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 20:59:51 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 20:59:51 +0300
Allocate PLyResultObject.tupdesc in TopMemoryContext, because its
lifetime is the lifetime of the Python object and it shouldn't be
freed by some other memory context, such as one controlled by SPI. We
trust that the Python object will clean up its own memory.
Before, this would crash the included regression test case by trying
to use memory that was already freed.
reported by Asif Naeem, analysis by Tom Lane
M src/pl/plpython/expected/plpython_setof.out
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/sql/plpython_setof.sql
Even more duplicate word removal, in the spirit of the season
commit : e9605a039b60350003daf8a5b3c0c10993994b60
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 20:14:39 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 2 May 2012 20:14:39 +0300
M contrib/fuzzystrmatch/levenshtein.c
M contrib/pgcrypto/crypt-md5.c
M src/backend/tsearch/wparser_def.c
Avoid repeated CLOG access from heap_hot_search_buffer.
commit : 003811042139790a5a479c8264271a3248eda36f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 12:40:07 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 12:40:07 -0400
At the time we check whether the tuple is dead to all running
transactions, we've already verified that it isn't visible to our
scan, setting hint bits if appropriate. So there's no need to
recheck CLOG for the all-dead test we do just a moment later.
So, add HeapTupleIsSurelyDead() to test the appropriate condition
under the assumption that all relevant hit bits are already set.
Review by Tom Lane.
M src/backend/access/heap/heapam.c
M src/backend/utils/time/tqual.c
M src/include/utils/tqual.h
Further corrections from the department of redundancy department.
commit : 1b4998fd44bad9f8ab90e741cadd6519f6c94a44
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 11:11:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 11:11:25 -0400
Thom Brown
M src/backend/storage/freespace/README
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/README.barrier
More duplicate word removal.
commit : e01e66f808fbd161b2714eab34bb9e9d0db0db53
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 09:27:34 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 2 May 2012 09:27:34 -0400
M contrib/sepgsql/selinux.c
M src/backend/access/gist/gistget.c
M src/include/catalog/objectaccess.h
M src/pl/plpython/plpy_typeio.c
Remove duplicate words in comments.
commit : f291ccd43e06fdd7c55102975a0b2f38bc140b90
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 2 May 2012 10:20:27 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 2 May 2012 10:20:27 +0300
Found these with grep -r "for for ".
M src/backend/access/spgist/spgdoinsert.c
M src/backend/storage/ipc/standby.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/numeric.c
M src/include/tsearch/dicts/regis.h
Kill some remaining references to SVR4 and univel.
commit : 50c2d6a1a63f04fd8c4553fc696c2c9e235b1a25
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 May 2012 00:29:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 May 2012 00:29:17 -0400
Both terms still appear in a few places, but I thought it best to leave
those alone in context.
M src/backend/utils/misc/ps_status.c
M src/port/getrusage.c
Tweak psql to print row counts when \x auto chooses non-expanded output.
commit : 9b7a84f2a45322b21b86eb180a869d1ed2937b85
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 1 May 2012 16:03:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 1 May 2012 16:03:45 -0400
Noah Misch
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/print.c
M src/bin/psql/print.h
M src/bin/psql/startup.c
Remove dead ports
commit : f2f9439fbfba378cb64cd6e5a046e0184cd542c6
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 1 May 2012 22:11:12 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 1 May 2012 22:11:12 +0300
Remove the following ports:
- dgux
- nextstep
- sunos4
- svr4
- ultrix4
- univel
These are obsolete and not worth rescuing. In most cases, there is
circumstantial evidence that they wouldn't work anymore anyway.
M configure
M configure.in
M doc/src/sgml/installation.sgml
M src/Makefile.shlib
M src/backend/main/main.c
D src/backend/port/dynloader/dgux.c
D src/backend/port/dynloader/dgux.h
M src/backend/port/dynloader/irix.h
D src/backend/port/dynloader/nextstep.c
D src/backend/port/dynloader/nextstep.h
D src/backend/port/dynloader/sunos4.c
D src/backend/port/dynloader/sunos4.h
D src/backend/port/dynloader/svr4.c
D src/backend/port/dynloader/svr4.h
D src/backend/port/dynloader/ultrix4.c
D src/backend/port/dynloader/ultrix4.h
D src/backend/port/dynloader/univel.c
D src/backend/port/dynloader/univel.h
M src/backend/port/dynloader/unixware.h
D src/backend/port/nextstep/Makefile
D src/backend/port/nextstep/port.c
D src/include/port/dgux.h
D src/include/port/nextstep.h
D src/include/port/sunos4.h
D src/include/port/svr4.h
D src/include/port/ultrix4.h
D src/include/port/univel.h
M src/include/storage/s_lock.h
D src/makefiles/Makefile.dgux
D src/makefiles/Makefile.sunos4
D src/makefiles/Makefile.svr4
D src/makefiles/Makefile.ultrix4
D src/makefiles/Makefile.univel
D src/template/dgux
D src/template/nextstep
D src/template/sunos4
D src/template/svr4
D src/template/ultrix4
D src/template/univel
Improve markup of cmdsynopsis elements
commit : 4266509c577b089627930af39f1dcd2d06b493e9
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 21:15:48 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 21:15:48 +0300
Add more markup in particular so that the command options appear
consistently in monospace in the HTML output.
On the vacuumdb reference page, remove listing all the possible
options in the synopsis. They have become too many now; we have the
detailed options list for that.
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/createlang.sgml
M doc/src/sgml/ref/droplang.sgml
M doc/src/sgml/ref/initdb.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_resetxlog.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/vacuumdb.sgml
Fix display of <command> elements on man pages
commit : 61c84b47619c11e74089cb3160813a4b3c98e6d7
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 21:12:28 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 21:12:28 +0300
We had changed this from the default bold to monospace for all output
formats, but for man pages, this creates visual inconsistencies, so
revert to the default for man pages.
M doc/src/sgml/stylesheet-common.xsl
M doc/src/sgml/stylesheet-fo.xsl
M doc/src/sgml/stylesheet-hh.xsl
M doc/src/sgml/stylesheet.xsl
Converge all SQL-level statistics timing values to float8 milliseconds.
commit : 809e7e21af8cd24855f1802524a13bbaa823f929
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 30 Apr 2012 14:02:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 30 Apr 2012 14:02:47 -0400
This patch adjusts the core statistics views to match the decision already
taken for pg_stat_statements, that values representing elapsed time should
be represented as float8 and measured in milliseconds. By using float8,
we are no longer tied to a specific maximum precision of timing data.
(Internally, it's still microseconds, but we could now change that without
needing changes at the SQL level.)
The columns affected are
pg_stat_bgwriter.checkpoint_write_time
pg_stat_bgwriter.checkpoint_sync_time
pg_stat_database.blk_read_time
pg_stat_database.blk_write_time
pg_stat_user_functions.total_time
pg_stat_user_functions.self_time
pg_stat_xact_user_functions.total_time
pg_stat_xact_user_functions.self_time
The first four of these are new in 9.2, so there is no compatibility issue
from changing them. The others require a release note comment that they
are now double precision (and can show a fractional part) rather than
bigint as before; also their underlying statistics functions now match
the column definitions, instead of returning bigint microseconds.
M doc/src/sgml/monitoring.sgml
M src/backend/access/transam/xlog.c
M src/backend/catalog/system_views.sql
M src/backend/postmaster/pgstat.c
M src/backend/utils/adt/pgstatfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/pgstat.h
M src/test/regress/expected/rules.out
Mark ReThrowError() with attribute noreturn
commit : 26471a51fc833e2ce58a2f16f891256d57dd28c6
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 20:22:28 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Apr 2012 20:22:28 +0300
All related functions were already so marked.
M src/include/utils/elog.h
Remove duplicate word in comment.
commit : 0d2235a25bc71848c18f551f992b3eed8cec2399
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 30 Apr 2012 13:14:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 30 Apr 2012 13:14:46 -0400
Noted by Peter Geoghegan.
M src/backend/access/transam/xlog.c
Add comments suggesting usage of git_changelog to generate release notes.
commit : f33fe47a9169eec692b80c17ea47bd2f9c261aaf
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 30 Apr 2012 11:05:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 30 Apr 2012 11:05:34 -0400
M src/tools/git_changelog
Rename I/O timing statistics columns to blk_read_time and blk_write_time.
commit : 1dd89eadcd2648d7ca0baed3c7af16a04eb1aa26
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 18:13:33 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 18:13:33 -0400
This seems more consistent with the pre-existing choices for names of
other statistics columns. Rename assorted internal identifiers to match.
M contrib/pg_stat_statements/pg_stat_statements–1.0–1.1.sql
M contrib/pg_stat_statements/pg_stat_statements–1.1.sql
M contrib/pg_stat_statements/pg_stat_statements.c
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/pgstatstatements.sgml
M src/backend/catalog/system_views.sql
M src/backend/commands/explain.c
M src/backend/executor/instrument.c
M src/backend/postmaster/pgstat.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/utils/adt/pgstatfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/executor/instrument.h
M src/include/pgstat.h
M src/test/regress/expected/rules.out
Rename track_iotiming GUC to track_io_timing.
commit : 309c64745ea145d7c731e1fe610631b2b84e7e88
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 16:23:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 16:23:54 -0400
This spelling seems significantly more readable to me.
M doc/src/sgml/config.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/pgstatstatements.sgml
M src/backend/storage/buffer/bufmgr.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/storage/bufmgr.h
Further editorialization on the new documentation for statistics views.
commit : 5f2b0893871cce1ffb77ac7f13b3fba227e6f11f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 15:35:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 15:35:57 -0400
Get rid of the per-column documentation of underlying functions, which did
far more to clutter the view descriptions than it did to be helpful, and
was rather incomplete and typo-ridden anyway. Instead suggest that people
consult the definitions of the standard views to see the underlying
functions.
The older functions for obtaining individual facts about backends are now
somewhat obsoleted by pg_stat_get_activity, which means that they are not
documented by any standard view. So I put that information into a separate
table. (Maybe we should just deprecate them instead?)
In passing, fix a couple more documentation errors.
M doc/src/sgml/monitoring.sgml
Change return type of ExceptionalCondition to void and mark it noreturn
commit : 81107282a5ff1490a0a4ded193cbc61e69cda537
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 29 Apr 2012 21:07:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 29 Apr 2012 21:07:35 +0300
In ancient times, it was thought that this wouldn't work because of
TrapMacro/AssertMacro, but changing those to use a comma operator
appears to work without compiler warnings.
M src/backend/utils/error/assert.c
M src/backend/utils/error/elog.c
M src/include/postgres.h
Simplify makefile rule
commit : 2227bb9c948d2dcc167d414630ed3bae7f31db83
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 29 Apr 2012 20:59:12 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 29 Apr 2012 20:59:12 +0300
Instead of writing out the .c -> .o rule, use the default one, so that
dependency tracking can be used.
M src/port/Makefile
Make a copy-editing pass over the new documentation for statistics views.
commit : aebe989477ac5a9f7b59ae464ec68ec45975ed3f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 13:24:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Apr 2012 13:24:44 -0400
Fix a bunch of typos, improve markup, make wording more uniform, rearrange
some material. No substantive changes.
M doc/src/sgml/monitoring.sgml
Adjust timing units in pg_stat_statements.
commit : 93f94e356d47ea20ca7c2fcb65cbb746049fe4d1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Apr 2012 16:03:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Apr 2012 16:03:57 -0400
Display total time and I/O timings in milliseconds, for consistency with
the units used for timings in the core statistics views. The columns
remain of float8 type, so that sub-msec precision is available. (At some
point we will probably want to convert the core views to use float8 type
for the same reason, but this patch does not touch that issue.)
This is a release-note-requiring change in the meaning of the total_time
column. The I/O timing columns are new as of 9.2, so there is no
compatibility impact from redefining them.
Do some minor copy-editing in the documentation, too.
M contrib/pg_stat_statements/pg_stat_statements.c
M doc/src/sgml/pgstatstatements.sgml
Clear I/O timing counters after sending them to the stats collector.
commit : cdbad241f41362aaf09f913722a541e04e048742
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Apr 2012 15:11:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Apr 2012 15:11:13 -0400
This oversight caused the reported times to accumulate in an O(N^2)
fashion the longer a backend runs.
M src/backend/postmaster/pgstat.c
PL/Python: Update list of supported environment variables
commit : 05dd9fb18d6572f1467f995085b1de324d0ad028
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 28 Apr 2012 13:34:06 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 28 Apr 2012 13:34:06 +0300
M doc/src/sgml/plpython.sgml
Fix printing of whole-row Vars at top level of a SELECT targetlist.
commit : d6f7d4fdc516b2b597f8c2cd011c41c2729dab45
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Apr 2012 19:49:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Apr 2012 19:49:18 -0400
Normally whole-row Vars are printed as "tabname.*". However, that does not
work at top level of a targetlist, because per SQL standard the parser will
think that the "*" should result in column-by-column expansion; which is
not at all what a whole-row Var implies. We used to just print the table
name in such cases, which works most of the time; but it fails if the table
name matches a column name available anywhere in the FROM clause. This
could lead for instance to a view being interpreted differently after dump
and reload. Adding parentheses doesn't fix it, but there is a reasonably
simple kluge we can use instead: attach a no-op cast, so that the "*" isn't
syntactically at top level anymore. This makes the printing of such
whole-row Vars a lot more consistent with other Vars, and may indeed fix
more cases than just the reported one; I'm suspicious that cases involving
schema qualification probably didn't work properly before, either.
Per bug report and fix proposal from Abbas Butt, though this patch is quite
different in detail from his.
Back-patch to all supported versions.
M src/backend/utils/adt/ruleutils.c
Add options to git_changelog for use in major release note creation:
commit : 993ce4e6c9f23d385d60f1fd4aee01bdf050de24
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 27 Apr 2012 17:15:41 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 27 Apr 2012 17:15:41 -0400
--details-after
--master-only
--oldest-first
M src/tools/git_changelog
Fix syslogger's rotation disable/re-enable logic.
commit : 537b26695389ae67adc4fbbe04254bc527a11128
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Apr 2012 00:12:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Apr 2012 00:12:42 -0400
If it fails to open a new log file, the syslogger assumes there's something
wrong with its parameters (such as log_directory), and stops attempting
automatic time-based or size-based log file rotations. Sending it SIGHUP
is supposed to start that up again. However, the original coding for that
was really bogus, involving clobbering a couple of GUC variables and hoping
that SIGHUP processing would restore them. Get rid of that technique in
favor of maintaining a separate flag showing we've turned rotation off.
Per report from Mark Kirkwood.
Also, the syslogger will automatically attempt to create the log_directory
directory if it doesn't exist, but that was only happening at startup.
For consistency and ease of use, it should do the same whenever the value
of log_directory is changed by SIGHUP.
Back-patch to all supported branches.
M src/backend/postmaster/syslogger.c
Prevent index-only scans from returning wrong answers under Hot Standby.
commit : 3424bff90f40532527b9cf4f2ad9eaff750682f7
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Apr 2012 20:00:21 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Apr 2012 20:00:21 -0400
The alternative of disallowing index-only scans in HS operation was
discussed, but the consensus was that it was better to treat marking
a page all-visible as a recovery conflict for snapshots that could still
fail to see XIDs on that page. We may in the future try to soften this,
so that we simply force index scans to do heap fetches in cases where
this may be an issue, rather than throwing a hard conflict.
M src/backend/access/heap/heapam.c
M src/backend/access/heap/visibilitymap.c
M src/backend/commands/vacuumlazy.c
M src/include/access/heapam.h
M src/include/access/htup.h
M src/include/access/visibilitymap.h
M src/include/access/xlog_internal.h
Improve documentation around historical calendar rules.
commit : 92df2203437603d40417fe711c3cb7066ac4fdf5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Apr 2012 18:28:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Apr 2012 18:28:52 -0400
Get rid of section 8.5.6 (Date/Time Internals), which appears to confuse
people more than it helps, and anyway discussion of Postgres' internal
datetime calculation methods seems pretty out of place here. Instead,
make datatype.sgml just say that we follow the Gregorian calendar (a bit
of specification not previously present anywhere in that chapter :-()
and link to the History of Units appendix for more info. Do some mild
editorialization on that appendix, too, to make it clearer that we are
following proleptic Gregorian calendar rules rather than anything more
historically accurate.
Per a question from Florence Cousin and subsequent discussion in
pgsql-docs.
M doc/src/sgml/datatype.sgml
M doc/src/sgml/datetime.sgml
Fix oversight in recent parameterized-path patch.
commit : 7c85aa39fc08df44e1ce67e651bda4cf7e331580
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Apr 2012 14:17:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 26 Apr 2012 14:17:13 -0400
bitmap_scan_cost_est() has to be able to cope with a BitmapOrPath, but
I'd taken a shortcut that didn't work for that case. Noted by Heikki.
Add some regression tests since this area is evidently under-covered.
M src/backend/optimizer/path/indxpath.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
PL/Python: Accept strings in functions returning composite types
commit : ba3e4157a7d0c7e963a8b800a30b9789aea6dd96
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 26 Apr 2012 21:03:48 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 26 Apr 2012 21:03:48 +0300
Before 9.1, PL/Python functions returning composite types could return
a string and it would be parsed using record_in. The 9.1 changes made
PL/Python only expect dictionaries, tuples, or objects supporting
getattr as output of composite functions, resulting in a regression
and a confusing error message, as the strings were interpreted as
sequences and the code for transforming lists to database tuples was
used. Fix this by treating strings separately as before, before
checking for the other types.
The reason why it's important to support string to database tuple
conversion is that trigger functions on tables with composite columns
get the composite row passed in as a string (from record_out).
Without supporting converting this back using record_in, this makes it
impossible to implement pass-through behavior for these columns, as
PL/Python no longer accepts strings for composite values.
A better solution would be to fix the code that transforms composite
inputs into Python objects to produce dictionaries that would then be
correctly interpreted by the Python->PostgreSQL counterpart code. But
that would be too invasive to backpatch to 9.1, and it is too late in
the 9.2 cycle to attempt it. It should be revisited in the future,
though.
Reported as bug #6559 by Kirill Simonov.
Jan Urbański
M src/pl/plpython/expected/plpython_record.out
M src/pl/plpython/expected/plpython_trigger.out
M src/pl/plpython/plpy_exec.c
M src/pl/plpython/plpy_typeio.c
M src/pl/plpython/plpy_typeio.h
M src/pl/plpython/sql/plpython_record.sql
M src/pl/plpython/sql/plpython_trigger.sql
psql: Tab completion updates
commit : cc71ceab57d763f8f443346badd8e826b3b09e6e
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 26 Apr 2012 20:07:40 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 26 Apr 2012 20:07:40 +0300
Add/complete support for:
- ALTER DOMAIN / VALIDATE CONSTRAINT
- ALTER DOMAIN / RENAME
- ALTER DOMAIN / RENAME CONSTRAINT
- ALTER TABLE / RENAME CONSTRAINT
M src/bin/psql/tab-complete.c
Modify create_index regression test to avoid intermittent failures.
commit : d6d5f67b5b98b1685f9158e9d00a726afb2ae789
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 22:57:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 22:57:48 -0400
We have been seeing intermittent buildfarm failures due to a query
sometimes not using an index-only scan plan, because a background
auto-ANALYZE prevented the table's all-visible bits from being set
immediately, thereby causing the estimated cost of an index-only scan
to go up considerably. Adjust the test case so that a bitmap index scan is
preferred instead, which serves equally well for the purpose the test case
is actually meant for. (Of course, it would be better to eliminate the
interference from auto-ANALYZE, but I see no low-risk way to do that,
so any such fix will have to be left for 9.3 or later.)
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Fix planner's handling of RETURNING lists in writable CTEs.
commit : 9fa82c980935ef4aee18fabe8da20ae2198b052a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 20:20:33 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 20:20:33 -0400
setrefs.c failed to do "rtoffset" adjustment of Vars in RETURNING lists,
which meant they were left with the wrong varnos when the RETURNING list
was in a subquery. That was never possible before writable CTEs, of
course, but now it's broken. The executor fails to notice any problem
because ExecEvalVar just references the ecxt_scantuple for any normal
varno; but EXPLAIN breaks when the varno is wrong, as illustrated in a
recent complaint from Bartosz Dmytrak.
Since the eventual rtoffset of the subquery is not known at the time
we are preparing its plan node, the previous scheme of executing
set_returning_clause_references() at that time cannot handle this
adjustment. Fortunately, it turns out that we don't really need to do it
that way, because all the needed information is available during normal
setrefs.c execution; we just have to dig it out of the ModifyTable node.
So, do that, and get rid of the kluge of early setrefs processing of
RETURNING lists. (This is a little bit of a cheat in the case of inherited
UPDATE/DELETE, because we are not passing a "root" struct that corresponds
exactly to what the subplan was built with. But that doesn't matter, and
anyway this is less ugly than early setrefs processing was.)
Back-patch to 9.1, where the problem became possible to hit.
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/plan/setrefs.c
M src/include/optimizer/planmain.h
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Fix edge-case behavior of pg_next_dst_boundary().
commit : c62b8eaae11aaa69a2b71bc63f9f78ca72eb412c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 17:25:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 17:25:12 -0400
Due to rather sloppy thinking (on my part, I'm afraid) about the
appropriate behavior for boundary conditions, pg_next_dst_boundary() gave
undefined, platform-dependent results when the input time is exactly the
last recorded DST transition time for the specified time zone, as a result
of fetching values one past the end of its data arrays.
Change its specification to be that it always finds the next DST boundary
*after* the input time, and adjust code to match that. The sole existing
caller, DetermineTimeZoneOffset, doesn't actually care about this
distinction, since it always uses a probe time earlier than the instant
that it does care about. So it seemed best to me to change the API to make
the result=1 and result=0 cases more consistent, specifically to ensure
that the "before" outputs always describe the state at the given time,
rather than hacking the code to obey the previous API comment exactly.
Per bug #6605 from Sergey Burladyan. Back-patch to all supported versions.
M src/timezone/localtime.c
Remove prototype for nonexistent function.
commit : ca1e1a8da11d188df738ba67632c0805a00d3f27
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Apr 2012 15:32:15 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Apr 2012 15:32:15 -0400
M src/include/storage/standby.h
Another trivial comment-typo fix.
commit : 9873001e6d1177d543a2e46273e738d726670f1f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 14:28:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 25 Apr 2012 14:28:58 -0400
M src/backend/access/common/reloptions.c
PL/Python: Improve error messages
commit : 65ca8e68b7b21de7641d8ec9b7d4b9a2dd5e081d
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 25 Apr 2012 21:11:59 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 25 Apr 2012 21:11:59 +0300
M src/pl/plpython/plpy_plpymodule.c
Standardize indentation of XSL files
commit : 2856c51c86857f2df674a37609515d26311062e9
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:40:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:40:07 +0300
Predominant standard is two spaces, so adjust outliers to that.
M doc/src/sgml/stylesheet-man.xsl
entab: Improve makefile
commit : 8bd44677df7f5139afa6d6a2d8f5a92e2db54cba
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:20:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:20:55 +0300
A few simplifications and stylistic improvements, found while grepping
around for makefile problems elsewhere.
M src/tools/entab/Makefile
Fix minor stylistic issue
commit : 225d9c063820237c979c918cf735bf98cbd566c0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:16:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Apr 2012 21:16:07 +0300
M doc/src/sgml/plperl.sgml
Casts to or from a domain type are ignored; warn and document.
commit : 3ce7f18e92e9687308ed5d9e516eb7e2f0decadb
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Apr 2012 09:20:53 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Apr 2012 09:20:53 -0400
Prohibiting this outright would break dumps taken from older versions
that contain such casts, which would create far more pain than is
justified here.
Per report by Jaime Casanova and subsequent discussion.
M doc/src/sgml/ref/create_cast.sgml
M src/backend/commands/functioncmds.c
M src/test/regress/expected/privileges.out
Another typographical correction.
commit : e4f06b70c9ac1473591d705990a8b601915ce4bd
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Apr 2012 08:15:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Apr 2012 08:15:45 -0400
Noted by Guillaume Smet.
M contrib/dblink/dblink.c
Lots of doc corrections.
commit : 5d4b60f2f25bedee257aaf6f2f4ac77028629b87
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:43:09 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:43:09 -0400
Josh Kupershmidt
M contrib/dblink/dblink.c
M contrib/fuzzystrmatch/fuzzystrmatch.c
M contrib/fuzzystrmatch/levenshtein.c
M contrib/hstore/hstore_io.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pgcrypto/crypt-des.c
M contrib/pgcrypto/imath.c
M contrib/pgcrypto/pgp-pgsql.c
M contrib/sepgsql/label.c
M contrib/sslinfo/sslinfo.c
M doc/src/sgml/release-7.4.sgml
M doc/src/sgml/release-8.0.sgml
M doc/src/sgml/release-8.1.sgml
M doc/src/sgml/release-8.2.sgml
M src/Makefile.global.in
M src/backend/access/gin/ginentrypage.c
M src/backend/access/gin/ginfast.c
M src/backend/access/heap/heapam.c
M src/backend/access/nbtree/README
M src/backend/access/transam/multixact.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/copy.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/executor/nodeMergejoin.c
M src/backend/libpq/auth.c
M src/backend/parser/gram.y
M src/backend/parser/parse_collate.c
M src/backend/port/win32/socket.c
M src/backend/postmaster/checkpointer.c
M src/backend/storage/file/reinit.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/tsquery_cleanup.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/mb/wchar.c
M src/bin/pg_config/pg_config.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pgevent/pgmsgevent.h
M src/bin/psql/command.c
M src/include/access/itup.h
M src/include/port/win32.h
M src/interfaces/ecpg/ecpglib/descriptor.c
M src/interfaces/ecpg/ecpglib/prepare.c
M src/interfaces/ecpg/pgtypeslib/dt_common.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
M src/interfaces/ecpg/preproc/ecpg.trailer
M src/interfaces/ecpg/preproc/pgc.l
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-print.c
M src/interfaces/libpq/win32.c
M src/nls-global.mk
M src/pl/tcl/expected/pltcl_setup.out
M src/pl/tcl/sql/pltcl_setup.sql
M src/test/mb/README
M src/test/regress/expected/foreign_key.out
M src/test/regress/pg_regress.c
M src/test/regress/sql/foreign_key.sql
M src/timezone/tznames/Asia.txt
M src/timezone/tznames/Default
M src/tools/backend/index.html
M src/tools/msvc/README
M src/tools/msvc/VSObjectFactory.pm
M src/tools/pginclude/pgcompinclude
M src/tools/pginclude/pgrminclude
Rearrange lazy_scan_heap to avoid visibility map race conditions.
commit : 7ab9b2f3b79177e501a1ef90ed004cc68788abaf
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:08:06 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:08:06 -0400
We must set the visibility map bit before releasing our exclusive lock
on the heap page; otherwise, someone might clear the heap page bit
before we set the visibility map bit, leading to a situation where the
visibility map thinks the page is all-visible but it's really not.
This problem has existed since 8.4, but it wasn't critical before we
had index-only scans, since the worst case scenario was that the page
wouldn't get vacuumed until the next scan_all vacuum.
Along the way, a couple of minor, related improvements: (1) if we
pause the heap scan to do an index vac cycle, release any visibility
map page we're holding, since really long-running pins are not good
for a variety of reasons; and (2) warn if we see a page that's marked
all-visible in the visibility map but not on the page level, since
that should never happen any more (it was allowed in previous
releases, but not in 9.2).
M src/backend/commands/vacuumlazy.c
Reduce hash size for compute_array_stats, compute_tsvector_stats.
commit : 85efd5f06593b80bbe01e541d78b336c1077213e
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:05:41 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 22:05:41 -0400
The size is only a hint, but a big hint chews up a lot of memory without
apparently improving performance much.
Analysis and patch by Noah Misch.
M src/backend/tsearch/ts_typanalyze.c
M src/backend/utils/adt/array_typanalyze.c
Minor improvements for CHECK NO INHERIT documentation.
commit : 9d435d57e1f8ec7e51d40722854252875d8cc6eb
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 21:59:17 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 23 Apr 2012 21:59:17 -0400
Fix typo spotted by Thom Brown, and improve wording in another area
where Thom spotted a typo.
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/create_table.sgml
Fix some typos
commit : 48658a1b818060fcfb3c91704943c5fbcf10088e
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 22 Apr 2012 19:23:47 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 22 Apr 2012 19:23:47 +0300
Josh Kupershmidt
M contrib/unaccent/unaccent.c
M src/backend/access/transam/README
M src/backend/postmaster/postmaster.c
Use fuzzy not exact cost comparison for the final tie-breaker in add_path.
commit : 33e99153e93b9accfa51ac036828144e1c2507b7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 21 Apr 2012 00:51:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 21 Apr 2012 00:51:14 -0400
Instead of an exact cost comparison, use a fuzzy comparison with 1e-10
delta after all other path metrics have proved equal. This is to avoid
having platform-specific roundoff behaviors determine the choice when
two paths are really the same to our cost estimators. Adjust the
recently-added test case that made it obvious we had a problem here.
M src/backend/optimizer/util/pathnode.c
M src/test/regress/expected/join.out
Recast "ONLY" column CHECK constraints as NO INHERIT
commit : 09ff76fcdb275769ac4d1a45a67416735613d04b
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 20 Apr 2012 23:46:20 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 20 Apr 2012 23:46:20 -0300
The original syntax wasn't universally loved, and it didn't allow its
usage in CREATE TABLE, only ALTER TABLE. It now works everywhere, and
it also allows using ALTER TABLE ONLY to add an uninherited CHECK
constraint, per discussion.
The pg_constraint column has accordingly been renamed connoinherit.
This commit partly reverts some of the changes in
61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac, particularly some pg_dump and
psql bits, because now pg_get_constraintdef includes the necessary NO
INHERIT within the constraint definition.
Author: Nikhil Sontakke
Some tweaks by me
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/create_table.sgml
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/pg_constraint.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/gram.y
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/relcache.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/psql/describe.c
M src/include/access/tupdesc.h
M src/include/catalog/catversion.h
M src/include/catalog/heap.h
M src/include/catalog/pg_constraint.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/inherit.out
M src/test/regress/input/constraints.source
M src/test/regress/output/constraints.source
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/inherit.sql
Adjust join_search_one_level's handling of clauseless joins.
commit : 1f0363001166ef6a43619846e44cfb9dbe7335ed
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 20 Apr 2012 20:10:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 20 Apr 2012 20:10:46 -0400
For an initial relation that lacks any join clauses (that is, it has to be
cartesian-product-joined to the rest of the query), we considered only
cartesian joins with initial rels appearing later in the initial-relations
list. This creates an undesirable dependency on FROM-list order. We would
never fail to find a plan, but perhaps we might not find the best available
plan. Noted while discussing the logic with Amit Kapila.
Improve the comments a bit in this area, too.
Arguably this is a bug fix, but given the lack of complaints from the
field I'll refrain from back-patching.
M src/backend/optimizer/path/joinrels.c
Revise parameterized-path mechanism to fix assorted issues.
commit : 5b7b5518d0ea56c422a197875f7efa5deddbb388
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Apr 2012 15:52:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 19 Apr 2012 15:52:46 -0400
This patch adjusts the treatment of parameterized paths so that all paths
with the same parameterization (same set of required outer rels) for the
same relation will have the same rowcount estimate. We cache the rowcount
estimates to ensure that property, and hopefully save a few cycles too.
Doing this makes it practical for add_path_precheck to operate without
a rowcount estimate: it need only assume that paths with different
parameterizations never dominate each other, which is close enough to
true anyway for coarse filtering, because normally a more-parameterized
path should yield fewer rows thanks to having more join clauses to apply.
In add_path, we do the full nine yards of comparing rowcount estimates
along with everything else, so that we can discard parameterized paths that
don't actually have an advantage. This fixes some issues I'd found with
add_path rejecting parameterized paths on the grounds that they were more
expensive than not-parameterized ones, even though they yielded many fewer
rows and hence would be cheaper once subsequent joining was considered.
To make the same-rowcounts assumption valid, we have to require that any
parameterized path enforce *all* join clauses that could be obtained from
the particular set of outer rels, even if not all of them are useful for
indexing. This is required at both base scans and joins. It's a good
thing anyway since the net impact is that join quals are checked at the
lowest practical level in the join tree. Hence, discard the original
rather ad-hoc mechanism for choosing parameterization joinquals, and build
a better one that has a more principled rule for when clauses can be moved.
The original rule was actually buggy anyway for lack of knowledge about
which relations are part of an outer join's outer side; getting this right
requires adding an outer_relids field to RestrictInfo.
M contrib/file_fdw/file_fdw.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/README
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/orindxpath.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/restrictinfo.c
M src/include/nodes/nodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/paths.h
M src/include/optimizer/restrictinfo.h
M src/test/regress/expected/inherit.out
M src/test/regress/expected/join.out
M src/test/regress/sql/inherit.sql
M src/test/regress/sql/join.sql
Untabify DSSSL and XSL files and add to check-tabs target
commit : cd1f4db4aec0c4b71d2ed0d29bbe388dfcd11527
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 19 Apr 2012 22:38:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 19 Apr 2012 22:38:14 +0300
Like with SGML files, using tabs in these files is confusing and
unnecessary.
M doc/src/sgml/Makefile
M doc/src/sgml/stylesheet-man.xsl
M doc/src/sgml/stylesheet.dsl
Remove bogus comment from HeapTupleSatisfiesNow.
commit : 293ec33c32e8e20fcb5859885a4b37ff6d855240
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:50:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:50:45 -0400
This has been wrong for a really long time. We don't use two-phase
locking to protect against serialization anomalies.
Per discussion on pgsql-hackers about 2011-03-07; original report
by Dan Ports.
M src/backend/utils/time/tqual.c
Finish rename of FastPathStrongLocks to FastPathStrongRelationLocks.
commit : 4a6fab03f23ed15f33e607b321c339d0c96c6b58
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:29:34 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:29:34 -0400
Commit 8e5ac74c1249820ca55481223a95b9124b4a4f95 tried to do this renaming,
but I relied on gcc to tell me where I needed to make changes, instead of
grep.
Noted by Jeff Davis.
M src/backend/storage/lmgr/README
M src/backend/storage/lmgr/lock.c
M src/include/storage/lock.h
Tighten up error recovery for fast-path locking.
commit : 53c5b869b464d567c3b8f617201b49a395f437ab
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:17:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 11:17:30 -0400
The previous code could cause a backend crash after BEGIN; SAVEPOINT a;
LOCK TABLE foo (interrupted by ^C or statement timeout); ROLLBACK TO
SAVEPOINT a; LOCK TABLE foo, and might have leaked strong-lock counts
in other situations.
Report by Zoltán Böszörményi; patch review by Jeff Davis.
M src/backend/access/transam/xact.c
M src/backend/storage/lmgr/README
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/include/storage/lock.h
M src/include/storage/proc.h
Fix incorrect comment in SetBufferCommitInfoNeedsSave().
commit : ab77b2da8bf2cd1c8068f2f90e95c42d426aba3c
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:55:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:55:40 -0400
Noah Misch spotted the fact that the old comment is in fact incorrect, due
to memory ordering hazards.
M src/backend/storage/buffer/bufmgr.c
After PageSetAllVisible, use MarkBufferDirty.
commit : e93c0b820f03e96ae0549cd30805ae734e5d5e2f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:49:37 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:49:37 -0400
Previously, we used SetBufferCommitInfoNeedsSave, but that's really
intended for dirty-marks we can theoretically afford to lose, such as
hint bits. As for 9.2, the PD_ALL_VISIBLE mustn't be lost in this
way, since we could then end up with a heap page that isn't
all-visible and a visibility map page that is all visible, causing
index-only scans to return wrong answers.
M src/backend/commands/vacuumlazy.c
Fix copyfuncs/equalfuncs support for ReassignOwnedStmt.
commit : b5eccaef2c05fd0c17f4510001528232b242a88e
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:45:18 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:45:18 -0400
Noah Misch
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
Fix various infelicities in node functions.
commit : 53bbc681ca97650a4b8ea59d8f1710196654fca5
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:43:16 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:43:16 -0400
Mostly, this consists of adding support for fields which exist in the
structure but aren't handled by copy/equal/outfuncs; but the create
foreign table case can actually produce garbage output.
Noah Misch
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
Doc clarification for synchronous_commit.
commit : 37e666b8b5999fddd556138edd17a5f26384460f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:09:41 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 18 Apr 2012 10:09:41 -0400
Fujii Masao
M doc/src/sgml/config.sgml
psql: Add tab completion for CREATE/ALTER ROLE name WITH
commit : 1fd832ddffe83a07f82939bd9e5787a61aeba1ef
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 18 Apr 2012 16:55:01 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 18 Apr 2012 16:55:01 +0300
Previously, the use of the optional key word WITH was not supported.
Josh Kupershmidt
M src/bin/psql/tab-complete.c
Don't override arguments set via options with positional arguments.
commit : 1b37a8c3cc4f0615f80d6007e2bbd47c6bd7e1e3
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 17 Apr 2012 18:30:34 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 17 Apr 2012 18:30:34 -0400
A number of utility programs were rather careless about paremeters
that can be set via both an option argument and a positional
argument. This leads to results which can violate the Principal
Of Least Astonishment. These changes refuse to use positional
arguments to override settings that have been made via positional
arguments. The changes are backpatched to all live branches.
M src/bin/initdb/initdb.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/droplang.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
Don't wait for the commit record to be replicated if we wrote no WAL.
commit : fe546f3da6a5ff1d879f587728f74ec457f0ee5f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 17 Apr 2012 16:28:31 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 17 Apr 2012 16:28:31 +0300
When using synchronous replication, we waited for the commit record to be
replicated, but if we our transaction didn't write any other WAL records,
that's not required because we don't even flush the WAL locally to disk in
that case. This lead to long waits when committing a transaction that only
modified a temporary table. Bug spotted by Thom Brown.
M src/backend/access/transam/xact.c
Add compatibility information for prepared transaction commands
commit : cf714c81086a85b7558a84ebd024f6a5eec2a5ee
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 22:40:54 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 22:40:54 +0300
M doc/src/sgml/ref/commit_prepared.sgml
M doc/src/sgml/ref/prepare_transaction.sgml
M doc/src/sgml/ref/rollback_prepared.sgml
Fix typo
commit : a33fcd7e79d7e1544030160de177aee847bb7648
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 15:36:40 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 15:36:40 +0300
Kyotaro HORIGUCHI
M src/backend/access/transam/xlog.c
Install plpgsql.h to to include/server at "make install".
commit : 49440fff08590cf1a764ab4b4c5342cd9e445991
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 16 Apr 2012 12:58:37 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 16 Apr 2012 12:58:37 +0300
The header file is needed by any module that wants to use the PL/pgSQL
instrumentation plugin interface. Most notably, the pldebugger plugin needs
this. With this patch, it can be built using pgxs, without having the full
server source tree available.
M src/pl/plpgsql/src/Makefile
M src/tools/msvc/Install.pm
PL/Python: Improve documentation of nrows() method
commit : 0f48e0675134eccd905eaf696a03c1e8cc85eab4
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 11:30:32 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Apr 2012 11:30:32 +0300
Clarify that nrows() is the number of rows processed, versus the
number of rows returned, which can be obtained using len. Also add
tests about that.
M doc/src/sgml/plpython.sgml
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/sql/plpython_spi.sql
PL/Python: Fix crash when colnames() etc. called without result set
commit : c03523ed3fc65e219068aff536330ce451f63ca7
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 15 Apr 2012 20:23:08 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 15 Apr 2012 20:23:08 +0300
The result object methods colnames() etc. would crash when called
after a command that did not produce a result set. Now they throw an
exception.
discovery and initial patch by Jean-Baptiste Quenot
M doc/src/sgml/plpython.sgml
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/plpy_resultobject.c
M src/pl/plpython/sql/plpython_spi.sql
Add missing descriptions about '--timeout' and '--mode' to help message. They are already implemented in the source code. Suggestions about the message formatting from Tom Lane.
commit : 4efbb7d04f3481da1aaf75630c1203203f400b66
author : Tatsuo Ishii <ishii@postgresql.org>
date : Sun, 15 Apr 2012 09:12:51 +0900
committer: Tatsuo Ishii <ishii@postgresql.org>
date : Sun, 15 Apr 2012 09:12:51 +0900
M src/bin/pg_ctl/pg_ctl.c
Rename synchronous_commit='write' to 'remote_write'.
commit : ea6a2d8d47b9368f50fb7f4cca206895e6127a0a
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 14 Apr 2012 10:53:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 14 Apr 2012 10:53:22 -0400
Fujii Masao, per discussion on pgsql-hackers
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
pg_size_pretty(numeric)
commit : 4a2d7ad76f5f275ef2d6a57e1a61d5bf756349e8
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 14 Apr 2012 08:04:11 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 14 Apr 2012 08:04:11 -0400
The output of the new pg_xlog_location_diff function is of type numeric,
since it could theoretically overflow an int8 due to signedness; this
provides a convenient way to format such values.
Fujii Masao, with some beautification by me.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/dbsize.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
Add description of long options for '-c', '-D', '-l' and '-s'. Per discussion of hackers list on 2012/3/10 "missing description initdb manual".
commit : d4db16d303b24ba5c9a6ddf8c2d70f6fd2da36d7
author : Tatsuo Ishii <ishii@postgresql.org>
date : Sat, 14 Apr 2012 18:40:35 +0900
committer: Tatsuo Ishii <ishii@postgresql.org>
date : Sat, 14 Apr 2012 18:40:35 +0900
M doc/src/sgml/ref/pg_ctl-ref.sgml
Update contrib/README
commit : 48ea558313fae4409d0e76facde041674678cba2
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 09:29:54 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 09:29:54 +0300
Remove lots of outdated information that is duplicated by the
better-maintained SGML documentation. In particular, remove the
outdated listing of contrib modules. Update the installation
instructions to mention CREATE EXTENSION, but don't go into too much
detail.
M contrib/README
Document that VALUES can be used in WITH
commit : aacc50d1758632550bebc4911857b323d65f0996
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 09:08:08 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 09:08:08 +0300
M doc/src/sgml/ref/select.sgml
Fix typo
commit : f3a3aac8452c0af53d510b4f042ff5ee939a1799
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 01:05:34 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Apr 2012 01:05:34 +0300
Etsuro Fujita
M doc/src/sgml/file-fdw.sgml
Add Peter Geoghegan as additional author of pg_stat_statements.
commit : cd93425cd1e9b66ad99cfee819c928b202b63ee6
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 16:42:24 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 16:42:24 -0400
M doc/src/sgml/pgstatstatements.sgml
Remove the "last ditch" code path in join_search_one_level().
commit : e54b10a62db2991235fe800c629baef4531a6d67
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 13 Apr 2012 16:03:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 13 Apr 2012 16:03:16 -0400
So far as I can tell, it is no longer possible for this heuristic to do
anything useful, because the new weaker definition of
have_relevant_joinclause means that any relation with a joinclause must be
considered joinable to at least one other relation. It would still be
possible for the code block to be entered, for example if there are join
order restrictions that prevent any join of the current level from being
formed; but in that case it's just a waste of cycles to attempt to form
cartesian joins, since the restrictions will still apply.
Furthermore, IMO the existence of this code path can mask bugs elsewhere;
we would have noticed the problem with cartesian joins a lot sooner if
this code hadn't compensated for it in the simplest case.
Accordingly, let's remove it and see what happens. I'm committing this
separately from the prerequisite changes in have_relevant_joinclause,
just to make the question easier to revisit if there is some fault in
my logic.
M src/backend/optimizer/path/joinrels.c
Weaken the planner's tests for relevant joinclauses.
commit : e3ffd05b02468b1a53de31a322cedf195576a625
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 13 Apr 2012 15:32:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 13 Apr 2012 15:32:34 -0400
We should be willing to cross-join two small relations if that allows us
to use an inner indexscan on a large relation (that is, the potential
indexqual for the large table requires both smaller relations). This
worked in simple cases but fell apart as soon as there was a join clause
to a fourth relation, because the existence of any two-relation join clause
caused the planner to not consider clauseless joins between other base
relations. The added regression test shows an example case adapted from
a recent complaint from Benoit Delbosc.
Adjust have_relevant_joinclause, have_relevant_eclass_joinclause, and
has_relevant_eclass_joinclause to consider that a join clause mentioning
three or more relations is sufficient grounds for joining any subset of
those relations, even if we have to do so via a cartesian join. Since such
clauses are relatively uncommon, this shouldn't affect planning speed on
typical queries; in fact it should help a bit, because the latter two
functions in particular get significantly simpler.
Although this is arguably a bug fix, I'm not going to risk back-patching
it, since it might have currently-unforeseen consequences.
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/util/joininfo.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Rename bytea_agg to string_agg and add delimiter argument
commit : c0cc526e8b1e821dfced692a68e4c8978c2bdbc1
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 13 Apr 2012 21:36:59 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 13 Apr 2012 21:36:59 +0300
Per mailing list discussion, we would like to keep the bytea functions
parallel to the text functions, so rename bytea_agg to string_agg,
which already exists for text.
Also, to satisfy the rule that we don't want aggregate functions of
the same name with a different number of arguments, add a delimiter
argument, just like string_agg for text already has.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/varlena.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_aggregate.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
M src/test/regress/expected/aggregates.out
M src/test/regress/sql/aggregates.sql
Consistently quote encoding and locale names in messages
commit : 64e1309c76aca35e32e62e69fc11e96aadfb2615
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 13 Apr 2012 20:37:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 13 Apr 2012 20:37:07 +0300
M src/backend/commands/dbcommands.c
M src/bin/initdb/initdb.c
M src/test/locale/test-ctype.c
Grammar corrections.
commit : 7167fcd21bc05e9114b1ededb835c5bc8610a6b0
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 12:47:23 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 12:47:23 -0400
Christoph Berg
M doc/src/sgml/high-availability.sgml
Fix typo in comment.
commit : 61167bfaf2af3bc0bbf3ba9c8ff14f10a483f9ff
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 08:54:13 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 08:54:13 -0400
M src/backend/commands/vacuumlazy.c
Update lazy_scan_heap header comment.
commit : 5630eddf1efe7c374fe8e8bdeaba3c70f8cd628b
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 08:49:59 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Apr 2012 08:49:59 -0400
The previous comment described how things worked in PostgreSQL 8.2
and prior.
M src/backend/commands/vacuumlazy.c
Assorted spelling corrections.
commit : 81e3e4fd14f82e93edfda8621727040ab3c70840
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Apr 2012 10:43:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Apr 2012 10:43:39 -0400
Thom Brown
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/sepgsql.sgml
M doc/src/sgml/tcn.sgml
Fix cost estimation for indexscan filter conditions.
commit : 732bfa2448c77bba5d98f485a387da77e1df8395
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Apr 2012 20:24:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Apr 2012 20:24:17 -0400
cost_index's method for estimating per-tuple costs of evaluating filter
conditions (a/k/a qpquals) was completely wrong in the presence of derived
indexable conditions, such as range conditions derived from a LIKE clause.
This was largely masked in common cases as a result of all simple operator
clauses having about the same costs, but it could show up in a big way when
dealing with functional indexes containing expensive functions, as seen for
example in bug #6579 from Istvan Endredy. Rejigger the calculation to give
sane answers when the indexquals aren't a subset of the baserestrictinfo
list. As a side benefit, we now do the calculation properly for cases
involving join clauses (ie, parameterized indexscans), which we always
overestimated before.
There are still cases where this is an oversimplification, such as clauses
that can be dropped because they are implied by a partial index's
predicate. But we've never accounted for that in cost estimates before,
and I'm not convinced it's worth the cycles to try to do so.
M src/backend/optimizer/path/costsize.c
Silently ignore any nonexistent schemas that are listed in search_path.
commit : 880bfc3287dd68cfe90d10d9597d7b0fd2dae3e5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Apr 2012 11:29:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Apr 2012 11:29:22 -0400
Previously we attempted to throw an error or at least warning for missing
schemas, but this was done inconsistently because of implementation
restrictions (in many cases, GUC settings are applied outside transactions
so that we can't do system catalog lookups). Furthermore, there were
exceptions to the rule even in the beginning, and we'd been poking more
and more holes in it as time went on, because it turns out that there are
lots of use-cases for having some irrelevant items in a common search_path
value. It seems better to just adopt a philosophy similar to what's always
been done with Unix PATH settings, wherein nonexistent or unreadable
directories are silently ignored.
This commit also fixes the documentation to point out that schemas for
which the user lacks USAGE privilege are silently ignored. That's always
been true but was previously not documented.
This is mostly in response to Robert Haas' complaint that 9.1 started to
throw errors or warnings for missing schemas in cases where prior releases
had not. We won't adopt such a significant behavioral change in a back
branch, so something different will be needed in 9.1.
M doc/src/sgml/config.sgml
M src/backend/catalog/namespace.c
M src/test/regress/expected/guc.out
M src/test/regress/sql/guc.sql
Accept postgres:// URIs in libpq connection functions
commit : b035cb9db7aa7c0f28581b23feb10d3c559701f6
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 11 Apr 2012 03:59:32 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 11 Apr 2012 03:59:32 -0300
postgres:// URIs are an attempt to "stop the bleeding" in this general
area that has been said to occur due to external projects adopting their
own syntaxes. The syntaxes supported by this patch:
postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&...]
postgres://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&...]
should be enough to cover most interesting cases without having to
resort to "param=value" pairs, but those are provided for the cases that
need them regardless.
libpq documentation has been shuffled around a bit, to avoid stuffing
all the format details into the PQconnectdbParams description, which was
already a bit overwhelming. The list of keywords has moved to its own
subsection, and the details on the URI format live in another subsection.
This includes a simple test program, as requested in discussion, to
ensure that interesting corner cases continue to work appropriately in
the future.
Author: Alexander Shulgin
Some tweaking by Álvaro Herrera, Greg Smith, Daniel Farina, Peter Eisentraut
Reviewed by Robert Haas, Alexey Klyukin (offlist), Heikki Linnakangas,
Marko Kreen, and others
Oh, it also supports postgresql:// but that's probably just an accident.
M doc/src/sgml/libpq.sgml
M doc/src/sgml/ref/psql-ref.sgml
M src/interfaces/libpq/Makefile
M src/interfaces/libpq/fe-connect.c
A src/interfaces/libpq/test/Makefile
A src/interfaces/libpq/test/README
A src/interfaces/libpq/test/expected.out
A src/interfaces/libpq/test/regress.in
A src/interfaces/libpq/test/regress.sh
A src/interfaces/libpq/test/uri-regress.c
Make pg_tablespace_location(0) return the database's default tablespace.
commit : 3769fa5fc64298143cf535c8a06921793598e458
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Apr 2012 21:42:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Apr 2012 21:42:46 -0400
This definition is convenient when applying the function to the
reltablespace column of pg_class, since that's what zero means there;
and it doesn't interfere with any other plausible use of the function.
Per gripe from Bruce Momjian.
M src/backend/utils/adt/misc.c
Fix pg_upgrade to properly upgrade a table that is stored in the cluster default tablespace, but part of a database that is in a user-defined tablespace. Caused "file not found" error during upgrade.
commit : 38458e45736efeb0d82739305c77c529c9cf0e1e
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 10 Apr 2012 19:57:14 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 10 Apr 2012 19:57:14 -0400
Per bug report from Ants Aasma.
Backpatch to 9.1 and 9.0.
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.h
NLS: Initialize Project-Id-Version field by xgettext
commit : eb821b91c86a85a37572c9062902f94a5efba528
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Apr 2012 21:26:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Apr 2012 21:26:17 +0300
Since xgettext provides options to do this now, we might as well use
them.
M src/nls-global.mk
psql: Improve tab completion of WITH
commit : 6b8c99c386d318b434829ac0c9ba935fb5e53d18
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Apr 2012 20:35:39 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Apr 2012 20:35:39 +0300
Only match when WITH is the first word, as WITH may appear in many
other contexts.
Josh Kupershmidt
M src/bin/psql/tab-complete.c
Measure epoch of timestamp-without-time-zone from local not UTC midnight.
commit : 0d9819f7e3be3c4186f0398d007d2fef8809da6a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Apr 2012 12:04:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 10 Apr 2012 12:04:42 -0400
This patch reverts commit 191ef2b407f065544ceed5700e42400857d9270f
and thereby restores the pre-7.3 behavior of EXTRACT(EPOCH FROM
timestamp-without-tz). Per discussion, the more recent behavior was
misguided on a couple of grounds: it makes it hard to get a
non-timezone-aware epoch value for a timestamp, and it makes this one
case dependent on the value of the timezone GUC, which is incompatible
with having timestamp_part() labeled as immutable.
The other behavior is still available (in all releases) by explicitly
casting the timestamp to timestamp with time zone before applying EXTRACT.
This will need to be called out as an incompatible change in the 9.2
release notes. Although having mutable behavior in a function marked
immutable is clearly a bug, we're not going to back-patch such a change.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/timestamp.c
Point the URL to PL/py directly to the page about the procedural language.
commit : 442da68f73e679ae8a799c249e3bf1fc1a3ee28d
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 10 Apr 2012 09:46:44 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 10 Apr 2012 09:46:44 +0300
It used to point to a top-level page that contains client-side tools as
well. It was hard to find the procedural language there.
M doc/src/sgml/external-projects.sgml
Fix typos in docs, some words were doubled.
commit : fb9bc5d9fb66a6065bd1c3f71a4b5bae5af89c90
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 10 Apr 2012 09:30:58 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 10 Apr 2012 09:30:58 +0300
Thom Brown
M doc/src/sgml/earthdistance.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/monitoring.sgml
Adjust various references to GEQO being non-deterministic.
commit : c94b43ce39f3ee48db04fb8284de0db12526af92
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 20:49:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 20:49:01 -0400
It's still non-deterministic in some sense ... but given fixed settings
and identical planning problems, it will now always choose the same plan,
so we probably shouldn't tar it with that brush. Per bug #6565 from
Guillaume Cottenceau. Back-patch to 9.0 where the behavior was fixed.
M doc/src/sgml/config.sgml
Re-add documentation recommendation to use gzip/gunzip for archive file storage.
commit : 17665f61155babff93ff916f1d080dcc9b5397d3
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:50:48 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:50:48 -0400
M doc/src/sgml/backup.sgml
Update documentation to more clearly label the streaming replication option.
commit : 75fcb935bc162b466eadac95e6eec6a0c415d18e
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:40:16 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:40:16 -0400
M doc/src/sgml/high-availability.sgml
Remove documentation mention of pglesslog, which was added in 2009 because there was only a beta for 9.0 and it does not compile on 9.1.
commit : 8213624fc95574c9bdd60cadd10ccd180df95217
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:12:04 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 9 Apr 2012 14:12:04 -0400
M doc/src/sgml/backup.sgml
Fix an Assert that turns out to be reachable after all.
commit : 65fd91333e45114c5d9a07d3d4f6a4786df48768
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:58:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:58:24 -0400
estimate_num_groups() gets unhappy with
create table empty();
select * from empty except select * from empty e2;
I can't see any actual use-case for such a query (and the table is illegal
per SQL spec), but it seems like a good idea that it not cause an assert
failure.
M src/backend/utils/adt/selfuncs.c
Don't bother copying empty support arrays in a zero-column MergeJoin.
commit : d515365a611a58241019c59a62b0cb79584aa725
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:41:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:41:54 -0400
The case could not arise when this code was originally written, but it can
now (since we made zero-column MergeJoins work for the benefit of FULL JOIN
ON TRUE). I don't think there is any actual bug here, but we might as well
treat it consistently with other uses of COPY_POINTER_FIELD(). Per comment
from Ashutosh Bapat.
M src/backend/nodes/copyfuncs.c
Save a few cycles while creating "sticky" entries in pg_stat_statements.
commit : e969f9a78008d6a09abf8646f1338e2dff447cbf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:16:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Apr 2012 11:16:04 -0400
There's no need to sit there and increment the stats when we know all the
increments would be zero anyway. The actual additions might not be very
expensive, but skipping acquisition of the spinlock seems like a good
thing. Pushing the logic about initialization of the usage count down into
entry_alloc() allows us to do that while making the code actually simpler,
not more complex. Expansion on a suggestion by Peter Geoghegan.
M contrib/pg_stat_statements/pg_stat_statements.c
Remove link to ODBCng project from the docs.
commit : 140a4fbf1a87891a79a2c61a08416828d39f286a
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 9 Apr 2012 09:45:06 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 9 Apr 2012 09:45:06 +0300
Thom Browne pointed out that the URL was out of date, and Devrim GÜNDÜZ
pointed out that the project isn't maintained anymore.
M doc/src/sgml/external-projects.sgml
Teach SLRU code to avoid replacing I/O-busy pages.
commit : 3ae5133b1cf478d516666f2003bc68ba0edb84c7
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 8 Apr 2012 23:04:07 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 8 Apr 2012 23:04:07 -0400
Patch by me; review by Tom Lane and others.
M src/backend/access/transam/slru.c
Improve management of "sticky" entries in contrib/pg_stat_statements.
commit : d5375491f8e391224b48e4bb449995a4642183ea
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 8 Apr 2012 15:49:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 8 Apr 2012 15:49:47 -0400
This patch addresses a deficiency in the previous pg_stat_statements patch.
We want to give sticky entries an initial "usage" factor high enough that
they probably will stick around until their query is completed. However,
if the query never completes (eg it gets an error during execution), the
entry shouldn't persist indefinitely. Manage this by starting out with
a usage setting equal to the (approximate) median usage value within the
whole hashtable, but decaying the value much more aggressively than we
do for normal entries.
Peter Geoghegan
M contrib/pg_stat_statements/pg_stat_statements.c
set_stack_base() no longer needs to be called in PostgresMain.
commit : 03529a3ff999b0e4770b3e0b8e342400e383db98
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 8 Apr 2012 19:39:12 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 8 Apr 2012 19:39:12 +0300
This was a thinko in previous commit. Now that stack base pointer is now set
in PostmasterMain and SubPostmasterMain, it doesn't need to be set in
PostgresMain anymore.
M src/backend/tcop/postgres.c
Do stack-depth checking in all postmaster children.
commit : ef3883d130cb553003015f3da7fa59415da6f5c9
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 8 Apr 2012 18:28:12 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 8 Apr 2012 18:28:12 +0300
We used to only initialize the stack base pointer when starting up a regular
backend, not in other processes. In particular, autovacuum workers can run
arbitrary user code, and without stack-depth checking, infinite recursion
in e.g an index expression will bring down the whole cluster.
The comment about PL/Java using set_stack_base() is not yet true. As the
code stands, PL/java still modifies the stack_base_ptr variable directly.
However, it's been discussed in the PL/Java mailing list that it should be
changed to use the function, because PL/Java is currently oblivious to the
register stack used on Itanium. There's another issues with PL/Java, namely
that the stack base pointer it sets is not really the base of the stack, it
could be something close to the bottom of the stack. That's a separate issue
that might need some further changes to this code, but that's a different
story.
Backpatch to all supported releases.
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/include/miscadmin.h
Fix incorrect make maintainer-clean rule.
commit : 7feecedccef078bb9f39188db2f75c1481b45cc3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Apr 2012 18:16:50 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>