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>
date : Sat, 7 Apr 2012 18:16:50 -0400
M src/backend/Makefile
Further adjustment of comment about qsort_tuple.
commit : 95b9c333b25463283ba07c5ba7dbe79b4e8b4480
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Apr 2012 17:48:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Apr 2012 17:48:40 -0400
M src/backend/utils/sort/tuplesort.c
Remove useless variable to suppress compiler warning.
commit : a25ef7a5f68728f7f78f798a98c26b773c45937e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Apr 2012 16:44:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Apr 2012 16:44:43 -0400
M src/backend/catalog/index.c
Stamp libraries versions for 9.2 (better late than never).
commit : d24ac36f4fb99824425c81a64a5e36f3e91a7656
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 7 Apr 2012 16:19:43 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 7 Apr 2012 16:19:43 -0400
M src/interfaces/ecpg/compatlib/Makefile
M src/interfaces/ecpg/ecpglib/Makefile
M src/interfaces/ecpg/pgtypeslib/Makefile
M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/libpq/Makefile
Update URL for pgtclng project.
commit : d75829a682fdf832fe9d044b28be597d3f058ec8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 19:00:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 19:00:14 -0400
Thom Brown
M doc/src/sgml/external-projects.sgml
Fix misleading output from gin_desc().
commit : 0ab4db52c0d45763adee3981da4325e7c353e443
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 18:10:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 18:10:21 -0400
XLOG_GIN_UPDATE_META_PAGE and XLOG_GIN_DELETE_LISTPAGE records were printed
with a list link field labeled as "blkno", which was confusing, especially
when the link was empty (InvalidBlockNumber). Print the metapage block
number instead, since that's what's actually being updated. We could
include the link values too as a separate field, but not clear it's worth
the trouble.
Back-patch to 8.4 where the dubious code was added.
M src/backend/access/gin/ginxlog.c
Fix broken comparetup_datum code.
commit : 17b985b1a068e120feb05bb61be6328f4fef8090
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 16:58:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 16:58:17 -0400
Commit 337b6f5ecf05b21b5e997986884d097d60e4e3d0 contained the entirely
fanciful assumption that it had made comparetup_datum unreachable.
Reported and patched by Takashi Yamamoto.
Fix up some not terribly accurate/useful comments from that commit, too.
M src/backend/utils/sort/tuplesort.c
Fix some typos in the documentation
commit : 6c41948c39288139cd9a592466cd373b6868bb55
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 6 Apr 2012 23:55:24 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 6 Apr 2012 23:55:24 +0300
Thom Brown
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/reference.sgml
Correct various system catalog/view definitions in the documentation
commit : 25028a27c828b8d31a85064f230113a42c0fea81
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 6 Apr 2012 23:54:27 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 6 Apr 2012 23:54:27 +0300
Thom Brown
M doc/src/sgml/catalogs.sgml
Dept of second thoughts: improve the API for AnalyzeForeignTable.
commit : cea49fe82fedcf125eb99a780099eaf47a326b03
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 16:04:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 16:04:10 -0400
If we make the initially-called function return the table physical-size
estimate, acquire_inherited_sample_rows will be able to use that to
allocate numbers of samples among child tables, when the day comes that
we want to support foreign tables in inheritance trees.
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/fdwhandler.sgml
M src/backend/commands/analyze.c
M src/include/foreign/fdwapi.h
Allow statistics to be collected for foreign tables.
commit : 263d9de66b867b7800fac82c222e004b795b724a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 15:02:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Apr 2012 15:02:35 -0400
ANALYZE now accepts foreign tables and allows the table's FDW to control
how the sample rows are collected. (But only manual ANALYZEs will touch
foreign tables, for the moment, since among other things it's not very
clear how to handle remote permissions checks in an auto-analyze.)
contrib/file_fdw is extended to support this.
Etsuro Fujita, reviewed by Shigeru Hanada, some further tweaking by me.
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/fdwhandler.sgml
M doc/src/sgml/maintenance.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/analyze.sgml
M src/backend/commands/analyze.c
M src/backend/commands/tablecmds.c
M src/bin/psql/describe.c
M src/bin/psql/tab-complete.c
M src/include/commands/vacuum.h
M src/include/foreign/fdwapi.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Add DROP INDEX CONCURRENTLY [IF EXISTS], uses ShareUpdateExclusiveLock
commit : 8cb53654dbdb4c386369eb988062d0bbb6de725e
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 6 Apr 2012 10:21:40 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 6 Apr 2012 10:21:40 +0100
M doc/src/sgml/ref/drop_index.sgml
M src/backend/catalog/dependency.c
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/tcop/utility.c
M src/backend/utils/cache/relcache.c
M src/include/catalog/dependency.h
M src/include/catalog/index.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
checkopint -> checkpoint
commit : 21cc529698c8d10c6f7c76874d4adc98d27c6187
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 21:36:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 21:36:42 -0400
Report by Guillaume Lelarge.
M src/backend/catalog/system_views.sql
M src/include/catalog/catversion.h
M src/test/regress/expected/rules.out
Put back code inadvertently deleted from exit_nicely.
commit : 662ca285a6f8fee5616eb2770f889ee94a040afa
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 21:30:19 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 21:30:19 -0400
Report by Andrew Dunstan.
M src/bin/pg_dump/dumputils.c
NLS: Use msgmerge/xgettext --no-wrap and --sort-by-file
commit : 05261ab6246cba9701b8529eba812b8a68c3be8d
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Apr 2012 21:22:15 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Apr 2012 21:22:15 +0300
The option --no-wrap prevents wars with (most?) editors about proper
line wrapping. --sort-by-file ensures consistent file order, for
easier diffing.
M src/nls-global.mk
Allow pg_archivecleanup to strip optional file extensions.
commit : bbc02243fcf2fbf51b6bacf05a73fa042d3d84a4
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 14:18:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 14:18:42 -0400
Greg Smith and Jaime Casanova, reviewed by Alex Shulgin and myself.
e
M contrib/pg_archivecleanup/pg_archivecleanup.c
M doc/src/sgml/pgarchivecleanup.sgml
Publish checkpoint timing information to pg_stat_bgwriter.
commit : b736aef2ec57b520ebadb70cceac0fed3168a5df
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 14:03:21 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 14:03:21 -0400
Greg Smith, Peter Geoghegan, and Robert Haas
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/storage/smgr/md.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
Update obsolete comment.
commit : a75b08066ab4b426b1bd056fed81302e5a5d5371
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 5 Apr 2012 13:05:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 5 Apr 2012 13:05:02 -0400
Somebody didn't bother to fix this comment while adding foreign table
support to the code below it.
In passing, remove the explicit calling-out of relkind letters, which adds
complexity to the comment but doesn't help in understanding the code.
M src/bin/pg_dump/pg_dump.c
Correctly explain units used by function-timing stats functions.
commit : 97e26dc66d47624bdbdee1dbd007a0f4212defcb
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 11:50:06 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 11:50:06 -0400
The views are in milliseconds, but the raw functions return
microseconds.
M doc/src/sgml/monitoring.sgml
Expose track_iotiming data via the statistics collector.
commit : 644828908fb132ee1f1da5b8b7975c0d73d6158a
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 11:37:31 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 5 Apr 2012 11:37:31 -0400
Ants Aasma's original patch to add timing information for buffer I/O
requests exposed this data at the relation level, which was judged too
costly. I've here exposed it at the database level instead.
M doc/src/sgml/config.sgml
M doc/src/sgml/monitoring.sgml
M src/backend/catalog/system_views.sql
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/pgstat.h
M src/test/regress/expected/rules.out
Fix plpgsql named-cursor-parameter feature for variable name conflicts.
commit : 05dbd4a7734e09bd1f835f4197d9befa1c00c4f3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 21:50:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 21:50:31 -0400
The parser got confused if a cursor parameter had the same name as
a plpgsql variable. Reported and diagnosed by Yeb Havinga, though
this isn't exactly his proposed fix.
Also, some mostly-but-not-entirely-cosmetic adjustments to the original
named-cursor-parameter patch, for code readability and better error
diagnostics.
M src/pl/plpgsql/src/gram.y
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Improve efficiency of dblink by using libpq's new row processor API.
commit : 6f922ef88e43b3084cdddf4b5ffe525a00896a90
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 18:39:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 18:39:08 -0400
This patch provides a test case for libpq's row processor API.
contrib/dblink can deal with very large result sets by dumping them into
a tuplestore (which can spill to disk) --- but until now, the intermediate
storage of the query result in a PGresult meant memory bloat for any large
result. Now we use a row processor to convert the data to tuple form and
dump it directly into the tuplestore.
A limitation is that this only works for plain dblink() queries, not
dblink_send_query() followed by dblink_get_result(). In the latter
case we don't know the desired tuple rowtype soon enough. While hack
solutions to that are possible, a different user-level API would
probably be a better answer.
Kyotaro Horiguchi, reviewed by Marko Kreen and Tom Lane
M contrib/dblink/dblink.c
M doc/src/sgml/dblink.sgml
Add a "row processor" API to libpq for better handling of large results.
commit : 92785dac2ee7026948962cd61c4cd84a2d052772
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 18:27:56 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 18:27:56 -0400
Traditionally libpq has collected an entire query result before passing
it back to the application. That provides a simple and transactional API,
but it's pretty inefficient for large result sets. This patch allows the
application to process each row on-the-fly instead of accumulating the
rows into the PGresult. Error recovery becomes a bit more complex, but
often that tradeoff is well worth making.
Kyotaro Horiguchi, reviewed by Marko Kreen and Tom Lane
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-misc.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
Remove useless PGRES_COPY_BOTH "support" in psql.
commit : cb917e1544612c187c74fed1a990e26820514c8a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 16:15:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 16:15:04 -0400
There is no existing or foreseeable case in which psql should see a
PGRES_COPY_BOTH PQresultStatus; and if such a case ever emerges, it's a
pretty good bet that these code fragments wouldn't do the right thing
anyway. Remove them, and let the existing default cases do the appropriate
thing, namely emit an "unexpected PQresultStatus" bleat.
Noted while working on libpq row processor patch, for which I was
considering adding a PGRES_SUSPENDED status code --- the same default-case
treatment would be appropriate for that.
M src/bin/psql/common.c
Fix syslogger to not lose log coherency under high load.
commit : c17e863bc7677a54d6da5bbb2868cca2cd9b30c1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 15:05:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Apr 2012 15:05:10 -0400
The original coding of the syslogger had an arbitrary limit of 20 large
messages concurrently in progress, after which it would just punt and dump
message fragments to the output file separately. Our ambitions are a bit
higher than that now, so allow the data structure to expand as necessary.
Reported and patched by Andrew Dunstan; some editing by Tom
M src/backend/postmaster/syslogger.c
Fix a couple of contrib/dblink bugs.
commit : d843ed21164275dfbfefa486bb00bca91380cdf0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 3 Apr 2012 20:43:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 3 Apr 2012 20:43:15 -0400
dblink_exec leaked temporary database connections if any error occurred
after connection setup, for example
SELECT dblink_exec('...connect string...', 'select 1/0');
Add a PG_TRY block to ensure PQfinish gets done when it is needed.
(dblink_record_internal is on the hairy edge of needing similar treatment,
but seems not to be actively broken at the moment.)
Also, in 9.0 and up, only one of the three functions using tuplestore
return mode was properly checking that the query context would allow
a tuplestore result.
Noted while reviewing dblink patch. Back-patch to all supported branches.
M contrib/dblink/dblink.c
Arrange for on_exit_nicely to be thread-safe.
commit : 5e86c61a7eec0fdc6961493a150159fa8fc63b1c
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 3 Apr 2012 08:38:24 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 3 Apr 2012 08:38:24 -0400
Extracted from Joachim Wieland's parallel pg_dump patch, with some
additional comments by me.
M src/bin/pg_dump/dumputils.c
Add support for renaming domain constraints
commit : 38b9693fd9847f4dcf6ff2fc469a7f2aac6385d9
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 3 Apr 2012 08:11:51 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 3 Apr 2012 08:11:51 +0300
M doc/src/sgml/ref/alter_domain.sgml
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_constraint.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/include/catalog/pg_constraint.h
M src/include/commands/typecmds.h
M src/test/regress/expected/domain.out
M src/test/regress/sql/domain.sql
NLS: Seed Language field in PO header
commit : c2cc5c347440e48bc4d0e4ed083db2f3966a0e90
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Apr 2012 02:58:37 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Apr 2012 02:58:37 +0300
Use msgmerge --lang option to seed the Language field, recently
introduced by gettext, in the header of the new PO file.
M src/nls-global.mk
Fix recently introduced typo in NLS file lists
commit : 5633df2582bedc93c2fb37555b7376eb51518bd5
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Apr 2012 02:39:34 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Apr 2012 02:39:34 +0300
M src/bin/psql/nls.mk
Fix O(N^2) behavior in pg_dump when many objects are in dependency loops.
commit : d5881c036a913d31a5b0f56519cce76ca3b3e587
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 15:51:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 15:51:07 -0400
Combining the loop workspace with the record of already-processed objects
might have been a cute trick, but it behaves horridly if there are many
dependency loops to repair: the time spent in the first step of findLoop()
grows as O(N^2). Instead use a separate flag array indexed by dump ID,
which we can check in constant time. The length of the workspace array
is now never more than the actual length of a dependency chain, which
should be reasonably short in all cases of practical interest. The code
is noticeably easier to understand this way, too.
Per gripe from Mike Roest. Since this is a longstanding performance bug,
backpatch to all supported versions.
M src/bin/pg_dump/pg_dump_sort.c
Fix O(N^2) behavior in pg_dump for large numbers of owned sequences.
commit : 0d8117abefdae69dbec7465adf2c68f5cd0412ac
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 14:42:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 14:42:17 -0400
The loop that matched owned sequences to their owning tables required time
proportional to number of owned sequences times number of tables; although
this work was only expended in selective-dump situations, which is probably
why the issue wasn't recognized long since. Refactor slightly so that we
can perform this work after the index array for findTableByOid has been
set up, reducing the time to O(M log N).
Per gripe from Mike Roest. 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
Rename frontend keyword arrays to avoid conflict with backend.
commit : c252a17d828756e2f7d635f69eace53aaf983420
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 13:15:53 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 13:15:53 -0400
ecpg and pg_dump each contain keyword arrays with structure similar
to the backend's keyword array. Up to now, we actually named those
arrays the same as the backend's and relied on parser/keywords.h
to declare them. This seems a tad too cute, though, and it breaks
now that we need to PGDLLIMPORT-decorate the backend symbols.
Rename to avoid the problem. Per buildfarm.
(It strikes me that maybe we should get rid of the separate keywords.c
files altogether, and just define these arrays in the modules that use
them, but that's a rather more invasive change.)
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/keywords.c
M src/interfaces/ecpg/preproc/ecpg_keywords.c
M src/interfaces/ecpg/preproc/keywords.c
Fix glitch recently introduced in psql tab completion.
commit : a52e6fe7bcf86f7e52d7b1d6f59260cb57b565fa
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 11:19:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 11:19:23 -0400
Over-optimization (by me, looks like :-() broke the case of recognizing
a word boundary just before a quoted identifier. Reported and diagnosed
by Dean Rasheed.
M src/bin/psql/tab-complete.c
Add PGDLLIMPORT to ScanKeywords and NumScanKeywords.
commit : 5e83854d71bb05403768a97a415a129b0081564b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 10:56:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 31 Mar 2012 10:56:21 -0400
Per buildfarm, this is now needed by contrib/pg_stat_statements.
M src/include/parser/keywords.h
Add new files to NLS file lists
commit : 194b5ea3d0722f94e8a6ba9cec03b858cc8c9370
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:42:06 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:42:06 +0300
Some of these are newly added, some are older and were forgotten, some
don't contain any translatable strings right now but look like they
could in the future.
M src/bin/initdb/nls.mk
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_dump/nls.mk
M src/bin/psql/nls.mk
Replace printf format %i by %d
commit : 1d1361b6b77242f519c3cbb10fede4478ba6444f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:40:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:40:46 +0300
see also ce8d7bb6440710058503d213b2aafcdf56a5b481
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
pgxs: Supply default values for BISON and FLEX variables
commit : 6ca365bff28e52dc14500df84e7b3230d4c292eb
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:36:49 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 30 Mar 2012 20:36:49 +0300
Otherwise, the availability of these variables depends on what
happened to be available at the time the PostgreSQL build was
configured.
M src/makefiles/pgxs.mk
pg_test_timing: Lame hack to work around compiler warning.
commit : 3f427c1353d92c41069197b31ea6c8b89f24cd11
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 30 Mar 2012 08:15:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 30 Mar 2012 08:15:25 -0400
Fujii Masao, plus a comment by me. While I'm at it, correctly tabify
this chunk of code.
M contrib/pg_test_timing/pg_test_timing.c
Fix dblink's failure to report correct connection name in error messages.
commit : b75fbe91910df323a8d3e1d92a8bb4dd0d5e88a9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 17:52:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 17:52:28 -0400
The DBLINK_GET_CONN and DBLINK_GET_NAMED_CONN macros did not set the
surrounding function's conname variable, causing errors to be incorrectly
reported as having occurred on the "unnamed" connection in some cases.
This bug was actually visible in two cases in the regression tests,
but apparently whoever added those cases wasn't paying attention.
Noted by Kyotaro Horiguchi, though this is different from his proposed
patch.
Back-patch to 8.4; 8.3 does not have the same type of error reporting
so the patch is not relevant.
M contrib/dblink/dblink.c
M contrib/dblink/expected/dblink.out
Improve contrib/pg_stat_statements' handling of PREPARE/EXECUTE statements.
commit : 566a1d43cf6bfcc7f9385b581d98e07eab282cdd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 16:42:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 16:42:09 -0400
It's actually more useful for the module to ignore these. Ignoring
EXECUTE (and not incrementing the nesting level) allows the executor
hooks to charge the time to the underlying prepared query, which
shows up as a stats entry with the original PREPARE as query string
(possibly modified by suppression of constants, which might not be
terribly useful here but it's not worth avoiding). This is much more
useful than cluttering the stats table with a distinct entry for each
textually distinct EXECUTE.
Experimentation with this idea shows that it's also preferable to ignore
PREPARE. If we don't, we get two stats table entries, one with the query
string hash and one with the jumble-derived hash, but with the same visible
query string (modulo those constants). This is confusing and not very
helpful, since the first entry will only receive costs associated with
initial planning of the query, which is not something counted at all
normally by pg_stat_statements. (And if we do start tracking planning
costs, we'd want them blamed on the other hash table entry anyway.)
M contrib/pg_stat_statements/pg_stat_statements.c
Improve handling of utility statements containing plannable statements.
commit : e0e4ebe38469a777e3c585e1d97383f974c19b8c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 15:32:50 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Mar 2012 15:32:50 -0400
When tracking nested statements, contrib/pg_stat_statements formerly
double-counted the execution costs of utility statements that directly
contain an executable statement, such as EXPLAIN and DECLARE CURSOR.
This was not obvious since the ProcessUtility and Executor hooks
would each add their measured costs to the same stats table entry.
However, with the new implementation that hashes utility and plannable
statements differently, this showed up as seemingly-duplicate stats
entries. Fix that by disabling the Executor hooks when the query has a
queryId of zero, which was the case already for such statements but is now
more clearly specified in the code. (The zero queryId was causing problems
anyway because all such statements would add to a single bogus entry.)
The PREPARE/EXECUTE case still results in counting the same execution
in two different stats table entries, but it should be much less surprising
to users that there are two entries in such cases.
In passing, include a CommonTableExpr's ctename in the query hash.
I had left it out originally on the grounds that we wanted to omit all
inessential aliases, but since RTE_CTE RTEs are hashing their referenced
names, we'd better hash the CTE names too to make sure we don't hash
semantically different queries the same.
M contrib/pg_stat_statements/pg_stat_statements.c
initdb: Mark more messages for translation
commit : 2005b77b8f336f4c2bd00185b4a63fe6582bf7a8
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Mar 2012 21:16:28 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Mar 2012 21:16:28 +0300
Some Windows-only messages had apparently been forgotten so far.
Also make the wording of the messages more consistent with similar
messages other parts, such as pg_ctl and pg_regress.
M src/bin/initdb/initdb.c
Correct epoch of txid_current() when executed on a Hot Standby server. Initialise ckptXidEpoch from starting checkpoint and maintain the correct value as we roll forwards. This allows GetNextXidAndEpoch() to return the correct epoch when executed during recovery. Backpatch to 9.0 when the problem is first observable by a user.
commit : 68219aaf6b8c6214e5f4a6124bd5607254aad6b3
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 29 Mar 2012 14:55:30 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 29 Mar 2012 14:55:30 +0100
Bug report from Daniel Farina
M src/backend/access/transam/xlog.c
Unbreak Windows builds broken by pgpipe removal.
commit : aeca65022609282f004e8332910938abd4eefbd6
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 29 Mar 2012 04:11:57 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 29 Mar 2012 04:11:57 -0400
M src/backend/port/Makefile
Inherit max_safe_fds to child processes in EXEC_BACKEND mode.
commit : 5762a4d9098ac0cba789ddd26286ac85c2d316f2
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 29 Mar 2012 08:19:11 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 29 Mar 2012 08:19:11 +0300
Postmaster sets max_safe_fds by testing how many open file descriptors it
can open, and that is normally inherited by all child processes at fork().
Not so on EXEC_BACKEND, ie. Windows, however. Because of that, we
effectively ignored max_files_per_process on Windows, and always assumed
a conservative default of 32 simultaneous open files. That could have an
impact on performance, if you need to access a lot of different files
in a query. After this patch, the value is passed to child processes by
save/restore_backend_variables() among many other global variables.
It has been like this forever, but given the lack of complaints about it,
I'm not backpatching this.
M src/backend/postmaster/postmaster.c
M src/backend/storage/file/fd.c
M src/include/storage/fd.h
Remove now redundant pgpipe code.
commit : d2c1740dc275543a46721ed254ba3623f63d2204
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 28 Mar 2012 23:24:07 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 28 Mar 2012 23:24:07 -0400
D src/backend/port/pipe.c
M src/backend/postmaster/syslogger.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/include/port.h
M src/port/exec.c
M src/tools/msvc/Mkvcbuild.pm
Improve contrib/pg_stat_statements to lump "similar" queries together.
commit : 7313cc016344a5705eb3e6916d8c4ea849c57975
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 28 Mar 2012 21:00:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 28 Mar 2012 21:00:31 -0400
pg_stat_statements now hashes selected fields of the analyzed parse tree
to assign a "fingerprint" to each query, and groups all queries with the
same fingerprint into a single entry in the pg_stat_statements view.
In practice it is expected that queries with the same fingerprint will be
equivalent except for values of literal constants. To make the display
more useful, such constants are replaced by "?" in the displayed query
strings.
This mechanism currently supports only optimizable queries (SELECT,
INSERT, UPDATE, DELETE). Utility commands are still matched on the
basis of their literal query strings.
There remain some open questions about how to deal with utility statements
that contain optimizable queries (such as EXPLAIN and SELECT INTO) and how
to deal with expiring speculative hashtable entries that are made to save
the normalized form of a query string. However, fixing these issues should
require only localized changes, and since there are other open patches
involving contrib/pg_stat_statements, it seems best to go ahead and commit
what we've got.
Peter Geoghegan, reviewed by Daniel Farina
M contrib/pg_stat_statements/pg_stat_statements.c
M doc/src/sgml/pgstatstatements.sgml
Run maintainer-check on all PO files, not only configured ones
commit : 4e1c72079abcc160e84cdcd879f2dca2a6956dea
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Mar 2012 21:06:45 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Mar 2012 21:06:45 +0300
The intent is to allow configure --enable-nls=xx for installation
speed and size, but have maintainer-check check all source files
regardless.
M src/nls-global.mk
Tweak markup to avoid extra whitespace in man pages
commit : 03f0c08f4730f3c80b65221749267b6436eac576
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Mar 2012 20:37:19 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Mar 2012 20:37:19 +0300
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/set_transaction.sgml
Attempt to unbreak pg_test_timing on Windows.
commit : 7f63527c82177c73197789468384a064d9d750d9
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 12:22:57 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 12:22:57 -0400
Per buildfarm, and Álvaro Herrera.
M src/tools/msvc/Mkvcbuild.pm
pg_basebackup: Error handling fixes.
commit : ada763cfcd0978cf95ebb0587f40a45b5cb57594
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 12:19:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 12:19:22 -0400
Thomas Ogrisegg and Fujii Masao
M src/bin/pg_basebackup/pg_basebackup.c
pg_basebackup: Error message improvements.
commit : 81f6bbe8ade8c90f23f9286ca9ca726d3e0e310f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 08:43:35 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 08:43:35 -0400
Fujii Masao
M src/bin/pg_basebackup/pg_basebackup.c
Doc fix for pg_test_timing.
commit : 9c272da8c49ac5531ceea57cd13d56dbdf761a82
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 08:16:19 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 28 Mar 2012 08:16:19 -0400
Fujii Masao
M doc/src/sgml/pgtesttiming.sgml
pg_test_timing utility, to measure clock monotonicity and timing cost.
commit : cee523867db29c0bfc5de7ec638ce0a4ad9b3817
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 16:14:00 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 16:14:00 -0400
Ants Aasma, Greg Smith
M contrib/Makefile
A contrib/pg_test_timing/.gitignore
A contrib/pg_test_timing/Makefile
A contrib/pg_test_timing/pg_test_timing.c
M doc/src/sgml/config.sgml
M doc/src/sgml/contrib.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/perform.sgml
A doc/src/sgml/pgtesttiming.sgml
Expose track_iotiming information via pg_stat_statements.
commit : 5b4f346611431361339253203d486789e4babb02
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 15:17:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 15:17:22 -0400
Ants Aasma, reviewed by Greg Smith, with very minor tweaks by me.
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/pgstatstatements.sgml
Bend parse location rules for the convenience of pg_stat_statements.
commit : 5d3fcc4c2e137417ef470d604fee5e452b22f6a7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 15:17:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 15:17:00 -0400
Generally, the parse location assigned to a multiple-token construct is
the location of its leftmost token. This commit breaks that rule for
the syntaxes TYPENAME 'LITERAL' and CAST(CONSTANT AS TYPENAME) --- the
resulting Const will have the location of the literal string, not the
typename or CAST keyword. The cases where this matters are pretty thin on
the ground (no error messages in the regression tests change, for example),
and it's unlikely that any user would be confused anyway by an error cursor
pointing at the literal. But still it's less than consistent. The reason
for changing it is that contrib/pg_stat_statements wants to know the parse
location of the original literal, and it was agreed that this is the least
unpleasant way to preserve that information through parse analysis.
Peter Geoghegan
M src/backend/parser/parse_coerce.c
Add some infrastructure for contrib/pg_stat_statements.
commit : a40fa613b516b97c37d87ac1b21fb7aa8a2f2c1b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 15:14:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 15:14:13 -0400
Add a queryId field to Query and PlannedStmt. This is not used by the
core backend, except for being copied around at appropriate times.
It's meant to allow plug-ins to track a particular query forward from
parse analysis to execution.
The queryId is intentionally not dumped into stored rules (and hence this
commit doesn't bump catversion). You could argue that choice either way,
but it seems better that stored rule strings not have any dependency
on plug-ins that might or might not be present.
Also, add a post_parse_analyze_hook that gets invoked at the end of
parse analysis (but only for top-level analysis of complete queries,
not cases such as analyzing a domain's default-value expression).
This is mainly meant to be used to compute and assign a queryId,
but it could have other applications.
Peter Geoghegan
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/optimizer/plan/planner.c
M src/backend/parser/analyze.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/tcop/postgres.c
M src/include/nodes/parsenodes.h
M src/include/nodes/plannodes.h
M src/include/parser/analyze.h
New GUC, track_iotiming, to track I/O timings.
commit : 40b9b957694cf7749c420c6c51a7e1d3c9b1fec1
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 14:52:37 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Mar 2012 14:52:37 -0400
Currently, the only way to see the numbers this gathers is via
EXPLAIN (ANALYZE, BUFFERS), but the plan is to add visibility through
the stats collector and pg_stat_statements in subsequent patches.
Ants Aasma, reviewed by Greg Smith, with some further changes by me.
M doc/src/sgml/config.sgml
M src/backend/commands/explain.c
M src/backend/executor/instrument.c
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/executor/instrument.h
M src/include/storage/bufmgr.h
Silence compiler warning about uninitialized variable.
commit : 98316e211b60cb160247171e3557b40a247c4610
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 14:47:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Mar 2012 14:47:23 -0400
M contrib/pg_upgrade/exec.c
pg_dump: Small message adjustment for consistency
commit : dd024c22f1fff083065b42af555a3552721fabfd
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Mar 2012 19:52:39 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Mar 2012 19:52:39 +0300
M src/bin/pg_dump/pg_backup_custom.c
Improve PL/Python database access function documentation
commit : 206bec11bd9214873e3703898958789324480b1f
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 26 Mar 2012 21:15:16 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 26 Mar 2012 21:15:16 +0300
Organize the function descriptions as a list instead of running text,
for easier access.
M doc/src/sgml/plpython.sgml
Remove dead assignment
commit : dcb33b1c6417cbeaf2c7d24eece0edf7cc0adfa7
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 26 Mar 2012 21:03:10 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 26 Mar 2012 21:03:10 +0300
found by Coverity
M src/backend/commands/sequence.c
Code cleanup for heap_freeze_tuple.
commit : 7386089d23c748af142ec7e3668fa0dd164eaf99
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 26 Mar 2012 11:03:06 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 26 Mar 2012 11:03:06 -0400
It used to be case that lazy vacuum could call this function with only
a shared lock on the buffer, but neither lazy vacuum nor any other
code path does that any more. Simplify the code accordingly and clean
up some related, obsolete comments.
M src/backend/access/heap/heapam.c
M src/backend/access/heap/rewriteheap.c
M src/backend/commands/vacuumlazy.c
M src/include/access/heapam.h
Fix COPY FROM for null marker strings that correspond to invalid encoding.
commit : e8476f46fc847060250c92ec9b310559293087fc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Mar 2012 23:17:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Mar 2012 23:17:22 -0400
The COPY documentation says "COPY FROM matches the input against the null
string before removing backslashes". It is therefore reasonable to presume
that null markers like E'\\0' will work ... and they did, until someone put
the tests in the wrong order during microoptimization-driven rewrites.
Since then, we've been failing if the null marker is something that would
de-escape to an invalidly-encoded string. Since null markers generally
need to be something that can't appear in the data, this represents a
nontrivial loss of functionality; surprising nobody noticed it earlier.
Per report from Jeff Davis. Backpatch to 8.4 where this got broken.
M src/backend/commands/copy.c
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
Replace empty locale name with implied value in CREATE DATABASE and initdb.
commit : c7cea267de3ca05b29a57b9d113b95ef3793c8d8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Mar 2012 21:47:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Mar 2012 21:47:22 -0400
setlocale() accepts locale name "" as meaning "the locale specified by the
process's environment variables". Historically we've accepted that for
Postgres' locale settings, too. However, it's fairly unsafe to store an
empty string in a new database's pg_database.datcollate or datctype fields,
because then the interpretation could vary across postmaster restarts,
possibly resulting in index corruption and other unpleasantness.
Instead, we should expand "" to whatever it means at the moment of calling
CREATE DATABASE, which we can do by saving the value returned by
setlocale().
For consistency, make initdb set up the initial lc_xxx parameter values the
same way. initdb was already doing the right thing for empty locale names,
but it did not replace non-empty names with setlocale results. On a
platform where setlocale chooses to canonicalize the spellings of locale
names, this would result in annoying inconsistency. (It seems that popular
implementations of setlocale don't do such canonicalization, which is a
pity, but the POSIX spec certainly allows it to be done.) The same risk
of inconsistency leads me to not venture back-patching this, although it
could certainly be seen as a longstanding bug.
Per report from Jeff Davis, though this is not his proposed patch.
M src/backend/commands/dbcommands.c
M src/backend/utils/adt/pg_locale.c
M src/bin/initdb/initdb.c
M src/include/utils/pg_locale.h
Fix planner's handling of outer PlaceHolderVars within subqueries.
commit : 8279eb4191c7ab9920c72ec8eec5df0e7b8c7530
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Mar 2012 16:21:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Mar 2012 16:21:39 -0400
For some reason, in the original coding of the PlaceHolderVar mechanism
I had supposed that PlaceHolderVars couldn't propagate into subqueries.
That is of course entirely possible. When it happens, we need to treat
an outer-level PlaceHolderVar much like an outer Var or Aggref, that is
SS_replace_correlation_vars() needs to replace the PlaceHolderVar with
a Param, and then when building the finished SubPlan we have to provide
the PlaceHolderVar expression as an actual parameter for the SubPlan.
The handling of the contained expression is a bit delicate but it can be
treated exactly like an Aggref's expression.
In addition to the missing logic in subselect.c, prepjointree.c was failing
to search subqueries for PlaceHolderVars that need their relids adjusted
during subquery pullup. It looks like everyplace else that touches
PlaceHolderVars got it right, though.
Per report from Mark Murawski. In 9.1 and HEAD, queries affected by this
oversight would fail with "ERROR: Upper-level PlaceHolderVar found where
not expected". But in 9.0 and 8.4, you'd silently get possibly-wrong
answers, since the value transmitted into the subquery wouldn't go to null
when it should.
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c
M src/include/nodes/relation.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Cast some printf arguments to avoid possibly-nonportable behavior.
commit : ed61127be483d8939e13a151773549f1517d6e67
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 20:18:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 20:18:04 -0400
Per compiler warnings on buildfarm member black_firefly.
M src/backend/replication/basebackup.c
M src/bin/pg_basebackup/pg_basebackup.c
Refactor simplify_function et al to centralize argument simplification.
commit : 81a646febe87964725647a36d839f6b4b405f3ae
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 19:15:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 19:15:58 -0400
We were doing the recursive simplification of function/operator arguments
in half a dozen different places, with rather baroque logic to ensure it
didn't get done multiple times on some arguments. This patch improves that
by postponing argument simplification until after we've dealt with named
parameters and added any needed default expressions.
Marti Raudsepp, somewhat hacked on by me
M src/backend/optimizer/util/clauses.c
Code review for protransform patches.
commit : 0339047bc93147c1c6f78f867ae6b0c215406235
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 17:29:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Mar 2012 17:29:57 -0400
Fix loss of previous expression-simplification work when a transform
function fires: we must not simply revert to untransformed input tree.
Instead build a dummy FuncExpr node to pass to the transform function.
This has the additional advantage of providing a simpler, more uniform
API for transform functions.
Move documentation to a somewhat less buried spot, relocate some
poorly-placed code, be more wary of null constants and invalid typmod
values, add an opr_sanity check on protransform function signatures,
and some other minor cosmetic adjustments.
Note: although this patch touches pg_proc.h, no need for catversion
bump, because the changes are cosmetic and don't actually change the
intended catalog contents.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/xfunc.sgml
M src/backend/nodes/nodeFuncs.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_clause.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/varbit.c
M src/backend/utils/adt/varchar.c
M src/include/catalog/pg_proc.h
M src/include/nodes/nodeFuncs.h
M src/include/parser/parse_clause.h
M src/test/regress/expected/opr_sanity.out
M src/test/regress/sql/opr_sanity.sql
Clarify that PQconninfoParse returns an array with all legal options.
commit : e08b4101e1daa2f4e6644330918177a10cac0aab
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 22:09:20 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 22:09:20 -0400
Per discussion with Dmitriy Igrishin and Tom Lane.
M doc/src/sgml/libpq.sgml
Doc clarifications regarding use of varlena.
commit : fdf719cd2868144b5bd78971217bb36bb970e15e
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 15:45:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 15:45:42 -0400
Jay Levitt, reviewed by Tom Lane.
M doc/src/sgml/xfunc.sgml
Update docs on numeric storage requirements.
commit : e83f827f5abeeca4750b40bd6d8701d91fead8dd
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 15:40:27 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Mar 2012 15:40:27 -0400
Since 9.1, the minimum overhead is three bytes, not five.
Fujii Masao
M doc/src/sgml/datatype.sgml
Fix GET DIAGNOSTICS for case of assignment to function's first variable.
commit : 88a4cb30a4c48a6b11fd4641855595d2678aa123
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 14:13:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 14:13:17 -0400
An incorrect and entirely unnecessary "safety check" in exec_stmt_getdiag()
caused the code to treat an assignment to a variable with dno zero as a
no-op. Unfortunately, that's a perfectly valid dno. This has been broken
since GET DIAGNOSTICS was invented. It's not terribly surprising that the
bug went unnoticed for so long, since in most cases you probably wouldn't
use the function's first-created variable (normally its first parameter)
as a GET DIAGNOSTICS target. Nonetheless, it's broken. Per bug #6551
from Adam Buraczewski.
M src/pl/plpgsql/src/pl_exec.c
Refactor to eliminate duplicate copies of conninfo default-finding code.
commit : e9ce658b6203e9052bff5c89ed6265fba69cdb36
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 12:08:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 12:08:34 -0400
Alex Shulgin, lightly edited by me
M src/interfaces/libpq/fe-connect.c
If a role has a password expiration date, show that in psql's \du output.
commit : 04dfc8774966c60e4031ab5d8eeb3263d9568ad3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 02:08:25 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 02:08:25 -0400
Per a suggestion from Euler Taveira, it seems like a good idea to include
this information in \du (and \dg) output. This costs nothing for people
who are not using the VALID UNTIL feature, while for those who are, it's
rather critical information.
Fabrízio de Royes Mello
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c
Fix configure's search for collateindex.pl.
commit : f2386d7136dacbb8bf59ebbe8e5c5b73db202813
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 00:46:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Mar 2012 00:46:03 -0400
PGAC_PATH_COLLATEINDEX supposed that it could use AC_PATH_PROGS to search
for collateindex.pl, but that macro will only accept files that are marked
executable, and at least some DocBook installations don't mark the script
executable (a case the docs Makefile was already prepared for). Accept the
script if it's present and readable in $DOCBOOKSTYLE/bin, and otherwise
search the PATH as before.
Having fixed that up, we don't need the fallback case that was in the docs
Makefile, and instead can throw an understandable error if configure didn't
find the script. Per recent trouble report from John Lumby.
M config/docbook.m4
M configure
M doc/src/sgml/Makefile
Clean up compiler warnings from unused variables with asserts disabled
commit : 0e85abd658738db9ea183c133c89c3c94ee37dae
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 21 Mar 2012 23:30:14 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 21 Mar 2012 23:30:14 +0200
For those variables only used when asserts are enabled, use a new
macro PG_USED_FOR_ASSERTS_ONLY, which expands to
__attribute__((unused)) when asserts are not enabled.
M src/backend/access/hash/hashovfl.c
M src/backend/executor/execCurrent.c
M src/backend/executor/nodeMaterial.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/nodeWorktablescan.c
M src/backend/libpq/be-fsstubs.c
M src/backend/libpq/pqcomm.c
M src/backend/optimizer/path/costsize.c
M src/backend/parser/analyze.c
M src/backend/storage/file/fd.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/adt/selfuncs.c
M src/bin/psql/psqlscan.l
M src/include/c.h
Add installing entab to pgindent instructions
commit : 621eb156f159d4979193939902f49ea597972a7d
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 21 Mar 2012 21:27:30 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 21 Mar 2012 21:27:30 +0200
And minor other pgindent documentation tweaks.
M src/tools/pgindent/README
Doc updates for index-only scans.
commit : 5b9c1e6d52dfd022a074462e029bfd7f7bc4321c
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Mar 2012 14:51:11 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Mar 2012 14:51:11 -0400
Document that routine vacuuming is now also important for the purpose
of index-only scans; and mention in the section that describes the
visibility map that it is used to implement index-only scans.
Marti Raudsepp, with some changes by me.
M doc/src/sgml/maintenance.sgml
M doc/src/sgml/storage.sgml
Allow new relmapper entries when allow_system_table_mods is true.
commit : f70f095c9096d5e2689e8d79172b37b57a84e51b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 21 Mar 2012 14:09:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 21 Mar 2012 14:09:39 -0400
This restores the pre-9.0 situation that it's possible to add new indexes
on pg_class and other mapped-but-not-shared catalogs, so long as you broke
the glass and flipped the big red Dont-Touch-Me switch. As before, there
are a lot of gotchas, and you'd have to be pretty desperate to try this
on a production database; but there doesn't seem to be a reason for
relmapper.c to be preventing such things all by itself. Per
experimentation with a case suggested by Cody Cutrer.
M src/backend/utils/cache/relmapper.c
Improve connectMaintenanceDatabase() error reporting.
commit : 99081c63e40ac6e33c83406b0958aa9426193fea
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Mar 2012 10:56:26 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Mar 2012 10:56:26 -0400
The prior coding instructs the user to pick an alternative maintenance
database, but this is overly clever, since it obscures whatever the real
cause of the failure is.
Josh Kupershmidt
M src/bin/scripts/common.c
Add some CHECK_FOR_INTERRUPTS() calls to the heap-sort call path.
commit : aefa6d163e21391626c20a508af33373d6ba387e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 20 Mar 2012 21:00:11 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 20 Mar 2012 21:00:11 -0400
I broke this in commit 337b6f5ecf05b21b5e997986884d097d60e4e3d0, which
among other things arranged for quicksorts to CHECK_FOR_INTERRUPTS()
slightly less frequently. Sadly, it also arranged for heapsorts to
CHECK_FOR_INTERRUPTS() much less frequently. Repair.
M src/backend/utils/sort/tuplesort.c
Improve the -l (limit) option recently added to contrib/vacuumlo.
commit : 64c604898e812aa93c124c666e8709fff1b8dd26
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Mar 2012 19:05:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Mar 2012 19:05:08 -0400
Instead of just stopping after removing an arbitrary subset of orphaned
large objects, commit and start a new transaction after each -l objects.
This is just as effective as the original patch at limiting the number of
locks used, and it doesn't require doing the OID collection process
repeatedly to get everything. Since the option no longer changes the
fundamental behavior of vacuumlo, and it avoids a known server-side
limitation, enable it by default (with a default limit of 1000 LOs per
transaction).
In passing, be more careful about properly quoting the names of tables
and fields, and do some other cosmetic cleanup.
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/vacuumlo.sgml
pg_dump: get rid of die_horribly
commit : 9d23a70d513aa1312135d6cedd444e7e3e933edb
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 18:38:11 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 18:38:11 -0300
The old code was using exit_horribly or die_horribly other depending on
whether it had an ArchiveHandle on which to close the connection or not;
but there were places that were passing a NULL ArchiveHandle to
die_horribly, and other places that used exit_horribly while having an
AH available. So there wasn't all that much consistency.
Improve the situation by keeping only one of the routines, and instead
of having to pass the AH down from the caller, arrange for it to be
present for an on_exit_nicely callback to operate on.
Author: Joachim Wieland
Some tweaks by me
Per a suggestion from Robert Haas, in the ongoing "parallel pg_dump"
saga.
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/nls.mk
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_null.c
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 trigger example code to match header changes
commit : b251cf31936b4507ad8ba78f34a14f592c664f43
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 16:50:18 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 16:50:18 -0300
I should have done this in b93f5a5673b4bb09e14eb80fe28aa21fc20a6271 but
didn't notice the problem at the time.
Per report from Marco Nenciarini
M doc/src/sgml/trigger.sgml
Update struct Trigger in docs
commit : 438269eb104446ff0c36d893cd6f01be8405d327
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 13:14:16 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 20 Mar 2012 13:14:16 -0300
M doc/src/sgml/trigger.sgml
Remove stray word from sepgsql documentation.
commit : 0b43edbca708a33a83d6842e96b837ad77f3e5bc
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 20 Mar 2012 15:10:33 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 20 Mar 2012 15:10:33 -0400
M doc/src/sgml/sepgsql.sgml
pg_upgrade: Add new generated file to .gitignore
commit : 1b12c3e836676e8e94ba94e15c25b100ce0debf0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Mar 2012 20:40:31 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Mar 2012 20:40:31 +0200
M contrib/pg_upgrade/.gitignore
pg_dump: Remove undocumented "files" output format
commit : 19f45565f581ce605956c29586bfd277f6012eec
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Mar 2012 20:38:20 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Mar 2012 20:38:20 +0200
This was for demonstration only, and now it was creating compiler
warnings from zlib without an obvious fix (see also
d923125b77c5d698bb8107a533a21627582baa43), let's just remove it. The
"directory" format is presumably similar enough anyway.
M src/bin/pg_dump/Makefile
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
D src/bin/pg_dump/pg_backup_files.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_restore.c
Restructure SELECT INTO's parsetree representation into CreateTableAsStmt.
commit : 9dbf2b7d75de5af38d087cbe2b1147dd0fd10f0a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Mar 2012 21:37:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Mar 2012 21:37:19 -0400
Making this operation look like a utility statement seems generally a good
idea, and particularly so in light of the desire to provide command
triggers for utility statements. The original choice of representing it as
SELECT with an IntoClause appendage had metastasized into rather a lot of
places, unfortunately, so that this patch is a great deal more complicated
than one might at first expect.
In particular, keeping EXPLAIN working for SELECT INTO and CREATE TABLE AS
subcommands required restructuring some EXPLAIN-related APIs. Add-on code
that calls ExplainOnePlan or ExplainOneUtility, or uses
ExplainOneQuery_hook, will need adjustment.
Also, the cases PREPARE ... SELECT INTO and CREATE RULE ... SELECT INTO,
which formerly were accepted though undocumented, are no longer accepted.
The PREPARE case can be replaced with use of CREATE TABLE AS EXECUTE.
The CREATE RULE case doesn't seem to have much real-world use (since the
rule would work only once before failing with "table already exists"),
so we'll not bother with that one.
Both SELECT INTO and CREATE TABLE AS still return a command tag of
"SELECT nnnn". There was some discussion of returning "CREATE TABLE nnnn",
but for the moment backwards compatibility wins the day.
Andres Freund and Tom Lane
M src/backend/commands/Makefile
M src/backend/commands/copy.c
A src/backend/commands/createas.c
M src/backend/commands/explain.c
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/spi.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.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/util/clauses.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_expr.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/tcop/dest.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/backend/utils/cache/plancache.c
M src/include/catalog/catversion.h
A src/include/commands/createas.h
M src/include/commands/explain.h
M src/include/commands/prepare.h
M src/include/executor/executor.h
M src/include/nodes/execnodes.h
M src/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
M src/include/nodes/plannodes.h
M src/include/parser/analyze.h
M src/include/tcop/pquery.h
M src/include/tcop/utility.h
M src/pl/plpgsql/src/pl_exec.c
M src/test/regress/expected/select_into.out
M src/test/regress/expected/transactions.out
M src/test/regress/sql/select_into.sql
pg_dump: fix double free of query results
commit : 77503a7638a35eedd9cb08d9ca4c54deb203521d
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Mar 2012 17:52:20 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Mar 2012 17:52:20 -0300
This bug was introduced while refactoring in commit 1631598e --- no need
to back-patch.
Bug report and fix from Joachim Wieland.
M src/bin/pg_dump/pg_dump.c
plperl: Package-qualify _TD
commit : 814e08e895a037e3f5485000db5964cd68dbfa01
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Mar 2012 17:29:05 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Mar 2012 17:29:05 -0300
Failing to do so causes trigger invocation to fail when they are nested
within a function invocation that changes the current package.
Backpatch to 9.1; previous releases used a different method to obtain
_TD. Per bug report from Mark Murawski (bug #6511)
Author: Alex Hunsaker
M src/pl/plperl/plperl.c
In pg_upgrade, remove dependency on pg_config, as that might not be in the non-development install. Instead, use the LOAD mechanism to check for the pg_upgrade_support shared object, like we do for other shared object checks.
commit : 02b183acb42831bbeba819fde568263f19f2acdc
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 19 Mar 2012 09:31:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 19 Mar 2012 09:31:50 -0400
Backpatch to 9.1.
Report from Àlvaro
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/function.c
Honor inputdir and outputdir when converting regression files.
commit : e3fc4a97bc8ee82a78605b5ffe79bd4cf3c6213b
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Mar 2012 17:24:15 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Mar 2012 17:24:15 -0400
When converting source files, pg_regress' inputdir and outputdir options were
ignored when computing the locations of the destination files. In consequence,
these options were effectively unusable when the regression inputs need to
be adjusted by pg_regress. This patch makes pg_regress put the converted files
in the same place that these options specify non-converted input or results
files are to be found. Backpatched to all live branches.
M src/test/regress/pg_regress.c
In pg_upgrade, move new echo quote define into include file.
commit : ced53c38d7a05694bc316229e2332aebd98388aa
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 17 Mar 2012 09:56:47 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 17 Mar 2012 09:56:47 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
Add note about column privilege behavior to REVOKE reference page
commit : 313d29f740ef92e25f2e7707c61697471d22ca1b
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 17 Mar 2012 10:34:00 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 17 Mar 2012 10:34:00 +0200
suggested by Josh Berkus
M doc/src/sgml/ref/revoke.sgml
In pg_upgrade, create a script to incrementally generate more accurate optimizer statistics so the cluster can be made available sooner.
commit : faec2815c8ea9d50da503896bb55222aabcc9741
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 16 Mar 2012 18:54:11 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 16 Mar 2012 18:54:11 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
libpq: Fix minor memory leaks
commit : d4318483e151b41cd663e7b36a5539d3c5048c5a
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 20:30:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 20:30:19 +0200
When using connection info arrays with a conninfo string in the dbname
slot, some memory would be leaked if an error occurred while
processing the following array slots.
found by Coverity
M src/interfaces/libpq/fe-connect.c
psql: Remove inappropriate const qualifiers
commit : 598bb8cdbd9c2554bd8acfc51c9fed473a7d37bc
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 20:03:38 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 20:03:38 +0200
Since mbvalidate() can alter the string it validates, having the
callers claim that the strings they accept are const is inappropriate.
M src/bin/psql/mbprint.c
M src/bin/psql/print.c
M src/bin/psql/print.h
pg_dump: Fix crash with invalid pg_cast row
commit : 359dea2859c63e73c8f3f4d769e5cf1eda2a428d
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:55:41 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:55:41 +0200
An invalid combination of pg_cast.castfunc and pg_cast.castmethod
would result in a segmentation fault. Now it prints a warning.
found by Coverity
M src/bin/pg_dump/pg_dump.c
pg_restore: Fix memory and file descriptor leak with directory format
commit : d8e5b3427a0f0c127eb08a3130055180ed0118e1
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:53:31 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:53:31 +0200
found by Coverity
M src/bin/pg_dump/pg_backup_directory.c
backend: Fix minor memory leak in configuration file processing
commit : 693ff85d47181fad123ef245cf9c28539cc3db92
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:51:43 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 16 Mar 2012 19:51:43 +0200
Just for consistency with the other code paths.
found by Coverity
M src/backend/utils/misc/guc.c
Improve commentary in match_pathkeys_to_index().
commit : b67ad046e6c37cbe0eebc5745323ed9864192f52
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Mar 2012 14:07:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Mar 2012 14:07:21 -0400
For a little while there I thought match_pathkeys_to_index() was broken
because it wasn't trying to match index columns to pathkeys in order.
Actually that's correct, because GiST can support ordering operators
on any random collection of index columns, but it sure needs a comment.
M src/backend/optimizer/path/indxpath.c
Revisit handling of UNION ALL subqueries with non-Var output columns.
commit : dd4134ea56cb8855aad3988febc45eca28851cd8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Mar 2012 13:11:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Mar 2012 13:11:12 -0400
In commit 57664ed25e5dea117158a2e663c29e60b3546e1c I tried to fix a bug
reported by Teodor Sigaev by making non-simple-Var output columns distinct
(by wrapping their expressions with dummy PlaceHolderVar nodes). This did
not work too well. Commit b28ffd0fcc583c1811e5295279e7d4366c3cae6c fixed
some ensuing problems with matching to child indexes, but per a recent
report from Claus Stadler, constraint exclusion of UNION ALL subqueries was
still broken, because constant-simplification didn't handle the injected
PlaceHolderVars well either. On reflection, the original patch was quite
misguided: there is no reason to expect that EquivalenceClass child members
will be distinct. So instead of trying to make them so, we should ensure
that we can cope with the situation when they're not.
Accordingly, this patch reverts the code changes in the above-mentioned
commits (though the regression test cases they added stay). Instead, I've
added assorted defenses to make sure that duplicate EC child members don't
cause any problems. Teodor's original problem ("MergeAppend child's
targetlist doesn't match MergeAppend") is addressed more directly by
revising prepare_sort_from_pathkeys to let the parent MergeAppend's sort
list guide creation of each child's sort list.
In passing, get rid of add_sort_column; as far as I can tell, testing for
duplicate sort keys at this stage is dead code. Certainly it doesn't
trigger often enough to be worth expending cycles on in ordinary queries.
And keeping the test would've greatly complicated the new logic in
prepare_sort_from_pathkeys, because comparing pathkey list entries against
a previous output array requires that we not skip any entries in the list.
Back-patch to 9.1, like the previous patches. The only known issue in
this area that wasn't caused by the ill-advised previous patches was the
MergeAppend planning failure, which of course is not relevant before 9.1.
It's possible that we need some of the new defenses against duplicate child
EC entries in older branches, but until there's some clear evidence of that
I'm going to refrain from back-patching further.
M src/backend/optimizer/README
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/placeholder.c
M src/include/nodes/relation.h
M src/include/optimizer/paths.h
M src/include/optimizer/placeholder.h
M src/test/regress/expected/inherit.out
M src/test/regress/expected/union.out
M src/test/regress/sql/inherit.sql
M src/test/regress/sql/union.sql
Add comments explaining why our Itanium spinlock implementation is safe.
commit : aef5fe7efee5bde4abd618adbaf4c13f44ee59ab
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 16 Mar 2012 10:14:45 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 16 Mar 2012 10:14:45 +0200
M src/include/storage/s_lock.h
A couple more fixes for the sepgsql documentation.
commit : 4012810a688f37ea12159f93d3ab0a1ed47ca3dc
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:49:44 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:49:44 -0400
M doc/src/sgml/sepgsql.sgml
Copy editing of sepgsql documentation.
commit : d0ed9efdf713f1bd8cdb5897d3f0c825986ff3b4
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:37:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:37:40 -0400
M doc/src/sgml/sepgsql.sgml
sepgsql_setcon().
commit : 523176cbf14a3414170a83dd43686c0eccdc61c6
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:08:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Mar 2012 16:08:40 -0400
This is intended as infrastructure to allow sepgsql to cooperate with
connection pooling software, by allowing the effective security label
to be set for each new connection.
KaiGai Kohei, reviewed by Yeb Havinga.
M contrib/sepgsql/expected/label.out
M contrib/sepgsql/label.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql-regtest.te
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/sepgsql.sql.in
M contrib/sepgsql/sql/label.sql
M doc/src/sgml/sepgsql.sgml
Add const qualifier to tzn returned by timestamp2tm()
commit : eb990a2b9efff853d0c68a9cf902b1df23498540
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Mar 2012 21:17:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Mar 2012 21:17:19 +0200
The tzn value might come from tm->tm_zone, which libc declares as
const, so it's prudent that the upper layers know about this as well.
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/xml.c
M src/include/utils/timestamp.h
M src/interfaces/ecpg/pgtypeslib/timestamp.c
Remove unused tzn arguments for timestamp2tm()
commit : 531e60aec02fa14d02185e42363b2277427e2119
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Mar 2012 21:13:35 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Mar 2012 21:13:35 +0200
M src/backend/utils/adt/date.c
M src/backend/utils/adt/timestamp.c
Uppercase pg_upgrade status output title.
commit : 7c8cfed78a52113095e51cf92b20f6606c3141be
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 14 Mar 2012 19:22:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 14 Mar 2012 19:22:01 -0400
M contrib/pg_upgrade/pg_upgrade.c
Improve EncodeDateTime and EncodeTimeOnly APIs
commit : ad4fb0d0d2f33ec0165f2a9a50a6d8cbcef4ab82
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 23:03:34 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 23:03:34 +0200
Use an explicit argument to tell whether to include the time zone in
the output, rather than using some undocumented pointer magic.
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/nabstime.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/xml.c
M src/include/utils/datetime.h
M src/interfaces/ecpg/pgtypeslib/dt.h
M src/interfaces/ecpg/pgtypeslib/dt_common.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
Add missing va_end() calls
commit : 942b63193c722a58ed24b3305308836b47b3f028
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:47:21 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:47:21 +0200
found by Coverity
M src/interfaces/ecpg/ecpglib/descriptor.c
COPY: Add an assertion
commit : 6f018c6dda201818251d8ead03866289b6b7e1c8
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:44:40 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:44:40 +0200
This is for tools such as Coverity that don't know that the grammar
enforces that the case of not having a relation (but instead a query)
cannot happen in the FROM case.
M src/backend/commands/copy.c
Add additional safety check against invalid backup label file
commit : e684ab5e1ec900bb7b73fb6f8a655e0ec54b3720
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:41:50 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 14 Mar 2012 22:41:50 +0200
It was already checking for invalid data after "BACKUP FROM", but
would possibly crash if "BACKUP FROM" was missing altogether.
found by Coverity
M src/backend/access/transam/xlog.c
pg_dump: Fix some minor memory leaks
commit : acfaa596ccd90e161bcc09bb00e755e65d9c068c
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 13 Mar 2012 21:34:54 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 13 Mar 2012 21:34:54 +0200
Although we often don't care about freeing all memory in pg_dump,
these functions already freed the same memory in other code paths, so
we might as well do it consistently.
found by Coverity
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
Patch some corner-case bugs in pl/python.
commit : 5cd72c7a7c7bd76ab028e1dc59d90a47750acebe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 15:26:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 15:26:32 -0400
Dave Malcolm of Red Hat is working on a static code analysis tool for
Python-related C code. It reported a number of problems in plpython,
most of which were failures to check for NULL results from object-creation
functions, so would only be an issue in very-low-memory situations.
Patch in HEAD and 9.1. We could go further back but it's not clear that
these issues are important enough to justify the work.
Jan Urbański
M src/pl/plpython/plpy_elog.c
M src/pl/plpython/plpy_main.c
M src/pl/plpython/plpy_plpymodule.c
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/plpy_typeio.c
Fix minor memory leak in PLy_typeinfo_dealloc().
commit : a14fa84693659c4c4a17204406945b29fae3d9c4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 13:28:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 13:28:11 -0400
We forgot to free the per-attribute array element descriptors.
Jan Urbański
M src/pl/plpython/plpy_typeio.c
Create a stack of pl/python "execution contexts".
commit : ed75380bdae30dc1313aef44beafad860cf246c0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 13:19:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Mar 2012 13:19:06 -0400
This replaces the former global variable PLy_curr_procedure, and provides
a place to stash per-call-level information. In particular we create a
per-call-level scratch memory context.
For the moment, the scratch context is just used to avoid leaking memory
from datatype output function calls in PLyDict_FromTuple. There probably
will be more use-cases in future.
Although this is a fix for a pre-existing memory leakage bug, it seems
sufficiently invasive to not want to back-patch; it feels better as part
of the major rearrangement of plpython code that we've already done as
part of 9.2.
Jan Urbański
M src/pl/plpython/plpy_cursorobject.c
M src/pl/plpython/plpy_elog.c
M src/pl/plpython/plpy_exec.c
M src/pl/plpython/plpy_main.c
M src/pl/plpython/plpy_main.h
M src/pl/plpython/plpy_procedure.c
M src/pl/plpython/plpy_procedure.h
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/plpy_typeio.c
pgstattuple: Use a BufferAccessStrategy object to avoid cache-trashing.
commit : 2e46bf67114586835f4a9908f1a1f08ee8ba83a8
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 13 Mar 2012 09:51:03 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 13 Mar 2012 09:51:03 -0400
Jaime Casanova, reviewed by Noah Misch, slightly modified by me.
M contrib/pgstattuple/pgstatindex.c
M contrib/pgstattuple/pgstattuple.c
pgstattuple: Add new error case for spgist indexes.
commit : 97c85098de1e21825adf447df60b95a56cef7bd8
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 13 Mar 2012 09:35:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 13 Mar 2012 09:35:55 -0400
Extracted from a larger patch by Jaime Casanova, reviewed by Noah Misch.
I think this error message could use some more extensive revision, but
this at least makes the handling of spgist consistent with what we do for
other types of indexes that this code doesn't know how to handle.
M contrib/pgstattuple/pgstattuple.c
In pg_upgrade, add various logging improvements:
commit : 717f6d60859cc2d1d7dfd57520531a50bd78df9c
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 12 Mar 2012 19:47:54 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 12 Mar 2012 19:47:54 -0400
add ability to control permissions of created files
have psql echo its queries for easier debugging
output four separate log files, and delete them on success
add -r/--retain option to keep log files after success
make logs file append-only
remove -g/-G/-l logging options
sugggest tailing appropriate log file on failure
enhance -v/--verbose behavior
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.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/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
M doc/src/sgml/pgupgrade.sgml
Fix SPGiST vacuum algorithm to handle concurrent tuple motion properly.
commit : b4af1c25bbc636379efc5d2ffb9d420765705b8a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 12 Mar 2012 16:10:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 12 Mar 2012 16:10:05 -0400
A leaf tuple that we need to delete could get moved as a consequence of an
insertion happening concurrently with the VACUUM scan. If it moves from a
page past the current scan point to a page before, we'll miss it, which is
not acceptable. Hence, when we see a leaf-page REDIRECT that could have
been made since our scan started, chase down the redirection pointer much
as if we were doing a normal index search, and be sure to vacuum every page
it leads to. This fixes the issue because, if the tuple was on page N at
the instant we start our scan, we will surely find it as a consequence of
chasing the redirect from page N, no matter how much it moves around in
between. Problem noted by Takashi Yamamoto.
M src/backend/access/spgist/README
M src/backend/access/spgist/spgvacuum.c
Use correct sizeof operand in qsort call
commit : bad250f4f31704f05247fa4696ac2077f884ed8e
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 12 Mar 2012 20:56:13 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 12 Mar 2012 20:56:13 +0200
Probably no practical impact, since all pointers ought to have the
same size, but it was wrong nonetheless. Found by Coverity.
M src/backend/utils/adt/tsrank.c
Add comment for missing break in switch
commit : c9f310d377d1d8f8acd2d05bf7920704d33affe5
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 12 Mar 2012 20:55:09 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 12 Mar 2012 20:55:09 +0200
For clarity, following other sites, and to silence Coverity.
M src/backend/utils/adt/formatting.c
Remove tabs in SGML files
commit : 9a39583264e46e6d2f869f202847cd8ab6c43f81
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 12 Mar 2012 10:13:42 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 12 Mar 2012 10:13:42 -0400
M doc/src/sgml/ref/initdb.sgml
Make INSERT/UPDATE queries depend on their specific target columns.
commit : c6be1f43ab0551a95ec8ac77364e2f8558ae6345
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 18:14:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 18:14:23 -0400
We have always created a whole-table dependency for the target relation,
but that's not really good enough, as it doesn't prevent scenarios such
as dropping an individual target column or altering its type. So we
have to create an individual dependency for each target column, as well.
Per report from Bill MacArthur of a rule containing UPDATE breaking
after such an alteration. Note that this patch doesn't try to make
such cases work, only to ensure that the attempted ALTER TABLE throws
an error telling you it can't cope with adjusting the rule.
This is a long-standing bug, but given the lack of prior reports
I'm not going to risk back-patching it. A back-patch wouldn't do
anything to fix existing rules' dependency lists, anyway.
M src/backend/catalog/dependency.c
Make parameter name consistent with syntax summary.
commit : 8142166162efb193b1fece5cf32afb07fe24e17e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:56:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:56:26 -0400
Thomas Hunger
M doc/src/sgml/ref/create_database.sgml
Fix documented type of t_infomask2.
commit : 1e4964478add0278a3f7ff685bc033f0f52625ad
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:53:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:53:04 -0400
Per Koizumi Satoru
M doc/src/sgml/storage.sgml
Teach SPGiST to store nulls and do whole-index scans.
commit : c6a11b89e48dfb47b305cea405924333dabc20b6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:29:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Mar 2012 16:29:04 -0400
This patch fixes the other major compatibility-breaking limitation of
SPGiST, that it didn't store anything for null values of the indexed
column, and so could not support whole-index scans or "x IS NULL"
tests. The approach is to create a wholly separate search tree for
the null entries, and use fixed "allTheSame" insertion and search
rules when processing this tree, instead of calling the index opclass
methods. This way the opclass methods do not need to worry about
dealing with nulls.
Catversion bump is for pg_am updates as well as the change in on-disk
format of SPGiST indexes; there are some tweaks in SPGiST WAL records
as well.
Heavily rewritten version of a patch by Oleg Bartunov and Teodor Sigaev.
(The original also stored nulls separately, but it reused GIN code to do
so; which required undesirable compromises in the on-disk format, and
would likely lead to bugs due to the GIN code being required to work in
two very different contexts.)
M doc/src/sgml/spgist.sgml
M src/backend/access/spgist/README
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/spgist/spgscan.c
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
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Removed redundant "the" from ecpg's docs.
commit : fc227a4e3b84f7bc243c4606780dde28aea257ee
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 11 Mar 2012 12:25:52 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 11 Mar 2012 12:25:52 +0100
Typo spotted by Erik Rijkers.
M doc/src/sgml/ecpg.sgml
Add description for --no-locale and --text-search-config.
commit : da9e73a137871ab8ebe432ea443193c336bfc81a
author : Tatsuo Ishii <ishii@postgresql.org>
date : Sun, 11 Mar 2012 08:23:20 +0900
committer: Tatsuo Ishii <ishii@postgresql.org>
date : Sun, 11 Mar 2012 08:23:20 +0900
M doc/src/sgml/ref/initdb.sgml
Add more detail to error message for invalid arguments for server process
commit : 86947e666d39229558311d7b0be45608fd071ed8
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Mar 2012 01:52:05 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Mar 2012 01:52:05 +0200
It now prints the argument that was at fault.
Also fix a small misbehavior where the error message issued by
getopt() would complain about a program named "--single", because
that's what argv[0] is in the server process.
M src/backend/tcop/postgres.c
Restructure SPGiST opclass interface API to support whole-index scans.
commit : 03e56f798e365763486b03a2630fbc3190ccd29a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 10 Mar 2012 18:36:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 10 Mar 2012 18:36:49 -0500
The original API definition was incapable of supporting whole-index scans
because there was no way to invoke leaf-value reconstruction without
checking any qual conditions. Also, it was inefficient for
multiple-qual-condition scans because value reconstruction got done over
again for each qual condition, and because other internal work in the
consistent functions likewise had to be done for each qual. To fix these
issues, pass the whole scankey array to the opclass consistent functions,
instead of only letting them see one item at a time. (Essentially, the
loop over scankey entries is now inside the consistent functions not
outside them. This makes the consistent functions a bit more complicated,
but not unreasonably so.)
In itself this commit does nothing except save a few cycles in
multiple-qual-condition index scans, since we can't support whole-index
scans on SPGiST indexes until nulls are included in the index. However,
I consider this a must-fix for 9.2 because once we release it will get
very much harder to change the opclass API definition.
M doc/src/sgml/spgist.sgml
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/include/access/spgist.h
M src/include/access/spgist_private.h
Add support for renaming constraints
commit : 39d74e346c083aa371ba64c4edb1332c40b56530
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 10 Mar 2012 20:19:13 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 10 Mar 2012 20:19:13 +0200
reviewed by Josh Berkus and Dimitri Fontaine
M doc/src/sgml/ref/alter_table.sgml
M src/backend/commands/alter.c
M src/backend/commands/tablecmds.c
M src/backend/parser/gram.y
M src/include/commands/tablecmds.h
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
sepgsql DROP support.
commit : e914a144d3aaa0a09e0aab031d7e6f58389401ce
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Mar 2012 15:18:45 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Mar 2012 15:18:45 -0500
KaiGai Kohei
M contrib/sepgsql/database.c
D contrib/sepgsql/expected/create.out
A contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql.h
R053 contrib/sepgsql/sql/create.sql contrib/sepgsql/sql/ddl.sql
M contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
Extend object access hook framework to support arguments, and DROP.
commit : 07d1edb954bc8f5d0e2c010dec8482328af38cb8
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Mar 2012 14:34:56 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Mar 2012 14:34:56 -0500
This allows loadable modules to get control at drop time, perhaps for the
purpose of performing additional security checks or to log the event.
The initial purpose of this code is to support sepgsql, but other
applications should be possible as well.
KaiGai Kohei, reviewed by me.
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_type.c
M src/backend/commands/dbcommands.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/proclang.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/user.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/storage/large_object/inv_api.c
M src/include/catalog/objectaccess.h
Revise FDW planning API, again.
commit : b14953932dfdda7d915b9e276a09df8458efeec8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Mar 2012 12:48:48 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Mar 2012 12:48:48 -0500
Further reflection shows that a single callback isn't very workable if we
desire to let FDWs generate multiple Paths, because that forces the FDW to
do all work necessary to generate a valid Plan node for each Path. Instead
split the former PlanForeignScan API into three steps: GetForeignRelSize,
GetForeignPaths, GetForeignPlan. We had already bit the bullet of breaking
the 9.1 FDW API for 9.2, so this shouldn't cause very much additional pain,
and it's substantially more flexible for complex FDWs.
Add an fdw_private field to RelOptInfo so that the new functions can save
state there rather than possibly having to recalculate information two or
three times.
In addition, we'd not thought through what would be needed to allow an FDW
to set up subexpressions of its choice for runtime execution. We could
treat ForeignScan.fdw_private as an executable expression but that seems
likely to break existing FDWs unnecessarily (in particular, it would
restrict the set of node types allowable in fdw_private to those supported
by expression_tree_walker). Instead, invent a separate field fdw_exprs
which will receive the postprocessing appropriate for expression trees.
(One field is enough since it can be a list of expressions; also, we assume
the corresponding expression state tree(s) will be held within fdw_state,
so we don't need to add anything to ForeignScanState.)
Per review of Hanada Shigeru's pgsql_fdw patch. We may need to tweak this
further as we continue to work on that patch, but to me it feels a lot
closer to being right now.
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/fdwhandler.sgml
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/relnode.c
M src/include/foreign/fdwapi.h
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/planmain.h
Update outdated comment. HeapTupleHeader.t_natts field doesn't exist anymore.
commit : 342baf4ce61f06ad3898490dc5125579d9e6bd18
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Mar 2012 08:07:56 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Mar 2012 08:07:56 +0200
Kevin Grittner
M src/backend/access/common/heaptuple.c
psql: Remove useless code
commit : 410ee35ed095d85bf49c60ab7fd096ddbb5cb0a1
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 23:13:51 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 23:13:51 +0200
Apparently a copy-and-paste mistake introduced in
8ddd22f2456af0155f9c183894f481203e86b76e.
found by Coverity
M src/bin/psql/print.c
Fix some issues with temp/transient tables in extension scripts.
commit : 08dd23cec7d6b5493c83848d7568495815eda5c6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Mar 2012 15:52:26 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Mar 2012 15:52:26 -0500
Phil Sorber reported that a rewriting ALTER TABLE within an extension
update script failed, because it creates and then drops a placeholder
table; the drop was being disallowed because the table was marked as an
extension member. We could hack that specific case but it seems likely
that there might be related cases now or in the future, so the most
practical solution seems to be to create an exception to the general rule
that extension member objects can only be dropped by dropping the owning
extension. To wit: if the DROP is issued within the extension's own
creation or update scripts, we'll allow it, implicitly performing an
"ALTER EXTENSION DROP object" first. This will simplify cases such as
extension downgrade scripts anyway.
No docs change since we don't seem to have documented the idea that you
would need ALTER EXTENSION DROP for such an action to begin with.
Also, arrange for explicitly temporary tables to not get linked as
extension members in the first place, and the same for the magic
pg_temp_nnn schemas that are created to hold them. This prevents assorted
unpleasant results if an extension script creates a temp table: the forced
drop at session end would either fail or remove the entire extension, and
neither of those outcomes is desirable. Note that this doesn't fix the
ALTER TABLE scenario, since the placeholder table is not temp (unless the
table being rewritten is).
Back-patch to 9.1.
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/namespace.c
M src/backend/catalog/pg_namespace.c
M src/backend/commands/schemacmds.c
M src/include/catalog/pg_namespace.h
ecpg: Fix off-by-one error in memory copying
commit : c5e073ca2deec1595e4fdd748f14fcb4122e8faf
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 22:29:01 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 22:29:01 +0200
In a rare case, one byte past the end of memory belonging to the
sqlca_t structure would be written to.
found by Coverity
M src/interfaces/ecpg/ecpglib/misc.c
ecpg: Fix rare memory leaks
commit : 8dd4d10d481ec1da568ab424e62a3e50c069baaf
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 22:21:12 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Mar 2012 22:21:12 +0200
found by Coverity
M src/interfaces/ecpg/ecpglib/connect.c
M src/interfaces/ecpg/ecpglib/execute.c
Silence warning about unused variable, when building without assertions.
commit : d93f209f483f006534ae543667a1254b6fdec183
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Mar 2012 11:10:02 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Mar 2012 11:10:02 +0200
M src/backend/access/transam/xlog.c
Improve estimation of IN/NOT IN by assuming array elements are distinct.
commit : 66a7e6bae98592d1d98d9ef589753f0e953c5828
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 22:59:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 22:59:49 -0500
In constructs such as "x IN (1,2,3,4)" and "x <> ALL(ARRAY[1,2,3,4])",
we formerly always used a general-purpose assumption that the probability
of success is independent for each comparison of "x" to an array element.
But in real-world usage of these constructs, that's a pretty poor
assumption; it's much saner to assume that the array elements are distinct
and so the match probabilities are disjoint. Apply that assumption if the
operator appears to behave as equality (for ANY) or inequality (for ALL).
But fall back to the normal independent-probabilities calculation if this
yields an impossible result, ie probability > 1 or < 0. We could protect
ourselves against bad estimates even more by explicitly checking for equal
array elements, but that is expensive and doesn't seem worthwhile: doing
it would amount to optimizing for poorly-written queries at the expense
of well-written ones.
Daniele Varrazzo and Tom Lane, after a suggestion by Ants Aasma
M src/backend/utils/adt/selfuncs.c
Fix indentation of \d footers for non-ASCII cases.
commit : 1ed7f0e6b90a9b693895105a90d8b5b0eefbcd56
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 19:25:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 19:25:59 -0500
Multi-line "Inherits:" and "Child tables:" footers were misindented when
those strings' translations involved multibyte characters, because we were
using strlen() instead of an appropriate display width measurement.
In passing, avoid doing gettext() more than once per loop in these places.
While at it, fix pg_wcswidth(), which has been entirely broken since about
8.2, but fortunately has been unused for the same length of time.
Report and patch by Sergey Burladyan (bug #6480)
M src/bin/psql/describe.c
M src/bin/psql/mbprint.c
M src/bin/psql/mbprint.h
Add GetForeignColumnOptions() to foreign.c, and add some documentation.
commit : 9088d1b96504717fd589ff7eeacc96b6d1c08ead
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 18:20:58 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 18:20:58 -0500
GetForeignColumnOptions provides some abstraction for accessing
column-specific FDW options, on a par with the access functions that were
already provided here for other FDW-related information.
Adjust file_fdw.c to use GetForeignColumnOptions instead of equivalent
hand-rolled code.
In addition, add some SGML documentation for the functions exported by
foreign.c that are meant for use by FDW authors.
(This is the fdw_helper portion of the proposed pgsql_fdw patch.)
Hanada Shigeru, reviewed by KaiGai Kohei
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/fdwhandler.sgml
M src/backend/foreign/foreign.c
M src/include/foreign/foreign.h
psql: Avoid some spurious output if the server croaks.
commit : cf7026b64b3e56889f8a81194a57221500e23a0f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 7 Mar 2012 16:56:42 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 7 Mar 2012 16:56:42 -0500
Fixes a regression in commit 08146775acd8bfe0fcc509c71857abb928697171.
Noah Misch
M src/bin/psql/common.c
psql: Fix memory leak
commit : 1673122127f9f17f4ca6b214027c0806b0d502f4
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:52:15 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:52:15 +0200
In expanded auto mode, a lot of allocated memory was not cleaned up.
found by Coverity
M src/bin/psql/print.c
psql: Fix invalid memory access
commit : 561ec761332b5608a894210e00d4fee1b5c6522a
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:46:41 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:46:41 +0200
Due to an apparent thinko, when printing a table in expanded mode
(\x), space would be allocated for 1 slot plus 1 byte per line,
instead of 1 slot per line plus 1 slot for the NULL terminator. When
the line count is small, reading or writing the terminator would
therefore access memory beyond what was allocated.
M src/bin/psql/print.c
libpq: Fix memory leak
commit : f9325df0fc6dcf3c1a2540b944c00b7316754146
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:35:03 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Mar 2012 23:35:03 +0200
If a client encoding is specified as a connection parameter (or
environment variable), internal storage allocated for it would never
be freed.
M src/interfaces/libpq/fe-connect.c
Expose an API for calculating catcache hash values.
commit : d4bf3c9c94305e692349fb6fe0c67e483b72ae87
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 14:51:13 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Mar 2012 14:51:13 -0500
Now that cache invalidation callbacks get only a hash value, and not a
tuple TID (per commits 632ae6829f7abda34e15082c91d9dfb3fc0f298b and
b5282aa893e565b7844f8237462cb843438cdd5e), the only way they can restrict
what they invalidate is to know what the hash values mean. setrefs.c was
doing this via a hard-wired assumption but that seems pretty grotty, and
it'll only get worse as more cases come up. So let's expose a calculation
function that takes the same parameters as SearchSysCache. Per complaint
from Marko Kreen.
M src/backend/optimizer/plan/setrefs.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/syscache.c
M src/include/utils/catcache.h
M src/include/utils/syscache.h
libpq: Small code clarification, and avoid casting away const
commit : e685a8e6651b0e55996e6eba6917302607866793
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 6 Mar 2012 23:20:43 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 6 Mar 2012 23:20:43 +0200
M src/interfaces/libpq/fe-auth.c
Add a hook for processing messages due to be sent to the server log.
commit : 19dbc3463161a142537ba5c569c8e6a073a318de
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Mar 2012 15:35:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Mar 2012 15:35:41 -0500
Use-cases for this include custom log filtering rules and custom log
message transmission mechanisms (for instance, lossy log message
collection, which has been discussed several times recently).
As is our common practice for hooks, there's no regression test nor
user-facing documentation for this, though the author did exhibit a
sample module using the hook.
Martin Pihlak, reviewed by Marti Raudsepp
M src/backend/utils/error/elog.c
M src/include/utils/elog.h
Typo fix.
commit : bc97c38115ed48c1dd27e9d534faae204427f9a5
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Mar 2012 08:23:51 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Mar 2012 08:23:51 -0500
Fujii Masao
M src/backend/access/transam/xlog.c
Make the comments more clear on the fact that UpdateFullPageWrites() is not safe to call concurrently from multiple processes.
commit : e587e2e3e39ec54772905b8e0ac7155a03253934
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 10:44:51 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 10:44:51 +0200
M src/backend/access/transam/xlog.c
Remove extra copies of LogwrtResult.
commit : 7714c6382941383514c0f1954ca831686ac4fcd2
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 09:34:10 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 09:34:10 +0200
This simplifies the code a little bit. The new rule is that to update
XLogCtl->LogwrtResult, you must hold both WALWriteLock and info_lck, whereas
before we had two copies, one that was protected by WALWriteLock and another
protected by info_lck. The code that updates them was already holding both
locks, so merging the two is trivial.
The third copy, XLogCtl->Insert.LogwrtResult, was not totally redundant, it
was used in AdvanceXLInsertBuffer to update the backend-local copy, before
acquiring the info_lck to read the up-to-date value. But the value of that
seems dubious; at best it's saving one spinlock acquisition per completed
WAL page, which is not significant compared to all the other work involved.
And in practice, it's probably not saving even that much.
M src/backend/access/transam/xlog.c
Simplify the way changes to full_page_writes are logged.
commit : 3b682df3260aa8e020201e4b6c5cbc31fe8ecb8e
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 09:13:00 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 6 Mar 2012 09:13:00 +0200
It's harmless to do full page writes even when not strictly necessary, so
when turning full_page_writes on, we can set the global flag first, and then
call XLogInsert. Likewise, when turning it off, we can write the WAL record
first, and then clear the flag. This way XLogInsert doesn't need any special
handling of the XLOG_FPW_CHANGE record type. XLogInsert is complicated
enough already, so anything we can keep away from there is a good thing.
Actually I don't think the atomicity of the shared memory flag matters,
anyway, because we only write the XLOG_FPW_CHANGE at the end of recovery,
when there are no concurrent WAL insertions going on. But might as well make
it safe, in case we allow changing full_page_writes on the fly in the
future.
M src/backend/access/transam/xlog.c
In pg_upgrade, only lock the old cluster if link mode is used, and do it right after we restore the schema (a common failure point), and right before we do the link operation.
commit : 2127aac6ef56df14f2fc9e91871c6e9194c52eed
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Mar 2012 21:19:54 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Mar 2012 21:19:54 -0500
Per suggesgtions from Robert and ^!C^!^@lvaro
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M doc/src/sgml/pgupgrade.sgml
Redesign PlanForeignScan API to allow multiple paths for a foreign table.
commit : 6b289942bfdbbfa2955cedc591c522822a7ffbfe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Mar 2012 16:15:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Mar 2012 16:15:59 -0500
The original API specification only allowed an FDW to create a single
access path, which doesn't seem like a terribly good idea in hindsight.
Instead, move the responsibility for building the Path node and calling
add_path() into the FDW's PlanForeignScan function. Now, it can do that
more than once if appropriate. There is no longer any need for the
transient FdwPlan struct, so get rid of that.
Etsuro Fujita, Shigeru Hanada, Tom Lane
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/fdwhandler.sgml
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/util/pathnode.c
M src/include/foreign/fdwapi.h
M src/include/nodes/nodes.h
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/pathnode.h
Improve documentation around logging_collector and use of stderr.
commit : 3f47e145f1869f147a807e5a2cb80d21a13e10ae
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Mar 2012 14:08:52 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Mar 2012 14:08:52 -0500
In backup.sgml, point out that you need to be using the logging collector
if you want to log messages from a failing archive_command script. (This
is an oversimplification, in that it will work without the collector as
long as you're not sending postmaster stderr to /dev/null; but it seems
like a good idea to encourage use of the collector to avoid problems
with multiple processes concurrently scribbling on one file.)
In config.sgml, do some wordsmithing of logging_collector discussion.
Per bug #6518 from Janning Vygen
M doc/src/sgml/backup.sgml
M doc/src/sgml/config.sgml
Add isolation test to check-world and installcheck-world
commit : cecdf6d4596976bb378ca194bba55a242b883d2d
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Mar 2012 20:19:20 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Mar 2012 20:19:20 +0200
M GNUmakefile.in
M src/test/Makefile
Rewrite GiST support code for rangetypes.
commit : 80da9e68fdd70b796b3a7de3821589513596c0f7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 22:50:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 22:50:06 -0500
This patch installs significantly smarter penalty and picksplit functions
for ranges, making GiST indexes for them smaller and faster to search.
There is no on-disk format change, so no catversion bump, but you'd need
to REINDEX to get the benefits for any existing index.
Alexander Korotkov, reviewed by Jeff Davis
M src/backend/utils/adt/rangetypes_gist.c
Remove useless "rough estimate" path from mcelem_array_contained_selec.
commit : e2eed7891008cbf2b7d3868b3d77751b33ed09ad
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 16:03:38 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 16:03:38 -0500
The code in this function that tried to cope with a missing count histogram
was quite ineffective for anything except a perfectly flat distribution.
Furthermore, since we were already punting for missing MCELEM slot, it's
rather useless to sweat over missing DECHIST: there are no cases where
ANALYZE will create the first but not the second. So just simplify the
code by punting rather than pretending we can do something useful.
M src/backend/utils/adt/array_selfuncs.c
Improve histogram-filling loop in new compute_array_stats() code.
commit : 4fb694aebc524f2085152d8c98a85e01ef6136f4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 15:40:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Mar 2012 15:40:16 -0500
Do "frac" arithmetic in int64 to prevent overflow with large statistics
targets, and improve the comments so people have some chance of
understanding how it works.
Alexander Korotkov and Tom Lane
M src/backend/utils/adt/array_typanalyze.c
More carefully validate xlog location string inputs
commit : 141b89826ddb82b3afa7cf5e048d28a3d8e1c45c
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Mar 2012 12:24:09 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Mar 2012 12:24:09 +0100
Now that we have validate_xlog_location, call it from the previously
existing functions taking xlog locatoins as a string input.
Suggested by Fujii Masao
M src/backend/access/transam/xlogfuncs.c
Add function pg_xlog_location_diff to help comparisons
commit : bc5ac3686580079bd4ea26bf027178786d77a9ee
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Mar 2012 12:15:24 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Mar 2012 12:15:24 +0100
Comparing two xlog locations are useful for example when calculating
replication lag.
Euler Taveira de Oliveira, reviewed by Fujii Masao, and some cleanups
from me
M doc/src/sgml/func.sgml
M src/backend/access/transam/xlogfuncs.c
M src/include/access/xlog_internal.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
Collect and use element-frequency statistics for arrays.
commit : 0e5e167aaea4ceb355a6e20eec96c4f7d05527ab
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Mar 2012 20:20:19 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Mar 2012 20:20:19 -0500
This patch improves selectivity estimation for the array <@, &&, and @>
(containment and overlaps) operators. It enables collection of statistics
about individual array element values by ANALYZE, and introduces
operator-specific estimators that use these stats. In addition,
ScalarArrayOpExpr constructs of the forms "const = ANY/ALL (array_column)"
and "const <> ANY/ALL (array_column)" are estimated by treating them as
variants of the containment operators.
Since we still collect scalar-style stats about the array values as a
whole, the pg_stats view is expanded to show both these stats and the
array-style stats in separate columns. This creates an incompatible change
in how stats for tsvector columns are displayed in pg_stats: the stats
about lexemes are now displayed in the array-related columns instead of the
original scalar-related columns.
There are a few loose ends here, notably that it'd be nice to be able to
suppress either the scalar-style stats or the array-element stats for
columns for which they're not useful. But the patch is in good enough
shape to commit for wider testing.
Alexander Korotkov, reviewed by Noah Misch and Nathan Boley
M doc/src/sgml/catalogs.sgml
M src/backend/catalog/heap.c
M src/backend/catalog/system_views.sql
M src/backend/commands/analyze.c
M src/backend/commands/typecmds.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/tsearch/ts_typanalyze.c
M src/backend/utils/adt/Makefile
A src/backend/utils/adt/array_selfuncs.c
A src/backend/utils/adt/array_typanalyze.c
M src/backend/utils/adt/selfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_statistic.h
M src/include/catalog/pg_type.h
M src/include/commands/vacuum.h
M src/include/utils/array.h
M src/include/utils/selfuncs.h
M src/test/regress/expected/arrays.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/type_sanity.out
M src/test/regress/sql/arrays.sql
M src/test/regress/sql/type_sanity.sql
Provide environment overrides for psql file locations.
commit : 34c978442c55dd13a3a8c6b90fd4380dad02f3da
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 3 Mar 2012 16:39:26 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 3 Mar 2012 16:39:26 -0500
PSQL_HISTORY provides an alternative for the command history file,
and PSQLRC provides an alternative location for the .psqlrc file.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/input.c
M src/bin/psql/startup.c
Allow CREATE TABLE (LIKE ...) from composite type
commit : b59ca98209d45f5689fe9de22a7429d4cf09d40c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Mar 2012 16:03:05 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Mar 2012 16:03:05 +0200
The only reason this didn't work before was that parserOpenTable()
rejects composite types. So use relation_openrv() directly and
manually do the errposition() setup that parserOpenTable() does.
M doc/src/sgml/ref/create_table.sgml
M src/backend/parser/parse_utilcmd.c
M src/test/regress/expected/create_table_like.out
M src/test/regress/sql/create_table_like.sql
Fix incorrect uses of gzFile
commit : d923125b77c5d698bb8107a533a21627582baa43
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 22:30:01 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 22:30:01 +0200
gzFile is already a pointer, so code like
gzFile *handle = gzopen(...)
is wrong.
This used to pass silently because gzFile used to be defined as void*,
and you can assign a void* to a void**. But somewhere between zlib
versions 1.2.3.4 and 1.2.6, the definition of gzFile was changed to
struct gzFile_s *, and with that new definition this usage causes
compiler warnings.
So remove all those extra pointer decorations.
There is a related issue in pg_backup_archiver.h, where
FILE *FH; /* General purpose file handle */
is used throughout pg_dump as sometimes a real FILE* and sometimes a
gzFile handle, which also causes warnings now. This is not yet fixed
here, because it might need more code restructuring.
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_dump/pg_backup_files.c
M src/bin/pg_dump/pg_backup_tar.c
Re-add "make check" target in src/test/isolation/Makefile
commit : 8e5f4300fdcadac1bfd72a7d1a0225030226c800
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 22:09:10 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 22:09:10 +0200
This effectively reverts 7886cc73ad12fb9b5a729b6c8152f11a309f5d65,
which was done under the impression that isolationtester needs libpq,
which it no longer does (and never really did).
M src/test/isolation/Makefile
Allow child-relation entries to be made in ec_has_const EquivalenceClasses.
commit : 44634e474fcb9dcd92b16fe3a0fb1d8a91e69353
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Mar 2012 14:28:46 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Mar 2012 14:28:46 -0500
This fixes an oversight in commit 11cad29c91524aac1d0b61e0ea0357398ab79bf8,
which introduced MergeAppend plans. Before that happened, we never
particularly cared about the sort ordering of scans of inheritance child
relations, since appending their outputs together would destroy any
ordering anyway. But now it's important to be able to match child relation
sort orderings to those of the surrounding query. The original coding of
add_child_rel_equivalences skipped ec_has_const EquivalenceClasses, on the
originally-correct grounds that adding child expressions to them was
useless. The effect of this is that when a parent variable is equated to
a constant, we can't recognize that index columns on the equivalent child
variables are not sort-significant; that is, we can't recognize that a
child index on, say, (x, y) is able to generate output in "ORDER BY y"
order when there is a clause "WHERE x = constant". Adding child
expressions to the (x, constant) EquivalenceClass fixes this, without any
downside that I can see other than a few more planner cycles expended on
such queries.
Per recent gripe from Robert McGehee. Back-patch to 9.1 where MergeAppend
was introduced.
M src/backend/optimizer/path/equivclass.c
Add COLLATION FOR expression
commit : 6688d2878e516314418274ee95c5c30412351933
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 21:12:16 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 21:12:16 +0200
reviewed by Jaime Casanova
M doc/src/sgml/func.sgml
M src/backend/parser/gram.y
M src/backend/utils/adt/misc.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/parser/kwlist.h
M src/include/utils/builtins.h
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.sql
ecpg: Clean up some const usage
commit : d41f510c807ce8b12c572196e2ae8f3817ac253a
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 20:51:29 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Mar 2012 20:51:29 +0200
M src/interfaces/ecpg/ecpglib/execute.c
M src/interfaces/ecpg/ecpglib/prepare.c
M src/interfaces/ecpg/preproc/descriptor.c
Add a rule to optionally build docs with the stylesheet from the website
commit : 8efb0bc57eb350bd991fd32c96e38a13bfe7f120
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:13:12 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:13:12 +0100
For those of us who prefer the formatting of the docs using the
website stylesheets. Use "make STYLE=website draft" (for example) to use.
The stylesheet itself is referenced directly to the website, so there
is currently no copy of it stored in the source repository. Thus, docs
built with it will only look correct if the browser can access the website
when viewing them.
M doc/src/sgml/Makefile
M doc/src/sgml/stylesheet.dsl
When a GiST page is split during index build, it might not have a buffer.
commit : 2502f45979fca76a6b19a07c98d7a41737a3dc7b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 2 Mar 2012 13:16:09 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 2 Mar 2012 13:16:09 +0200
Previously it was thought that it's impossible as the code stands, because
insertions create buffers as tuples are cascaded downwards, and index
split also creaters buffers eagerly for all halves. But the example from
Jay Levitt demonstrates that it can happen, when the root page is split.
It's in fact OK if the buffer doesn't exist, so we just need to remove the
sanity check. In fact, we've been discussing the possibility of destroying
empty buffers to conserve memory, which would render the sanity check
completely useless anyway.
Fix by Alexander Korotkov
M src/backend/access/gist/gistbuildbuffers.c
Small possible clarification in pg_basebackup reference page
commit : bc8765e91c743d87f5658387b41e3a61cde54116
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 21:16:24 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 21:16:24 +0200
The <literal> markup is not visible as distinct on man pages, which
creates a bit of confusion when looking at the documentation of the
pg_basebackup -l option. Rather than reinventing the entire font
system for man pages to remedy this, just put some quotes around this
particular case, which should also help in other output formats.
M doc/src/sgml/ref/pg_basebackup.sgml
Don't link pg_isolation_regress with libpq
commit : 36a1a8c33d0d400b246dec8395990725b98801b7
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 20:50:36 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 20:50:36 +0200
It's not necessary and can only create confusion about which libpq
installation should be used.
Also remove some dead code from the makefile that was apparently
copied from elsewhere.
M src/test/isolation/Makefile
psql: Improve error display for psql -f -
commit : 89c2f573a392e3995fffc619d4faed23f8649269
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 19:58:10 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Mar 2012 19:58:10 +0200
Running "psql -f -" used to print
psql:<stdin>:1: ERROR: blah
but that got broken between 8.4 and 9.0 (commit
b291c0fba83a1e93868e2f69c03be195d620f30c), and now it printed
psql:-:1: ERROR: blah
This reverts to the old behavior and cleans up some code that was left
dead or useless by the mentioned commit.
M src/bin/psql/command.c
M src/bin/psql/startup.c
Remove TOAST table from pg_database
commit : 3433c6ba002f711a60352c3518f30cda73d06087
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 23:43:36 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 23:43:36 -0300
The only toastable column now is datacl, but we don't really support
long ACLs anyway. The TOAST table should have been removed when the
pg_db_role_setting catalog was introduced in commit
2eda8dfb52ed9962920282d8384da8bb4c22514d, but I forgot to do that.
Per -hackers discussion on March 2011.
M src/backend/catalog/catalog.c
M src/include/catalog/catversion.h
M src/include/catalog/toasting.h
Simplify references to backslash-doubling in func.sgml.
commit : a5c1a1969dd838189e5cc936c15cb40e13fb6d68
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Feb 2012 12:11:10 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Feb 2012 12:11:10 -0500
Several places were still written as though standard_conforming_strings
didn't exist, much less be the default. Now that it is on by default,
we can simplify the text and just insert occasional notes suggesting that
you might have to think harder if it's turned off. Per discussion of a
suggestion from Hannes Frederic Sowa.
Back-patch to 9.1 where standard_conforming_strings was made the default.
M doc/src/sgml/func.sgml
Correctly detect SSI conflicts of prepared transactions after crash.
commit : d6a7271958e61fe8029087a34483437292f41f6f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Feb 2012 15:22:49 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Feb 2012 15:22:49 +0200
A prepared transaction can get new conflicts in and out after preparing, so
we cannot rely on the in- and out-flags stored in the statefile at prepare-
time. As a quick fix, make the conservative assumption that after a restart,
all prepared transactions are considered to have both in- and out-conflicts.
That can lead to unnecessary rollbacks after a crash, but that shouldn't be
a big problem in practice; you don't want prepared transactions to hang
around for a long time anyway.
Dan Ports
M src/backend/storage/lmgr/predicate.c
Fix MSVC builds for previous patch's addition of a src/port file.
commit : 8cae5810ebaaabb54171d9953bdd9cc802f0d135
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Feb 2012 00:24:01 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Feb 2012 00:24:01 -0500
(And why in the world is this OBJS list not being scraped from the
corresponding Makefile?)
M src/tools/msvc/Mkvcbuild.pm
Fix typo in comment
commit : 58e9f974dcfae7c4c445631afad47d80deb83160
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 23:52:52 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 23:52:52 -0300
Haifeng Liu
M src/include/utils/json.h
Move CRC tables to libpgport, and provide them in a separate include file.
commit : 5c02a00d440b90ead12658ce6ec9f4eee95dd0a3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 28 Feb 2012 19:53:39 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 28 Feb 2012 19:53:39 -0500
This makes it much more convenient to build tools for Postgres that are
separately compiled and require a matching CRC implementation.
To prevent multiple copies of the CRC polynomial tables being introduced
into the postgres binaries, they are now included in the static library
libpgport that is mainly meant for replacement system functions. That
seems like a bit of a kludge, but there's no better place.
This cleans up building of the tools pg_controldata and pg_resetxlog,
which previously had to build their own copies of pg_crc.o.
In the future, external programs that need access to the CRC tables can
include the tables directly from the new header file pg_crc_tables.h.
Daniel Farina, reviewed by Abhijit Menon-Sen and Tom Lane
M src/backend/utils/hash/Makefile
M src/bin/pg_controldata/.gitignore
M src/bin/pg_controldata/Makefile
M src/bin/pg_resetxlog/.gitignore
M src/bin/pg_resetxlog/Makefile
R098 src/backend/utils/hash/pg_crc.c src/include/utils/pg_crc_tables.h
M src/port/Makefile
A src/port/pg_crc.c
M src/tools/msvc/Project.pm
Fix thinko in new match_join_clauses_to_index() logic.
commit : 0140a11b9ba5b22e1e4807e178bca770d46c3e28
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 28 Feb 2012 18:10:40 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 28 Feb 2012 18:10:40 -0500
We don't need to constrain the other side of an indexable join clause to
not be below an outer join; an example here is
SELECT FROM t1 LEFT JOIN t2 ON t1.a = t2.b LEFT JOIN t3 ON t2.c = t3.d;
We can consider an inner indexscan on t3.d using c = d as indexqual, even
though t2.c is potentially nulled by a previous outer join. The comparable
logic in orindxpath.c has always worked that way, but I was being overly
cautious here.
M src/backend/optimizer/path/indxpath.c
Add const qualifiers where they are accidentally cast away
commit : 973e9fb294dc05a384ecae7623923ae53cb81806
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Feb 2012 12:42:08 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Feb 2012 12:42:08 +0200
This only produces warnings under -Wcast-qual, but it's more correct
and consistent in any case.
M contrib/intarray/_intbig_gist.c
M contrib/ltree/ltree_gist.c
M src/backend/access/gist/gistproc.c
M src/backend/utils/adt/tsquery_util.c
M src/backend/utils/adt/xml.c
M src/backend/utils/misc/guc.c
M src/bin/psql/mbprint.c
M src/include/c.h
M src/include/utils/pg_crc.h
psql: when tab-completing, use quotes on file names that need them
commit : 41e3c94cac0e68257126b2d264dc5e877e892490
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 01:06:29 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 28 Feb 2012 01:06:29 -0300
psql backslash commands that deal with file or directory names require
quotes around those that have spaces, single quotes, or backslashes.
However, tab-completing such names does not provide said quotes, and is
thus almost useless with them.
This patch fixes the problem by having a wrapper function around
rl_filename_completion_function that dequotes on input and quotes on
output. This eases dealing with such names.
Author: Noah Misch
M src/bin/psql/stringutils.c
M src/bin/psql/stringutils.h
M src/bin/psql/tab-complete.c
ALTER TABLE: skip FK validation when it's safe to do so
commit : cb3a7c2b95a28e57c56562d48d2a3aa5eeb7fa29
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 27 Feb 2012 18:28:00 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 27 Feb 2012 18:28:00 -0300
We already skip rewriting the table in these cases, but we still force a
whole table scan to validate the data. This can be skipped, and thus
we can make the whole ALTER TABLE operation just do some catalog touches
instead of scanning the table, when these two conditions hold:
(a) Old and new pg_constraint.conpfeqop match exactly. This is actually
stronger than needed; we could loosen things by way of operator
families, but it'd require a lot more effort.
(b) The functions, if any, implementing a cast from the foreign type to
the primary opcintype are the same. For this purpose, we can consider a
binary coercion equivalent to an exact type match. When the opcintype
is polymorphic, require that the old and new foreign types match
exactly. (Since ri_triggers.c does use the executor, the stronger check
for polymorphic types is no mere future-proofing. However, no core type
exercises its necessity.)
Author: Noah Misch
Committer's note: catalog version bumped due to change of the Constraint
node. I can't actually find any way to have such a node in a stored
rule, but given that we have "out" support for them, better be safe.
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/utils/adt/ri_triggers.c
M src/include/catalog/catversion.h
M src/include/nodes/parsenodes.h
Call check_keywords.pl in maintainer-check
commit : 9bf8603c7a9153cada7e32eb0cf7ac1feb1d3b56
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Feb 2012 13:53:12 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Feb 2012 13:53:12 +0200
For that purpose, have check_keywords.pl print errors to stderr and
return a useful exit status.
M src/backend/common.mk
M src/backend/parser/Makefile
M src/tools/check_keywords.pl
Fix some more bugs in GIN's WAL replay logic.
commit : 1b630751d0ffef4c856bfe382889d0d187eca404
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 26 Feb 2012 15:12:17 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 26 Feb 2012 15:12:17 -0500
In commit 4016bdef8aded77b4903c457050622a5a1815c16 I fixed a bunch of
ginxlog.c bugs having to do with not handling XLogReadBuffer failures
correctly. However, in ginRedoUpdateMetapage and ginRedoDeleteListPages,
I unaccountably thought that failure to read the metapage would be
impossible and just put in an elog(PANIC) call. This is of course wrong:
failure is exactly what will happen if the index got dropped (or rebuilt)
between creation of the WAL record and the crash we're trying to recover
from. I believe this explains Nicholas Wilson's recent report of these
errors getting reached.
Also, fix memory leak in forgetIncompleteSplit. This wasn't of much
concern when the code was written, but in a long-running standby server
page split records could be expected to accumulate indefinitely.
Back-patch to 8.4 --- before that, GIN didn't have a metapage.
M src/backend/access/gin/ginxlog.c
Remove useless cast
commit : b5c077c3685c1b122c10c7ef03ff4c07abe786a3
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Feb 2012 15:31:16 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Feb 2012 15:31:16 +0200
M src/backend/libpq/crypt.c
Remove useless const qualifier
commit : 66f0cf7da8eeaeca4b9894bfafd61789b514af4a
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Feb 2012 15:22:27 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Feb 2012 15:22:27 +0200
Claiming that the typevar argument to DefineCompositeType() is const
was a plain lie. A similar case in DefineVirtualRelation() was
already changed in passing in commit 1575fbcb. Also clean up the now
unnecessary casts that used to cast away the const.
M src/backend/commands/typecmds.c
M src/backend/commands/view.c
M src/include/commands/typecmds.h
Fix some typos and correct wording in the monitoring docs patch
commit : ac086d466d124337ba87c8eca9aca2417c5bb98f
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 16:33:57 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 16:33:57 +0100
Thom Brown
M doc/src/sgml/monitoring.sgml
Merge the list of statistics functions into the view documentation
commit : ddfc2d9a3705d246c7f262d1f3745d2cf64da1bd
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:21:04 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:21:04 +0100
Most people won't read them individually anyway, it's an easy way to find
them, and it's a lot of duplicated information if they are kept in two
different places.
M doc/src/sgml/monitoring.sgml
Make each pg_stat_ view into it's own table in the documentation
commit : da9ed7dafdc49e6571d056d92f2ef67858d68946
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:20:49 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 25 Feb 2012 15:20:49 +0100
This makes it easier to match a column name with the description of it,
and makes it possible to add more detailed documentation in the future.
This patch does not add that extra documentation at this point, only
the structure required for it.
Modeled on the changes already done to pg_stat_activity.
M doc/src/sgml/monitoring.sgml
Merge dissect() into cdissect() to remove a pile of near-duplicate code.
commit : 4dd78bf37aa29d04b3f358b08c4a2fa43cf828e7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 16:26:10 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 16:26:10 -0500
The "uncomplicated" case isn't materially less complicated than the full
case, certainly not enough so to justify duplicating nearly 500 lines
of code. The only extra work being done in the full path is zaptreesubs,
which is very cheap compared to everything else being done here, and
besides that I'm less than convinced that it's not needed in some cases
even without backrefs.
M src/backend/regex/regexec.c
Avoid repeated creation/freeing of per-subre DFAs during regex search.
commit : 587359479acbbdc95c8e37da40707e37097423f5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 14:56:35 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 14:56:35 -0500
In nested sub-regex trees, lower-level nodes created DFAs and then
destroyed them again before exiting, which is a bit dumb considering that
the recursive search is likely to call those nodes again later. Instead
cache each created DFA until the end of pg_regexec(). This is basically a
space for time tradeoff, in that it might increase the maximum memory
usage. However, in most regex patterns there are not all that many subre
nodes, so not that many DFAs --- and in any case, the peak usage occurs
when reaching the bottom recursion level, and except for alternation cases
that's going to be the same anyway.
M src/backend/regex/regexec.c
M src/include/regex/regguts.h
Remove useless "retry memory" logic within regex engine.
commit : 3cbfe485e44d055b9e6a27e47069729375059f8c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 03:36:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 03:36:49 -0500
Apparently some primordial version of Spencer's engine needed cdissect()
and child functions to be able to continue matching from a previous
position when re-called. That is dead code, though, since trivial
inspection shows that cdissect can never be entered without having
previously done zapmem which resets the relevant retry counter. I have
also verified experimentally that no case in the Tcl regression tests
reaches cdissect with a nonzero retry value. Accordingly, remove that
logic. This doesn't really save any noticeable number of cycles in itself,
but it is one step towards making dissect() and cdissect() equivalent,
which will allow removing hundreds of lines of near-duplicated code.
Since struct subre's "retry" field is no longer particularly related to
any kind of retry, rename it to "id". As of this commit it's only used
for identifying a subre node in debug printouts, so you might think we
should get rid of the field entirely; but I have a plan for another use.
M src/backend/regex/regcomp.c
M src/backend/regex/regexec.c
M src/include/regex/regguts.h
Mention original ctags option name.
commit : 1fbacbf998678ae8d5868aeea3e83c915e940d0a
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 24 Feb 2012 16:19:18 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 24 Feb 2012 16:19:18 -0500
M src/tools/make_ctags
Update src/tools/make_ctags to avoid Exuberant tags option that has been renamed and undocumented since 2003; instead, use the documented option. Add comments.
commit : 7c19f9d139e76529bbb94b1bde7bc4c19f1bc37a
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 24 Feb 2012 16:17:07 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 24 Feb 2012 16:17:07 -0500
M src/tools/make_ctags
Put Debian package list back in alphabetical order
commit : 3aa42c25c3d1cab8dcbdff913aa60e404f67de1f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Feb 2012 20:40:29 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Feb 2012 20:40:29 +0200
M doc/src/sgml/docguide.sgml
Add some enumeration commas, for consistency
commit : 9cfd800aab9ee3c3b0b2b11ab41e129cc92dc15b
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Feb 2012 11:04:45 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 24 Feb 2012 11:04:45 +0200
M src/backend/access/gist/gistbuild.c
M src/backend/commands/async.c
M src/backend/commands/tablecmds.c
M src/backend/libpq/hba.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/misc/guc.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_restore.c
M src/test/regress/expected/numeric.out
Fix the general case of quantified regex back-references.
commit : 173e29aa5deefd9e71c183583ba37805c8102a72
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 01:40:18 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 24 Feb 2012 01:40:18 -0500
Cases where a back-reference is part of a larger subexpression that
is quantified have never worked in Spencer's regex engine, because
he used a compile-time transformation that neglected the need to
check the back-reference match in iterations before the last one.
(That was okay for capturing parens, and we still do it if the
regex has *only* capturing parens ... but it's not okay for backrefs.)
To make this work properly, we have to add an "iteration" node type
to the regex engine's vocabulary of sub-regex nodes. Since this is a
moderately large change with a fair risk of introducing new bugs of its
own, apply to HEAD only, even though it's a fix for a longstanding bug.
M src/backend/regex/README
M src/backend/regex/regcomp.c
M src/backend/regex/regexec.c
M src/include/regex/regguts.h
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Correctly handle NULLs in JSON output.
commit : 0c9e5d5e0d407013bf66af01942a7b2dd3342546
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 23 Feb 2012 23:44:16 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 23 Feb 2012 23:44:16 -0500
Error reported by David Wheeler.
M src/backend/utils/adt/json.c
Last-minute release note updates.
commit : b2ce60703ab431a1d6c10f50587ea5f5e984af2e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 17:47:52 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 17:47:52 -0500
Security: CVE-2012-0866, CVE-2012-0867, CVE-2012-0868
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
Convert newlines to spaces in names written in pg_dump comments.
commit : 89e0bac86dbca40dfc321926205f2a90d3da5437
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:53:09 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:53:09 -0500
pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script. A name containing a newline
would at least render the script syntactically incorrect. Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.
Reported by Heikki Linnakangas, patch by Robert Haas
Security: CVE-2012-0868
M src/bin/pg_dump/pg_backup_archiver.c
Remove arbitrary limitation on length of common name in SSL certificates.
commit : 077711c2e3e86384d19d833233bd35e05b921cfc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:48:04 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:48:04 -0500
Both libpq and the backend would truncate a common name extracted from a
certificate at 32 bytes. Replace that fixed-size buffer with dynamically
allocated string so that there is no hard limit. While at it, remove the
code for extracting peer_dn, which we weren't using for anything; and
don't bother to store peer_cn longer than we need it in libpq.
This limit was not so terribly unreasonable when the code was written,
because we weren't using the result for anything critical, just logging it.
But now that there are options for checking the common name against the
server host name (in libpq) or using it as the user's name (in the server),
this could result in undesirable failures. In the worst case it even seems
possible to spoof a server name or user name, if the correct name is
exactly 32 bytes and the attacker can persuade a trusted CA to issue a
certificate in which that string is a prefix of the certificate's common
name. (To exploit this for a server name, he'd also have to send the
connection astray via phony DNS data or some such.) The case that this is
a realistic security threat is a bit thin, but nonetheless we'll treat it
as one.
Back-patch to 8.4. Older releases contain the faulty code, but it's not
a security problem because the common name wasn't used for anything
interesting.
Reported and patched by Heikki Linnakangas
Security: CVE-2012-0867
M src/backend/libpq/be-secure.c
M src/include/libpq/libpq-be.h
M src/interfaces/libpq/fe-secure.c
M src/interfaces/libpq/libpq-int.h
Require execute permission on the trigger function for CREATE TRIGGER.
commit : 891e6e7bfd9bb72687522af08c18689f795cb60a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:38:56 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:38:56 -0500
This check was overlooked when we added function execute permissions to the
system years ago. For an ordinary trigger function it's not a big deal,
since trigger functions execute with the permissions of the table owner,
so they couldn't do anything the user issuing the CREATE TRIGGER couldn't
have done anyway. However, if a trigger function is SECURITY DEFINER,
that is not the case. The lack of checking would allow another user to
install it on his own table and then invoke it with, essentially, forged
input data; which the trigger function is unlikely to realize, so it might
do something undesirable, for instance insert false entries in an audit log
table.
Reported by Dinesh Kumar, patch by Robert Haas
Security: CVE-2012-0866
M doc/src/sgml/ref/create_trigger.sgml
M src/backend/commands/trigger.c
Allow MinGW builds to use standardly-named OpenSSL libraries.
commit : 74e29162a4f0ec0ad1c7224b8be936d1f9a51f7e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:05:08 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 23 Feb 2012 15:05:08 -0500
In the Fedora variant of MinGW, the openssl libraries have their normal
names, not libeay32 and libssleay32. Adjust configure probes to allow
that, per bug #6486.
Tomasz Ostrowski
M configure
M configure.in
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Remove inappropriate quotes
commit : c9d700444007046d799cdfea2038194e56bec1f7
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Feb 2012 12:51:33 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Feb 2012 12:51:33 +0200
And adjust wording for consistency.
M src/backend/commands/foreigncmds.c
Fix build without OpenSSL
commit : 8251670cb30c4e9c76a9cb8382a88109502ba583
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Feb 2012 10:20:25 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Feb 2012 10:20:25 +0200
This is a fixup for commit a445cb92ef5b3a31313ebce30e18cc1d6e0bdecb.
M src/backend/libpq/be-secure.c
Don't install hstore--1.0.sql any more.
commit : d4fb2f99ec86edc5c7ad11a9c7adc0d977cbb4d7
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 20:37:13 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 20:37:13 -0500
Since the current version is 1.1, the 1.0 file isn't really needed. We do
need the 1.0--1.1 upgrade file, so people on 1.0 can upgrade.
Per recent discussion on pgsql-hackers.
M contrib/hstore/Makefile
Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written.
commit : 2254367435fcc4a31cc3b6d8324e33c5c30f265a
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 20:33:05 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 20:33:05 -0500
Also expose the new counters through pg_stat_statements.
Patch by me. Review by Fujii Masao and Greg Smith.
M contrib/pg_stat_statements/Makefile
A contrib/pg_stat_statements/pg_stat_statements–1.0–1.1.sql
A contrib/pg_stat_statements/pg_stat_statements–1.1.sql
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_stat_statements/pg_stat_statements.control
M doc/src/sgml/pgstatstatements.sgml
M doc/src/sgml/ref/explain.sgml
M src/backend/commands/explain.c
M src/backend/executor/instrument.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/include/executor/instrument.h
Fix typo in comment.
commit : f74f9a277c37b42c570ce01019f815abbec58ba0
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 19:44:52 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Feb 2012 19:44:52 -0500
Sandro Santilli
M src/backend/commands/extension.c
Improve wording of pg_upgrade logfile option:
commit : 4e6092a2277e50f15d24292ac98ebca8133c881b
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Feb 2012 18:40:19 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Feb 2012 18:40:19 -0500
-l, --logfile=FILENAME log internal activity to file\n\
M contrib/pg_upgrade/option.c
M doc/src/sgml/pgupgrade.sgml
Draft release notes for 9.1.3, 9.0.7, 8.4.11, 8.3.18.
commit : dd2954963b4da9f6e8ea759f19ca5eb0cf79010f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Feb 2012 18:11:46 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Feb 2012 18:11:46 -0500
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
Add parameters for controlling locations of server-side SSL files
commit : a445cb92ef5b3a31313ebce30e18cc1d6e0bdecb
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 22 Feb 2012 23:40:46 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 22 Feb 2012 23:40:46 +0200
This allows changing the location of the files that were previously
hard-coded to server.crt, server.key, root.crt, root.crl.
server.crt and server.key continue to be the default settings and are
thus required to be present by default if SSL is enabled. But the
settings for the server-side CA and CRL are now empty by default, and
if they are set, the files are required to be present. This replaces
the previous behavior of ignoring the functionality if the files were
not found.
M doc/src/sgml/config.sgml
M doc/src/sgml/runtime.sgml
M src/backend/libpq/be-secure.c
M src/backend/libpq/hba.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/libpq/libpq.h
REASSIGN OWNED: Support foreign data wrappers and servers
commit : a417f85e1da1ef241af4bf40507ca213464d7069
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 21 Feb 2012 17:58:02 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 21 Feb 2012 17:58:02 -0300
This was overlooked when implementing those kinds of objects, in commit
cae565e503c42a0942ca1771665243b4453c5770.
Per report from Pawel Casperek.
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/foreigncmds.c
M src/include/commands/defrem.h
Don't clear btpo_cycleid during _bt_vacuum_one_page.
commit : 593a9631a7947ab95903e87e24786d7e469cc988
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Feb 2012 15:03:36 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Feb 2012 15:03:36 -0500
When "vacuuming" a single btree page by removing LP_DEAD tuples, we are not
actually within a vacuum operation, but rather in an ordinary insertion
process that could well be running concurrently with a vacuum. So clearing
the cycleid is incorrect, and could cause the concurrent vacuum to miss
removing tuples that it needs to remove. This is a longstanding bug
introduced by commit e6284649b9e30372b3990107a082bc7520325676 of
2006-07-25. I believe it explains Maxim Boguk's recent report of index
corruption, and probably some other previously unexplained reports.
In 9.0 and up this is a one-line fix; before that we need to introduce a
flag to tell _bt_delitems what to do.
M src/backend/access/nbtree/nbtpage.c
Cosmetic cleanup for commit a760893dbda9934e287789d54bbd3c4ca3914ce0.
commit : 9789c99d01e7e4460b77c29b77d177f86c45a273
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Feb 2012 14:14:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Feb 2012 14:14:16 -0500
Mostly, fixing overlooked comments.
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtxlog.c
M src/include/access/nbtree.h
Avoid double close of file handle in syslogger on win32
commit : c2a2f7516bd27d4b2bcd387b2aa25a5b98d9c7b0
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 21 Feb 2012 17:12:25 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 21 Feb 2012 17:12:25 +0100
This causes an exception when running under a debugger or in particular
when running on a debug version of Windows.
Patch from MauMau
M src/backend/postmaster/syslogger.c
Fix typo, noticed by Will Crawford.
commit : 6b044cb810460993ad9e458a0ee8fcc9fde5a350
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 21 Feb 2012 11:03:51 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 21 Feb 2012 11:03:51 -0500
M src/backend/utils/adt/json.c
pg_regress: Add application name setting
commit : 95ca2859f45171c345d427991c1f319b5e77cc6c
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 21 Feb 2012 16:45:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 21 Feb 2012 16:45:19 +0200
Set the PGAPPNAME environment variable in pg_regress so that it
identifies itself as such instead of "psql".
M src/test/regress/pg_regress.c
Don't reject threaded Python on FreeBSD.
commit : c0efc2c2ab416b805ba5ccea621d7198a3f3330f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Feb 2012 16:21:28 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Feb 2012 16:21:28 -0500
According to Chris Rees, this has worked for awhile, and the current
FreeBSD port is removing the test anyway.
M config/python.m4
M configure
Fix a couple of cases of JSON output.
commit : 83fcaffea2b55152e45fdcaf3fdaf4c0c89f65ce
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 20 Feb 2012 15:01:03 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 20 Feb 2012 15:01:03 -0500
First, as noted by Itagaki Takahiro, a datum of type JSON doesn't
need to be escaped. Second, ensure that numeric output not in
the form of a legal JSON number is quoted and escaped.
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
Fix regex back-references that are directly quantified with *.
commit : 5223f96d92fd6fb6fcf260da9f9cb111831f0b37
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Feb 2012 00:52:33 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Feb 2012 00:52:33 -0500
The syntax "\n*", that is a backref with a * quantifier directly applied
to it, has never worked correctly in Spencer's library. This has been an
open bug in the Tcl bug tracker since 2005:
https://sourceforge.net/tracker/index.php?func=detail&aid=1115587&group_id=10894&atid=110894
The core of the problem is in parseqatom(), which first changes "\n*" to
"\n+|" and then applies repeat() to the NFA representing the backref atom.
repeat() thinks that any arc leading into its "rp" argument is part of the
sub-NFA to be repeated. Unfortunately, since parseqatom() already created
the arc that was intended to represent the empty bypass around "\n+", this
arc gets moved too, so that it now leads into the state loop created by
repeat(). Thus, what was supposed to be an "empty" bypass gets turned into
something that represents zero or more repetitions of the NFA representing
the backref atom. In the original example, in place of
^([bc])\1*$
we now have something that acts like
^([bc])(\1+|[bc]*)$
At runtime, the branch involving the actual backref fails, as it's supposed
to, but then the other branch succeeds anyway.
We could no doubt fix this by some rearrangement of the operations in
parseqatom(), but that code is plenty ugly already, and what's more the
whole business of converting "x*" to "x+|" probably needs to go away to fix
another problem I'll mention in a moment. Instead, this patch suppresses
the *-conversion when the target is a simple backref atom, leaving the case
of m == 0 to be handled at runtime. This makes the patch in regcomp.c a
one-liner, at the cost of having to tweak cbrdissect() a little. In the
event I went a bit further than that and rewrote cbrdissect() to check all
the string-length-related conditions before it starts comparing characters.
It seems a bit stupid to possibly iterate through many copies of an
n-character backreference, only to fail at the end because the target
string's length isn't a multiple of n --- we could have found that out
before starting. The existing coding could only be a win if integer
division is hugely expensive compared to character comparison, but I don't
know of any modern machine where that might be true.
This does not fix all the problems with quantified back-references. In
particular, the code is still broken for back-references that appear within
a larger expression that is quantified (so that direct insertion of the
quantification limits into the BACKREF node doesn't apply). I think fixing
that will take some major surgery on the NFA code, specifically introducing
an explicit iteration node type instead of trying to transform iteration
into concatenation of modified regexps.
Back-patch to all supported branches. In HEAD, also add a regression test
case for this. (It may seem a bit silly to create a regression test file
for just one test case; but I'm expecting that we will soon import a whole
bunch of regex regression tests from Tcl, so might as well create the
infrastructure now.)
M src/backend/regex/regcomp.c
M src/backend/regex/regexec.c
A src/test/regress/expected/regex.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/regex.sql
Add caching of ctype.h/wctype.h results in regc_locale.c.
commit : e00f68e49c148851187136d3278b7e9afa370537
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Feb 2012 21:01:13 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Feb 2012 21:01:13 -0500
While this doesn't save a huge amount of runtime, it still seems worth
doing, especially since I realized that the data copying I did in my first
draft was quite unnecessary. In this version, once we have the results
cached, getting them back for re-use is really very cheap.
Also, remove the hard-wired limitation to not consider wctype.h results for
character codes above 255. It turns out that we can't push the limit as
far up as I'd originally hoped, because the regex colormap code is not
efficient enough to cope very well with character classes containing many
thousand letters, which a Unicode locale is entirely capable of producing.
Still, we can push it up to U+7FF (which I chose as the limit of 2-byte
UTF8 characters), which will at least make Eastern Europeans happy pending
a better solution. Thus, this commit resolves the specific complaint in
bug #6457, but not the more general issue that letters of non-western
alphabets are mostly not recognized as matching [[:alpha:]].
M src/backend/regex/regc_locale.c
M src/backend/regex/regc_pg_locale.c
Create the beginnings of internals documentation for the regex code.
commit : 27af91438b68f46f4015853b6f75c6f5c3a8650c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Feb 2012 18:57:38 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Feb 2012 18:57:38 -0500
Create src/backend/regex/README to hold an implementation overview of
the regex package, and fill it in with some preliminary notes about
the code's DFA/NFA processing and colormap management. Much more to
do there of course.
Also, improve some code comments around the colormap and cvec code.
No functional changes except to add one missing assert.
A src/backend/regex/README
M src/backend/regex/regc_cvec.c
M src/backend/regex/regcomp.c
M src/include/regex/regguts.h
Improve pretty printing of viewdefs.
commit : 2f582f76b1945929ff07116cd4639747ce9bb8a1
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 19 Feb 2012 11:43:46 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 19 Feb 2012 11:43:46 -0500
Some line feeds are added to target lists and from lists to make
them more readable. By default they wrap at 80 columns if possible,
but the wrap column is also selectable - if 0 it wraps after every
item.
Andrew Dunstan, reviewed by Hitoshi Harada.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/ruleutils.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
M src/test/regress/expected/polymorphism.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/with.out
M src/test/regress/sql/rules.sql
In ecpglib rewrote code that used strtok_r to not use library functions anymore. This way we don't have to worry which compiler on which OS offers which version of strtok.
commit : 84ff5b5db5f801f5da6690d8904cc88cea4700e8
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 19 Feb 2012 14:50:14 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 19 Feb 2012 14:50:14 +0100
M src/interfaces/ecpg/ecpglib/connect.c
Update expected/collate.linux.utf8.out for recent plpgsql changes.
commit : 759c95c45b65a5220976c85e6f03323975c2b276
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 18 Feb 2012 18:08:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 18 Feb 2012 18:08:02 -0500
This file was missed in commit 4c6cedd1b014abf2046886a9a92e10e18f0d658e.
M src/test/regress/expected/collate.linux.utf8.out
gcc on Windows does not know about strtok_s.
commit : 45b7ab6b59f4a1982181327ac6393c09ffbbbbd0
author : Michael Meskes <meskes@postgresql.org>
date : Sat, 18 Feb 2012 17:20:53 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sat, 18 Feb 2012 17:20:53 +0100
M src/interfaces/ecpg/ecpglib/connect.c
Windows doesn't have strtok_r, so let's use strtok_s instead.
commit : e3155c97b0fa6d73aa9128cf0e56e8a776f5d355
author : Michael Meskes <meskes@postgresql.org>
date : Sat, 18 Feb 2012 15:56:39 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sat, 18 Feb 2012 15:56:39 +0100
M src/interfaces/ecpg/ecpglib/connect.c
Make sure all connection paramters are used in call to PQconnectdbParams.
commit : 5e7710e725b1d1fe408ac20548d872cc52f7b8ab
author : Michael Meskes <meskes@postgresql.org>
date : Fri, 17 Feb 2012 14:53:22 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Fri, 17 Feb 2012 14:53:22 +0100
M src/interfaces/ecpg/ecpglib/connect.c
M src/interfaces/ecpg/test/connect/test5.pgc
M src/interfaces/ecpg/test/expected/connect-test1.stderr
M src/interfaces/ecpg/test/expected/connect-test5.c
M src/interfaces/ecpg/test/expected/connect-test5.stderr
Sync regex code with Tcl 8.5.11.
commit : 08fd6ff37f71485e2fc04bc6ce07d2a483c36702
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Feb 2012 19:44:26 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Feb 2012 19:44:26 -0500
Sync our regex code with upstream changes since last time we did this,
which was Tcl 8.5.0 (see commit df1e965e12cdd48c11057ee6e15346ee2b8b02f5).
There are no functional changes here; the main point is just to lay down
a commit-log marker that somebody has looked at this recently, and to do
what we can to keep the two codebases comparable.
M src/backend/regex/regc_locale.c
M src/backend/regex/rege_dfa.c
M src/backend/regex/regexec.c
Fix longstanding error in contrib/intarray's int[] & int[] operator.
commit : 06d9afa6f93ec08a45da4de7afd97bbf16738739
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Feb 2012 20:00:11 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Feb 2012 20:00:11 -0500
The array intersection code would give wrong results if the first entry of
the correct output array would be "1". (I think only this value could be
at risk, since the previous word would always be a lower-bound entry with
that fixed value.)
Problem spotted by Julien Rouhaud, initial patch by Guillaume Lelarge,
cosmetic improvements by me.
M contrib/intarray/_int_tool.c
M contrib/intarray/expected/_int.out
M contrib/intarray/sql/_int.sql
Improve statistics estimation to make some use of DISTINCT in sub-queries.
commit : 4767bc8ff2edc1258cf4d8a83155d4cedd724231
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Feb 2012 17:33:28 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Feb 2012 17:33:28 -0500
Formerly, we just punted when trying to estimate stats for variables coming
out of sub-queries using DISTINCT, on the grounds that whatever stats we
might have for underlying table columns would be inapplicable. But if the
sub-query has only one DISTINCT column, we can consider its output variable
as being unique, which is useful information all by itself. The scope of
this improvement is pretty narrow, but it costs nearly nothing, so we might
as well do it. Per discussion with Andres Freund.
This patch differs from the draft I submitted yesterday in updating various
comments about vardata.isunique (to reflect its extended meaning) and in
tweaking the interaction with security_barrier views. There does not seem
to be a reason why we can't use this sort of knowledge even when the
sub-query is such a view.
M src/backend/utils/adt/selfuncs.c
M src/include/utils/selfuncs.h
pg_dump: Miscellaneous tightening based on recent refactorings.
commit : 1cc1b91d1b09a5cdd9fc51c9eee31effd2227b4f
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 13:24:19 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 13:24:19 -0500
Use exit_horribly() and ExecuteSqlQueryForSingleRow() in various
places where it's equivalent, or nearly equivalent, to the prior
coding. Apart from being more compact, this also makes the error
messages for the wrong-number-of-tuples case more consistent.
M src/bin/pg_dump/pg_dump.c
pg_dump: Remove global connection pointer.
commit : 689d0eb7db9514f33f49fd5260462b9ba8331e80
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 13:00:24 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 13:00:24 -0500
Parallel pg_dump wants to have multiple ArchiveHandle objects, and
therefore multiple PGconns, in play at the same time. This should
be just about the end of the refactoring that we need in order to
make that workable.
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_dump.c
Refactor pg_dump.c to avoid duplicating returns-one-row check.
commit : 549e93c990575b2b69c49fcacc0f280bc9762db9
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 12:07:06 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 12:07:06 -0500
Any patches apt to get broken have probably already been broken by the
error-handling cleanups I just did, so we might as well clean this up
at the same time.
M src/bin/pg_dump/pg_dump.c
Invent on_exit_nicely for pg_dump.
commit : e9a22259c45e235aaa30f0d068f767d9c0f818a0
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 11:49:20 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 16 Feb 2012 11:49:20 -0500
Per recent discussions on pgsql-hackers regarding parallel pg_dump.
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.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_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_files.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.h
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
Run a portal's cleanup hook immediately when pushing it to FAILED state.
commit : 4bfe68dfab009ce8fcaea79dc0832eadf3380051
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Feb 2012 16:18:34 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Feb 2012 16:18:34 -0500
This extends the changes of commit 6252c4f9e201f619e5eebda12fa867acd4e4200e
so that we run the cleanup hook earlier for failure cases as well as
success cases. As before, the point is to avoid an assertion failure from
an Assert I added in commit a874fe7b4c890d1fe3455215a83ca777867beadd, which
was meant to check that no user-written code can be called during portal
cleanup. This fixes a case reported by Pavan Deolasee in which the Assert
could be triggered during backend exit (see the new regression test case),
and also prevents the possibility that the cleanup hook is run after
portions of the portal's state have already been recycled. That doesn't
really matter in current usage, but it foreseeably could matter in the
future.
Back-patch to 9.1 where the Assert in question was added.
M src/backend/commands/portalcmds.c
M src/backend/tcop/pquery.c
M src/backend/utils/mmgr/portalmem.c
M src/include/utils/portal.h
M src/test/regress/expected/transactions.out
M src/test/regress/sql/transactions.sql
Fix VPATH builds, broken by my recent commit to speed up tuplesorting.
commit : edec8c8e00e3f2a9305ab92e2c81293457cf959a
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 15:52:44 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 15:52:44 -0500
The relevant commit is 337b6f5ecf05b21b5e997986884d097d60e4e3d0.
M src/backend/utils/sort/Makefile
Have pg_upgrade output 'link' or 'copy' when reporting its status.
commit : 7f951474dc01cef3c829d953429246fc308cac68
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Feb 2012 14:22:54 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Feb 2012 14:22:54 -0500
Idea from Peter.
M contrib/pg_upgrade/relfilenode.c
sepgsql: Move some code from hooks.c to label.c
commit : d44a3fb55de06137e77b0105c89656a897e396e8
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 13:54:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 13:54:26 -0500
This is some preliminary refactoring related to a pending patch
to allow sepgsql-enable sessions to make dynamic label transitions.
But this commit doesn't involve any functional change: it just puts
some bits of code in more logical places.
KaiGai Kohei
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/sepgsql.h
Speed up in-memory tuplesorting.
commit : 337b6f5ecf05b21b5e997986884d097d60e4e3d0
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 12:13:32 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 12:13:32 -0500
Per recent work by Peter Geoghegan, it's significantly faster to
tuplesort on a single sortkey if ApplySortComparator is inlined into
quicksort rather reached via a function pointer. It's also faster
in general to have a version of quicksort which is specialized for
sorting SortTuple objects rather than objects of arbitrary size and
type. This requires a couple of additional copies of the quicksort
logic, which in this patch are generate using a Perl script. There
might be some benefit in adding further specializations here too,
but thus far it's not clear that those gains are worth their weight
in code footprint.
M src/backend/Makefile
A src/backend/utils/sort/.gitignore
M src/backend/utils/sort/Makefile
A src/backend/utils/sort/gen_qsort_tuple.pl
M src/backend/utils/sort/tuplesort.c
M src/port/qsort.c
M src/port/qsort_arg.c
M src/tools/msvc/Solution.pm
More regression tests for LEAKPROOF/NOT LEAKPROOF stuff.
commit : ac9100f8cf595f7512e98fc5c6338ee3e32a0651
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 10:56:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 10:56:26 -0500
Along the way, move create_function_3 into a parallel schedule.
KaiGai Kohei
M src/test/regress/expected/create_function_3.out
M src/test/regress/parallel_schedule
M src/test/regress/sql/create_function_3.sql
Make CREATE/ALTER FUNCTION support NOT LEAKPROOF.
commit : 73a4b994a69661964b1ff45b746f1ca26f70194c
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 10:45:08 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 10:45:08 -0500
Because it isn't good to be able to turn things on, and not off again.
M doc/src/sgml/ref/alter_function.sgml
M doc/src/sgml/ref/create_function.sgml
M src/backend/parser/gram.y
sepgsql: Reword and fix typo in docs on DML permissions.
commit : d845fd684a3a386400a42c83c209e70095cadd55
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 09:57:56 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 15 Feb 2012 09:57:56 -0500
Per report from Christoph Berg.
M doc/src/sgml/sepgsql.sgml
Fix pg_test_fsync Win32 problems reported by the build farm; add comments about the alarm method used on Win32.
commit : 388c2f93254b90921e207bc1cf52e1c8e0f4bba8
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Feb 2012 07:10:48 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Feb 2012 07:10:48 -0500
M contrib/pg_test_fsync/pg_test_fsync.c
Try to get pg_test_thread to compile on Windows by using a sleeper thread.
commit : 7ae2db1d1e7bc95ef8cee380d549dd03a2f8ce88
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 21:53:17 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 21:53:17 -0500
M contrib/pg_test_fsync/pg_test_fsync.c
Improve fsync documentation by stating that -W _0_ turns of write caching.
commit : 58d746213d3defb84947ff1407e6cb0eabb26f38
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 17:41:57 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 17:41:57 -0500
M doc/src/sgml/wal.sgml
Preserve column names in the execution-time tupledesc for a RowExpr.
commit : 398f70ec070fe60151584eaa448f04708aa77892
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Feb 2012 17:34:19 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Feb 2012 17:34:19 -0500
The hstore and json datatypes both have record-conversion functions that
pay attention to column names in the composite values they're handed.
We used to not worry about inserting correct field names into tuple
descriptors generated at runtime, but given these examples it seems
useful to do so. Observe the nicer-looking results in the regression
tests whose results changed.
catversion bump because there is a subtle change in requirements for stored
rule parsetrees: RowExprs from ROW() constructs now have to include field
names.
Andrew Dunstan and Tom Lane
M contrib/hstore/expected/hstore.out
M src/backend/executor/execQual.c
M src/backend/executor/execTuples.c
M src/backend/executor/nodeValuesscan.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/var.c
M src/backend/parser/gram.y
M src/backend/parser/parse_expr.c
M src/include/catalog/catversion.h
M src/include/executor/executor.h
M src/include/nodes/primnodes.h
M src/include/optimizer/prep.h
M src/test/regress/expected/json.out
Document random page cost is only 4x seqeuntial, and not 40x.
commit : c1d9df4fa227781b31be44a5a3024865a7f48049
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 16:54:54 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 16:54:54 -0500
M doc/src/sgml/config.sgml
Document that the pg_test_fsync defaults allow the program to complete in about 30 seconds.
commit : ef7a7c81d99c721db6e7d550f3fef3b94737ee94
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 11:14:15 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 11:14:15 -0500
M doc/src/sgml/pgtestfsync.sgml
Change contrib/pg_test_fsync to control tests in terms of seconds per test, rather than a number of test cycles. Changes -o/cycles option to -s/seconds.
commit : 0a8396e35e2e230da7539372b32968c0d959fba8
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 11:09:49 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Feb 2012 11:09:49 -0500
M contrib/pg_test_fsync/pg_test_fsync.c
M doc/src/sgml/pgtestfsync.sgml
Remove new, intermittently failing regression test.
commit : dc66f1c5f2a6e93d949252a0ad661388e1fe7856
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 23:43:24 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 23:43:24 -0500
Per buildfarm.
M src/test/regress/expected/create_function_3.out
M src/test/regress/sql/create_function_3.sql
Fix new create_function_3 regression tests not to rely on tuple order.
commit : e37e448650dfd9f4afdf916843015c5cb33346c8
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 22:49:07 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 22:49:07 -0500
Per buildfarm.
M src/test/regress/expected/create_function_3.out
M src/test/regress/sql/create_function_3.sql
Allow LEAKPROOF functions for better performance of security views.
commit : cd30728fb2ed7c367d545fc14ab850b5fa2a4850
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 22:20:27 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Feb 2012 22:20:27 -0500
We don't normally allow quals to be pushed down into a view created
with the security_barrier option, but functions without side effects
are an exception: they're OK. This allows much better performance in
common cases, such as when using an equality operator (that might
even be indexable).
There is an outstanding issue here with the CREATE FUNCTION / ALTER
FUNCTION syntax: there's no way to use ALTER FUNCTION to unset the
leakproof flag. But I'm committing this as-is so that it doesn't
have to be rebased again; we can fix up the grammar in a future
commit.
KaiGai Kohei, with some wordsmithing by me.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/alter_function.sgml
M doc/src/sgml/ref/create_function.sgml
M doc/src/sgml/rules.sgml
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/backend/optimizer/path/allpaths.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/gram.y
M src/backend/utils/cache/lsyscache.c
M src/bin/pg_dump/pg_dump.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_proc_fn.h
M src/include/optimizer/clauses.h
M src/include/parser/kwlist.h
M src/include/utils/lsyscache.h
A src/test/regress/expected/create_function_3.out
M src/test/regress/expected/select_views.out
M src/test/regress/expected/select_views_1.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/create_function_3.sql
M src/test/regress/sql/select_views.sql
Improve labeling of pg_test_fsync open_sync test output.
commit : 2bbd88f8f841b01efb073972b60d4dc1ff1f6fd0
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 13 Feb 2012 21:48:33 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 13 Feb 2012 21:48:33 -0500
M contrib/pg_test_fsync/pg_test_fsync.c
Do not use the variable name when defining a varchar structure in ecpg.
commit : 9a4880a0dd3cc94770aae2d372302642990c9fc1
author : Michael Meskes <meskes@postgresql.org>
date : Fri, 10 Feb 2012 03:58:57 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Fri, 10 Feb 2012 03:58:57 +0100
With a unique counter being added anyway, there is no need anymore to have the variable name listed, too.
M src/interfaces/ecpg/preproc/ecpg.trailer
M src/interfaces/ecpg/preproc/type.c
M src/interfaces/ecpg/preproc/type.h
M src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
M src/interfaces/ecpg/test/expected/preproc-cursor.c
M src/interfaces/ecpg/test/expected/preproc-type.c
M src/interfaces/ecpg/test/expected/preproc-variable.c
M src/interfaces/ecpg/test/preproc/type.pgc
Fix auto-explain JSON output to be valid JSON.
commit : 21320763a39994021a4ff045ff66f7204bdb6d78
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 13 Feb 2012 08:22:15 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 13 Feb 2012 08:22:15 -0500
Problem reported by Peter Eisentraut.
Backpatched to release 9.0.
M contrib/auto_explain/auto_explain.c
Fix heap_multi_insert to set t_self field in the caller's tuples.
commit : 21b16342750d6623f3c78f639f07bf3b66b49417
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 13 Feb 2012 10:14:49 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 13 Feb 2012 10:14:49 +0200
If tuples were toasted, heap_multi_insert didn't update the ctid on the
original tuples. This caused a failure if there was an after trigger
(including a foreign key), on the table, and a tuple got toasted.
Per off-list report and test case from Ted Phelps
M src/backend/access/heap/heapam.c
Silence warning about deprecated assignment to $[ in check_keywords.pl
commit : b4e3633ac42ed7af21bce611234ccbf820098644
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 13 Feb 2012 09:15:08 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 13 Feb 2012 09:15:08 +0200
Alex Hunsaker
M src/tools/check_keywords.pl
Fix I/O-conversion-related memory leaks in plpgsql.
commit : 58a9596ed4a509467e1781b433ff9c65a4e5b5ce
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Feb 2012 18:06:24 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Feb 2012 18:06:24 -0500
Datatype I/O functions are allowed to leak memory in CurrentMemoryContext,
since they are generally called in short-lived contexts. However, plpgsql
calls such functions for purposes of type conversion, and was calling them
in its procedure context. Therefore, any leaked memory would not be
recovered until the end of the plpgsql function. If such a conversion
was done within a loop, quite a bit of memory could get consumed. Fix by
calling such functions in the transient "eval_econtext", and adjust other
logic to match. Back-patch to all supported versions.
Andres Freund, Jan Urbański, Tom Lane
M src/pl/plpgsql/src/pl_exec.c
Fix oversight in pg_dump's handling of extension configuration tables.
commit : 59de132f9a578ae5d2909228484a61309df986e0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 15:22:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 15:22:14 -0500
If an extension has not been selected to be dumped (perhaps because of
a --schema or --table switch), the contents of its configuration tables
surely should not get dumped either. Per gripe from
Hubert Depesz Lubaczewski.
M src/bin/pg_dump/pg_dump.c
Fix brain fade in previous pg_dump patch.
commit : 97dc3c8a147c01da38570e4be7b4979af918dca2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 14:09:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 14:09:21 -0500
In pre-7.3 databases, pg_attribute.attislocal doesn't exist. The easiest
way to make sure the new inheritance logic behaves sanely is to assume it's
TRUE, not FALSE. This will result in printing child columns even when
they're not really needed. We could work harder at trying to reconstruct a
value for attislocal, but there is little evidence that anyone still cares
about dumping from such old versions, so just do the minimum necessary to
have a valid dump.
I had this correct in the original draft of the patch, but for some
unaccountable reason decided it wasn't necessary to change the value.
Testing against an old server shows otherwise...
M src/bin/pg_dump/pg_dump.c
Fix pg_dump for better handling of inherited columns.
commit : 00bc96bd2b6646c73a073aa91dc68ed4718cf5f3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 13:28:05 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 13:28:05 -0500
Revise pg_dump's handling of inherited columns, which was last looked at
seriously in 2001, to eliminate several misbehaviors associated with
inherited default expressions and NOT NULL flags. In particular make sure
that a column is printed in a child table's CREATE TABLE command if and
only if it has attislocal = true; the former behavior would sometimes cause
a column to become marked attislocal when it was not so marked in the
source database. Also, stop relying on textual comparison of default
expressions to decide if they're inherited; instead, don't use
default-expression inheritance at all, but just install the default
explicitly at each level of the hierarchy. This fixes the
search-path-related misbehavior recently exhibited by Chester Young, and
also removes some dubious assumptions about the order in which ALTER TABLE
SET DEFAULT commands would be executed.
Back-patch to all supported branches.
M src/bin/pg_dump/common.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
Add ORDER BY to a query to prevent occasional regression test failures.
commit : d06e2d200562837afa18058937f20460a3ea526a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 02:33:00 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 10 Feb 2012 02:33:00 -0500
Per buildfarm, we sometimes get row-ordering variations in the output.
This also makes this query look more like numerous other ones in the same
test file.
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
psql: Support zero byte field and record separators
commit : 169c8a911260bd5a8b6910c458afa57a1ae29627
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 9 Feb 2012 20:15:48 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 9 Feb 2012 20:15:48 +0200
Add new psql settings and command-line options to support setting the
field and record separators for unaligned output to a zero byte, for
easier interfacing with other shell tools.
reviewed by Abhijit Menon-Sen
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/help.c
M src/bin/psql/print.c
M src/bin/psql/print.h
M src/bin/psql/startup.c
Attempt to fix MSVC builds and other fls-related breakage.
commit : dd7c84185c160bb0d95bd265182f24f1f6c21924
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:39:33 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:39:33 -0500
Thanks to Andrew Dunstan for bringing this to my attention.
M src/port/Makefile
M src/tools/msvc/Mkvcbuild.pm
Add a comment to AdjustIntervalForTypmod to reduce chance of future bugs.
commit : d429ebe347a5f1404cc3c50234e1c93f8db2bb53
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:22:21 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:22:21 -0500
It's not entirely evident how the logic here relates to the
interval_transform function, so let's clue people in that they need to
check that if the rules change.
M src/backend/utils/adt/timestamp.c
Improve interval_transform function to detect a few more cases.
commit : 6656588575abd13016989be1a276b1b60be49b69
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:21:57 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 9 Feb 2012 12:21:57 -0500
Noah Misch, per a review comment from me.
M src/backend/utils/adt/timestamp.c
Have pg_receivexlog always send an invalid log position in status messages
commit : d7ea9193d18d29bea82b30604cdd087e90c5ee27
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 9 Feb 2012 14:12:49 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 9 Feb 2012 14:12:49 +0100
This prevents pg_basebackup and pg_receivexlog from becoming a synchronous
standby in case 'write' is used for synchronous_commit.
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
Add new keywords SNAPSHOT and TYPES to the keyword list in gram.y
commit : 82e73ba0d1f8990a76a20b3a57957e633945fb2b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 9 Feb 2012 11:37:54 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 9 Feb 2012 11:37:54 +0200
These were added to kwlist.h as unreserved keywords in separate patches,
but authors forgot to add them to the corresponding list in gram.y.
Because of that, even though they were supposed to be unreserved keywords,
they could not be used as identifiers. src/tools/check_keywords.pl is your
friend.
M src/backend/parser/gram.y
Throw error sooner for unlogged GiST indexes.
commit : 331bf6712c71a1c110bc52423eede8b4bac221a1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 16:19:27 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 16:19:27 -0500
Throwing an error only after we've built the main index fork is pretty
unfriendly when the table already contains data. Per gripe from Jay
Levitt.
M src/backend/access/gist/gistbuild.c
Fix up dumping conditions for extension configuration tables.
commit : d77354eaec53ed469a6f2444813ff3a4fd9d7a48
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 15:23:00 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 15:23:00 -0500
Various filters that were meant to prevent dumping of table data were not
being applied to extension config tables, notably --exclude-table-data and
--no-unlogged-table-data. We also would bogusly try to dump data from
views, sequences, or foreign tables, should an extension try to claim they
were config tables. Fix all that, and refactor/redocument to try to make
this a bit less fragile. This reverts the implementation, though not the
feature, of commit 7b070e896ca835318c90b02c830a5c4844413b64, which had
broken config-table dumping altogether :-(.
It is still the case that the code will dump config-table data even if
--schema is specified. That behavior was intentional, as per the comments
in getExtensionMembership, so I think it requires some more discussion
before we change it.
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
Check misplaced window functions before checking aggregate/group by sanity.
commit : cb7c84fae8a6780d836687aa2c9655eb936ebd25
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 13:15:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 13:15:02 -0500
If somebody puts a window function in WHERE, we should complain about that
in so many words. The previous coding tended to complain about the window
function's arguments instead, which is likely to be misleading to users who
are unclear on the semantics of window functions; as seen for example in
bug #6440 from Matyas Novak.
Just another example of how "add new code at the end" is frequently a bad
heuristic.
M src/backend/parser/analyze.c
Support min/max index optimizations on boolean columns.
commit : cbba55d6d792b55f6b448a31fc14aef84510967c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 12:41:48 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 12:41:48 -0500
Since bool_and() is equivalent to min(), and bool_or() to max(), we might
as well let them be index-optimized in the same way. The practical value
of this is debatable at best, but it seems nearly cost-free to enable it.
Code-wise, we need only adjust the entries in pg_aggregate. There is a
measurable planning speed penalty for a query involving one of these
aggregates, but it is only a few percent in simple cases, so that seems
acceptable.
Marti Raudsepp, reviewed by Abhijit Menon-Sen
M src/include/catalog/catversion.h
M src/include/catalog/pg_aggregate.h
M src/test/regress/expected/opr_sanity.out
M src/test/regress/sql/opr_sanity.sql
Mark some more I/O-conversion-invoking functions as stable not volatile.
commit : 3db6524fe63f0598dcb2b307bb422bc126f2b15d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 11:29:29 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 8 Feb 2012 11:29:29 -0500
When written, textanycat, anytextcat, quote_literal, and quote_nullable
were marked volatile, because they could invoke arbitrary type-specific
output functions as part of casting their anyelement arguments to text.
Since then, we have defined a project policy that I/O functions must not
be volatile, as per commit aab353a60b95aadc00f81da0c6d99bde696c4b75.
So these functions can safely be downgraded to stable. Most of the time
this makes no difference since they'll get inlined anyway, but as noted
by Andrew Dunstan, there are cases where the volatile marking prevents
optimizations that the planner does before function inlining. (I think
I might have overlooked these functions in the earlier commit on the
grounds that inlining would make it moot, but not so --- tgl)
This change results in a change in the expected output of the json
regression tests, because the planner can now flatten a sub-select
that it failed to before. The old output is preferable, but getting
that back will require some as-yet-unfinished work on RowExpr handling.
Marti Raudsepp
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/test/regress/expected/json.out
Add transform functions for various temporal typmod coercisions.
commit : c13897983a0006e658fb7c6410d72ca59fb87136
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 8 Feb 2012 09:33:02 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 8 Feb 2012 09:33:02 -0500
This enables ALTER TABLE to skip table and index rebuilds in some cases.
Noah Misch, with trivial changes by me.
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/timestamp.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/date.h
M src/include/utils/datetime.h
M src/include/utils/timestamp.h
Rename LWLockWaitUntilFree to LWLockAcquireOrWait.
commit : 1a01560cbb78ff363fc7d70298328aa23f05bfb5
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 8 Feb 2012 09:17:13 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 8 Feb 2012 09:17:13 +0200
LWLockAcquireOrWait makes it more clear that the lock is acquired if it's
free.
M src/backend/access/transam/xlog.c
M src/backend/storage/lmgr/lwlock.c
M src/include/storage/lwlock.h
Fix typos pointed out by Noah Misch.
commit : af7dd696b00fe666fec3642e103acafe33002765
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 21:40:36 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 21:40:36 -0500
M src/backend/utils/adt/numeric.c
Add opensp as a requirement for building the docs on Debian --- tested on Debian Squeeze.
commit : a870c7fdbca71e2c651fd80b3dec902c49040c7a
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 7 Feb 2012 20:30:11 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 7 Feb 2012 20:30:11 -0500
M doc/src/sgml/docguide.sgml
pg_dump: Add some const qualifiers
commit : e09509bd33d691b2d2d3473b4e112efd59518b31
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 23:20:29 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 23:20:29 +0200
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
pg_regress: Use target-specific variable instead of overriding make rule
commit : d66b31c94faf2b8b8aac9d273c8cd1708a54887e
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 22:42:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 22:42:19 +0200
Use a target-specific variable to add to CPPFLAGS instead of writing a
custom .c -> .o rule. This will ensure that dependency tracking is
used when enabled.
M src/test/regress/GNUmakefile
Fix typo in comment.
commit : 5ece8ecae88fd7fd8616429790bd70ca2ffad260
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 7 Feb 2012 21:21:50 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 7 Feb 2012 21:21:50 +0200
M src/port/fls.c
Support fls().
commit : 4f658dc851a73fc309a61be2503c29ed78a1592e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 13:45:46 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 13:45:46 -0500
The immediate impetus for this is that Noah Misch's patch to elide
unnecessary table and index rebuilds when changing typmod for temporal
types uses it; and this is extracted from that patch, with some
further commentary by me. But it seems logically separate from the
remainder of the patch, so I'm committing it separately; this is not
the first time someone has wanted fls() in the backend and probably
won't be the last.
If we end up using this in more performance-critical spots it may be
worthwhile to add some architecture-specific optimizations to our
src/port version of fls() - e.g. any x86 platform can implement this
using the assembly instruction BSRL. But performance won't matter
a bit for assessing typmod changes, so I'm not worried about that
right now.
M configure
M configure.in
M src/include/pg_config.h.in
M src/include/port.h
A src/port/fls.c
Add a transform function for varbit typmod coercisions.
commit : f7d7dade8afe19847510efe44be191c35e1ce26c
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 12:41:42 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 12:41:42 -0500
This enables ALTER TABLE to skip table and index rebuilds when the
new type is unconstraint varbit, or when the allowable number of bits
is not decreasing.
Noah Misch, with review and a fix for an OID collision by me.
M src/backend/utils/adt/varbit.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/varbit.h
Add a transform function for numeric typmod coercisions.
commit : 3cc0800829a6dda5347497337b0cf43848da4acf
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 12:08:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 12:08:26 -0500
This enables ALTER TABLE to skip table and index rebuilds when a column
is changed to an unconstrained numeric, or when the scale is unchanged
and the precision does not decrease.
Noah Misch, with a few stylistic changes and a fix for an OID
collision by me.
M src/backend/utils/adt/numeric.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.
commit : af7914c6627bcf0b0ca614e9ce95d3f8056602bf
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 11:23:04 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 11:23:04 -0500
Sometimes it may be useful to get actual row counts out of EXPLAIN
(ANALYZE) without paying the cost of timing every node entry/exit.
With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that.
Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
M contrib/auto_explain/auto_explain.c
M doc/src/sgml/ref/explain.sgml
M src/backend/commands/explain.c
M src/backend/executor/instrument.c
M src/include/commands/explain.h
M src/include/executor/instrument.h
pg_dump: Further reduce reliance on global variables.
commit : 1631598ea204a3b05104f25d008b510ff5a5c94a
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 10:07:02 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 7 Feb 2012 10:07:02 -0500
This is another round of refactoring to make things simpler for parallel
pg_dump. pg_dump.c now issues SQL queries through the relevant Archive
object, rather than relying on the global variable g_conn. This commit
isn't quite enough to get rid of g_conn entirely, but it makes a big
dent in its utilization and, along the way, manages to be slightly less
code than before.
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_db.c
M src/bin/pg_dump/pg_backup_db.h
M src/bin/pg_dump/pg_dump.c
createuser: Disable prompting by default
commit : a347f96b99741e44276cdd481a72d04f1b2ac5fc
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 14:55:34 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 7 Feb 2012 14:55:34 +0200
Do not prompt when options were not specified. Assume --no-createdb,
--no-createrole, --no-superuser by default.
Also disable prompting for user name in dropdb, unless --interactive
was specified.
reviewed by Josh Kupershmidt
M doc/src/sgml/ref/createuser.sgml
M doc/src/sgml/ref/dropuser.sgml
M src/bin/scripts/createuser.c
M src/bin/scripts/dropuser.c
When building with LWLOCK_STATS, initialize the stats in LWLockWaitUntilFree.
commit : 15ad6f1510f8979a39e4c39078c742b5fdb121ce
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 7 Feb 2012 09:38:25 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 7 Feb 2012 09:38:25 +0200
If LWLockWaitUntilFree was called before the first LWLockAcquire call, you
would either crash because of access to uninitialized array or account the
acquisition incorrectly. LWLockConditionalAcquire doesn't have this problem
because it doesn't update the lwlock stats.
In practice, this never happens because there is no codepath where you would
call LWLockWaitUntilfree before LWLockAcquire after a new process is
launched. But that's just accidental, there's no guarantee that that's
always going to be true in the future.
Spotted by Jeff Janes.
M src/backend/storage/lmgr/lwlock.c
Fix postmaster to attempt restart after a hot-standby crash.
commit : 442231d7f71764b8c628044e7ce2225f9aa43b67
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 15:29:26 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 15:29:26 -0500
The postmaster was coded to treat any unexpected exit of the startup
process (i.e., the WAL replay process) as a catastrophic crash, and not try
to restart it. This was OK so long as the startup process could not have
any sibling postmaster children. However, if a hot-standby backend
crashes, we SIGQUIT the startup process along with everything else, and the
resulting exit is hardly "unexpected". Treating it as such meant we failed
to restart a standby server after any child crash at all, not only a crash
of the WAL replay process as intended. Adjust that. Back-patch to 9.0
where hot standby was introduced.
M src/backend/postmaster/postmaster.c
Allow the connection keyword array to carry all seven items in ecpglib.
commit : 0ee23b53beb851d60c0eff9bde8fd7a303270720
author : Michael Meskes <meskes@postgresql.org>
date : Mon, 6 Feb 2012 20:46:48 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Mon, 6 Feb 2012 20:46:48 +0100
M src/interfaces/ecpg/ecpglib/connect.c
Avoid throwing ERROR during WAL replay of DROP TABLESPACE.
commit : 5fc78efcec01fd5e857278556ad4312ae94ecc58
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 14:43:58 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 14:43:58 -0500
Although we will not even issue an XLOG_TBLSPC_DROP WAL record unless
removal of the tablespace's directories succeeds, that does not guarantee
that the same operation will succeed during WAL replay. Foreseeable
reasons for it to fail include temp files created in the tablespace by Hot
Standby backends, wrong directory permissions on a standby server, etc etc.
The original coding threw ERROR if replay failed to remove the directories,
but that is a serious overreaction. Throwing an error aborts recovery,
and worse means that manual intervention will be needed to get the database
to start again, since otherwise the same error will recur on subsequent
attempts to replay the same WAL record. And the consequence of failing to
remove the directories is only that some probably-small amount of disk
space is wasted, so it hardly seems justified to throw an error.
Accordingly, arrange to report such failures as LOG messages and keep going
when a failure occurs during replay.
Back-patch to 9.0 where Hot Standby was introduced. In principle such
problems can occur in earlier releases, but Hot Standby increases the odds
of trouble significantly. Given the lack of field reports of such issues,
I'm satisfied with patching back as far as the patch applies easily.
M src/backend/commands/tablespace.c
pg_dump: Remove global Archive pointer.
commit : 3b157cf21dc2c1cd678580a178d05e0c1fbafd9d
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 14:07:55 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 14:07:55 -0500
Instead, everything that needs the Archive object now gets it as a
parameter. This is necessary infrastructure for parallel pg_dump,
but is also amply justified by the ugliness of the current code
(though a lot more than this is needed to fix that problem).
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
pg_dump: Reduce dependencies on global variables.
commit : 622f862868992e3b7ded31d79403a4f63281f44a
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 12:52:36 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 12:52:36 -0500
Change various places in the code that are referencing the global
Archive object g_fout to instead reference the Archive object fout
which is already being passed as a parameter. For parallel pg_dump to
work, we're going to need multiple Archive(Handle) objects, so the
real solution here is to pass down the Archive object to everywhere
that it needs to go, but we might as well pick the low-hanging fruit
first.
M src/bin/pg_dump/pg_dump.c
Add locking around WAL-replay modification of shared-memory variables.
commit : c6d76d7c82ebebb7210029f7382c0ebe2c558bca
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 12:34:10 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 6 Feb 2012 12:34:10 -0500
Originally, most of this code assumed that no Postgres backends could be
running concurrently with it, and so no locking could be needed. That
assumption fails in Hot Standby. While it's still true that Hot Standby
backends should never change values like nextXid, they can examine them,
and consistency is important in some cases such as when computing a
snapshot. Therefore, prudence requires that WAL replay code obtain the
relevant locks when modifying such variables, even though it can examine
them without taking a lock. We were following that coding rule in some
places but not all. This commit applies the coding rule uniformly to all
updates of ShmemVariableCache and MultiXactState fields; a search of the
replay routines did not find any other cases that seemed to be at risk.
In addition, this commit fixes a longstanding thinko in replay of NEXTOID
and checkpoint records: we tried to advance nextOid only if it was behind
the value in the WAL record, but the comparison would draw the wrong
conclusion if OID wraparound had occurred since the previous value.
Better to just unconditionally assign the new value, since OID assignment
shouldn't be happening during replay anyway.
The additional locking seems to be more in the nature of future-proofing
than fixing any live bug, so I am not going to back-patch it. The NEXTOID
fix will be back-patched separately.
M src/backend/access/transam/multixact.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
Remove dead declaration.
commit : 96abd81744a90511b7cae9299e589412ce1897c9
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 12:09:20 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 6 Feb 2012 12:09:20 -0500
M src/bin/pg_dump/pg_backup_archiver.h
fe-misc.c depends on pg_config_paths.h
commit : 0c88086df3f79ff48d09440d96be17f3307017ed
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 6 Feb 2012 11:50:01 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 6 Feb 2012 11:50:01 -0300
Declare this in Makefile to avoid failures in parallel compiles.
Author: Lionel Elie Mamane
M src/interfaces/libpq/Makefile
Fix transient clobbering of shared buffers during WAL replay.
commit : 17118825b8164aac6d337b58cf66b17637c66a49
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 5 Feb 2012 15:49:17 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 5 Feb 2012 15:49:17 -0500
RestoreBkpBlocks was in the habit of zeroing and refilling the target
buffer; which was perfectly safe when the code was written, but is unsafe
during Hot Standby operation. The reason is that we have coding rules
that allow backends to continue accessing a tuple in a heap relation while
holding only a pin on its buffer. Such a backend could see transiently
zeroed data, if WAL replay had occasion to change other data on the page.
This has been shown to be the cause of bug #6425 from Duncan Rance (who
deserves kudos for developing a sufficiently-reproducible test case) as
well as Bridget Frey's re-report of bug #6200. It most likely explains the
original report as well, though we don't yet have confirmation of that.
To fix, change the code so that only bytes that are supposed to change will
change, even transiently. This actually saves cycles in RestoreBkpBlocks,
since it's not writing the same bytes twice.
Also fix seq_redo, which has the same disease, though it has to work a bit
harder to meet the requirement.
So far as I can tell, no other WAL replay routines have this type of bug.
In particular, the index-related replay routines, which would certainly be
broken if they had to meet the same standard, are not at risk because we
do not have coding rules that allow access to an index page when not
holding a buffer lock on it.
Back-patch to 9.0 where Hot Standby was added.
M src/backend/access/transam/xlog.c
M src/backend/commands/sequence.c
Improve comment.
commit : ee68a44106fa89b8efb2f21b71c3fcafaaf48851
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 22:37:34 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 22:37:34 -0500
M src/backend/access/gin/ginxlog.c
Add missing Assert and fix inaccurate elog message in standby_redo().
commit : 2af72cefeaa15e27277d327783fdec2748d9b758
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 22:32:35 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 22:32:35 -0500
All other WAL redo routines either call RestoreBkpBlocks() or Assert that
they haven't been passed any backup blocks. Make this one do likewise.
Also, fix incorrect routine name in its failure message.
M src/backend/storage/ipc/standby.c
Allow SQL-language functions to reference parameters by name.
commit : 9bff0780cf5be2193a5bad0d3df2dbe143085264
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 19:23:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 19:23:49 -0500
Matthew Draper, reviewed by Hitoshi Harada
M doc/src/sgml/xfunc.sgml
M src/backend/executor/functions.c
M src/test/regress/input/create_function_2.source
M src/test/regress/input/misc.source
M src/test/regress/output/create_function_2.source
M src/test/regress/output/misc.source
Revert "Add some regression test cases for denormalized float8 input."
commit : 342b83fdca6af04d86e761f4d8d79e5d598688cd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 15:52:09 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 4 Feb 2012 15:52:09 -0500
This reverts commit 500cf66d5522b39ddfdc26b309f8b5b0e385f42e. As was
more or less expected, a small minority of platforms won't accept
denormalized input even with the recent changes. It doesn't seem
especially helpful to test this if we're going to have to provide an
alternate expected-file to allow failure.
M src/test/regress/expected/float8-exp-three-digits-win32.out
M src/test/regress/expected/float8-small-is-zero.out
M src/test/regress/expected/float8-small-is-zero_1.out
M src/test/regress/expected/float8.out
M src/test/regress/sql/float8.sql
Remove tabs in SGML file.
commit : 072ba77bffe005ccd6d1aaf8fff2c52ebed1a8b3
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 4 Feb 2012 07:11:13 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 4 Feb 2012 07:11:13 -0500
M doc/src/sgml/func.sgml
Applied Peter's patch to PQconnectdbParams in ecpglib instead of the old PQconectdb.
commit : fc211f8277c06326fcd5012f7247528920376a4c
author : Michael Meskes <meskes@postgresql.org>
date : Fri, 3 Feb 2012 17:46:10 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Fri, 3 Feb 2012 17:46:10 +0100
M src/interfaces/ecpg/ecpglib/connect.c
Add array_to_json and row_to_json functions.
commit : 39909d1d39ae57c3a655fc7010e394e26b90fec9
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 3 Feb 2012 12:11:16 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 3 Feb 2012 12:11:16 -0500
Also move the escape_json function from explain.c to json.c where it
seems to belong.
Andrew Dunstan, Reviewd by Abhijit Menon-Sen.
M doc/src/sgml/func.sgml
M src/backend/commands/explain.c
M src/backend/utils/adt/json.c
M src/include/catalog/pg_proc.h
M src/include/utils/json.h
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
ecpg: Improve test building
commit : 69e9768e7b183d4b276d0e067a5a0000689580eb
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 2 Feb 2012 20:24:38 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 2 Feb 2012 20:24:38 +0200
Further improve on commit c75e1436467f32a06b5ab9d594d2a390e7f4594d.
Instead of building both .o files and binaries in the same make rule,
just rely on the normal .c -> .o rule. This will ensure that
dependency tracking is used when enabled. To do this, disable the
implicit direct .c -> binary rule globally, which will also prevent
the original problem (*.dSYM junk) from reappearing elsewhere.
M src/Makefile.global.in
M src/interfaces/ecpg/test/Makefile.regress
Allow spgist's text_ops to handle pattern-matching operators.
commit : 0ed7445d7317318ffed0d8dac9a06611771d315b
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 2 Feb 2012 13:10:56 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 2 Feb 2012 13:10:56 -0500
This was presumably intended to work this way all along, but a few key
bits of indxpath.c didn't get the memo.
Robert Haas and Tom Lane
M src/backend/optimizer/path/indxpath.c
M src/include/catalog/pg_opfamily.h
Avoid re-checking for visibility map extension too frequently.
commit : b4e0741727685443657b55932da0c06f028fbc00
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 1 Feb 2012 20:35:42 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 1 Feb 2012 20:35:42 -0500
When testing bits (but not when setting or clearing them), we now
won't check whether the map has been extended. This significantly
improves performance in the case where the visibility map doesn't
exist yet, by avoiding an extra system call per tuple. To make
sure backends notice eventually, send an smgr inval on VM extension.
Dean Rasheed, with minor modifications by me.
M src/backend/access/heap/visibilitymap.c
initdb: Add options --auth-local and --auth-host
commit : 8a02339e9ba3f2f962c5967be8c5d053a1fa39d2
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 1 Feb 2012 21:18:55 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 1 Feb 2012 21:18:55 +0200
reviewed by Robert Haas and Pavel Stehule
M doc/src/sgml/ref/initdb.sgml
M src/backend/libpq/pg_hba.conf.sample
M src/bin/initdb/initdb.c
psql: Case preserving completion of SQL key words
commit : 69f4f1c3576abc535871c6cfa95539e32a36120f
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 1 Feb 2012 20:16:40 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 1 Feb 2012 20:16:40 +0200
Instead of always completing SQL key words in upper case, look at the
word being completed and match the case.
reviewed by Fujii Masao
M src/bin/psql/tab-complete.c
Add some regression test cases for denormalized float8 input.
commit : 500cf66d5522b39ddfdc26b309f8b5b0e385f42e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 13:13:54 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 13:13:54 -0500
This was submitted with the previous patch, but I'm committing it
separately to ease backing it out if these results prove too unportable.
Marti Raudsepp, after a proposal by Jeroen Vermeulen
M src/test/regress/expected/float8-exp-three-digits-win32.out
M src/test/regress/expected/float8-small-is-zero.out
M src/test/regress/expected/float8-small-is-zero_1.out
M src/test/regress/expected/float8.out
M src/test/regress/sql/float8.sql
Try to be more consistent about accepting denormalized float8 numbers.
commit : c318aeed84438619fc6b8c647def1730a110f04b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 13:11:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 13:11:16 -0500
On some platforms, strtod() reports ERANGE for a denormalized value (ie,
one that can be represented as distinct from zero, but is too small to have
full precision). On others, it doesn't. It seems better to try to accept
these values consistently, so add a test to see if the result value
indicates a true out-of-range condition. This should be okay per Single
Unix Spec. On machines where the underlying math isn't IEEE standard, the
behavior for such small numbers may not be very consistent, but then it
wouldn't be anyway.
Marti Raudsepp, after a proposal by Jeroen Vermeulen
M src/backend/utils/adt/float.c
Implement dry-run mode for pg_archivecleanup
commit : b2e431a4db81a735d1474c4d1565a20b835878c9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 1 Feb 2012 13:56:59 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 1 Feb 2012 13:56:59 -0300
In dry-run mode, just the name of the file to be removed is printed to
stdout; this is so the user can easily plug it into another program
through a pipe. If debug mode is also specified, a more verbose message
is printed to stderr.
Author: Gabriele Bartolini
Reviewer: Josh Kupershmidt
M contrib/pg_archivecleanup/pg_archivecleanup.c
M doc/src/sgml/pgarchivecleanup.sgml
Properly free the sslcompression field in PGconn
commit : 21238deea50e194bfa1c844b01ffbd15ed56c01a
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 1 Feb 2012 16:51:35 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 1 Feb 2012 16:51:35 +0100
Marko Kreen
M src/interfaces/libpq/fe-connect.c
Code review for plpgsql fn_signature patch.
commit : bef47331b6a1c0d081179a7fc9b82dd7e1862394
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 02:14:37 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 1 Feb 2012 02:14:37 -0500
Don't quote the output of format_procedure(); it's already quoted quite
enough. Remove the fn_name field, which was now just dead weight. Fix
remaining expected-output files.
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/plpgsql.h
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/guc.out
M src/test/regress/expected/plancache.out
M src/test/regress/expected/plpgsql.out
M src/test/regress/expected/triggers.out
psql: Reduce the amount of const lies a bit
commit : 4b77bfc37a1819fdfd3b767a52ff633cd28f9155
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 31 Jan 2012 21:23:17 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 31 Jan 2012 21:23:17 +0200
M src/bin/psql/tab-complete.c
pg_dump: Add GCC noreturn attribute to appropriate functions
commit : 88a6ac9f93b138d39d08b9882b377539edf985f4
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 31 Jan 2012 20:47:43 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 31 Jan 2012 20:47:43 +0200
This is a small help to the compiler and static analyzers.
M src/bin/pg_dump/dumputils.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_dump.h
Adjust expected regression test outputs for PL/python.
commit : 5ae88c65da7d893e304a51bfc57b46d8b7653bd0
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 13:16:38 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 13:16:38 -0500
This got broken by commit 4c6cedd1b014abf2046886a9a92e10e18f0d658e,
which caused PL/pgsql error messages to print the function
signature, not just the name.
Per buildfarm.
M src/pl/plpython/expected/plpython_error.out
Catversion bump for JSON patch.
commit : c327108140b5dfc4db1fcb9d9ca647f483e0a153
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 11:51:51 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 11:51:51 -0500
Sigh.
M src/include/catalog/catversion.h
Built-in JSON data type.
commit : 5384a73f98d9829725186a7b65bf4f8adb3cfaf1
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 11:48:23 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 31 Jan 2012 11:48:23 -0500
Like the XML data type, we simply store JSON data as text, after checking
that it is valid. More complex operations such as canonicalization and
comparison may come later, but this is enough for not.
There are a few open issues here, such as whether we should attempt to
detect UTF-8 surrogate pairs represented as \uXXXX\uYYYY, but this gets
the basic framework in place.
M doc/src/sgml/datatype.sgml
M src/backend/commands/explain.c
M src/backend/utils/adt/Makefile
A src/backend/utils/adt/json.c
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_type.h
A src/include/utils/json.h
A src/test/regress/expected/json.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/json.sql
Print function signature, not just name, in PL/pgSQL error messages.
commit : 4c6cedd1b014abf2046886a9a92e10e18f0d658e
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 31 Jan 2012 10:34:50 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 31 Jan 2012 10:34:50 +0200
This makes it unambiguous which function the message is coming from, if you
have overloaded functions.
Pavel Stehule, reviewed by Abhijit Menon-Sen.
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/domain.out
M src/test/regress/expected/guc.out
M src/test/regress/expected/plancache.out
M src/test/regress/expected/plpgsql.out
M src/test/regress/expected/triggers.out
Fix bug in the new wait-until-lwlock-is-free mechanism.
commit : 82d4b262d9614958da38003cdc9d56915d9bcda0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 20:56:35 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 20:56:35 +0200
If there was a wait-until-free process in the head of the wait queue,
followed by an exclusive locker, the exclusive locker was not be woken up
as it should.
M src/backend/storage/lmgr/lwlock.c
Add sequence USAGE privileges to information schema
commit : 82e83f46a2ed311c6e7536f607f73a6f2a1d7dea
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:45:42 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:45:42 +0200
The sequence USAGE privilege is sufficiently similar to the SQL
standard that it seems reasonable to show in the information schema.
Also add some compatibility notes about it on the GRANT reference
page.
M doc/src/sgml/information_schema.sgml
M doc/src/sgml/ref/grant.sgml
M src/backend/catalog/information_schema.sql
PL/Python: Add result metadata functions
commit : ee7fa66b19f5454fac07caee4b7798810b579a82
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:38:52 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:38:52 +0200
Add result object functions .colnames, .coltypes, .coltypmods to
obtain information about the result column names and types, which was
previously not possible in the PL/Python SPI interface.
reviewed by Abhijit Menon-Sen
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/plpy_resultobject.h
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/sql/plpython_spi.sql
Use abort() instead of exit() to abort library functions
commit : c6ea8ccea6bf23501962ddc7ac9ffdb99c8643e1
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:34:00 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 30 Jan 2012 21:34:00 +0200
In some hopeless situations, certain library functions in libpq and
libpgport quit the program. Use abort() for that instead of exit(),
so we don't interfere with the normal exit codes the program might
use, we clearly signal the abnormal termination, and the caller has a
chance of catching the termination.
This was originally pointed out by Debian's Lintian program.
M src/interfaces/libpq/fe-print.c
M src/interfaces/libpq/libpq-int.h
M src/port/path.c
Remove prototype for nonexistent function.
commit : 423ee49b491ee966aa06259772dc38819cab786a
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 30 Jan 2012 11:59:40 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 30 Jan 2012 11:59:40 -0500
M src/bin/pg_dump/pg_dump.h
Make group commit more effective.
commit : 9b38d46d9f5517dab67dda1dd0459683fc9cda9f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 16:40:58 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 16:40:58 +0200
When a backend needs to flush the WAL, and someone else is already flushing
the WAL, wait until it releases the WALInsertLock and check if we still need
to do the flush or if the other backend already did the work for us, before
acquiring WALInsertLock. This helps group commit, because when the WAL flush
finishes, all the backends that were waiting for it can be woken up in one
go, and the can all concurrently observe that they're done, rather than
waking them up one by one in a cascading fashion.
This is based on a new LWLock function, LWLockWaitUntilFree(), which has
peculiar semantics. If the lock is immediately free, it grabs the lock and
returns true. If it's not free, it waits until it is released, but then
returns false without grabbing the lock. This is used in XLogFlush(), so
that when the lock is acquired, the backend flushes the WAL, but if it's
not, the backend first checks the current flush location before retrying.
Original patch and benchmarking by Peter Geoghegan and Simon Riggs, although
this patch as committed ended up being very different from that.
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xlog.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/probes.d
M src/include/storage/lwlock.h
M src/include/storage/proc.h
Minor bug fix and cleanup from self-review of sync rep queues patch.
commit : ba1868ba3138b2119f8290969b9a3936fbc297ce
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 30 Jan 2012 14:36:17 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 30 Jan 2012 14:36:17 +0000
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/postmaster.c
M src/backend/replication/syncrep.c
Various minor comments changes from bgwriter to checkpointer.
commit : 73f617f13f4ca185977d9f7b09bf9edc491cd12f
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 30 Jan 2012 14:34:25 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 30 Jan 2012 14:34:25 +0000
M src/backend/postmaster/checkpointer.c
M src/backend/replication/syncrep.c
M src/include/replication/walsender_private.h
Accept a non-existent value in "ALTER USER/DATABASE SET ..." command.
commit : a5782570402988205b3a42ed40f7bc157eac21fc
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 10:32:46 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 30 Jan 2012 10:32:46 +0200
When default_text_search_config, default_tablespace, or temp_tablespaces
setting is set per-user or per-database, with an "ALTER USER/DATABASE SET
..." statement, don't throw an error if the text search configuration or
tablespace does not exist. In case of text search configuration, even if
it doesn't exist in the current database, it might exist in another
database, where the setting is intended to have its effect. This behavior
is now the same as search_path's.
Tablespaces are cluster-wide, so the same argument doesn't hold for
tablespaces, but there's a problem with pg_dumpall: it dumps "ALTER USER
SET ..." statements before the "CREATE TABLESPACE" statements. Arguably
that's pg_dumpall's fault - it should dump the statements in such an order
that the tablespace is created first and then the "ALTER USER SET
default_tablespace ..." statements after that - but it seems better to be
consistent with search_path and default_text_search_config anyway. Besides,
you could still create a dump that throws an error, by creating the
tablespace, running "ALTER USER SET default_tablespace", then dropping the
tablespace and running pg_dumpall on that.
Backpatch to all supported versions.
M src/backend/commands/tablespace.c
M src/backend/utils/cache/ts_cache.c
Assorted comment fixes, mostly just typos, but some obsolete statements.
commit : ad10853b30b84d89905e023afa599de3a1fea4c6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 19:23:56 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 19:23:56 -0500
YAMAMOTO Takashi
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistproc.c
M src/backend/access/gist/gistsplit.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/slru.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/storage/ipc/procarray.c
M src/backend/utils/hash/hashfn.c
M src/include/access/gist.h
Fix typo in comment.
commit : dd243b3e40c24cd7c6b0db80bb39061f8f85af7b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 18:56:35 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 18:56:35 -0500
Peter Geoghegan
M src/include/storage/proc.h
Tweak index costing for problems with partial indexes.
commit : 21a39de5809cd3050a37d2554323cc1d0cbeed9d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 18:37:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 18:37:14 -0500
btcostestimate() makes an estimate of the number of index tuples that will
be visited based on knowledge of which index clauses can actually bound the
scan within nbtree. However, it forgot to account for partial indexes in
this calculation, with the result that the cost of the index scan could be
significantly overestimated for a partial index. Fix that by merging the
predicate with the abbreviated indexclause list, in the same way as we do
with the full list to estimate how many heap tuples will be visited.
Also, slightly increase the "fudge factor" that's meant to give preference
to smaller indexes over larger ones. While this is applied to all indexes,
it's most important for partial indexes since it can be the only factor
that makes a partial index look cheaper than a similar full index.
Experimentation shows that the existing value is so small as to easily get
swamped by noise such as page-boundary-roundoff behavior. I'm tempted to
kick it up more than this, but will refrain for now.
Per report from Ruben Blanco. These are long-standing issues, but given
the lack of prior complaints I'm not going to risk changing planner
behavior in back branches by back-patching.
M src/backend/utils/adt/selfuncs.c
Fix pushing of index-expression qualifications through UNION ALL.
commit : b28ffd0fcc583c1811e5295279e7d4366c3cae6c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 16:31:23 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 29 Jan 2012 16:31:23 -0500
In commit 57664ed25e5dea117158a2e663c29e60b3546e1c, I made the planner
wrap non-simple-variable outputs of appendrel children (IOW, child SELECTs
of UNION ALL subqueries) inside PlaceHolderVars, in order to solve some
issues with EquivalenceClass processing. However, this means that any
upper-level WHERE clauses mentioning such outputs will now contain
PlaceHolderVars after they're pushed down into the appendrel child,
and that prevents indxpath.c from recognizing that they could be matched
to index expressions. To fix, add explicit stripping of PlaceHolderVars
from index operands, same as we have long done for RelabelType nodes.
Add a regression test covering both this and the plain-UNION case (which
is a totally different code path, but should also be able to do it).
Per bug #6416 from Matteo Beccati. Back-patch to 9.1, same as the
previous change.
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/createplan.c
M src/test/regress/expected/union.out
M src/test/regress/sql/union.sql
Add caution about multiple unique indexes breaking plpgsql upsert example.
commit : ed6e0545f5f6e9977c8410e04244138b567c5a73
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 21:06:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 21:06:41 -0500
Per Phil Sorber, though I didn't use his wording exactly.
M doc/src/sgml/plpgsql.sgml
Update statement about sorting of character-string data.
commit : 17d3233e1bfd9fbe856f032a542f2c595e79ca01
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 20:54:56 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 20:54:56 -0500
The sort order is no longer fixed at database creation time, but can be
controlled via COLLATE. Noted by Thomas Kellerer.
M doc/src/sgml/ref/select.sgml
Fix handling of init_plans list in inheritance_planner().
commit : 4ec6581c0cdddfda767641f535116ee9a0412149
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 20:24:42 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 20:24:42 -0500
Formerly we passed an empty list to each per-child-table invocation of
grouping_planner, and then merged the results into the global list.
However, that fails if there's a CTE attached to the statement, because
create_ctescan_plan uses the list to find the plan referenced by a CTE
reference; so it was unable to find any CTEs attached to the outer UPDATE
or DELETE. But there's no real reason not to use the same list throughout
the process, and doing so is simpler and faster anyway.
Per report from Josh Berkus of "could not find plan for CTE" failures.
Back-patch to 9.1 where we added support for WITH attached to UPDATE or
DELETE. Add some regression test cases, too.
M src/backend/optimizer/plan/planner.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Add simple tests of EvalPlanQual using the isolationtester infrastructure.
commit : 759d9d67695783f6d04a85aba383a41c5382548c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 17:55:08 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 17:55:08 -0500
Much more could be done here, but at least now we have *some* automated
test coverage of that mechanism. In particular this tests the writable-CTE
case reported by Phil Sorber.
In passing, remove isolationtester's arbitrary restriction on the number of
steps in a permutation list. I used this so that a single spec file could
be used to run several related test scenarios, but there are other possible
reasons to want a step series that's not exactly a permutation. Improve
documentation and fix a couple other nits as well.
M src/test/isolation/README
A src/test/isolation/expected/eval-plan-qual.out
M src/test/isolation/isolation_schedule
M src/test/isolation/isolationtester.c
A src/test/isolation/specs/eval-plan-qual.spec
Fix handling of data-modifying CTE subplans in EvalPlanQual.
commit : 7c1719bc68ec1c347e7c80c3735bf3373e765f35
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 17:43:57 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 28 Jan 2012 17:43:57 -0500
We can't just skip initializing such subplans, because the referencing CTE
node will expect to find the subplan available when it initializes. That
in turn means that ExecInitModifyTable must allow the case (which actually
it needed to do anyway, since there's no guarantee that ModifyTable is
exactly at the top of the CTE plan tree). So move the complaint about not
being allowed in EvalPlanQual mode to execution instead of initialization.
Testing turned up yet another problem, which is that we'd try to
re-initialize the result relation's index list, leading to leaks and
dangling pointers.
Per report from Phil Sorber. Back-patch to 9.1 where data-modifying CTEs
were introduced.
M src/backend/executor/execMain.c
M src/backend/executor/nodeModifyTable.c
Prevent logging "failed to stat file: success" for temp files
commit : 672614cf2137b2a3778c69de8d73770d84790e44
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 28 Jan 2012 10:01:17 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 28 Jan 2012 10:01:17 +0100
This was broken in commit bc3347484a7bf9eddb98e4352d84599cae9a31c6, the
addition of statistics counters for temp files.
Reported by Thom Brown
M src/backend/storage/file/fd.c
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().
commit : a8b4b84360e5ea145d12d372305b50f6774b0366
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 23:09:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 23:09:16 -0500
Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.
Marko Kreen, per report from Stefan Kaltenbrunner
M contrib/pgcrypto/pgcrypto.c
Undo 8.4-era lobotomization of subquery pullup rules.
commit : 0816fad6eebddb8f1f0e21635e46625815d690b9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 19:46:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 19:46:41 -0500
After the planner was fixed to convert some IN/EXISTS subqueries into
semijoins or antijoins, we had to prevent it from doing that in some
cases where the plans risked getting much worse. The reason the plans
got worse was that in the unoptimized implementation, subqueries could
reference parameters from the outer query at any join level, and so
full table scans could be avoided even if they were one or more levels
of join below where the semi/anti join would be. Now that we have
sufficient mechanism in the planner to handle such cases properly,
it should no longer be necessary to play dumb here.
This reverts commits 07b9936a0f10d746e5076239813a5e938f2f16be and
cd1f0d04bf06938c0ee5728fc8424d62bcf2eef3. The latter was a stopgap
fix that wasn't really sufficiently analyzed at the time. Rather
than just restricting ourselves to cases where the new join can be
stacked on the right-hand input, we should also consider whether it
can be stacked on the left-hand input.
M src/backend/optimizer/prep/prepjointree.c
Use parameterized paths to generate inner indexscans more flexibly.
commit : e2fa76d80ba571d4de8992de6386536867250474
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 19:26:38 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 27 Jan 2012 19:26:38 -0500
This patch fixes the planner so that it can generate nestloop-with-
inner-indexscan plans even with one or more levels of joining between
the indexscan and the nestloop join that is supplying the parameter.
The executor was fixed to handle such cases some time ago, but the
planner was not ready. This should improve our plans in many situations
where join ordering restrictions formerly forced complete table scans.
There is probably a fair amount of tuning work yet to be done, because
of various heuristics that have been added to limit the number of
parameterized paths considered. However, we are not going to find out
what needs to be adjusted until the code gets some real-world use, so
it's time to get it in there where it can be tested easily.
Note API change for index AM amcostestimate functions. I'm not aware of
any non-core index AMs, but if there are any, they will need minor
adjustments.
M doc/src/sgml/indexam.sgml
M src/backend/nodes/bitmapset.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/planmain.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/restrictinfo.c
M src/backend/utils/adt/selfuncs.c
M src/include/nodes/bitmapset.h
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
Show default privileges in information schema
commit : b376ec6fa57bc76037014ede29498e2d1611968e
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:58:51 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:58:51 +0200
Hitherto, the information schema only showed explicitly granted
privileges that were visible in the *acl catalog columns. If no
privileges had been granted, the implicit privileges were not shown.
To fix that, add an SQL-accessible version of the acldefault()
function, and use that inside the aclexplode() calls to substitute the
catalog-specific default privilege set for null values.
reviewed by Abhijit Menon-Sen
M src/backend/catalog/information_schema.sql
M src/backend/utils/adt/acl.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/acl.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Revert unfortunate whitespace change
commit : bf90562aa464e3a9afedde5f0007058f381d00fe
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:39:38 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:39:38 +0200
In e5e2fc842c418432756d8b5825ff107c6c5fc4c3, blank lines were removed
after a comment block, which now looks as though the comment refers to
the immediately following code, but it actually refers to the
preceding code. So put the blank lines back.
M src/backend/libpq/hba.c
Disallow ALTER DOMAIN on non-domain type everywhere
commit : 27874583627e049a049dc1327deb12a02a7013ab
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:20:34 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 21:20:34 +0200
This has been the behavior already in most cases, but through
omission, ALTER DOMAIN / OWNER TO and ALTER DOMAIN / SET SCHEMA would
silently work on non-domain types as well.
M src/backend/commands/alter.c
M src/backend/commands/typecmds.c
M src/include/commands/typecmds.h
Hide most variable-length fields from Form_pg_* structs
commit : 8137f2c32322c624e0431fac1621e8e9315202f9
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 20:16:17 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 20:16:17 +0200
Those fields only appear in the structs so that genbki.pl can create
the BKI bootstrap files for the catalogs. But they are not actually
usable from C. So hiding them can prevent coding mistakes, saves
stack space, and can help the compiler.
In certain catalogs, the first variable-length field has been kept
visible after manual inspection. These exceptions are noted in C
comments.
reviewed by Tom Lane
M src/backend/catalog/Catalog.pm
M src/include/catalog/genbki.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_class.h
M src/include/catalog/pg_constraint.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_pltemplate.h
M src/include/catalog/pg_proc.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/catalog/pg_user_mapping.h
Do not access indclass through Form_pg_index
commit : 8a3f745f160d8334ad978676828d3926ac949f43
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 20:08:34 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 27 Jan 2012 20:08:34 +0200
Normally, accessing variable-length members of catalog structures past
the first one doesn't work at all. Here, it happened to work because
indnatts was checked to be 1, and so the defined FormData_pg_index
layout, using int2vector[1] and oidvector[1] for variable-length
arrays, happened to match the actual memory layout. But it's a very
fragile assumption, and it's not in a performance-critical path, so
code it properly using heap_getattr() instead.
bug analysis by Tom Lane
M src/backend/utils/cache/relcache.c
Document that COUNT(*) might not need a seq scan any more.
commit : eb6af016fc04392c41106ac866072914bf66ecd0
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 12:40:37 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 12:40:37 -0500
Noted by Josh Kupershmidt.
M doc/src/sgml/func.sgml
Document that analyzing an empty table doesn't update the statistics.
commit : db6de5b71ef2d91dde94fc0de8adf45372bc332d
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 12:13:49 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 12:13:49 -0500
Per a suggestion from Sergey Konoplev
M doc/src/sgml/ref/analyze.sgml
Initialize the new bgwriterLatch field properly.
commit : cf3fff6326299deca77c1387df31d24aea36e2e1
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 18:24:58 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 18:24:58 +0200
Peter Geoghegan
M src/backend/storage/lmgr/proc.c
pg_dump: Move connection-setup code to a separate function.
commit : e43166a557d5f28aa66fa15be12fdc6a8ebe380a
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 10:59:27 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 27 Jan 2012 10:59:27 -0500
Parallel dump will need to repeat these steps for each new connection,
so it's better to have this logic in its own function.
Extracted (with some changes) from a much larger patch
by Joachim Wieland.
M src/bin/pg_dump/pg_dump.c
Fix copy-paste error in docs.
commit : 59c67ecdd39725aaee0db6e09f399c8e6c248f22
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 12:48:42 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 12:48:42 +0200
Dean Rasheed
M doc/src/sgml/ref/alter_foreign_table.sgml
Fix wording, per Peter Geoghegan
commit : c9f14bb4acf3e5caff97ef0a639c3ee911932e1c
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 27 Jan 2012 10:36:27 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 27 Jan 2012 10:36:27 +0100
M doc/src/sgml/auto-explain.sgml
Mention in the docs that bgwriter now sleeps longer when it has no work to do.
commit : 2e92b5872faeb01f1865bb00556ec7be0ef006ee
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 09:09:50 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 27 Jan 2012 09:09:50 +0200
M doc/src/sgml/config.sgml
Fix pg_upgrade --help text for --user to not use a plural cluster name.
commit : 3946c281613e549d5686ad3f5b298549b0eb0efe
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jan 2012 22:18:49 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 26 Jan 2012 22:18:49 -0500
M contrib/pg_upgrade/option.c
Adjust tuplesort.c based on the fact that we never use the OS's qsort().
commit : c5a03256c725c09c32a5c498bd7c8799ed3ec2a0
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 14:43:28 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 14:43:28 -0500
Our own qsort_arg() implementation doesn't have the defect previously
observed to affect only QNX 4, so it seems sufficiently to assert that
it isn't broken rather than retesting. Also, update a few comments to
clarify why it's valuable to retain a tie-break rule based on CTID
during index builds.
Peter Geoghegan, with slight tweaks by me.
M src/backend/utils/sort/tuplesort.c
Be more clear when a new column name collides with a system column name.
commit : 2d1371d3ee5cf7e96d16fb503c27e060df9497f7
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 12:44:30 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 12:44:30 -0500
We now use the same error message for ALTER TABLE .. ADD COLUMN or
ALTER TABLE .. RENAME COLUMN that we do for CREATE TABLE. The old
message was accurate, but might be confusing to users not aware of our
system columns.
Vik Reykja, with some changes by me, and further proofreading by Tom Lane
M src/backend/commands/tablecmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/errors.out
M src/test/regress/sql/alter_table.sql
Fix sentence in docs: checkpoints are not done by bgwriter anymore.
commit : d4bad4e1e1c7269b906f3b005fc322537630efcf
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 26 Jan 2012 19:08:20 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 26 Jan 2012 19:08:20 +0200
M doc/src/sgml/wal.sgml
Make bgwriter sleep longer when it has no work to do, to save electricity.
commit : 6d90eaaa89a007e0d365f49d6436f35d2392cfeb
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 26 Jan 2012 18:19:48 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 26 Jan 2012 18:19:48 +0200
To make it wake up promptly when activity starts again, backends nudge it
by setting a latch in MarkBufferDirty(). The latch is kept set while
bgwriter is active, so there is very little overhead from that when the
system is busy. It is only armed before going into longer sleep.
Peter Geoghegan, with some changes by me.
M src/backend/postmaster/bgwriter.c
M src/backend/storage/buffer/bufmgr.c
M src/include/storage/bufmgr.h
M src/include/storage/proc.h
Add missing #include, to suppress compiler warning.
commit : 467ff207f51439cadee7857d6a0874f34652ed53
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 10:11:51 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 10:11:51 -0500
M src/backend/storage/file/fd.c
Fix a copy/pasted typo in several comments
commit : 7729e22d83b31afa1009f190bf0f4838cc8feaf8
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 16:02:33 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 16:02:33 +0100
M src/backend/postmaster/pgstat.c
Add deadlock counter to pg_stat_database
commit : 61cb8c5abb9235c3106af6c6a6e60d94cb1eee80
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 15:58:19 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 15:58:19 +0100
Adds a counter that tracks number of deadlocks that occurred in
each database to pg_stat_database.
Magnus Hagander, reviewed by Jaime Casanova
M doc/src/sgml/monitoring.sgml
M src/backend/catalog/system_views.sql
M src/backend/postmaster/pgstat.c
M src/backend/storage/lmgr/deadlock.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
Classify DROP operations by whether or not they are user-initiated.
commit : 0e549697d1c6b8eeb623c497dc38a5aed4deea1e
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 09:24:54 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 09:24:54 -0500
This doesn't do anything useful just yet, but is intended as supporting
infrastructure for allowing sepgsql to sensibly check DROP permissions.
KaiGai Kohei and Robert Haas
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/cluster.c
M src/backend/commands/dropcmds.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/postmaster/autovacuum.c
M src/backend/storage/large_object/inv_api.c
M src/include/catalog/dependency.h
M src/include/catalog/heap.h
Track temporary file count and size in pg_stat_database
commit : bc3347484a7bf9eddb98e4352d84599cae9a31c6
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 14:41:19 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 26 Jan 2012 14:41:19 +0100
Add counters for number and size of temporary files used
for spill-to-disk queries for each database to the
pg_stat_database view.
Tomas Vondra, review by Magnus Hagander
M doc/src/sgml/monitoring.sgml
M src/backend/catalog/system_views.sql
M src/backend/postmaster/pgstat.c
M src/backend/storage/file/fd.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
Damage control for yesterday's CheckIndexCompatible changes.
commit : 9d35116611e6a1fc10f2298944fbf0e4e1a826be
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 08:21:31 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 26 Jan 2012 08:21:31 -0500
Rip out a regression test that doesn't play well with settings put in
place by the build farm, and rewrite the code in CheckIndexCompatible
in a hopefully more transparent style.
M src/backend/commands/indexcmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
Instrument index-only scans to count heap fetches performed.
commit : 9f9135d129e915e72c8a2f770689fd72619ead49
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Jan 2012 20:40:34 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Jan 2012 20:40:34 -0500
Patch by me; review by Tom Lane, Jeff Davis, and Peter Geoghegan.
M src/backend/commands/explain.c
M src/backend/executor/nodeIndexonlyscan.c
M src/include/nodes/execnodes.h
Have \copy go through SendQuery
commit : 08146775acd8bfe0fcc509c71857abb928697171
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jan 2012 18:06:00 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jan 2012 18:06:00 -0300
This enables a bunch of features, notably ON_ERROR_ROLLBACK. It also
makes COPY failure (either in the server or psql) as a whole behave more
sanely in psql.
Additionally, having more commands in the same command line as COPY
works better (though since psql splits lines at semicolons, this doesn't
matter much unless you're using -c).
Also tighten a couple of switches on PQresultStatus() to add
PGRES_COPY_BOTH support and stop assuming that unknown statuses received
are errors; have those print diagnostics where warranted.
Author: Noah Misch
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/copy.c
M src/test/regress/expected/copyselect.out
M src/test/regress/sql/copyselect.sql
Make CheckIndexCompatible simpler and more bullet-proof.
commit : 6eb71ac5527a94be443bc66e68b47b04979906e4
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Jan 2012 15:28:07 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 25 Jan 2012 15:28:07 -0500
This gives up the "don't rewrite the index" behavior in a couple of
relatively unimportant cases, such as changing between an array type
and an unconstrained domain over that array type, in return for
making this code more future-proof.
Noah Misch
M src/backend/commands/indexcmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
Allow pg_basebackup from standby node with safety checking. Base backup follows recommended procedure, plus goes to great lengths to ensure that partial page writes are avoided.
commit : 8366c7803ec3d0591cf2d1226fea1fee947d56c3
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 25 Jan 2012 18:02:04 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 25 Jan 2012 18:02:04 +0000
Jun Ishizuka and Fujii Masao, with minor modifications
M doc/src/sgml/ref/pg_basebackup.sgml
M src/backend/access/transam/xlog.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/postmaster.c
M src/backend/replication/basebackup.c
M src/backend/utils/misc/guc.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/catalog/pg_control.h
Add pg_trigger_depth() function
commit : 74ab96a45ef6259aa6a86a781580edea8488511a
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jan 2012 13:15:29 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 25 Jan 2012 13:15:29 -0300
This reports the depth level of triggers currently in execution, or zero
if not called from inside a trigger.
No catversion bump in this patch, but you have to initdb if you want
access to the new function.
Author: Kevin Grittner
M doc/src/sgml/func.sgml
M src/backend/commands/trigger.c
M src/include/catalog/pg_proc.h
M src/include/commands/trigger.h
M src/test/regress/expected/triggers.out
M src/test/regress/sql/triggers.sql
Now that the shared library name can be adjusted in the library test, have pg_upgrade allocate a maximum fixed size buffer for testing the library file name, rather than base the allocation on the library name.
commit : 6d5aae7afacc564ead2af88c76b13cfc55750556
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 25 Jan 2012 09:35:17 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 25 Jan 2012 09:35:17 -0500
Backpatch to 9.1.
M contrib/pg_upgrade/function.c
Improve plpython fix comment in pg_upgrade.
commit : a7f2c79a6eebccd94aade2b03d40a2caeba8a5c3
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 22:49:55 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 22:49:55 -0500
M contrib/pg_upgrade/function.c
In pg_upgrade, when checking for the plpython library, we must check for "plpython2" when upgrading from pre-PG 9.1. Patch to head and 9.1.
commit : cfe443ab9d42b4ffe950608f01c3a4bdc2895c7b
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 22:42:37 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 22:42:37 -0500
Per report from Peter.
M contrib/pg_upgrade/function.c
Fix new SQL tablespace location function usage in pg_upgrade to properly check cluster version numbers, and fix missing table alias.
commit : b95aec529014355f4f90c5095993404ff0291b02
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 21:51:10 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 21:51:10 -0500
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/tablespace.c
Add new replication mode synchronous_commit = 'write'. Replication occurs only to memory on standby, not to disk, so provides additional performance if user wishes to reduce durability level slightly. Adds concept of multiple independent sync rep queues.
commit : 443b4821f1649bc617c5ce1f6f3ffc65842a8930
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 24 Jan 2012 20:22:37 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 24 Jan 2012 20:22:37 +0000
Fujii Masao and Simon Riggs
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
M src/backend/replication/syncrep.c
M src/backend/replication/walsender.c
M src/backend/utils/misc/guc.c
M src/include/access/xact.h
M src/include/replication/syncrep.h
M src/include/replication/walsender_private.h
Remove quotes around format_type_be() output
commit : 89dda5f2979fbe277809369ff88832ab39e83ff0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Jan 2012 21:49:27 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 24 Jan 2012 21:49:27 +0200
format_type_be() takes care of any needed quoting itself.
M src/backend/catalog/pg_constraint.c
Suppress variable-clobbered-by-longjmp warning seen with older gcc versions.
commit : f26c9896b3da1b6aa5c560c4743f22a2a6c84919
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 24 Jan 2012 13:44:07 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 24 Jan 2012 13:44:07 -0500
M src/backend/utils/misc/guc-file.l
Suppress possibly-uninitialized-variable warning seen with older gcc versions.
commit : beef89567e3a0e3e1c753754a474065c5ad632fe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 24 Jan 2012 13:40:26 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 24 Jan 2012 13:40:26 -0500
M src/backend/postmaster/pgstat.c
Reduce tab outdent of "error handling" GUC comments in postgresql.conf, to match surrounding outdenting.
commit : 890a9992ce78b691e44359236d8b47e3c889581d
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 10:40:47 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 24 Jan 2012 10:40:47 -0500
M src/backend/utils/misc/postgresql.conf.sample
Adjustments to regression tests for security_barrier views.
commit : 49562f5eb66f31940dd7b64555bbd81bae952387
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Jan 2012 08:38:20 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 24 Jan 2012 08:38:20 -0500
Drop the role we create, so regression tests pass even when run more
than once against the same cluster, a problem noted by Tom Lane and
Jeff Janes. Also, rename the temporary role so that it starts with
"regress_", to make it unlikely that we'll collide with an existing
role name while running "make installcheck", per further gripe from
Tom Lane.
M src/test/regress/expected/select_views.out
M src/test/regress/expected/select_views_1.out
M src/test/regress/sql/select_views.sql
Resolve timing issue with logging locks for Hot Standby. We log AccessExclusiveLocks for replay onto standby nodes, but because of timing issues on ProcArray it is possible to log a lock that is still held by a just committed transaction that is very soon to be removed. To avoid any timing issue we avoid applying locks made by transactions with InvalidXid.
commit : c172b7b02e6f6008d6dad66ddee8f67faf223c5b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 23 Jan 2012 23:37:32 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 23 Jan 2012 23:37:32 +0000
Simon Riggs, bug report Tom Lane, diagnosis Pavan Deolasee
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/include/storage/standby.h
ALTER <thing> [IF EXISTS] ... allows silent DDL if required, e.g. ALTER FOREIGN TABLE IF EXISTS foo RENAME TO bar
commit : b8a91d9d1c7ec75aaecf13df687ec7b5b0ed35a6
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 23 Jan 2012 23:25:04 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 23 Jan 2012 23:25:04 +0000
Pavel Stehule
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_index.sgml
M doc/src/sgml/ref/alter_sequence.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_view.sgml
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/tcop/utility.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/sequence.out
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/foreign_data.sql
M src/test/regress/sql/sequence.sql
Typo fix
commit : 4993a49b7cf1d23dfe1f9e1a85d9411b8ff57454
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 22 Jan 2012 22:34:28 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 22 Jan 2012 22:34:28 +0100
Guillaume Lelarge
M doc/src/sgml/tcn.sgml
psql: Add support for tab completion of GRANT/REVOKE role
commit : 95c63b5e3209cfc8d91d7956407032fc6fe89640
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 21 Jan 2012 19:46:55 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 21 Jan 2012 19:46:55 +0200
Previously, only GRANT/REVOKE privilege was supported.
reviewed by Pavel Stehule
M src/bin/psql/tab-complete.c
Check number of fields in IDENTIFY_SYSTEM response
commit : c14534957bb93df76bc66516aa03476de0069213
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 13:57:02 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 13:57:02 +0100
Jaime Casanova
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Get rid of itemizedlist inside table
commit : 356fddfa0ff612a40cc85f8374f9cd058585687f
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 12:30:19 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 12:30:19 +0100
This renders badly on the website, and in this particular case also
doesn't actually add anything to the readability...
M doc/src/sgml/monitoring.sgml
Further doc cleanups from the pg_stat_activity changes
commit : a65023e7decf5f5ba9b17bd86db8fe1ea4b6c331
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 12:23:26 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 20 Jan 2012 12:23:26 +0100
Fujii Masao
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/monitoring.sgml
M src/backend/utils/misc/guc.c
Triggered change notifications.
commit : 6e3323d41dc45e93700a3420fd27ca05db6a64a7
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 23:15:15 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 23:15:15 -0500
Kevin Grittner, reviewed (in earlier versions) by Álvaro Herrera
M contrib/Makefile
A contrib/tcn/Makefile
A contrib/tcn/tcn–1.0.sql
A contrib/tcn/tcn.c
A contrib/tcn/tcn.control
M doc/src/sgml/contrib.sgml
M doc/src/sgml/filelist.sgml
A doc/src/sgml/tcn.sgml
Clarify that bgwriter no longer handles checkpoints.
commit : c8397bd6d909620457b532e252ce2e437c787d4f
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 21:52:51 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 21:52:51 -0500
Text by Peter Geoghegan.
M doc/src/sgml/config.sgml
Add pg_upgrade C comment about why we check all relkinds for regtypes.
commit : ecf7a2ea387a409f6152c05f60e5765c7436b8df
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 19 Jan 2012 16:04:34 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 19 Jan 2012 16:04:34 -0500
M contrib/pg_upgrade/check.c
Add bitwise AND, OR, and NOT operators for macaddr data type.
commit : cc53a1e7ccfa762bda70e1b6a15bfd929bf1b4e3
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 15:23:04 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 19 Jan 2012 15:23:04 -0500
Brendan Jurd, reviewed by Fujii Masao
M doc/src/sgml/func.sgml
M src/backend/utils/adt/mac.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
M src/test/regress/expected/macaddr.out
M src/test/regress/sql/macaddr.sql
Separate state from query string in pg_stat_activity
commit : 4f42b546fd87a80be30c53a0f2c897acb826ad52
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 19 Jan 2012 14:19:20 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 19 Jan 2012 14:19:20 +0100
This separates the state (running/idle/idleintransaction etc) into
it's own field ("state"), and leaves the query field containing just
query text.
The query text will now mean "current query" when a query is running
and "last query" in other states. Accordingly,the field has been
renamed from current_query to query.
Since backwards compatibility was broken anyway to make that, the procpid
field has also been renamed to pid - along with the same field in
pg_stat_replication for consistency.
Scott Mead and Magnus Hagander, review work from Greg Smith
M doc/src/sgml/monitoring.sgml
M src/backend/catalog/system_views.sql
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgstat.c
M src/backend/tcop/postgres.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
Make pg_relation_size() and friends return NULL if the object doesn't exist.
commit : fa352d662e57fa150158b9cb0a8f127250f8c97f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 19 Jan 2012 13:06:30 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 19 Jan 2012 13:06:30 +0200
That avoids errors when the functions are used in queries like "SELECT
pg_relation_size(oid) FROM pg_class", and a table is dropped concurrently.
Phil Sorber
M doc/src/sgml/func.sgml
M src/backend/utils/adt/dbsize.c
PL/Python: Update example
commit : 6f6b46c9c0ca3d96acbebc5499c32ee6369e1eec
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 18 Jan 2012 21:02:09 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 18 Jan 2012 21:02:09 +0200
Change the usesavedplan() example to use a more modern Python style
using the .setdefault() function.
M doc/src/sgml/plpython.sgml
Fix corner case in cleanup of transactions using SSI.
commit : 326b922e8b2d65257a635b5f80e5de0f15dffd3a
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 18 Jan 2012 17:09:44 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 18 Jan 2012 17:09:44 +0200
When the only remaining active transactions are READ ONLY, we do a "partial
cleanup" of committed transactions because certain types of conflicts
aren't possible anymore. For committed r/w transactions, we release the
SIREAD locks but keep the SERIALIZABLEXACT. However, for committed r/o
transactions, we can go further and release the SERIALIZABLEXACT too. The
problem was with the latter case: we were returning the SERIALIZABLEXACT to
the free list without removing it from the finished list.
The only real change in the patch is the SHMQueueDelete line, but I also
reworked some of the surrounding code to make it obvious that r/o and r/w
transactions are handled differently -- the existing code felt a bit too
clever.
Dan Ports
M src/backend/storage/lmgr/predicate.c
Show psql timing output for failed queries as well as successful ones
commit : 2106c55ac8dacc52bf6483925529fd3ab99b94c4
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 18 Jan 2012 10:32:54 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 18 Jan 2012 10:32:54 +0100
This is useful for example when a long-runing statement such as CREATE
INDEX fails after a long time.
M src/bin/psql/common.c
Fix warning about unused variable
commit : ae137bcaab7dd0b1ee58020d93ce8f07e36d4d49
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 18 Jan 2012 10:22:54 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 18 Jan 2012 10:22:54 +0100
M src/backend/commands/view.c
Regression tests for security_barrier views.
commit : 504f0c5d5d2955c05458e1a8d5f4fbba4cac07cd
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 17 Jan 2012 22:07:24 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 17 Jan 2012 22:07:24 -0500
KaiGai Kohei
M src/test/regress/expected/select_views.out
M src/test/regress/expected/select_views_1.out
M src/test/regress/sql/select_views.sql
Catch fatal flex errors in the GUC file lexer.
commit : 4b496a3583ecb3f70bb4d13f8275dbb7e5b26100
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 17 Jan 2012 20:51:38 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 17 Jan 2012 20:51:38 -0500
This prevents the postmaster from unexpectedly croaking if postgresql.conf
contains something like:
include 'invalid_directory_name'
Noah Misch. Reviewed by Tom Lane and myself.
M src/backend/utils/misc/guc-file.l
fastgetattr is in access/htup.h, not access/heapam.h
commit : 754b8140a1a5ceb12343fd89423da5cc86ce5328
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 16 Jan 2012 20:37:01 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 16 Jan 2012 20:37:01 -0500
Noted by Peter Geoghegan
M src/backend/access/heap/heapam.c
Disallow merging ONLY constraints in children tables
commit : 3b11247aadf857bbcbfc765191273973d9ca9dd7
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 16 Jan 2012 19:19:42 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 16 Jan 2012 19:19:42 -0300
When creating a child table, or when attaching an existing table as
child of another, we must not allow inheritable constraints to be
merged with non-inheritable ones, because then grandchildren would not
properly get the constraint. This would violate the grandparent's
expectations.
Bugs noted by Robert Haas.
Author: Nikhil Sontakke
M doc/src/sgml/ref/alter_table.sgml
M src/backend/catalog/heap.c
M src/backend/commands/tablecmds.c
psql: Fix memory leak
commit : 1b9f774090d58a950ef0535b51bc377ab62b795c
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Jan 2012 20:08:33 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 16 Jan 2012 20:08:33 +0200
The command
\password username
leaked memory.
M src/bin/psql/command.c
Prevent adding relations to a concurrently dropped schema.
commit : 1575fbcb795fc331f46588b4520c4bca7e854d5c
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 16 Jan 2012 09:34:21 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 16 Jan 2012 09:34:21 -0500
In the previous coding, it was possible for a relation to be created
via CREATE TABLE, CREATE VIEW, CREATE SEQUENCE, CREATE FOREIGN TABLE,
etc. in a schema while that schema was meanwhile being concurrently
dropped. This led to a pg_class entry with an invalid relnamespace
value. The same problem could occur if a relation was moved using
ALTER .. SET SCHEMA while the target schema was being concurrently
dropped. This patch prevents both of those scenarios by locking the
schema to which the relation is being added using AccessShareLock,
which conflicts with the AccessExclusiveLock taken by DROP.
As a desirable side effect, this also prevents the use of CREATE OR
REPLACE VIEW to queue for an AccessExclusiveLock on a relation on which
you have no rights: that will now fail immediately with a permissions
error, before trying to obtain a lock.
We need similar protection for all other object types, but as everything
other than relations uses a slightly different set of code paths, I'm
leaving that for a separate commit.
Original complaint (as far as I could find) about CREATE by Nikhil
Sontakke; risk for ALTER .. SET SCHEMA pointed out by Tom Lane;
further details by Dan Farina; patch by me; review by Hitoshi Harada.
M src/backend/catalog/namespace.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/parser/parse_utilcmd.c
M src/include/catalog/namespace.h
Improve efficiency of recent changes to plperl's sv2cstr().
commit : 01d83ffdcae92f75dbfd41de0b4213d241edd394
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 15 Jan 2012 16:15:04 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 15 Jan 2012 16:15:04 -0500
Along the way, add a missing dependency in the GNUmakefile.
Alex Hunsaker, with a slight adjustment by me.
M src/pl/plperl/GNUmakefile
M src/pl/plperl/expected/plperl_elog.out
M src/pl/plperl/plperl_helpers.h
M src/pl/plperl/sql/plperl_elog.sql
Fix poll() implementation of WaitLatchOrSocket to notice postmaster death.
commit : b2b4af535eb733ba0c2ea6eeb2b14cac7f1ca4be
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 15 Jan 2012 22:03:09 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 15 Jan 2012 22:03:09 +0200
When the remote end of the pipe is closed, select() reports the fd as
readable, but poll() has a separate POLLHUP return code for that.
Spotted by Peter Geoghegan.
M src/backend/port/unix_latch.c
Allow a user to kill his own queries using pg_cancel_backend()
commit : 0495aaad8b337642830a4d4e82f8b8c02b27b1be
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 15 Jan 2012 15:34:40 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 15 Jan 2012 15:34:40 +0100
Allows a user to use pg_cancel_queries() to cancel queries in
other backends if they are running under the same role.
pg_terminate_backend() still requires superuser permissoins.
Short patch, many authors working on the bikeshed: Magnus Hagander,
Josh Kupershmidt, Edward Muller, Greg Smith.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/misc.c
pgcrypto: Remove inappropriate const qualifier
commit : 652300f5392f2d951b368c38f1cf123003e5e21e
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 15 Jan 2012 14:00:52 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 15 Jan 2012 14:00:52 +0200
The function in question does not in fact ensure that the passed
argument is not changed, and the callers don't care much either.
M contrib/pgcrypto/mbuf.c
M contrib/pgcrypto/mbuf.h
Detect invalid permutations in isolationtester
commit : 7064fd06489e069d38a9d67c5322265cb8f7ceec
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 14 Jan 2012 19:36:39 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 14 Jan 2012 19:36:39 -0300
isolationtester is now able to continue running other permutations when
it detects that one of them is invalid, which is useful during initial
development of spec files.
Author: Alexander Shulgin
M src/test/isolation/isolationtester.c
Avoid NULL pointer dereference in isolationtester
commit : d2a75837ccaa3b0da996969674b631dc3f778838
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 14 Jan 2012 18:58:49 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 14 Jan 2012 18:58:49 -0300
M src/test/isolation/isolationtester.c
Make superuser imply replication privilege. The idea of a privilege that superuser doesn't have doesn't make much sense, as a superuser can do whatever he wants through other means, anyway. So instead of granting replication privilege to superusers in CREATE USER time by default, allow replication connection from superusers whether or not they have the replication privilege.
commit : 00c5f55061df52ccfd82eae16f054e08818ad0ff
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 14 Jan 2012 18:22:16 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 14 Jan 2012 18:22:16 +0200
Patch by Noah Misch, per discussion on bug report #6264
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/recovery-config.sgml
M doc/src/sgml/ref/create_role.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/user-manag.sgml
M src/backend/commands/user.c
M src/backend/utils/init/postinit.c
initdb: Remove support for crypt authentication method
commit : ea038d65c2460408296a5708da8bb0bd8f3d00bc
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Jan 2012 15:01:24 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 14 Jan 2012 15:01:24 +0200
This was removed from the backend a long time ago, but initdb still
thought that it was OK to use in the -A option.
M src/bin/initdb/initdb.c
Fix broken logic in lazy_vacuum_heap.
commit : d0dcb315db0043f10073a9a244cea138e9e60edd
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Jan 2012 08:22:31 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Jan 2012 08:22:31 -0500
As noted by Tom Lane, the previous coding in this area, which I
introduced in commit bbb6e559c4ea0fb4c346beda76736451dc24eb4e, was
poorly tested and caused the vacuum's second heap to go into what would
have been an infinite loop but for the fact that it eventually caused a
memory allocation failure. This version seems to work better.
M src/backend/commands/vacuumlazy.c
Typo fix.
commit : 4d0b11a0ca347e5b0304004625b7eb6752e32ee7
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Jan 2012 08:21:45 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 13 Jan 2012 08:21:45 -0500
M src/backend/replication/walreceiver.c
Correctly initialise shared recoveryLastRecPtr in recovery. Previously we used ReadRecPtr rather than EndRecPtr, which was not a serious error but caused pg_stat_replication to report incorrect replay_location until at least one WAL record is replayed.
commit : 5530623d0326e96e40b8d54275da256ca0fb6856
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 13 Jan 2012 13:02:44 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 13 Jan 2012 13:02:44 +0000
Fujii Masao
M src/backend/access/transam/xlog.c
Minor but necessary improvements to WAL keepalives
commit : 3f1787c253967617a0e34fa4bfb7b2ab184ad484
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 13 Jan 2012 12:59:08 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 13 Jan 2012 12:59:08 +0000
Fujii Masao
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
Fix CLUSTER/VACUUM FULL for toast values owned by recently-updated rows.
commit : 21b446dd0927f8f2a187d9461a0d3f11db836f77
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jan 2012 16:40:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jan 2012 16:40:14 -0500
In commit 7b0d0e9356963d5c3e4d329a917f5fbb82a2ef05, I made CLUSTER and
VACUUM FULL try to preserve toast value OIDs from the original toast table
to the new one. However, if we have to copy both live and recently-dead
versions of a row that has a toasted column, those versions may well
reference the same toast value with the same OID. The patch then led to
duplicate-key failures as we tried to insert the toast value twice with the
same OID. (The previous behavior was not very desirable either, since it
would have silently inserted the same value twice with different OIDs.
That wastes space, but what's worse is that the toast values inserted for
already-dead heap rows would not be reclaimed by subsequent ordinary
VACUUMs, since they go into the new toast table marked live not deleted.)
To fix, check if the copied OID already exists in the new toast table, and
if so, assume that it stores the desired value. This is reasonably safe
since the only case where we will copy an OID from a previous toast pointer
is when toast_insert_or_update was given that toast pointer and so we just
pulled the data from the old table; if we got two different values that way
then we have big problems anyway. We do have to assume that no other
backend is inserting items into the new toast table concurrently, but
that's surely safe for CLUSTER and VACUUM FULL.
Per bug #6393 from Maxim Boguk. Back-patch to 9.0, same as the previous
patch.
M src/backend/access/heap/tuptoaster.c
M src/backend/commands/cluster.c
M src/include/utils/rel.h
Tweak duplicate-index-column regression test to avoid locale sensitivity.
commit : de5a08c59de39df07599723cb212ae8297903f48
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jan 2012 14:18:08 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 12 Jan 2012 14:18:08 -0500
The originally-chosen test case gives different results in es_EC locale
because of unusual rule for sorting strings beginning with "LL". Adjust
the comparison value to avoid that, while hopefully not introducing new
locale dependencies elsewhere. Per report from Jaime Casanova.
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Validate number of steps specified in permutation
commit : 50363c8f86f89fe611ba417575218978917f1ac0
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 11 Jan 2012 18:46:18 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 11 Jan 2012 18:46:18 -0300
A permutation that specifies more steps than defined causes
isolationtester to crash, so avoid that. Using less steps than defined
should probably not be a problem, but no spec currently does that.
M src/test/isolation/isolationtester.c
Remove useless 'needlock' argument from GetXLogInsertRecPtr. It was always passed as 'true'.
commit : 1b9dea04b5cd8b1b2f8041e4aece9d573f007eb1
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Jan 2012 11:00:53 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Jan 2012 11:00:53 +0200
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/include/access/xlog.h
Refactor XLogInsert a bit. The rdata entries for backup blocks are now constructed before acquiring WALInsertLock, which slightly reduces the time the lock is held. Although I could not measure any benefit in benchmarks, the code is more readable this way.
commit : 9c808f89c2841dd847555898a8db45fcd69e913b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Jan 2012 09:46:18 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Jan 2012 09:46:18 +0200
M src/backend/access/transam/xlog.c
Fix typos
commit : 26e89e7f23194e390ec4326cd0198a1992c2adf0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 22:49:17 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 22:49:17 +0200
M src/pl/plpython/plpy_cursorobject.c
Support CREATE TABLE (LIKE ...) with foreign tables and views
commit : a9f2e31cf653bad72debae616521130065e55077
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 21:46:29 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 21:46:29 +0200
Composite types are not yet supported, because parserOpenTable()
rejects them.
M doc/src/sgml/ref/create_table.sgml
M src/backend/parser/parse_utilcmd.c
M src/test/regress/expected/create_table_like.out
M src/test/regress/sql/create_table_like.sql
pg_dump: Dump foreign options in sorted order
commit : 07123dff778389382f08d2152742bb061d351c21
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 20:58:16 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 10 Jan 2012 20:58:16 +0200
M src/bin/pg_dump/pg_dump.c
Fix one-byte buffer overrun in contrib/test_parser.
commit : 89b3c6cc8b560f7f46a6a25b270aed5330c09a0e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Jan 2012 19:56:27 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 9 Jan 2012 19:56:27 -0500
The original coding examined the next character before verifying that
there *is* a next character. In the worst case with the input buffer
right up against the end of memory, this would result in a segfault.
Problem spotted by Paul Guyot; this commit extends his patch to fix an
additional case. In addition, make the code a tad more readable by not
overloading the usage of *tlen.
M contrib/test_parser/test_parser.c
Add compatibility note about grant options on GRANT reference page
commit : 743ed082accbc542294a4408e2e45a6ffb8ec966
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 9 Jan 2012 21:10:50 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 9 Jan 2012 21:10:50 +0200
Point out in the compatibility section that granting grant options to
PUBLIC is not supported by PostgreSQL. This is already mentioned
earlier, but since it concerns the information schema, it might be
worth pointing out explicitly as a compatibility issue.
M doc/src/sgml/ref/grant.sgml
Fix pathname in pgindent README.
commit : dc3f33f6be0be3f7ce25511d4485506ec43e20aa
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 9 Jan 2012 13:31:58 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 9 Jan 2012 13:31:58 -0500
Kevin Grittner
M src/tools/pgindent/README
Add .gitignore file for entab
commit : 822128947eb707830ad1b775c216517c3a54befc
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 18:18:25 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 18:18:25 +0100
Kevin Grittner
A src/tools/entab/.gitignore
Fix comment language
commit : 4ecd359c420203082489e2b5dddd098e34a1b70c
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 18:16:51 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 18:16:51 +0100
Per comment from Heikki
M src/bin/pg_basebackup/receivelog.c
Fix pg_basebackup for keepalive messages
commit : 6b020d228b976821181ac673964f302b2c32f12d
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 11:53:38 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 9 Jan 2012 11:53:38 +0100
Teach pg_basebackup in streaming mode to deal with keepalive messages.
Also change the order of checks to complain at the message rather than
block size when a new message is introduced.
In passing, switch to using sizeof() instead of hardcoded sizes for
WAL protocol structs.
M src/bin/pg_basebackup/receivelog.c
Rename the internal structures of the CREATE TABLE (LIKE ...) facility
commit : db49517c62750322fb2a37ff6324ecc00965e641
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 7 Jan 2012 14:58:13 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 7 Jan 2012 14:58:13 +0200
The original implementation of this interpreted it as a kind of
"inheritance" facility and named all the internal structures
accordingly. This turned out to be very confusing, because it has
nothing to do with the INHERITS feature. So rename all the internal
parser infrastructure, update the comments, adjust the error messages,
and split up the regression tests.
M doc/src/sgml/ref/create_table.sgml
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/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
A src/test/regress/expected/create_table_like.out
M src/test/regress/expected/inherit.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/create_table_like.sql
M src/test/regress/sql/inherit.sql
Use __sync_lock_test_and_set() for spinlocks on ARM, if available.
commit : 0a41e865845bfa5d7aafcc5fe000dafa26573fef
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Jan 2012 15:38:52 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 7 Jan 2012 15:38:52 -0500
Historically we've used the SWPB instruction for TAS() on ARM, but this
is deprecated and not available on ARMv6 and later. Instead, make use
of a GCC builtin if available. We'll still fall back to SWPB if not,
so as not to break existing ports using older GCC versions.
Eventually we might want to try using __sync_lock_test_and_set() on some
other architectures too, but for now that seems to present only risk and
not reward.
Back-patch to all supported versions, since people might want to use any
of them on more recent ARM chips.
Martin Pitt
M configure
M configure.in
M src/include/pg_config.h.in
M src/include/storage/s_lock.h
Slightly reorganize struct SnapshotData.
commit : 1fc3d18faa8f4476944bc6854be0f7f6adf4aec8
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:56:00 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:56:00 -0500
This squeezes out a bunch of alignment padding, reducing the size
from 72 to 56 bytes on my machine. At least in my testing, this
didn't produce any measurable performance improvement, but the space
savings seem like enough justification.
Andres Freund
M src/include/utils/snapshot.h
Fix backwards logic in previous commit.
commit : df970a0ac8fb416b179825a135c18ad3293076af
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:54:43 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:54:43 -0500
I wrote this code before committing it, but managed not to include it in
the actual commit.
M src/backend/commands/tablecmds.c
Improve behavior of concurrent ALTER TABLE, and do some refactoring.
commit : 1489e2f26a4c0318938b3085f50976512f321d84
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:42:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 22:42:26 -0500
ALTER TABLE (and ALTER VIEW, ALTER SEQUENCE, etc.) now use a
RangeVarGetRelid callback to check permissions before acquiring a table
lock. We also now use the same callback for all forms of ALTER TABLE,
rather than having separate, almost-identical callbacks for ALTER TABLE
.. SET SCHEMA and ALTER TABLE .. RENAME, and no callback at all for
everything else.
I went ahead and changed the code so that no form of ALTER TABLE works
on foreign tables; you must use ALTER FOREIGN TABLE instead. In 9.1,
it was possible to use ALTER TABLE .. SET SCHEMA or ALTER TABLE ..
RENAME on a foreign table, but not any other form of ALTER TABLE, which
did not seem terribly useful or consistent.
Patch by me; review by Noah Misch.
M src/backend/commands/alter.c
M src/backend/commands/tablecmds.c
M src/backend/tcop/utility.c
M src/include/commands/tablecmds.h
Make the number of CLOG buffers adaptive, based on shared_buffers.
commit : 33aaa139e6302e81b4fbf2570be20188bb974c4f
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 14:30:23 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 14:30:23 -0500
Previously, this was hardcoded: we always had 8. Performance testing
shows that isn't enough, especially on big SMP systems, so we allow it
to scale up as high as 32 when there's adequate memory. On the flip
side, when shared_buffers is very small, drop the number of CLOG buffers
down to as little as 4, so that we can start the postmaster even
when very little shared memory is available.
Per extensive discussion with Simon Riggs, Tom Lane, and others on
pgsql-hackers.
M src/backend/access/transam/clog.c
M src/backend/storage/lmgr/lwlock.c
M src/include/access/clog.h
Fix typo, pg_types_date.h => pgtypes_date.h.
commit : 7a72efda72a85eef1513f2a02449e24dc4bdfc74
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Jan 2012 13:31:37 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Jan 2012 13:31:37 -0500
Spotted by Koizumi Satoru.
M doc/src/sgml/ecpg.sgml
Fix pg_restore's direct-to-database mode for INSERT-style table data.
commit : f3316a05b5ddee619ba0617716a4fef3ceb29ded
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Jan 2012 13:04:09 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 6 Jan 2012 13:04:09 -0500
In commit 6545a901aaf84cb05212bb6a7674059908f527c3, I removed the mini SQL
lexer that was in pg_backup_db.c, thinking that it had no real purpose
beyond separating COPY data from SQL commands, which purpose had been
obsoleted by long-ago fixes in pg_dump's archive file format.
Unfortunately this was in error: that code was also used to identify
command boundaries in INSERT-style table data, which is run together as a
single string in the archive file for better compressibility. As a result,
direct-to-database restores from archive files made with --inserts or
--column-inserts fail in our latest releases, as reported by Dick Visser.
To fix, restore the mini SQL lexer, but simplify it by adjusting the
calling logic so that it's only required to cope with INSERT-style table
data, not arbitrary SQL commands. This allows us to not have to deal with
SQL comments, E'' strings, or dollar-quoted strings, none of which have
ever been emitted by dumpTableData_insert.
Also, fix the lexer to cope with standard-conforming strings, which was the
actual bug that the previous patch was meant to solve.
Back-patch to all supported branches. The previous patch went back to 8.2,
which unfortunately means that the EOL release of 8.2 contains this bug,
but I don't think we're doing another 8.2 release just because of that.
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_db.c
M src/bin/pg_dump/pg_dump.c
Fix variable confusion in BufferSync().
commit : 7e4911b2ae33acff7b85234b91372133ec6df9d4
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 08:32:32 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 6 Jan 2012 08:32:32 -0500
As noted by Heikki Linnakangas, the previous coding confused the "flags"
variable with the "mask" variable. The affect of this appears to be that
unlogged buffers would get written out at every checkpoint rather than
only at shutdown time. Although that's arguably an acceptable failure
mode, I'm back-patching this change, since it seems like a poor idea to
rely on this happening to work.
M src/backend/storage/buffer/bufmgr.c
Fix breakage from earlier plperl fix.
commit : bd0e74a9ce98c65c94565fb603dcc7b710cd4227
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 5 Jan 2012 17:59:19 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 5 Jan 2012 17:59:19 -0500
Apparently the perl garbage collector was a bit too eager, so here
we control when the new SV is garbage collected.
M src/pl/plperl/plperl_helpers.h
pg_dump: Dump foreign options in prettier format
commit : 7e53515480853604aac825bd3e53e7f9716632b4
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 21:13:14 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 21:13:14 +0200
Dump them using line breaks and indentation instead of everything on
one line.
M src/bin/pg_dump/pg_dump.c
pg_dump: Dump operators with the same name ordered by arity
commit : 15df037845d9d3d99e9e2b4370256b136b00c66a
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 20:34:07 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 20:34:07 +0200
pg_dump sorts operators by name, but operators with the same name come
out in random order. Now operators with the same name are dumped in
the order prefix, postfix, infix. (This is consistent with functions,
which are dumped in increasing number of argument order.)
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
Improve ALTER DOMAIN / DROP CONSTRAINT with nonexistent constraint
commit : 104e7dac28c56dcaf9b778dff60a5daefc3a0661
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 19:48:55 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 5 Jan 2012 19:48:55 +0200
ALTER DOMAIN / DROP CONSTRAINT on a nonexistent constraint name did
not report any error. Now it reports an error. The IF EXISTS option
was added to get the usual behavior of ignoring nonexistent objects to
drop.
M doc/src/sgml/ref/alter_domain.sgml
M src/backend/commands/typecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/tcop/utility.c
M src/include/commands/typecmds.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/domain.out
M src/test/regress/sql/domain.sql
Work around perl bug in SvPVutf8().
commit : 2abefd9a92f3c02ad4f6030ac1578bbf314db368
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 5 Jan 2012 12:01:18 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 5 Jan 2012 12:01:18 -0500
Certain things like typeglobs or readonly things like $^V cause
perl's SvPVutf8() to die nastily and crash the backend. To avoid
that bug we make a copy of the object, which will subsequently be
garbage collected.
Back patched to 9.1 where we first started using SvPVutf8().
Per -hackers discussion. Original problem reported by David Wheeler.
M src/pl/plperl/plperl_helpers.h
Ecpglib stores variables that are used in DECLARE statements in a global list. This list is now freed when the last connection has been closed.
commit : 8cf82ac53e9a3d5dd86f16106e3398063a526817
author : Michael Meskes <meskes@postgresql.org>
date : Thu, 5 Jan 2012 14:08:45 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Thu, 5 Jan 2012 14:08:45 +0100
Closes: #6366
M src/interfaces/ecpg/ecpglib/connect.c
M src/interfaces/ecpg/ecpglib/extern.h
M src/interfaces/ecpg/ecpglib/misc.c
Make executor's SELECT INTO code save and restore original tuple receiver.
commit : dfd26f9c5f371437f243249025863ea9911aacaa
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Jan 2012 18:30:55 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 4 Jan 2012 18:30:55 -0500
As previously coded, the QueryDesc's dest pointer was left dangling
(pointing at an already-freed receiver object) after ExecutorEnd. It's a
bit astonishing that it took us this long to notice, and I'm not sure that
the known problem case with SQL functions is the only one. Fix it by
saving and restoring the original receiver pointer, which seems the most
bulletproof way of ensuring any related bugs are also covered.
Per bug #6379 from Paul Ramsey. Back-patch to 8.4 where the current
handling of SELECT INTO was introduced.
M src/backend/executor/execMain.c
M src/test/regress/expected/select_into.out
M src/test/regress/sql/select_into.sql
Made code in ecpg better readable.
commit : 10ecc0d5867b8dd39cf506b8bb02053ede05fb60
author : Michael Meskes <meskes@postgresql.org>
date : Wed, 4 Jan 2012 10:01:14 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Wed, 4 Jan 2012 10:01:14 +0100
M src/interfaces/ecpg/preproc/ecpg.header
M src/interfaces/ecpg/test/expected/preproc-outofscope.c
Suggest use of psql when pg_restore gets a text dump.
commit : 54a622cadf1fb6d2047bf99fbee73b6418d2a23f
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 3 Jan 2012 16:02:49 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 3 Jan 2012 16:02:49 -0500
M src/bin/pg_dump/pg_backup_archiver.c
Use a non-locking initial test in TAS_SPIN on PPC.
commit : bc2a050d40976441cdb963ad829316c23e8df0aa
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 3 Jan 2012 16:00:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 3 Jan 2012 16:00:06 -0500
Further testing convinces me that this is helpful at sufficiently high
contention levels, though it's still worrisome that it loses slightly
at lower contention levels.
Per Manabu Ori.
M src/include/storage/s_lock.h
Support for building with MS Visual Studio 2010.
commit : 63876d3bac5a7471a7987da25a93c13a2534a644
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 3 Jan 2012 08:44:26 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 3 Jan 2012 08:44:26 -0500
Brar Piening, reviewed by Craig Ringer.
M doc/src/sgml/install-windows.sgml
M src/include/port/win32.h
M src/tools/msvc/Install.pm
A src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
M src/tools/msvc/README
M src/tools/msvc/Solution.pm
A src/tools/msvc/VCBuildProject.pm
A src/tools/msvc/VSObjectFactory.pm
M src/tools/msvc/build.pl
M src/tools/msvc/builddoc.pl
M src/tools/msvc/clean.bat
Another fix for pg_regress: Replace exit_nicely() with exit() plus atexit() hook
commit : f132824c24c46d2efab49b4cddd1088781bf499e
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jan 2012 23:29:16 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jan 2012 23:29:16 +0200
M src/test/isolation/isolation_main.c
pg_regress: Replace exit_nicely() with exit() plus atexit() hook
commit : bd09111f1f52e3739a24b88a4671f7a4b0ed4c1d
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jan 2012 22:08:04 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 2 Jan 2012 22:08:04 +0200
M src/interfaces/ecpg/test/pg_regress_ecpg.c
M src/test/regress/pg_regress.c
M src/test/regress/pg_regress.h
M src/test/regress/pg_regress_main.c
Fix coerce_to_target_type for coerce_type's klugy handling of COLLATE.
commit : ac7a5a3f25708c03242edc301ad008236fc36c7e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jan 2012 14:43:45 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jan 2012 14:43:45 -0500
Because coerce_type recurses into the argument of a CollateExpr,
coerce_to_target_type's longstanding code for detecting whether coerce_type
had actually done anything (to wit, returned a different node than it
passed in) was broken in 9.1. This resulted in unexpected failures in
hide_coercion_node; which was not the latter's fault, since it's critical
that we never call it on anything that wasn't inserted by coerce_type.
(Else we might decide to "hide" a user-written function call.)
Fix by removing and replacing the CollateExpr in coerce_to_target_type
itself. This is all pretty ugly but I don't immediately see a way to make
it nicer.
Per report from Jean-Yves F. Barbier.
M src/backend/parser/parse_coerce.c
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.sql
Add comment about skipping binary files for copyright changes.
commit : a8ab8d0eaa96dbaebb646971f8988a3edc28e52c
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 2 Jan 2012 08:48:59 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 2 Jan 2012 08:48:59 -0500
M src/tools/copyright.pl
Use LWSYNC in place of SYNC/ISYNC in PPC spinlocks, where possible.
commit : 631beeac3598a73dee2c2afa38fa2e734148031b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jan 2012 00:01:33 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 2 Jan 2012 00:01:33 -0500
This is allegedly a win, at least on some PPC implementations, according
to the PPC ISA documents. However, as with LWARX hints, some PPC
platforms give an illegal-instruction failure. Use the same trick as
before of assuming that PPC64 platforms will accept it; we might need to
refine that based on experience, but there are other projects doing
likewise according to google.
I did not add an assembler compatibility test because LWSYNC has been
around much longer than hint bits, and it seems unlikely that any
toolchains currently in use don't recognize it.
M src/include/pg_config_manual.h
M src/include/storage/s_lock.h
Use 4-byte slock_t on both PPC and PPC64.
commit : 8496c6cd77e2f5f105fc47315680174157d66647
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jan 2012 22:44:01 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jan 2012 22:44:01 -0500
Previously we defined slock_t as 8 bytes on PPC64, but the TAS assembly
code uses word-wide operations regardless, so that the second word was
just wasted space. There doesn't appear to be any performance benefit
in adding the second word, so get rid of it to simplify the code.
M src/include/storage/s_lock.h
Use mutex hint bit in PPC LWARX instructions, where possible.
commit : 5cfa8dd3007d7e953c6a03b0fa2215d97c581b0c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jan 2012 22:39:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 1 Jan 2012 22:39:59 -0500
The hint bit makes for a small but measurable performance improvement
in access to contended spinlocks.
On the other hand, some PPC chips give an illegal-instruction failure.
There doesn't seem to be a completely bulletproof way to tell whether the
hint bit will cause an illegal-instruction failure other than by trying
it; but most if not all 64-bit PPC machines should accept it, so follow
the Linux kernel's lead and assume it's okay to use it in 64-bit builds.
Of course we must also check whether the assembler accepts the command,
since even with a recent CPU the toolchain could be old.
Patch by Manabu Ori, significantly modified by me.
M configure
M configure.in
M src/include/pg_config.h.in
M src/include/pg_config_manual.h
M src/include/storage/s_lock.h
Update copyright git skip comment.
commit : 6b6137e4efebcd767a349099b3e048fbc7755cca
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 22:27:27 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 22:27:27 -0500
M src/tools/copyright.pl
Skip any .git directory for copyright changes, not just top-level .git directories. Per suggestion from Andrew Dunstan.
commit : bed762c81e6a7f62695d6c8acb78f15c8e85342e
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:47:24 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:47:24 -0500
M src/tools/copyright.pl
Revert binary change in copyright year adjustment.
commit : b5eb06a22a5a811cbdd065ac52580bbcc59469a0
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:42:07 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:42:07 -0500
M src/bin/pgevent/MSG00001.bin
Revert binary change in copyright year adjustment.
commit : 1358801b7a7afed840b780d7c52e20921a483ed1
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:40:13 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:40:13 -0500
M src/port/win32.ico
Skip 'ico' and 'bin' extensions in copyright changes.
commit : f4cd747a4d760600ec9791a95957e993c320ba63
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:36:10 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 19:36:10 -0500
M src/tools/copyright.pl
Update copyright notices for year 2012.
commit : e126958c2efdfc2d60b978d1fc7a780ff647e8ad
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 18:01:58 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 18:01:58 -0500
M COPYRIGHT
M configure
M configure.in
M contrib/adminpack/adminpack.c
M contrib/auto_explain/auto_explain.c
M contrib/dblink/dblink.c
M contrib/dblink/dblink.h
M contrib/dict_int/dict_int.c
M contrib/dict_xsyn/dict_xsyn.c
M contrib/dummy_seclabel/dummy_seclabel.c
M contrib/file_fdw/file_fdw.c
M contrib/fuzzystrmatch/fuzzystrmatch.c
M contrib/fuzzystrmatch/levenshtein.c
M contrib/isn/isn.c
M contrib/isn/isn.h
M contrib/pageinspect/fsmfuncs.c
M contrib/pageinspect/heapfuncs.c
M contrib/pageinspect/rawpage.c
M contrib/passwordcheck/passwordcheck.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.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/page.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/test.sh
M contrib/pg_upgrade/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pg_upgrade_support/pg_upgrade_support.c
M contrib/pgbench/pgbench.c
M contrib/sepgsql/database.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/launcher
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/uavc.c
M contrib/tablefunc/tablefunc.c
M contrib/tablefunc/tablefunc.h
M contrib/test_parser/test_parser.c
M contrib/tsearch2/tsearch2.c
M contrib/unaccent/unaccent.c
M contrib/uuid-ossp/uuid-ossp.c
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/generate-errcodes-table.pl
M doc/src/sgml/legal.sgml
M src/backend/Makefile
M src/backend/access/common/heaptuple.c
M src/backend/access/common/indextuple.c
M src/backend/access/common/printtup.c
M src/backend/access/common/reloptions.c
M src/backend/access/common/scankey.c
M src/backend/access/common/tupconvert.c
M src/backend/access/common/tupdesc.c
M src/backend/access/gin/ginarrayproc.c
M src/backend/access/gin/ginbtree.c
M src/backend/access/gin/ginbulk.c
M src/backend/access/gin/gindatapage.c
M src/backend/access/gin/ginentrypage.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/gininsert.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gin/ginvacuum.c
M src/backend/access/gin/ginxlog.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/gistget.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/gist/gistutil.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hash.c
M src/backend/access/hash/hashfunc.c
M src/backend/access/hash/hashinsert.c
M src/backend/access/hash/hashovfl.c
M src/backend/access/hash/hashpage.c
M src/backend/access/hash/hashscan.c
M src/backend/access/hash/hashsearch.c
M src/backend/access/hash/hashsort.c
M src/backend/access/hash/hashutil.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/heap/syncscan.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/nbtinsert.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/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/nbtree/nbtxlog.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/multixact.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/subtrans.c
M src/backend/access/transam/transam.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/twophase_rmgr.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/xlogfuncs.c
M src/backend/access/transam/xlogutils.c
M src/backend/bootstrap/bootparse.y
M src/backend/bootstrap/bootscanner.l
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/Catalog.pm
M src/backend/catalog/aclchk.c
M src/backend/catalog/catalog.c
M src/backend/catalog/dependency.c
M src/backend/catalog/genbki.pl
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/indexing.c
M src/backend/catalog/information_schema.sql
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_db_role_setting.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_inherits.c
M src/backend/catalog/pg_largeobject.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_range.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/pg_type.c
M src/backend/catalog/storage.c
M src/backend/catalog/system_views.sql
M src/backend/catalog/toasting.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/analyze.c
M src/backend/commands/async.c
M src/backend/commands/cluster.c
M src/backend/commands/collationcmds.c
M src/backend/commands/comment.c
M src/backend/commands/constraint.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/copy.c
M src/backend/commands/dbcommands.c
M src/backend/commands/define.c
M src/backend/commands/discard.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/operatorcmds.c
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/proclang.c
M src/backend/commands/schemacmds.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/tsearchcmds.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/variable.c
M src/backend/commands/view.c
M src/backend/executor/execAmi.c
M src/backend/executor/execCurrent.c
M src/backend/executor/execGrouping.c
M src/backend/executor/execJunk.c
M src/backend/executor/execMain.c
M src/backend/executor/execProcnode.c
M src/backend/executor/execQual.c
M src/backend/executor/execScan.c
M src/backend/executor/execTuples.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/instrument.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeAppend.c
M src/backend/executor/nodeBitmapAnd.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeBitmapOr.c
M src/backend/executor/nodeCtescan.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeFunctionscan.c
M src/backend/executor/nodeGroup.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeIndexonlyscan.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeLimit.c
M src/backend/executor/nodeLockRows.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/nodeNestloop.c
M src/backend/executor/nodeRecursiveunion.c
M src/backend/executor/nodeResult.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/nodeSort.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeSubqueryscan.c
M src/backend/executor/nodeTidscan.c
M src/backend/executor/nodeUnique.c
M src/backend/executor/nodeValuesscan.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/executor/nodeWorktablescan.c
M src/backend/executor/spi.c
M src/backend/executor/tstoreReceiver.c
M src/backend/foreign/foreign.c
M src/backend/lib/dllist.c
M src/backend/lib/stringinfo.c
M src/backend/libpq/auth.c
M src/backend/libpq/be-fsstubs.c
M src/backend/libpq/be-secure.c
M src/backend/libpq/crypt.c
M src/backend/libpq/hba.c
M src/backend/libpq/ip.c
M src/backend/libpq/md5.c
M src/backend/libpq/pqcomm.c
M src/backend/libpq/pqformat.c
M src/backend/libpq/pqsignal.c
M src/backend/main/main.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/makefuncs.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/nodes.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/params.c
M src/backend/nodes/print.c
M src/backend/nodes/read.c
M src/backend/nodes/readfuncs.c
M src/backend/nodes/tidbitmap.c
M src/backend/nodes/value.c
M src/backend/optimizer/geqo/geqo_copy.c
M src/backend/optimizer/geqo/geqo_eval.c
M src/backend/optimizer/geqo/geqo_main.c
M src/backend/optimizer/geqo/geqo_misc.c
M src/backend/optimizer/geqo/geqo_pool.c
M src/backend/optimizer/geqo/geqo_random.c
M src/backend/optimizer/geqo/geqo_selection.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/clausesel.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/path/tidpath.c
M src/backend/optimizer/plan/analyzejoins.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/prepqual.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/joininfo.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/restrictinfo.c
M src/backend/optimizer/util/tlist.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/parser/keywords.c
M src/backend/parser/kwlookup.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_collate.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_param.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/parser/parser.c
M src/backend/parser/scan.l
M src/backend/parser/scansup.c
M src/backend/port/dynloader/aix.h
M src/backend/port/dynloader/bsdi.c
M src/backend/port/dynloader/bsdi.h
M src/backend/port/dynloader/cygwin.h
M src/backend/port/dynloader/dgux.h
M src/backend/port/dynloader/freebsd.c
M src/backend/port/dynloader/freebsd.h
M src/backend/port/dynloader/hpux.c
M src/backend/port/dynloader/hpux.h
M src/backend/port/dynloader/irix.h
M src/backend/port/dynloader/linux.c
M src/backend/port/dynloader/linux.h
M src/backend/port/dynloader/netbsd.c
M src/backend/port/dynloader/netbsd.h
M src/backend/port/dynloader/openbsd.c
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/sunos4.h
M src/backend/port/dynloader/svr4.h
M src/backend/port/dynloader/ultrix4.c
M src/backend/port/dynloader/ultrix4.h
M src/backend/port/dynloader/univel.h
M src/backend/port/dynloader/unixware.h
M src/backend/port/ipc_test.c
M src/backend/port/pipe.c
M src/backend/port/posix_sema.c
M src/backend/port/sysv_sema.c
M src/backend/port/sysv_shmem.c
M src/backend/port/tas/sunstudio_sparc.s
M src/backend/port/tas/sunstudio_x86.s
M src/backend/port/unix_latch.c
M src/backend/port/win32/crashdump.c
M src/backend/port/win32/mingwcompat.c
M src/backend/port/win32/security.c
M src/backend/port/win32/signal.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/port/win32_shmem.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/fork_process.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/startup.c
M src/backend/postmaster/syslogger.c
M src/backend/postmaster/walwriter.c
M src/backend/regex/regc_pg_locale.c
M src/backend/replication/basebackup.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/repl_gram.y
M src/backend/replication/repl_scanner.l
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/rewriteHandler.c
M src/backend/rewrite/rewriteManip.c
M src/backend/rewrite/rewriteRemove.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/snowball/dict_snowball.c
M src/backend/storage/buffer/buf_init.c
M src/backend/storage/buffer/buf_table.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/freelist.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/file/buffile.c
M src/backend/storage/file/copydir.c
M src/backend/storage/file/fd.c
M src/backend/storage/file/reinit.c
M src/backend/storage/freespace/freespace.c
M src/backend/storage/freespace/fsmpage.c
M src/backend/storage/freespace/indexfsm.c
M src/backend/storage/ipc/ipc.c
M src/backend/storage/ipc/ipci.c
M src/backend/storage/ipc/pmsignal.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/ipc/shmem.c
M src/backend/storage/ipc/shmqueue.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/large_object/inv_api.c
M src/backend/storage/lmgr/deadlock.c
M src/backend/storage/lmgr/lmgr.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/lmgr/spin.c
M src/backend/storage/page/bufpage.c
M src/backend/storage/page/itemptr.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/backend/storage/smgr/smgrtype.c
M src/backend/tcop/dest.c
M src/backend/tcop/fastpath.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/backend/tsearch/Makefile
M src/backend/tsearch/dict.c
M src/backend/tsearch/dict_ispell.c
M src/backend/tsearch/dict_simple.c
M src/backend/tsearch/dict_synonym.c
M src/backend/tsearch/dict_thesaurus.c
M src/backend/tsearch/regis.c
M src/backend/tsearch/spell.c
M src/backend/tsearch/to_tsany.c
M src/backend/tsearch/ts_locale.c
M src/backend/tsearch/ts_parse.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/tsearch/ts_typanalyze.c
M src/backend/tsearch/ts_utils.c
M src/backend/tsearch/wparser.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/Gen_dummy_probes.sed
M src/backend/utils/Gen_fmgrtab.pl
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/array_userfuncs.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/arrayutils.c
M src/backend/utils/adt/ascii.c
M src/backend/utils/adt/bool.c
M src/backend/utils/adt/char.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/datum.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/domains.c
M src/backend/utils/adt/encode.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/format_type.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/geo_ops.c
M src/backend/utils/adt/geo_selfuncs.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c
M src/backend/utils/adt/like.c
M src/backend/utils/adt/like_match.c
M src/backend/utils/adt/lockfuncs.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/nabstime.c
M src/backend/utils/adt/name.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/numutils.c
M src/backend/utils/adt/oid.c
M src/backend/utils/adt/oracle_compat.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pg_lzcompress.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/pseudotypes.c
M src/backend/utils/adt/quote.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/rowtypes.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/tid.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/trigfuncs.c
M src/backend/utils/adt/tsginidx.c
M src/backend/utils/adt/tsgistidx.c
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsquery_cleanup.c
M src/backend/utils/adt/tsquery_gist.c
M src/backend/utils/adt/tsquery_op.c
M src/backend/utils/adt/tsquery_rewrite.c
M src/backend/utils/adt/tsquery_util.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/tsvector.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/tsvector_parser.c
M src/backend/utils/adt/txid.c
M src/backend/utils/adt/uuid.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/version.c
M src/backend/utils/adt/windowfuncs.c
M src/backend/utils/adt/xid.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/attoptcache.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/relmapper.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/errcodes.txt
M src/backend/utils/error/assert.c
M src/backend/utils/error/elog.c
M src/backend/utils/fmgr/dfmgr.c
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/generate-errcodes.pl
M src/backend/utils/hash/dynahash.c
M src/backend/utils/hash/hashfn.c
M src/backend/utils/hash/pg_crc.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/mb/Unicode/Makefile
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/mb/conv.c
M src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c
M src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c
M src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
M src/backend/utils/mb/conversion_procs/euc_cn_and_mic/euc_cn_and_mic.c
M src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c
M src/backend/utils/mb/conversion_procs/euc_kr_and_mic/euc_kr_and_mic.c
M src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
M src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c
M src/backend/utils/mb/conversion_procs/latin_and_mic/latin_and_mic.c
M src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c
M src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c
M src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c
M src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c
M src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c
M src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
M src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c
M src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c
M src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c
M src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c
M src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c
M src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/help_config.c
M src/backend/utils/misc/pg_rusage.c
M src/backend/utils/misc/ps_status.c
M src/backend/utils/misc/rbtree.c
M src/backend/utils/misc/superuser.c
M src/backend/utils/misc/tzparser.c
M src/backend/utils/mmgr/aset.c
M src/backend/utils/mmgr/mcxt.c
M src/backend/utils/mmgr/portalmem.c
M src/backend/utils/probes.d
M src/backend/utils/resowner/resowner.c
M src/backend/utils/sort/logtape.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/combocid.c
M src/backend/utils/time/snapmgr.c
M src/backend/utils/time/tqual.c
M src/bin/Makefile
M src/bin/initdb/Makefile
M src/bin/initdb/findtimezone.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/.gitignore
M src/bin/pg_basebackup/Makefile
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
M src/bin/pg_config/Makefile
M src/bin/pg_config/pg_config.c
M src/bin/pg_controldata/Makefile
M src/bin/pg_ctl/Makefile
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/compress_io.h
M src/bin/pg_dump/dumpmem.c
M src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/keywords.c
M src/bin/pg_dump/pg_backup_directory.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
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_resetxlog/Makefile
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/pgevent/MSG00001.bin
M src/bin/pgevent/Makefile
M src/bin/psql/Makefile
M src/bin/psql/command.c
M src/bin/psql/command.h
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/psql/copy.c
M src/bin/psql/copy.h
M src/bin/psql/create_help.pl
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
M src/bin/psql/help.h
M src/bin/psql/input.c
M src/bin/psql/input.h
M src/bin/psql/large_obj.c
M src/bin/psql/large_obj.h
M src/bin/psql/mainloop.c
M src/bin/psql/mainloop.h
M src/bin/psql/mbprint.c
M src/bin/psql/print.c
M src/bin/psql/print.h
M src/bin/psql/prompt.c
M src/bin/psql/prompt.h
M src/bin/psql/psqlscan.h
M src/bin/psql/psqlscan.l
M src/bin/psql/settings.h
M src/bin/psql/startup.c
M src/bin/psql/stringutils.c
M src/bin/psql/stringutils.h
M src/bin/psql/tab-complete.c
M src/bin/psql/tab-complete.h
M src/bin/psql/variables.c
M src/bin/psql/variables.h
M src/bin/scripts/Makefile
M src/bin/scripts/clusterdb.c
M src/bin/scripts/common.c
M src/bin/scripts/common.h
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/include/access/attnum.h
M src/include/access/clog.h
M src/include/access/genam.h
M src/include/access/gin.h
M src/include/access/gin_private.h
M src/include/access/gist.h
M src/include/access/gist_private.h
M src/include/access/gistscan.h
M src/include/access/hash.h
M src/include/access/heapam.h
M src/include/access/hio.h
M src/include/access/htup.h
M src/include/access/itup.h
M src/include/access/multixact.h
M src/include/access/nbtree.h
M src/include/access/printtup.h
M src/include/access/reloptions.h
M src/include/access/relscan.h
M src/include/access/rewriteheap.h
M src/include/access/sdir.h
M src/include/access/skey.h
M src/include/access/slru.h
M src/include/access/spgist.h
M src/include/access/spgist_private.h
M src/include/access/subtrans.h
M src/include/access/sysattr.h
M src/include/access/transam.h
M src/include/access/tupconvert.h
M src/include/access/tupdesc.h
M src/include/access/tupmacs.h
M src/include/access/tuptoaster.h
M src/include/access/twophase.h
M src/include/access/twophase_rmgr.h
M src/include/access/valid.h
M src/include/access/visibilitymap.h
M src/include/access/xact.h
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/access/xlogdefs.h
M src/include/access/xlogutils.h
M src/include/bootstrap/bootstrap.h
M src/include/c.h
M src/include/catalog/catalog.h
M src/include/catalog/catversion.h
M src/include/catalog/dependency.h
M src/include/catalog/genbki.h
M src/include/catalog/heap.h
M src/include/catalog/index.h
M src/include/catalog/indexing.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_am.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_attrdef.h
M src/include/catalog/pg_attribute.h
M src/include/catalog/pg_auth_members.h
M src/include/catalog/pg_authid.h
M src/include/catalog/pg_cast.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_collation.h
M src/include/catalog/pg_collation_fn.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_conversion.h
M src/include/catalog/pg_conversion_fn.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_depend.h
M src/include/catalog/pg_description.h
M src/include/catalog/pg_enum.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_inherits.h
M src/include/catalog/pg_inherits_fn.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_opfamily.h
M src/include/catalog/pg_pltemplate.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_proc_fn.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_shdepend.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_config.h
M src/include/catalog/pg_ts_config_map.h
M src/include/catalog/pg_ts_dict.h
M src/include/catalog/pg_ts_parser.h
M src/include/catalog/pg_ts_template.h
M src/include/catalog/pg_type.h
M src/include/catalog/pg_type_fn.h
M src/include/catalog/pg_user_mapping.h
M src/include/catalog/storage.h
M src/include/catalog/toasting.h
M src/include/commands/alter.h
M src/include/commands/async.h
M src/include/commands/cluster.h
M src/include/commands/collationcmds.h
M src/include/commands/comment.h
M src/include/commands/conversioncmds.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/discard.h
M src/include/commands/explain.h
M src/include/commands/extension.h
M src/include/commands/lockcmds.h
M src/include/commands/portalcmds.h
M src/include/commands/prepare.h
M src/include/commands/schemacmds.h
M src/include/commands/seclabel.h
M src/include/commands/sequence.h
M src/include/commands/tablecmds.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/commands/typecmds.h
M src/include/commands/vacuum.h
M src/include/commands/variable.h
M src/include/commands/view.h
M src/include/datatype/timestamp.h
M src/include/executor/execdebug.h
M src/include/executor/execdesc.h
M src/include/executor/executor.h
M src/include/executor/functions.h
M src/include/executor/hashjoin.h
M src/include/executor/instrument.h
M src/include/executor/nodeAgg.h
M src/include/executor/nodeAppend.h
M src/include/executor/nodeBitmapAnd.h
M src/include/executor/nodeBitmapHeapscan.h
M src/include/executor/nodeBitmapIndexscan.h
M src/include/executor/nodeBitmapOr.h
M src/include/executor/nodeCtescan.h
M src/include/executor/nodeForeignscan.h
M src/include/executor/nodeFunctionscan.h
M src/include/executor/nodeGroup.h
M src/include/executor/nodeHash.h
M src/include/executor/nodeHashjoin.h
M src/include/executor/nodeIndexonlyscan.h
M src/include/executor/nodeIndexscan.h
M src/include/executor/nodeLimit.h
M src/include/executor/nodeLockRows.h
M src/include/executor/nodeMaterial.h
M src/include/executor/nodeMergeAppend.h
M src/include/executor/nodeMergejoin.h
M src/include/executor/nodeModifyTable.h
M src/include/executor/nodeNestloop.h
M src/include/executor/nodeRecursiveunion.h
M src/include/executor/nodeResult.h
M src/include/executor/nodeSeqscan.h
M src/include/executor/nodeSetOp.h
M src/include/executor/nodeSort.h
M src/include/executor/nodeSubplan.h
M src/include/executor/nodeSubqueryscan.h
M src/include/executor/nodeTidscan.h
M src/include/executor/nodeUnique.h
M src/include/executor/nodeValuesscan.h
M src/include/executor/nodeWindowAgg.h
M src/include/executor/nodeWorktablescan.h
M src/include/executor/spi.h
M src/include/executor/spi_priv.h
M src/include/executor/tstoreReceiver.h
M src/include/executor/tuptable.h
M src/include/fmgr.h
M src/include/foreign/fdwapi.h
M src/include/foreign/foreign.h
M src/include/funcapi.h
M src/include/getaddrinfo.h
M src/include/getopt_long.h
M src/include/lib/dllist.h
M src/include/lib/stringinfo.h
M src/include/libpq/auth.h
M src/include/libpq/be-fsstubs.h
M src/include/libpq/crypt.h
M src/include/libpq/ip.h
M src/include/libpq/libpq-be.h
M src/include/libpq/libpq-fs.h
M src/include/libpq/libpq.h
M src/include/libpq/md5.h
M src/include/libpq/pqcomm.h
M src/include/libpq/pqformat.h
M src/include/libpq/pqsignal.h
M src/include/mb/pg_wchar.h
M src/include/miscadmin.h
M src/include/nodes/bitmapset.h
M src/include/nodes/execnodes.h
M src/include/nodes/makefuncs.h
M src/include/nodes/memnodes.h
M src/include/nodes/nodeFuncs.h
M src/include/nodes/nodes.h
M src/include/nodes/params.h
M src/include/nodes/parsenodes.h
M src/include/nodes/pg_list.h
M src/include/nodes/plannodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/print.h
M src/include/nodes/readfuncs.h
M src/include/nodes/relation.h
M src/include/nodes/replnodes.h
M src/include/nodes/tidbitmap.h
M src/include/nodes/value.h
M src/include/optimizer/clauses.h
M src/include/optimizer/cost.h
M src/include/optimizer/geqo.h
M src/include/optimizer/geqo_copy.h
M src/include/optimizer/geqo_gene.h
M src/include/optimizer/geqo_misc.h
M src/include/optimizer/geqo_mutation.h
M src/include/optimizer/geqo_pool.h
M src/include/optimizer/geqo_random.h
M src/include/optimizer/geqo_recombination.h
M src/include/optimizer/geqo_selection.h
M src/include/optimizer/joininfo.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/paths.h
M src/include/optimizer/placeholder.h
M src/include/optimizer/plancat.h
M src/include/optimizer/planmain.h
M src/include/optimizer/planner.h
M src/include/optimizer/predtest.h
M src/include/optimizer/prep.h
M src/include/optimizer/restrictinfo.h
M src/include/optimizer/subselect.h
M src/include/optimizer/tlist.h
M src/include/optimizer/var.h
M src/include/parser/analyze.h
M src/include/parser/gramparse.h
M src/include/parser/keywords.h
M src/include/parser/kwlist.h
M src/include/parser/parse_agg.h
M src/include/parser/parse_clause.h
M src/include/parser/parse_coerce.h
M src/include/parser/parse_collate.h
M src/include/parser/parse_cte.h
M src/include/parser/parse_expr.h
M src/include/parser/parse_func.h
M src/include/parser/parse_node.h
M src/include/parser/parse_oper.h
M src/include/parser/parse_param.h
M src/include/parser/parse_relation.h
M src/include/parser/parse_target.h
M src/include/parser/parse_type.h
M src/include/parser/parse_utilcmd.h
M src/include/parser/parser.h
M src/include/parser/parsetree.h
M src/include/parser/scanner.h
M src/include/parser/scansup.h
M src/include/pg_trace.h
M src/include/pgstat.h
M src/include/pgtime.h
M src/include/port.h
M src/include/portability/instr_time.h
M src/include/postgres.h
M src/include/postgres_fe.h
M src/include/postmaster/autovacuum.h
M src/include/postmaster/bgwriter.h
M src/include/postmaster/fork_process.h
M src/include/postmaster/pgarch.h
M src/include/postmaster/postmaster.h
M src/include/postmaster/startup.h
M src/include/postmaster/syslogger.h
M src/include/postmaster/walwriter.h
M src/include/replication/basebackup.h
M src/include/replication/syncrep.h
M src/include/replication/walprotocol.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/replication/walsender_private.h
M src/include/rewrite/prs2lock.h
M src/include/rewrite/rewriteDefine.h
M src/include/rewrite/rewriteHandler.h
M src/include/rewrite/rewriteManip.h
M src/include/rewrite/rewriteRemove.h
M src/include/rewrite/rewriteSupport.h
M src/include/rusagestub.h
M src/include/snowball/header.h
M src/include/storage/backendid.h
M src/include/storage/barrier.h
M src/include/storage/block.h
M src/include/storage/buf.h
M src/include/storage/buf_internals.h
M src/include/storage/buffile.h
M src/include/storage/bufmgr.h
M src/include/storage/bufpage.h
M src/include/storage/copydir.h
M src/include/storage/fd.h
M src/include/storage/freespace.h
M src/include/storage/fsm_internals.h
M src/include/storage/indexfsm.h
M src/include/storage/ipc.h
M src/include/storage/item.h
M src/include/storage/itemid.h
M src/include/storage/itemptr.h
M src/include/storage/large_object.h
M src/include/storage/latch.h
M src/include/storage/lmgr.h
M src/include/storage/lock.h
M src/include/storage/lwlock.h
M src/include/storage/off.h
M src/include/storage/pg_sema.h
M src/include/storage/pg_shmem.h
M src/include/storage/pmsignal.h
M src/include/storage/pos.h
M src/include/storage/predicate.h
M src/include/storage/predicate_internals.h
M src/include/storage/proc.h
M src/include/storage/procarray.h
M src/include/storage/procsignal.h
M src/include/storage/reinit.h
M src/include/storage/relfilenode.h
M src/include/storage/s_lock.h
M src/include/storage/shmem.h
M src/include/storage/sinval.h
M src/include/storage/sinvaladt.h
M src/include/storage/smgr.h
M src/include/storage/spin.h
M src/include/storage/standby.h
M src/include/tcop/dest.h
M src/include/tcop/fastpath.h
M src/include/tcop/pquery.h
M src/include/tcop/tcopdebug.h
M src/include/tcop/tcopprot.h
M src/include/tcop/utility.h
M src/include/tsearch/dicts/regis.h
M src/include/tsearch/dicts/spell.h
M src/include/tsearch/ts_cache.h
M src/include/tsearch/ts_locale.h
M src/include/tsearch/ts_public.h
M src/include/tsearch/ts_type.h
M src/include/tsearch/ts_utils.h
M src/include/utils/acl.h
M src/include/utils/array.h
M src/include/utils/ascii.h
M src/include/utils/attoptcache.h
M src/include/utils/builtins.h
M src/include/utils/bytea.h
M src/include/utils/catcache.h
M src/include/utils/combocid.h
M src/include/utils/date.h
M src/include/utils/datetime.h
M src/include/utils/datum.h
M src/include/utils/dynahash.h
M src/include/utils/dynamic_loader.h
M src/include/utils/elog.h
M src/include/utils/fmgrtab.h
M src/include/utils/formatting.h
M src/include/utils/geo_decls.h
M src/include/utils/guc.h
M src/include/utils/guc_tables.h
M src/include/utils/help_config.h
M src/include/utils/hsearch.h
M src/include/utils/inet.h
M src/include/utils/int8.h
M src/include/utils/inval.h
M src/include/utils/logtape.h
M src/include/utils/lsyscache.h
M src/include/utils/memutils.h
M src/include/utils/nabstime.h
M src/include/utils/numeric.h
M src/include/utils/palloc.h
M src/include/utils/pg_crc.h
M src/include/utils/pg_locale.h
M src/include/utils/pg_rusage.h
M src/include/utils/plancache.h
M src/include/utils/portal.h
M src/include/utils/rangetypes.h
M src/include/utils/rbtree.h
M src/include/utils/rel.h
M src/include/utils/relcache.h
M src/include/utils/relmapper.h
M src/include/utils/reltrigger.h
M src/include/utils/resowner.h
M src/include/utils/selfuncs.h
M src/include/utils/snapmgr.h
M src/include/utils/snapshot.h
M src/include/utils/sortsupport.h
M src/include/utils/spccache.h
M src/include/utils/syscache.h
M src/include/utils/timestamp.h
M src/include/utils/tqual.h
M src/include/utils/tuplesort.h
M src/include/utils/tuplestore.h
M src/include/utils/typcache.h
M src/include/utils/tzparser.h
M src/include/utils/uuid.h
M src/include/utils/varbit.h
M src/include/utils/xml.h
M src/include/windowapi.h
M src/interfaces/ecpg/compatlib/Makefile
M src/interfaces/ecpg/ecpglib/Makefile
M src/interfaces/ecpg/ecpglib/pg_type.h
M src/interfaces/ecpg/pgtypeslib/Makefile
M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/ecpg/preproc/check_rules.pl
M src/interfaces/ecpg/preproc/ecpg.c
M src/interfaces/ecpg/preproc/keywords.c
M src/interfaces/ecpg/preproc/parse.pl
M src/interfaces/ecpg/preproc/parser.c
M src/interfaces/ecpg/preproc/pgc.l
M src/interfaces/ecpg/test/pg_regress_ecpg.c
M src/interfaces/libpq/Makefile
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-auth.h
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-misc.c
M src/interfaces/libpq/fe-print.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-events.c
M src/interfaces/libpq/libpq-events.h
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/interfaces/libpq/libpq.rc.in
M src/interfaces/libpq/pqexpbuffer.c
M src/interfaces/libpq/pqexpbuffer.h
M src/interfaces/libpq/pqsignal.c
M src/interfaces/libpq/pqsignal.h
M src/interfaces/libpq/pthread-win32.c
M src/interfaces/libpq/win32.c
M src/pl/plperl/plperl.h
M src/pl/plpgsql/src/generate-plerrcodes.pl
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/pl/plpython/generate-spiexceptions.pl
M src/pl/plpython/plpython.h
M src/port/chklocale.c
M src/port/dirent.c
M src/port/dirmod.c
M src/port/exec.c
M src/port/fseeko.c
M src/port/getaddrinfo.c
M src/port/gethostname.c
M src/port/getpeereid.c
M src/port/getrusage.c
M src/port/isinf.c
M src/port/kill.c
M src/port/memcmp.c
M src/port/noblock.c
M src/port/open.c
M src/port/path.c
M src/port/pgcheckdir.c
M src/port/pgsleep.c
M src/port/pgstrcasecmp.c
M src/port/random.c
M src/port/sprompt.c
M src/port/srandom.c
M src/port/strdup.c
M src/port/strlcpy.c
M src/port/strtol.c
M src/port/thread.c
M src/port/unsetenv.c
M src/port/win32.ico
M src/port/win32env.c
M src/port/win32error.c
M src/port/win32setlocale.c
M src/port/win32ver.rc
M src/test/examples/testlo.c
M src/test/isolation/isolation_main.c
M src/test/isolation/isolationtester.h
M src/test/isolation/specparse.y
M src/test/isolation/specscanner.l
M src/test/regress/GNUmakefile
M src/test/regress/pg_regress.c
M src/test/regress/pg_regress.h
M src/test/regress/pg_regress_main.c
M src/test/thread/Makefile
M src/test/thread/thread_test.c
M src/timezone/pgtz.c
M src/timezone/pgtz.h
M src/tools/check_bison_recursion.pl
M src/tools/findoidjoins/Makefile
M src/tools/findoidjoins/findoidjoins.c
M src/tools/ifaddrs/Makefile
M src/tools/version_stamp.pl
M src/tools/win32tzlist.pl
M src/tutorial/complex.source
M src/tutorial/syscat.source
Don't use tabs in Perl scripts, for consistency.
commit : 6ba139dc5a8a5cce42f0508c14a8b42f4fb6b1cc
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 17:59:44 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 17:59:44 -0500
M src/tools/copyright.pl
Fix Perl copyright script to skip .git subdirectory; running it on those files corrupts the index.
commit : 9f60880207c6c7d00a2e4e4d904ef720de58f45b
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 17:56:51 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 1 Jan 2012 17:56:51 -0500
M src/tools/copyright.pl
Send new protocol keepalive messages to standby servers. Allows streaming replication users to calculate transfer latency and apply delay via internal functions. No external functions yet.
commit : 64233902d22ba42846397cb7551894217522fad4
author : Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 31 Dec 2011 13:30:26 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Sat, 31 Dec 2011 13:30:26 +0000
M doc/src/sgml/protocol.sgml
M src/backend/access/transam/xlog.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
M src/include/replication/walprotocol.h
M src/include/replication/walreceiver.h
Revert "Remove troublesome Asserts in cost_mergejoin()."
commit : 2ae2e9c00798685cd75ea0cc5120466bf2027b90
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Dec 2011 17:58:15 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Dec 2011 17:58:15 -0500
This reverts commit ff68b256a533b398e3420750f34d161aeee4e099.
The recent change to use -fexcess-precision=standard should make those
Asserts safe, and does fix a test case that formerly crashed for me,
so I think there's no need to have a cross-version difference in the
code here.
M src/backend/optimizer/path/costsize.c
Modify tools/pgtest to run the 'make' command from a variable, and default to 'make' rather than 'gmake' for the binary name.
commit : dca0a54717a8372cc88b0c187965a1add19ec7e3
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 30 Dec 2011 16:29:25 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 30 Dec 2011 16:29:25 -0500
M src/tools/pgtest
Adjust SP-GiST regression tests to be less locale-sensitive.
commit : 15ba590792045a6bbde538c407a34d83f46b496f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Dec 2011 17:03:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Dec 2011 17:03:59 -0500
The original test cases gave varying results depending on whether the
locale sorts digits before or after letters. Since that's not really
what we wish to test here, adjust the test data to not contain any strings
beginning with digits. Per report from Pavel Stehule.
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
PL/Python: Add argument names to function declarations
commit : f9de1e9a96a8e63bd4d3b9e615abd9cf6d8de703
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Dec 2011 22:55:49 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Dec 2011 22:55:49 +0200
For easier source reading
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_planobject.c
M src/pl/plpython/plpy_planobject.h
M src/pl/plpython/plpy_plpymodule.c
M src/pl/plpython/plpy_procedure.c
M src/pl/plpython/plpy_procedure.h
M src/pl/plpython/plpy_resultobject.c
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.h
pg_dump: Dump user mappings ordered by user name
commit : a671d9409bfeac9ec5a622d74519fd1142a47274
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Dec 2011 21:16:15 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 29 Dec 2011 21:16:15 +0200
This is to get a deterministic dump order independent of the order in
which the user mappings were created.
M src/bin/pg_dump/pg_dump.c
Indicate default format in --help output of pg_dump and pg_basebackup
commit : 66843265eed40d181066f408f0d35e7ac639eb96
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Dec 2011 21:06:12 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 28 Dec 2011 21:06:12 +0200
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_dump/pg_dump.c
Standardize treatment of strcmp() return value
commit : 037a82704ce644e2b1c3946345b54444caddb1a5
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 21:19:09 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 21:19:09 +0200
Always compare the return value to 0, don't use cute tricks like
if (!strcmp(...)).
M contrib/fuzzystrmatch/dmetaphone.c
M contrib/isn/isn.c
M contrib/pgbench/pgbench.c
M contrib/pgcrypto/crypt-md5.c
M contrib/pgcrypto/internal.c
M contrib/pgcrypto/openssl.c
M contrib/pgcrypto/px-crypt.c
M contrib/pgcrypto/px.c
M src/backend/libpq/auth.c
M src/backend/utils/adt/formatting.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/pg_dump.c
M src/bin/psql/tab-complete.c
M src/interfaces/ecpg/ecpglib/data.c
M src/interfaces/ecpg/ecpglib/descriptor.c
M src/interfaces/ecpg/ecpglib/execute.c
M src/interfaces/ecpg/ecpglib/prepare.c
M src/interfaces/ecpg/preproc/descriptor.c
M src/interfaces/ecpg/preproc/ecpg.addons
M src/interfaces/ecpg/preproc/ecpg.header
M src/interfaces/ecpg/preproc/output.c
M src/interfaces/ecpg/preproc/pgc.l
M src/interfaces/ecpg/preproc/type.c
M src/interfaces/ecpg/preproc/variable.c
M src/interfaces/libpq/fe-lobj.c
Remove support for on_exit()
commit : d383c23f6fbc4a79dae66483cf4f7051121008ad
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:57:59 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:57:59 +0200
All supported platforms support the C89 standard function atexit()
(SunOS 4 probably being the last one not to), and supporting both
makes the code clumsy.
M configure
M configure.in
M contrib/pg_upgrade/server.c
M src/backend/storage/ipc/ipc.c
M src/bin/psql/input.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Run "make all" as a prerequisite of "make check"
commit : c317a3ac167d36244e8dd5add679b4e9ff36ea16
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:27:24 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:27:24 +0200
This is the standard behavior but was forgotten in some places.
M contrib/pg_upgrade/Makefile
M src/pl/plperl/GNUmakefile
M src/pl/plpython/Makefile
M src/pl/tcl/Makefile
Sort compendium lists for msgmerge
commit : 54d792f3e5a31d993aeee420e98adab0a0419e43
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:22:51 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:22:51 +0200
That way, the result of a msgmerge is more deterministic and not
dependent on the order in which the files are found.
M src/nls-global.mk
Sort file list when creating gettext-files
commit : 9099d84374eb71860dc881c7a158f8f1262b5734
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:20:56 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 27 Dec 2011 20:20:56 +0200
That way, the created .pot file is more deterministic and not
dependent on the order in which the files are found.
M src/backend/nls.mk
Minor enhancements to MVCC chapter
commit : 7db101c36ef7c998cfcf3f4a324c58c23f88927c
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 26 Dec 2011 19:09:50 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 26 Dec 2011 19:09:50 -0300
Author: Erik Rijkers
M doc/src/sgml/mvcc.sgml
Rethink representation of index clauses' mapping to index columns.
commit : 472d3935a2793343e450ba7cda4adbc323a984c3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Dec 2011 19:03:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Dec 2011 19:03:21 -0500
In commit e2c2c2e8b1df7dfdb01e7e6f6191a569ce3c3195 I made use of nested
list structures to show which clauses went with which index columns, but
on reflection that's a data structure that only an old-line Lisp hacker
could love. Worse, it adds unnecessary complication to the many places
that don't much care which clauses go with which index columns. Revert
to the previous arrangement of flat lists of clauses, and instead add a
parallel integer list of column numbers. The places that care about the
pairing can chase both lists with forboth(), while the places that don't
care just examine one list the same as before.
The only real downside to this is that there are now two more lists that
need to be passed to amcostestimate functions in case they care about
column matching (which btcostestimate does, so not passing the info is not
an option). Rather than deal with 11-argument amcostestimate functions,
pass just the IndexPath and expect the functions to extract fields from it.
That gets us down to 7 arguments which is better than 11, and it seems
more future-proof against likely additions to the information we keep
about an index path.
M doc/src/sgml/indexam.sgml
M src/backend/access/nbtree/nbtutils.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/pathnode.c
M src/backend/utils/adt/selfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.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/pg_config_manual.h
Improve planner's handling of duplicated index column expressions.
commit : e2c2c2e8b1df7dfdb01e7e6f6191a569ce3c3195
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Dec 2011 18:44:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Dec 2011 18:44:21 -0500
It's potentially useful for an index to repeat the same indexable column
or expression in multiple index columns, if the columns have different
opclasses. (If they share opclasses too, the duplicate column is pretty
useless, but nonetheless we've allowed such cases since 9.0.) However,
the planner failed to cope with this, because createplan.c was relying on
simple equal() matching to figure out which index column each index qual
is intended for. We do have that information available upstream in
indxpath.c, though, so the fix is to not flatten the multi-level indexquals
list when putting it into an IndexPath. Then we can rely on the sublist
structure to identify target index columns in createplan.c. There's a
similar issue for index ORDER BYs (the KNNGIST feature), so introduce a
multi-level-list representation for that too. This adds a bit more
representational overhead, but we might more or less buy that back by not
having to search for matching index columns anymore in createplan.c;
likewise btcostestimate saves some cycles.
Per bug #6351 from Christian Rudolph. Likely symptoms include the "btree
index keys must be ordered by attribute" failure shown there, as well as
"operator MMMM is not a member of opfamily NNNN".
Although this is a pre-existing problem that can be demonstrated in 9.0 and
9.1, I'm not going to back-patch it, because the API changes in the planner
seem likely to break things such as index plugins. The corner cases where
this matters seem too narrow to justify possibly breaking things in a minor
release.
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/restrictinfo.c
M src/backend/utils/adt/selfuncs.c
M src/include/nodes/relation.h
M src/include/optimizer/paths.h
M src/test/regress/expected/create_index.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/sql/create_index.sql
Add bytea_agg, parallel to string_agg.
commit : d5448c7d31b5af66a809e6580bae9bd31448bfa7
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Dec 2011 08:40:25 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Dec 2011 08:40:25 -0500
Pavel Stehule
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
Typo fixes.
commit : 0510b62d91151b9d8c1fe1aa15c9cf3ffe9bf25b
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 17:57:17 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 17:57:17 -0500
All noted by Jaime Casanova.
M doc/src/sgml/ref/create_view.sgml
M doc/src/sgml/rules.sgml
Catversion bump for commit 0e4611c0234d89e288a53351f775c59522baed7c.
commit : 99b60fc04e53c09ca630d2798acb3768a778dc47
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 17:25:35 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 17:25:35 -0500
It changed the format of stored rules.
M src/include/catalog/catversion.h
Add a security_barrier option for views.
commit : 0e4611c0234d89e288a53351f775c59522baed7c
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 16:15:57 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 16:15:57 -0500
When a view is marked as a security barrier, it will not be pulled up
into the containing query, and no quals will be pushed down into it,
so that no function or operator chosen by the user can be applied to
rows not exposed by the view. Views not configured with this
option cannot provide robust row-level security, but will perform far
better.
Patch by KaiGai Kohei; original problem report by Heikki Linnakangas
(in October 2009!). Review (in earlier versions) by Noah Misch and
others. Design advice by Tom Lane and myself. Further review and
cleanup by me.
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/create_view.sgml
M doc/src/sgml/rules.sgml
M src/backend/access/common/reloptions.c
M src/backend/commands/tablecmds.c
M src/backend/commands/view.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/parser/gram.y
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/cache/relcache.c
M src/bin/pg_dump/pg_dump.c
M src/include/access/reloptions.h
M src/include/nodes/parsenodes.h
M src/include/utils/rel.h
M src/test/regress/expected/create_view.out
M src/test/regress/sql/create_view.sql
Add ALTER DOMAIN ... RENAME
commit : f90dd28062db2128a340fbe02f55829f15ab5561
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 22 Dec 2011 22:43:56 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 22 Dec 2011 22:43:56 +0200
You could already rename domains using ALTER TYPE, but with this new
command it is more consistent with how other commands treat domains as
a subcategory of types.
M doc/src/sgml/ref/alter_domain.sgml
M src/backend/commands/alter.c
M src/backend/commands/typecmds.c
M src/backend/parser/gram.y
M src/include/commands/typecmds.h
M src/test/regress/expected/domain.out
M src/test/regress/sql/domain.sql
Don't forget to de-escape the password field in .pgpass.
commit : 8d15e3ec4fcb735875a8a70a09ec0c62153c3329
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 12:55:27 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 22 Dec 2011 12:55:27 -0500
This has been broken just about forever (or more specifically, commit
7f4981f4af1700456f98ac3f2b2d84959919ec81) and nobody noticed until
Richard Huxton reported it recently. Analysis and fix by Ross
Reedstrom, although I didn't use his patch. This doesn't seem
important enough to back-patch and is mildly backward incompatible, so
I'm just doing this in master.
M src/interfaces/libpq/fe-connect.c
Update per-column ACLs, not only per-table ACL, when changing table owner.
commit : c31224e257a57fc9ad1c602414d9f6f5f4ce4ae3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 21 Dec 2011 18:23:11 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 21 Dec 2011 18:23:11 -0500
We forgot to modify column ACLs, so privileges were still shown as having
been granted by the old owner. This meant that neither the new owner nor
a superuser could revoke the now-untraceable-to-table-owner permissions.
Per bug #6350 from Marc Balmer.
This has been wrong since column ACLs were added, so back-patch to 8.4.
M src/backend/commands/tablecmds.c
Improve behavior of concurrent CLUSTER.
commit : cbe24a6dd8fb224b9585f25b882d5ffdb55a0ba5
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 15:17:28 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 15:17:28 -0500
In the previous coding, a user could queue up for an AccessExclusiveLock
on a table they did not have permission to cluster, thus potentially
interfering with access by authorized users who got stuck waiting behind
the AccessExclusiveLock. This approach avoids that. cluster() has the
same permissions-checking requirements as REINDEX TABLE, so this commit
moves the now-shared callback to tablecmds.c and renames it, per
discussion with Noah Misch.
M src/backend/commands/cluster.c
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/include/commands/tablecmds.h
Take fewer snapshots.
commit : d573e239f03506920938bf0be56c868d9c3416da
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 09:16:55 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 09:16:55 -0500
When a PORTAL_ONE_SELECT query is executed, we can opportunistically
reuse the parse/plan shot for the execution phase. This cuts down the
number of snapshots per simple query from 2 to 1 for the simple
protocol, and 3 to 2 for the extended protocol. Since we are only
reusing a snapshot taken early in the processing of the same protocol
message, the change shouldn't be user-visible, except that the remote
possibility of the planning and execution snapshots being different is
eliminated.
Note that this change does not make it safe to assume that the parse/plan
snapshot will certainly be reused; that will currently only happen if
PortalStart() decides to use the PORTAL_ONE_SELECT strategy. It might
be worth trying to provide some stronger guarantees here in the future,
but for now we don't.
Patch by me; review by Dimitri Fontaine.
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/executor/spi.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/include/tcop/pquery.h
sepgsql: Check CREATE permissions for some object types.
commit : e1042a348421bc16f4d4307228a9951e38a984f1
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 09:12:43 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 09:12:43 -0500
KaiGai Kohei, reviewed by Dimitri Fontaine and me.
M contrib/sepgsql/database.c
A contrib/sepgsql/expected/create.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql.h
A contrib/sepgsql/sql/create.sql
M contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
Shave a few cycles in string_agg().
commit : 7f0e4bb82e408090c0366c63a9ff4c0f7c4b0a8e
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 08:53:50 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Dec 2011 08:53:50 -0500
Pavel Stehule
M src/backend/utils/adt/varlena.c
Fix gincostestimate to handle ScalarArrayOpExpr reasonably.
commit : 1db5af279441b9ee215b54de424c2af92eeb1ef8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Dec 2011 19:57:34 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Dec 2011 19:57:34 -0500
The original coding of this function overlooked the possibility that
it could be passed anything except simple OpExpr indexquals. But
ScalarArrayOpExpr is possible too, and the code would probably crash
(and surely give ridiculous answers) in such a case. Add logic to try
to estimate sanely for such cases.
In passing, fix the treatment of inner-indexscan cost estimation: it was
failing to scale up properly for multiple iterations of a nestloop.
(I think somebody might've thought that index_pages_fetched() is linear,
but of course it's not.)
Report, diagnosis, and preliminary patch by Marti Raudsepp; I refactored
it a bit and fixed the cost estimation.
Back-patch into 9.1 where the bogus code was introduced.
M src/backend/utils/adt/selfuncs.c
M src/test/regress/expected/tsearch.out
M src/test/regress/sql/tsearch.sql
Avoid crashing when we have problems unlinking files post-commit.
commit : d0024cd1881447fa7aed58db94df379e593c6630
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Dec 2011 15:00:36 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Dec 2011 15:00:36 -0500
smgrdounlink takes care to not throw an ERROR if it fails to unlink
something, but that caution was rendered useless by commit
3396000684b41e7e9467d1abc67152b39e697035, which put an smgrexists call in
front of it; smgrexists *does* throw error if anything looks funny, such
as getting a permissions error from trying to open the file. If that
happens post-commit, you get a PANIC, and what's worse the same logic
appears in the WAL replay code, so the database even fails to restart.
Restore the intended behavior by removing the smgrexists call --- it isn't
accomplishing anything that we can't do better by adjusting mdunlink's
ideas of whether it ought to warn about ENOENT or not.
Per report from Joseph Shraibman of unrecoverable crash after trying to
drop a table whose FSM fork had somehow gotten chmod'd to 000 permissions.
Backpatch to 8.4, where the bogus coding was introduced.
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/catalog/storage.c
M src/backend/storage/smgr/md.c
Add support for privileges on types
commit : 729205571e81b4767efc42ad7beb53663e08d1ff
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Dec 2011 00:05:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 20 Dec 2011 00:05:19 +0200
This adds support for the more or less SQL-conforming USAGE privilege
on types and domains. The intent is to be able restrict which users
can create dependencies on types, which restricts the way in which
owners can alter types.
reviewed by Yeb Havinga
M doc/src/sgml/information_schema.sgml
M doc/src/sgml/ref/alter_default_privileges.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_type.sgml
M doc/src/sgml/ref/create_aggregate.sgml
M doc/src/sgml/ref/create_cast.sgml
M doc/src/sgml/ref/create_domain.sgml
M doc/src/sgml/ref/create_foreign_table.sgml
M doc/src/sgml/ref/create_function.sgml
M doc/src/sgml/ref/create_operator.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/revoke.sgml
M src/backend/access/common/tupdesc.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/information_schema.sql
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_type.c
M src/backend/commands/functioncmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/executor/execMain.c
M src/backend/parser/gram.y
M src/backend/utils/adt/acl.c
M src/bin/psql/describe.c
M src/bin/psql/tab-complete.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_default_acl.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_type.h
M src/include/nodes/parsenodes.h
M src/include/parser/kwlist.h
M src/include/utils/acl.h
M src/include/utils/builtins.h
M src/test/regress/expected/privileges.out
M src/test/regress/sql/privileges.sql
Forgot catversion bump on previous patch
commit : 05e992e90e49aa5bca7e2b290ab736bfec97a7c1
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Dec 2011 17:44:38 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 19 Dec 2011 17:44:38 -0300
Per Tom
M src/include/catalog/catversion.h
Rename updateNodeLink to spgUpdateNodeLink.
commit : 8f57b064fdaa682ddea60f5dc27c0a5d5fcbffab
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Dec 2011 15:38:03 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Dec 2011 15:38:03 -0500
On reflection, the original name seems way too generic for a global
symbol. A quick check shows this is the only exported function name
in SP-GiST that doesn't begin with "spg" or contain "SpGist", so the
rest of them seem all right.
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spgxlog.c
M src/include/access/spgist_private.h
Allow CHECK constraints to be declared ONLY
commit : 61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Dec 2011 15:10:18 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Dec 2011 15:10:18 -0300
This makes them enforceable only on the parent table, not on children
tables. This is useful in various situations, per discussion involving
people bitten by the restrictive behavior introduced in 8.4.
Message-Id:
8762mp93iw.fsf@comcast.net
CAFaPBrSMMpubkGf4zcRL_YL-AERUbYF_-ZNNYfb3CVwwEqc9TQ@mail.gmail.com
Authors: Nikhil Sontakke, Alex Hunsaker
Reviewed by Robert Haas and myself
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/alter_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/commands/typecmds.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/heap.h
M src/include/catalog/pg_constraint.h
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/inherit.out
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/inherit.sql
Teach SP-GiST to do index-only scans.
commit : 92203624934095163f8b57b5b3d7bbd2645da2c8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Dec 2011 14:58:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 19 Dec 2011 14:58:41 -0500
Operator classes can specify whether or not they support this; this
preserves the flexibility to use lossy representations within an index.
In passing, move constant data about a given index into the rd_amcache
cache area, instead of doing fresh lookups each time we start an index
operation. This is mainly to try to make sure that spgcanreturn() has
insignificant cost; I still don't have any proof that it matters for
actual index accesses. Also, get rid of useless copying of FmgrInfo
pointers; we can perfectly well use the relcache's versions in-place.
M doc/src/sgml/spgist.sgml
M src/backend/access/spgist/spgdoinsert.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/include/access/spgist.h
M src/include/access/spgist_private.h
M src/test/regress/expected/create_index.out
Replace simple constant pg_am.amcanreturn with an AM support function.
commit : 3695a555136a6d179cac8ae48d5f90171d5b30e9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 18 Dec 2011 15:49:00 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 18 Dec 2011 15:49:00 -0500
The need for this was debated when we put in the index-only-scan feature,
but at the time we had no near-term expectation of having AMs that could
support such scans for only some indexes; so we kept it simple. However,
the SP-GiST AM forces the issue, so let's fix it.
This patch only installs the new API; no behavior actually changes.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/indexam.sgml
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/spgist/spgscan.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/util/plancat.c
M src/include/access/genam.h
M src/include/access/nbtree.h
M src/include/access/spgist.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_proc.h
M src/include/nodes/relation.h
M src/include/utils/rel.h
PL/Python: One more file renaming fix to unbreak the build
commit : 19d223171801dda36f84e24dc89c9fbab1ababad
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 18 Dec 2011 22:34:53 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 18 Dec 2011 22:34:53 +0200
M src/pl/plpython/Makefile
Split plpython.c into smaller pieces
commit : 147c2482542868d1f9dcf7d2ecfeac58d845335c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 18 Dec 2011 21:14:16 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 18 Dec 2011 21:14:16 +0200
This moves the code around from one huge file into hopefully logical
and more manageable modules. For the most part, the code itself was
not touched, except: PLy_function_handler and PLy_trigger_handler were
renamed to PLy_exec_function and PLy_exec_trigger, because they were
not actually handlers in the PL handler sense, and it makes the naming
more similar to the way PL/pgSQL is organized. The initialization of
the procedure caches was separated into a new function
init_procedure_caches to keep the hash tables private to
plpy_procedures.c.
Jan Urbański and Peter Eisentraut
M src/pl/plpython/Makefile
M src/pl/plpython/nls.mk
A src/pl/plpython/plpy_cursorobject.c
A src/pl/plpython/plpy_cursorobject.h
A src/pl/plpython/plpy_elog.c
A src/pl/plpython/plpy_elog.h
A src/pl/plpython/plpy_exec.c
A src/pl/plpython/plpy_exec.h
A src/pl/plpython/plpy_main.c
A src/pl/plpython/plpy_main.h
A src/pl/plpython/plpy_planobject.c
A src/pl/plpython/plpy_planobject.h
A src/pl/plpython/plpy_plpymodule.c
A src/pl/plpython/plpy_plpymodule.h
A src/pl/plpython/plpy_procedure.c
A src/pl/plpython/plpy_procedure.h
A src/pl/plpython/plpy_resultobject.c
A src/pl/plpython/plpy_resultobject.h
A src/pl/plpython/plpy_spi.c
A src/pl/plpython/plpy_spi.h
A src/pl/plpython/plpy_subxactobject.c
A src/pl/plpython/plpy_subxactobject.h
A src/pl/plpython/plpy_typeio.c
A src/pl/plpython/plpy_typeio.h
A src/pl/plpython/plpy_util.c
A src/pl/plpython/plpy_util.h
D src/pl/plpython/plpython.c
A src/pl/plpython/plpython.h
Mark variables as const in pgtypeslib if they only carry a format string.
commit : 59e242a4969d2efa6ce68dc7aab3cbd8cf975b08
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 19:04:19 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 19:04:19 +0100
M src/interfaces/ecpg/include/pgtypes_date.h
M src/interfaces/ecpg/include/pgtypes_timestamp.h
M src/interfaces/ecpg/pgtypeslib/common.c
M src/interfaces/ecpg/pgtypeslib/datetime.c
M src/interfaces/ecpg/pgtypeslib/extern.h
M src/interfaces/ecpg/pgtypeslib/timestamp.c
Added test for cursor handling on different connections to regression test suite for ecpg.
commit : 22232834c54c315ed57708806c9f8a9b962e2988
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 18:44:14 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 18:44:14 +0100
M src/interfaces/ecpg/test/expected/preproc-cursor.c
M src/interfaces/ecpg/test/expected/preproc-cursor.stderr
M src/interfaces/ecpg/test/expected/preproc-cursor.stdout
M src/interfaces/ecpg/test/preproc/cursor.pgc
In ecpg removed old leftover check for given connection name.
commit : 4b8b5e53eb6105924266bb32709042f710043b4e
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 15:34:33 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 18 Dec 2011 15:34:33 +0100
Ever since we introduced real prepared statements this should work for
different connections. The old solution just emulating prepared statements,
though, wasn't able to handle this.
Closes: #6309
M src/interfaces/ecpg/preproc/ecpg.addons
Remove tabs in SGML file.
commit : 153c8dbd8ca3f6736dd220edda7d4392f5381a33
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 18 Dec 2011 08:32:08 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 18 Dec 2011 08:32:08 -0500
M doc/src/sgml/monitoring.sgml
Defend against null scankeys in spgist searches.
commit : b7a0e8fb4d6fafcd30555e4ddf18e77e138ec3d0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 19:08:28 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 19:08:28 -0500
Should've thought of that one earlier.
M src/backend/access/spgist/spgscan.c
Remove bogus entries in gist point_ops operator class.
commit : 5577ca5bfb33bf7f31a03fc5b42a56de400e464e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 18:51:00 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 18:51:00 -0500
These entries could never be matched to an index clause because they don't
have the index datatype on the left-hand side of the operator. (Their
commutators are in the opclass, which is sensible, but that doesn't mean
these operators should be.) Spotted by a test that I recently added to
opr_sanity to catch exactly this type of thinko. AFAICT there is no code
in gistproc.c that is specifically meant to cover these cases, so nothing
to remove at that level.
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/test/regress/expected/opr_sanity.out
Fix some long-obsolete references to XLogOpenRelation.
commit : dd45d3ad33bdb415b18ee8b37182b52c1c354cd6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 18:26:52 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 18:26:52 -0500
These were missed in commit a213f1ee6c5a1bbe1f074ca201975e76ad2ed50c,
which removed that function.
M src/backend/access/transam/README
M src/backend/catalog/storage.c
Fix compiler warning seen on 64-bit machine.
commit : 85df5dbf5ac56f75cf9e23fe4504f2e672893f30
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 16:51:36 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 16:51:36 -0500
M src/backend/access/spgist/spgutils.c
Add SP-GiST (space-partitioned GiST) index access method.
commit : 8daeb5ddd698f661eb118f8e874e7c68cfd6ae09
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 16:41:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Dec 2011 16:41:16 -0500
SP-GiST is comparable to GiST in flexibility, but supports non-balanced
partitioned search structures rather than balanced trees. As described at
PGCon 2011, this new indexing structure can beat GiST in both index build
time and query speed for search problems that it is well matched to.
There are a number of areas that could still use improvement, but at this
point the code seems committable.
Teodor Sigaev and Oleg Bartunov, with considerable revisions by Tom Lane
M doc/src/sgml/acronyms.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/indices.sgml
M doc/src/sgml/mvcc.sgml
M doc/src/sgml/postgres.sgml
M doc/src/sgml/ref/alter_opfamily.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_opclass.sgml
M doc/src/sgml/ref/create_table.sgml
A doc/src/sgml/spgist.sgml
M doc/src/sgml/xindex.sgml
M src/backend/access/Makefile
M src/backend/access/common/reloptions.c
A src/backend/access/spgist/Makefile
A src/backend/access/spgist/README
A src/backend/access/spgist/spgdoinsert.c
A src/backend/access/spgist/spginsert.c
A src/backend/access/spgist/spgkdtreeproc.c
A src/backend/access/spgist/spgquadtreeproc.c
A src/backend/access/spgist/spgscan.c
A src/backend/access/spgist/spgtextproc.c
A src/backend/access/spgist/spgutils.c
A src/backend/access/spgist/spgvacuum.c
A src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/rmgr.c
M src/backend/utils/adt/selfuncs.c
M src/include/access/gin_private.h
M src/include/access/reloptions.h
M src/include/access/rmgr.h
A src/include/access/spgist.h
A src/include/access/spgist_private.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_opfamily.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
M src/include/utils/selfuncs.h
M src/test/regress/expected/create_index.out
M src/test/regress/expected/opr_sanity.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/sql/create_index.sql
M src/test/regress/sql/opr_sanity.sql
Same clarification for pg_restore.
commit : 19fc0fe3ae7861a8b0d3ab8b67bd01fde33bf2da
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Dec 2011 13:12:01 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Dec 2011 13:12:01 -0500
M doc/src/sgml/ref/pg_restore.sgml
Clarify the post-data status on unvalidated check constraints.
commit : 8900f663f2405cc8ebc401f4f055671c81adaca7
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Dec 2011 12:38:40 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 17 Dec 2011 12:38:40 -0500
Per gripe from Thom Brown.
M doc/src/sgml/ref/pg_dump.sgml
Add missing 'static' qualifier.
commit : fb4bbc8113e5b5eb1233418ad1f92428339da370
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Dec 2011 23:19:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Dec 2011 23:19:06 -0500
M src/bin/pg_ctl/pg_ctl.c
Various micro-optimizations for GetSnapshopData().
commit : 0d76b60db4684d3487223b003833828fe9655fe2
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 16 Dec 2011 21:44:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 16 Dec 2011 21:44:26 -0500
Heikki Linnakangas had the idea of rearranging GetSnapshotData to
avoid checking for sub-XIDs when no top-level XID is present. This
patch does that plus further a bit of further, related rearrangement.
Benchmarking show a significant improvement on unlogged tables at
higher concurrency levels, and mostly indifferent result on permanent
tables (which are presumably bottlenecked elsewhere). Most of the
benefit seems to come from using the new NormalTransactionIdPrecedes()
macro rather than the function call TransactionIdPrecedes().
M src/backend/storage/ipc/procarray.c
M src/include/access/transam.h
Add --section option to pg_dump and pg_restore.
commit : a4cd6abcc901c1a8009c62a27f78696717bb8fe1
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 16 Dec 2011 19:09:38 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 16 Dec 2011 19:09:38 -0500
Valid values are --pre-data, data and post-data. The option can be
given more than once. --schema-only is equivalent to
--section=pre-data --section=post-data. --data-only is equivalent
to --section=data.
Andrew Dunstan, reviewed by Joachim Wieland and Josh Berkus.
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
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_dump.c
M src/bin/pg_dump/pg_restore.c
Fix reference to "verify-ca" and "verify-full" in a note in the docs.
commit : 4b43b48c9f05d7bfc5d20fdf53c8fb966d704312
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 16 Dec 2011 15:03:36 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 16 Dec 2011 15:03:36 +0200
M doc/src/sgml/libpq.sgml
include_if_exists facility for config file.
commit : 6d09b2105fb5fa6e6245e7b024bfbe465b1041ee
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 15 Dec 2011 19:40:58 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 15 Dec 2011 19:40:58 -0500
This works the same as include, except that an error is not thrown
if the file is missing. Instead the fact that it's missing is
logged.
Greg Smith, reviewed by Euler Taveira de Oliveira.
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc-file.l
M src/include/utils/guc.h
Improve behavior of concurrent ALTER <relation> .. SET SCHEMA.
commit : 1da5c119594e4fb07fb6a2c57f66642fa5e966fb
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 19:02:58 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 19:02:58 -0500
If the referrent of a name changes while we're waiting for the lock,
we must recheck permissons. We also now check the relkind before
locking, since it's easy to do that long the way.
Patch by me; review by Noah Misch.
M src/backend/commands/alter.c
M src/backend/commands/tablecmds.c
Improve behavior of concurrent rename statements.
commit : 74a1d4fe7cc092076806767925d6f34ea347efde
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:51:46 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:51:46 -0500
Previously, renaming a table, sequence, view, index, foreign table,
column, or trigger checked permissions before locking the object, which
meant that if permissions were revoked during the lock wait, we would
still allow the operation. Similarly, if the original object is dropped
and a new one with the same name is created, the operation will be allowed
if we had permissions on the old object; the permissions on the new
object don't matter. All this is now fixed.
Along the way, attempting to rename a trigger on a foreign table now gives
the same error message as trying to create one there in the first place
(i.e. that it's not a table or view) rather than simply stating that no
trigger by that name exists.
Patch by me; review by Noah Misch.
M src/backend/commands/alter.c
M src/backend/commands/cluster.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/typecmds.c
M src/include/commands/tablecmds.h
M src/include/commands/trigger.h
Don't leave regress_test_role_super lying around.
commit : d039fd51f79e9ddde4d692d2b396bdf5722b4c4e
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:45:02 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:45:02 -0500
Fixes an oversight in commit fc6d1006bda783cc002c61a5f072905849dbde4b.
Noted by Tom Lane.
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Fix typo.
commit : f6835ea90ac4b6b87fcf9f042959756c246f8fbe
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:22:29 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 15 Dec 2011 18:22:29 -0500
M src/include/libpq/libpq-be.h
PL/Python: Refactor subtransaction handling
commit : fc9959701b57d11d08a4a8a0788ccbd887ee2e47
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Dec 2011 16:52:57 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 15 Dec 2011 16:52:57 +0200
Lots of repetitive code was moved into new functions
PLy_spi_subtransaction_{begin,commit,abort}.
Jan Urbański
M src/pl/plpython/plpython.c
Disable excessive FP optimization by recent versions of gcc.
commit : 5878a328e36b7f59c6c173212b77d0536e8804dd
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 17:15:24 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 17:15:24 -0500
Suggested solution from Tom Lane. Problem discovered, probably not
for the first time, while testing the mingw-w64 32 bit compiler.
Backpatched to all live branches.
M configure
M configure.in
Fix docs build I inadvertantly broke.
commit : fb0eca0695e0e287335cf969b8ae48f0a42c40e8
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 16:49:20 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 16:49:20 -0500
M doc/src/sgml/ref/pg_dump.sgml
Add --exclude-table-data option to pg_dump.
commit : 7b070e896ca835318c90b02c830a5c4844413b64
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 09:23:17 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 14 Dec 2011 09:23:17 -0500
Andrew Dunstan, reviewed by Josh Berkus, Robert Haas and Peter Geoghegan.
This allows dumping of a table definition but not its data, on a per table basis.
Table name patterns are supported just as for --exclude-table.
M doc/src/sgml/ref/pg_dump.sgml
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
Add support for passing cursor parameters in named notation in PL/pgSQL.
commit : 4adead1d224278ff3064636063a818eba17cb211
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Dec 2011 15:55:37 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Dec 2011 15:55:37 +0200
Yeb Havinga, reviewed by Kevin Grittner, with small changes by me.
M doc/src/sgml/plpgsql.sgml
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Move BKP_REMOVABLE bit from individual WAL records to WAL page headers.
commit : 2dd9322ba6eea76800b38bfea0599fbc459458f2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 12 Dec 2011 16:22:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 12 Dec 2011 16:22:14 -0500
Removing this bit from xl_info allows us to restore the old limit of four
(not three) separate pages touched by a WAL record, which is needed for the
upcoming SP-GiST feature, and will likely be useful elsewhere in future.
When we implemented XLR_BKP_REMOVABLE in 2007, we had to do it like that
because no special WAL-visible action was taken when starting a backup.
However, now we force a segment switch when starting a backup, so a
compressing WAL archiver (such as pglesslog) that uses the state shown in
the current page header will not be fooled as to removability of backup
blocks. The only downside is that the archiver will not return to
compressing mode for up to one WAL page after the backup is over, which is
a small price to pay for getting back the extra xl_info bit. In any case
the archiver could look for XLOG_BACKUP_END records if it thought it was
worth the trouble to do so.
Bump XLOG_PAGE_MAGIC since this is effectively a change in WAL format.
M src/backend/access/transam/README
M src/backend/access/transam/xlog.c
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
Revert the behavior of inet/cidr functions to not unpack the arguments.
commit : 8409b60476a4112e654d1a5099dd67a54f197afd
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 12 Dec 2011 09:49:47 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 12 Dec 2011 09:49:47 +0200
I forgot to change the functions to use the PG_GETARG_INET_PP() macro,
when I changed DatumGetInetP() to unpack the datum, like Datum*P macros
usually do. Also, I screwed up the definition of the PG_GETARG_INET_PP()
macro, and didn't notice because it wasn't used.
This fixes the memory leak when sorting inet values, as reported
by Jochen Erwied and debugged by Andres Freund. Backpatch to 8.3, like
the previous patch that broke it.
M src/backend/utils/adt/network.c
M src/include/utils/inet.h
Miscellaneous cleanup to silence compiler warnings seen on Mingw.
commit : 0f44335122fd01b54417bc955d6a98b967ca832c
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 18:15:15 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 18:15:15 -0500
Remove some dead code, conditionally declare some items or call
some code, and fix one or two declarations.
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/varlena.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_ctl/pg_ctl.c
M src/bin/pgevent/pgevent.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
Remove define inadvertantly left over from testing.
commit : 8e461ca5a9714f3487534b2b0dddb8eb2dda94af
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 16:29:37 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 16:29:37 -0500
M src/include/c.h
Enable compiling with the mingw-w64 32 bit compiler.
commit : 1a0c76c32fe470142d3663dd84ac960d75a4e8db
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 15:35:41 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 10 Dec 2011 15:35:41 -0500
Original patch by Lars Kanis, reviewed by Nishiyama Tomoaki and tweaked some by me.
This compiler, or at least the latest version of it, is currently broken, and
only passes the regression tests if built with -O0.
M config/ac_func_accept_argtypes.m4
M configure
M configure.in
M src/include/c.h
M src/include/pg_config.h.in
M src/include/port/win32.h
M src/interfaces/ecpg/test/resultmap
M src/interfaces/libpq/win32.h
M src/port/getaddrinfo.c
M src/test/regress/resultmap
If pg_test_fsync is interrupted, clean up the temp file.
commit : ab7d4213f93f0ef0e45b9b9343725974f196b091
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Dec 2011 15:05:48 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 9 Dec 2011 15:05:48 -0500
Marti Raudsepp, with additional paranoia by me.
M contrib/pg_test_fsync/pg_test_fsync.c
Add ALTER FOREIGN DATA WRAPPER / RENAME and ALTER SERVER / RENAME
commit : 5bcf8ede45c780e4ac394397bd0413118f3a162f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 9 Dec 2011 20:42:30 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 9 Dec 2011 20:42:30 +0200
M doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
M doc/src/sgml/ref/alter_server.sgml
M src/backend/commands/alter.c
M src/backend/commands/foreigncmds.c
M src/backend/parser/gram.y
M src/include/commands/defrem.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Don't set reachedMinRecoveryPoint during crash recovery. In crash recovery, we don't reach consistency before replaying all of the WAL. Rename the variable to reachedConsistency, to make its intention clearer.
commit : 9f0d2bdc88630781485a17178e2b50e49ce70040
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Dec 2011 14:32:42 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Dec 2011 14:32:42 +0200
In master, that was an active bug because of the recent patch to
immediately PANIC if a reference to a missing page is found in WAL after
reaching consistency, as Tom Lane's test case demonstrated. In 9.1 and 9.0,
the only consequence was a misleading "consistent recovery state reached at
%X/%X" message in the log at the beginning of crash recovery (the database
is not consistent at that point yet). In 8.4, the log message was not
printed in crash recovery, even though there was a similar
reachedMinRecoveryPoint local variable that was also set early. So,
backpatch to 9.1 and 9.0.
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogutils.c
M src/include/access/xlog.h
Cancel running query if it is detected that the connection to the client is lost. The only way we detect that at the moment is when write() fails when we try to write to the socket.
commit : 5d8a894e3095b2f602e901c19689f3176bf20543
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Dec 2011 11:37:21 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 9 Dec 2011 11:37:21 +0200
Florian Pflug with small changes by me, reviewed by Greg Jaskiewicz.
M src/backend/libpq/pqcomm.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/globals.c
M src/include/miscadmin.h
Add const qualifiers to node inspection functions
commit : d5f23af6bfbc454e86dd16e5c7a0bfc0cf6189d0
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Dec 2011 21:46:56 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 7 Dec 2011 21:46:56 +0200
Thomas Munro
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/optimizer/util/clauses.c
M src/include/nodes/nodeFuncs.h
M src/include/nodes/nodes.h
M src/include/nodes/pg_list.h
M src/include/nodes/print.h
M src/include/optimizer/clauses.h
Fix corner cases in readlink() usage.
commit : 0d0ec527afec5e7bc9d709c40a37f295b627336a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Dec 2011 13:34:13 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Dec 2011 13:34:13 -0500
Make sure all calls are protected by HAVE_READLINK, and get the buffer
overflow tests right. Be a bit more paranoid about string length in
_tarWriteHeader(), too.
M src/backend/replication/basebackup.c
M src/backend/utils/adt/misc.c
Better error reporting if the link target is too long
commit : 0d9b09282fbf2a21160d57d2f11785cb23841909
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 12:17:55 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 12:17:55 +0100
This situation won't set errno, so using %m will give an incorrect
error message.
M src/backend/utils/adt/misc.c
Avoid using readlink() on platforms that don't support it
commit : 1f422db663aa291be4af4b079e7d1b0ef0d78af2
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 12:09:05 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 12:09:05 +0100
We don't have any such platforms now, but might in the future.
Also, detect cases when a tablespace symlink points to a path that
is longer than we can handle, and give a warning.
M src/backend/replication/basebackup.c
Remove spclocation field from pg_tablespace
commit : 16d8e594acd96661267cb7897834f9cba51a2ffd
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 10:35:00 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 7 Dec 2011 10:35:00 +0100
Instead, add a function pg_tablespace_location(oid) used to return
the same information, and do this by reading the symbolic link.
Doing it this way makes it possible to relocate a tablespace when the
database is down by simply changing the symbolic link.
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/tablespace.c
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/xaggr.sgml
M src/backend/commands/tablespace.c
M src/backend/utils/adt/misc.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/psql/describe.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_tablespace.h
M src/include/utils/builtins.h
Create a "sort support" interface API for faster sorting.
commit : c6e3ac11b60ac4a8942ab964252d51c1c0bd8845
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Dec 2011 00:18:38 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Dec 2011 00:18:38 -0500
This patch creates an API whereby a btree index opclass can optionally
provide non-SQL-callable support functions for sorting. In the initial
patch, we only use this to provide a directly-callable comparator function,
which can be invoked with a bit less overhead than the traditional
SQL-callable comparator. While that should be of value in itself, the real
reason for doing this is to provide a datatype-extensible framework for
more aggressive optimizations, as in Peter Geoghegan's recent work.
Robert Haas and Tom Lane
M doc/src/sgml/ref/alter_opfamily.sgml
M doc/src/sgml/ref/create_opclass.sgml
M doc/src/sgml/xindex.sgml
M src/backend/access/nbtree/nbtcompare.c
M src/backend/commands/analyze.c
M src/backend/commands/opclasscmds.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/sort/Makefile
A src/backend/utils/sort/sortsupport.c
M src/backend/utils/sort/tuplesort.c
M src/bin/pg_dump/pg_dump.c
M src/include/access/nbtree.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_proc.h
M src/include/nodes/execnodes.h
M src/include/utils/builtins.h
M src/include/utils/date.h
M src/include/utils/lsyscache.h
A src/include/utils/sortsupport.h
M src/include/utils/timestamp.h
M src/include/utils/tuplesort.h
M src/test/regress/expected/opr_sanity.out
M src/test/regress/sql/opr_sanity.sql
Typo fixes for commit 2ad36c4e44c8b513f6155656e1b7a8d26715bb94.
commit : d2a662182eac1069ff3874a1db499508a13c6bca
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Dec 2011 15:50:02 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Dec 2011 15:50:02 -0500
Noted during post-commit review by by Noah Misch.
M src/backend/catalog/namespace.c
M src/backend/commands/tablecmds.c
Make command-line tools smarter about finding a DB to connect to.
commit : 68281e00540a29e7f9bfc154c25a78b875f560d1
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Dec 2011 08:48:15 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 6 Dec 2011 08:48:15 -0500
If unable to connect to "postgres", try "template1". This allows things to
work more smoothly in the case where the postgres database has been
dropped. And just in case that's not good enough, also allow the user to
specify a maintenance database to be used for the initial connection, to
cover the case where neither postgres nor template1 is suitable.
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/createdb.sgml
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/vacuumdb.sgml
M src/bin/scripts/clusterdb.c
M src/bin/scripts/common.c
M src/bin/scripts/common.h
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
Add missing documentation for function pg_stat_get_wal_senders()
commit : 6ef4ae1d4e829675c332c39895fdf90e15c3faeb
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 6 Dec 2011 11:02:02 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 6 Dec 2011 11:02:02 +0100
Euler Taveira de Oliveira
M doc/src/sgml/monitoring.sgml
In pg_upgrade, allow tables using regclass to be upgraded because we preserve pg_class oids since PG 9.0.
commit : 0e8f6bf0e7a280749cc09715acc2b27d17e1b2fd
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Dec 2011 16:45:19 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Dec 2011 16:45:19 -0500
M contrib/pg_upgrade/check.c
M doc/src/sgml/pgupgrade.sgml
Remove troublesome Asserts in cost_mergejoin().
commit : ff68b256a533b398e3420750f34d161aeee4e099
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Dec 2011 15:50:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Dec 2011 15:50:06 -0500
While logically correct, these two Asserts could fail depending on the
vagaries of floating-point arithmetic. In particular, on machines with
floating-point registers wider than standard "double" values, it was
possible for the compiler to compare a rounded-to-double value already
stored in memory with an unrounded long double value still in a register.
Given the preceding checks, these assertions aren't adding much, so let's
just get rid of them rather than try to find a compiler-proof fix.
Per report from Pavel Stehule.
Given the lack of previous complaints, and the fact that only developers
would be likely to trip over it, I'm only going to change this in HEAD,
even though the code has been like this for a long time.
M src/backend/optimizer/path/costsize.c
plpython: Add SPI cursor support
commit : 89e850e6fda9e4e441712012abe971fe938d595a
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Dec 2011 19:52:15 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Dec 2011 19:52:15 +0200
Add a function plpy.cursor that is similar to plpy.execute but uses an
SPI cursor to avoid fetching the entire result set into memory.
Jan Urbański, reviewed by Steve Singer
M doc/src/sgml/plpython.sgml
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/expected/plpython_subtransaction.out
M src/pl/plpython/expected/plpython_subtransaction_0.out
M src/pl/plpython/expected/plpython_subtransaction_5.out
M src/pl/plpython/expected/plpython_test.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_spi.sql
M src/pl/plpython/sql/plpython_subtransaction.sql
Add a \setenv command to psql.
commit : e6d9e2106f0dda459063126d07967df197b7b5fe
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 4 Dec 2011 11:43:38 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 4 Dec 2011 11:43:38 -0500
This can be used to set (or unset) environment variables that will
affect programs called by psql (such as the PAGER), probably most
usefully in a .psqlrc file.
Andrew Dunstan, reviewed by Josh Kupershmidt.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/help.c
Remove incorrect instructions to run CREATE FOREIGN DATA WRAPPER
commit : eb06416ba44ccbf3fe03a47739d9da4e4de42ced
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Dec 2011 16:57:36 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 4 Dec 2011 16:57:36 +0100
The CREATE EXTENSION step does this automatically. Doing it again will
cause an error.
M doc/src/sgml/file-fdw.sgml
Applied another patch by Zoltan to fix memory alignement issues in ecpg's sqlda code.
commit : f2ae9f9c3058c2ec5313e6d38c83b345bd2a7024
author : Michael Meskes <meskes@postgresql.org>
date : Sat, 3 Dec 2011 21:03:57 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sat, 3 Dec 2011 21:03:57 +0100
M src/interfaces/ecpg/ecpglib/sqlda.c
Treat ENOTDIR as ENOENT when looking for client certificate file
commit : 5b40677986984d450a2a16e515fe44d90dfeef02
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 3 Dec 2011 15:02:53 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 3 Dec 2011 15:02:53 +0100
This makes it possible to use a libpq app with home directory set
to /dev/null, for example - treating it the same as if the file
doesn't exist (which it doesn't).
Per bug #6302, reported by Diego Elio Petteno
M src/interfaces/libpq/fe-secure.c
Update documentation suggestions for debugging the backend.
commit : 155e56bd970d4f386fd3ca903eadc2b8d3ee0276
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 2 Dec 2011 17:08:33 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 2 Dec 2011 17:08:33 -0500
Tom Lane, with minor adjustments by me.
M doc/src/sgml/installation.sgml
psql: Make temporary editor files have .sql extension
commit : b6f9834a9e8dfab1bd503ec0357bb812a18018a2
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Dec 2011 23:38:33 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 2 Dec 2011 23:38:33 +0200
This gives editors a better chance to treat these files as the SQL
files that they are.
M src/bin/psql/command.c
Add some weasel wording about threaded usage of PGresults.
commit : 0de93a9c69a13073ed27c8d53f8c83663d3561fd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Dec 2011 11:33:53 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Dec 2011 11:33:53 -0500
PGresults used to be read-only from the application's viewpoint, but now
that we've exposed various functions that allow modification of a PGresult,
that sweeping statement is no longer accurate. Noted by Dmitriy Igrishin.
M doc/src/sgml/libpq.sgml
During recovery, if we reach consistent state and still have entries in the invalid-page hash table, PANIC immediately. Immediate PANIC is much better than waiting for end-of-recovery, which is what we did before, because the end-of-recovery might not come until months later if this is a standby server.
commit : 1e616f639156b2431725f7823c999486ca46c1ea
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 2 Dec 2011 10:49:54 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 2 Dec 2011 10:49:54 +0200
Also refrain from creating a restartpoint if there are invalid-page entries
in the hash table. Restarting recovery from such a restartpoint would not
see the invalid references, and wouldn't be able to cross-check them when
consistency is reached. That wouldn't matter when things are going smoothly,
but the more sanity checks you have the better.
Fujii Masao
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogutils.c
M src/include/access/xlog.h
M src/include/access/xlogutils.h
Clarify documentation about SQL:2008 variant of LIMIT/OFFSET syntax.
commit : 15a5006aac1432da35ff6a7ae27a018ed300e860
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:38:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:38:59 -0500
The point that you need parentheses for non-constant expressions apparently
needs to be brought out a bit more clearly, per bug #6315.
M doc/src/sgml/ref/select.sgml
Make pgcompinclude/pgrminclude less tied to Bruce's personal machine.
commit : 3b86b4653c0635308a16ce0fade7209f1204832f
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Dec 2011 14:44:32 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Dec 2011 14:44:32 -0500
Not everyone has /pg linked to the src subdirectory of their PostgreSQL
tree. Also, cc isn't the way to invoke the compiler everywhere.
M src/tools/pginclude/pgcompinclude
M src/tools/pginclude/pgrminclude
Fix getTypeIOParam to support type record[].
commit : 65d9aedb1b0e2c160cee3ef6cddb284b092f542e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 12:44:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 12:44:16 -0500
Since record[] uses array_in, it needs to have its element type passed
as typioparam. In HEAD and 9.1, this fix essentially reverts commit
9bc933b2125a5358722490acbc50889887bf7680, which was a hack that is no
longer needed since domains don't set their typelem anymore. Before
that, adjust the logic so that only domains are excluded from being
treated like arrays, rather than assuming that only base types should
be included. Add a regression test to demonstrate the need for this.
Per report from Maxim Boguk.
Back-patch to 8.4, where type record[] was added.
M src/backend/utils/cache/lsyscache.c
M src/test/regress/expected/polymorphism.out
M src/test/regress/sql/polymorphism.sql
Add file-fdw documentation example.
commit : 1be6f9379287ecbbe6ab47636af7d41c7ae279ea
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Dec 2011 09:33:59 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Dec 2011 09:33:59 -0500
Josh Berkus
M doc/src/sgml/file-fdw.sgml
Add documentation mention that 7 != NULL also returns NULL.
commit : ebbcba75b46699fe11e347e1250898ce7d01b6f2
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Dec 2011 09:17:51 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Dec 2011 09:17:51 -0500
M doc/src/sgml/func.sgml
Update information about configuring SysV IPC parameters on NetBSD.
commit : bc9306f4c5e55042e20c8d8b308e573478f26e34
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 20:55:00 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 20:55:00 -0500
Per Emmanuel Kasper, sysctl works fine as of NetBSD 5.0.
M doc/src/sgml/runtime.sgml
Draft release notes for 9.1.2, 9.0.6, 8.4.10, 8.3.17, 8.2.23.
commit : 56d609c3b12bdab97e8bdf84157b906934c23054
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 19:34:47 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 19:34:47 -0500
M doc/src/sgml/release-8.2.sgml
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
Update time zone data files to tzdata release 2011n.
commit : 895d328a164b870705eb9aafd321090354c8575d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 11:48:05 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 11:48:05 -0500
DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, Samoa.
Historical corrections for Alaska and British East Africa.
M src/timezone/data/africa
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/backward
M src/timezone/data/europe
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab
Improve table locking behavior in the face of current DDL.
commit : 2ad36c4e44c8b513f6155656e1b7a8d26715bb94
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 30 Nov 2011 10:12:27 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 30 Nov 2011 10:12:27 -0500
In the previous coding, callers were faced with an awkward choice:
look up the name, do permissions checks, and then lock the table; or
look up the name, lock the table, and then do permissions checks.
The first choice was wrong because the results of the name lookup
and permissions checks might be out-of-date by the time the table
lock was acquired, while the second allowed a user with no privileges
to interfere with access to a table by users who do have privileges
(e.g. if a malicious backend queues up for an AccessExclusiveLock on
a table on which AccessShareLock is already held, further attempts
to access the table will be blocked until the AccessExclusiveLock
is obtained and the malicious backend's transaction rolls back).
To fix, allow callers of RangeVarGetRelid() to pass a callback which
gets executed after performing the name lookup but before acquiring
the relation lock. If the name lookup is retried (because
invalidation messages are received), the callback will be re-executed
as well, so we get the best of both worlds. RangeVarGetRelid() is
renamed to RangeVarGetRelidExtended(); callers not wishing to supply
a callback can continue to invoke it as RangeVarGetRelid(), which is
now a macro. Since the only one caller that uses nowait = true now
passes a callback anyway, the RangeVarGetRelid() macro defaults nowait
as well. The callback can also be used for supplemental locking - for
example, REINDEX INDEX needs to acquire the table lock before the index
lock to reduce deadlock possibilities.
There's a lot more work to be done here to fix all the cases where this
can be a problem, but this commit provides the general infrastructure
and fixes the following specific cases: REINDEX INDEX, REINDEX TABLE,
LOCK TABLE, and and DROP TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE.
Per discussion with Noah Misch and Alvaro Herrera.
M src/backend/access/heap/heapam.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/commands/alter.c
M src/backend/commands/indexcmds.c
M src/backend/commands/lockcmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/vacuum.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_type.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/tcop/utility.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/adt/ruleutils.c
M src/include/catalog/index.h
M src/include/catalog/namespace.h
M src/pl/plpgsql/src/pl_comp.c
Tweak previous patch to ensure edata->filename always gets initialized.
commit : a87ebace190b16bbc6454bb93bae3356712aa3ca
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 00:37:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 00:37:06 -0500
On a platform that isn't supplying __FILE__, previous coding would either
crash or give a stale result for the filename string. Not sure how likely
that is, but the original code catered for it, so let's keep doing so.
M src/backend/utils/error/elog.c
Strip file names reported in error messages in vpath builds
commit : dd136052bcc8281dd3faa77e717cd7cec216f7c7
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 22:04:59 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 22:04:59 +0200
In vpath builds, the __FILE__ macro that is used in verbose error
reports contains the full absolute file name, which makes the error
messages excessively verbose. So keep only the base name, thus
matching the behavior of non-vpath builds.
M src/backend/utils/error/elog.c
Remove duplicate definition of 'progname'.
commit : be2f909200ece7985d60848797c3eb07f9d1b995
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 23:19:46 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 23:19:46 -0500
Per buildfarm.
M src/bin/pg_dump/pg_dumpall.c
Move EXTRA_CLEAN to where it actually works.
commit : 9c6aa8cca0c8b2d46a174ec5171c2cf0aa97b2d0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 23:14:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 23:14:16 -0500
M contrib/pg_upgrade/Makefile
Prevent autovacuum transactions from running in serializable mode.
commit : 73d1bfd0b567ef9a4439be1510c12c346a064d9e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 22:39:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 22:39:16 -0500
Force the transaction isolation level to READ COMMITTED in autovacuum
worker and launcher processes. There is no benefit to using a higher
isolation level, and doing so could result in delaying foreground
transactions (or maybe even causing unnecessary serialization failures?).
Noted by Dan Ports.
Also, make sure we disable zero_damaged_pages and statement_timeout in
the autovac launcher, not only workers. Now that the launcher can run
transactions, these settings could affect its behavior, and it seems
like the same arguments apply to the launcher as the workers.
M src/backend/postmaster/autovacuum.c
Change installation docs to mention general debugging options.
commit : 99f5e47df5d04670be2fb5d575d6dc294a312eea
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 22:35:06 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 22:35:06 -0500
M doc/src/sgml/installation.sgml
Clean up after recent pg_dump patches.
commit : 0195e5c4ab1ac710b280f7834202a7164058379c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 20:41:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 20:41:06 -0500
Fix entirely broken handling of va_list printing routines, update some
out-of-date comments, fix some bogus inclusion orders, fix NLS declarations,
fix missed realloc calls.
M src/bin/pg_dump/common.c
M src/bin/pg_dump/dumpmem.c
M src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/nls.mk
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
In docs, suggest "-O0 -g" only if using a debugger.
commit : 2ff36abeec948899b9a51d1c945e9fbe85e056d5
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 19:11:53 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 19:11:53 -0500
M doc/src/sgml/installation.sgml
When a row fails a not-null constraint, show row's contents in errdetail.
commit : f225e4bc54df77e766b0edcffacb865648b099a3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 18:29:18 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 18:29:18 -0500
Simple extension of previous patch for CHECK constraints.
M src/backend/executor/execMain.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/inherit.out
M src/test/regress/expected/insert.out
M src/test/regress/expected/sequence.out
M src/test/regress/expected/sequence_1.out
M src/test/regress/output/constraints.source
Simplify the pg_dump/pg_restore error reporting macros, and allow pg_dumpall to use the same memory allocation functions as the others.
commit : 8b08deb0d1ee04a82130e640e48e302a3456817a
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 16:34:45 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 16:34:45 -0500
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/dumpmem.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_files.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/tools/msvc/Mkvcbuild.pm
Suggest configure options for server developers.
commit : b60f37bf44c248189ed8e4d925cd8e45308d54f8
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 16:31:53 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 29 Nov 2011 16:31:53 -0500
Greg Smith
M doc/src/sgml/installation.sgml
When a row fails a CHECK constraint, show row's contents in errdetail.
commit : f1e13001b2ffff676b4b803db9ab439a1619dc4e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 15:02:10 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 15:02:10 -0500
This should make it easier to identify which row is problematic when an
insert or update is processing many rows.
The formatting is similar to that for unique-index violation messages,
except that we limit field widths to 64 bytes since otherwise the message
could get unreasonably long. (In particular, there's currently no attempt
to quote or escape field values that contain commas etc.)
Jan Kundrát, reviewed by Royce Ausburn, somewhat rewritten by me.
M src/backend/executor/execMain.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/inherit.out
M src/test/regress/output/constraints.source
pg_dump: Add gettext plural support to error message
commit : 9922fc5f9f02e9d1653d08b0e62cefa8560425be
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 19:49:02 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 19:49:02 +0200
M src/bin/pg_dump/pg_dump.c
pg_upgrade: Disable installcheck
commit : b258ceb3ad1409af06347d385bab73352ea856a6
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:57:09 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:57:09 +0200
Disabled for now because some build farm members with low resources
are not prepared to handle it.
M contrib/pg_upgrade/Makefile
python.m4: Remove useless "import string" calls
commit : 80ac853f0521963e870dfe484d56df8ab2de82e0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:50:11 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:50:11 +0200
They have been unneeded since the use of the string module has been
removed in a65ed83f8a6fbf35c1e563533ab8293a788b1fce.
M config/python.m4
M configure
plpython: Fix sed expression in python3 build
commit : 04e5cb629b5c46462eee334f68d5ea12bc9097e0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:39:05 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:39:05 +0200
The old expression sed 's,$(srcdir),python3,' would normally resolve
as sed 's,.,python3,', which is not really what we wanted. While it
doesn't actually break anything right now, it's still wrong, so put in
a bit more work to make it more robust.
M src/pl/plpython/Makefile
pg_dump: Fix clean rule after file renaming shuffle
commit : cc534f8b3c8939bb1086036da0cc4bb6c8b7b964
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:30:45 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 06:30:45 +0200
M src/bin/pg_dump/Makefile
Document that perl needs to be indented during the pgindent run.
commit : 7260a0d00a5365bc3e49dc8913465428da2c38b2
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 28 Nov 2011 21:56:19 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 28 Nov 2011 21:56:19 -0500
M src/tools/msvc/README
M src/tools/pgindent/README
Make some minor formatting improvements to what pgindent did.
commit : 43dc4adf58ff1c342c2888feda75313230f5a658
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 20:19:29 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 20:19:29 -0500
Moving the code two full tab stops to the right requires rethinking of
cosmetic code layout choices, which pgindent isn't really able to do for
us. Whitespace and comment adjustments only, no code changes.
M src/backend/optimizer/util/clauses.c
Disallow deletion of CurrentExtensionObject while running extension script.
commit : 871dd024a6adf7766702b1cdacfb02bd8002d2bb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 19:12:17 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 19:12:17 -0500
While the deletion in itself wouldn't break things, any further creation
of objects in the script would result in dangling pg_depend entries being
added by recordDependencyOnCurrentExtension(). An example from Phil
Sorber convinced me that this is just barely likely enough to be worth
expending a couple lines of code to defend against. The resulting error
message might be confusing, but it's better than leaving corrupted catalog
contents for the user to deal with.
M src/backend/commands/extension.c
Pgindent clauses.c, per request from Tom.
commit : 269755ef725aa331fb2e49e33b23f38241d2a13b
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 28 Nov 2011 16:47:43 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 28 Nov 2011 16:47:43 -0500
M src/backend/optimizer/util/clauses.c
Convert eval_const_expressions's long series of IsA tests into a switch.
commit : a04161f2eab55f72b3c3dba9baed0ec09e7f633f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 14:21:40 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 14:21:40 -0500
This function has now grown enough cases that a switch seems appropriate.
This results in a measurable speed improvement on some platforms, and
should certainly not hurt. The code's in need of a pgindent run now,
though.
Andres Freund
M src/backend/optimizer/util/clauses.c
Remove erroneous claim about use of pg_locks.objid for advisory locks.
commit : 5943d4016854fe5064687cf7487487087ee61425
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 13:51:58 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 13:51:58 -0500
The correct information appears in the text, so just remove the statement
in the table, where it did not fit nicely anyway. (Curiously, the correct
info has been there much longer than the erroneous table entry.)
Resolves problem noted by Daniele Varrazzo.
In HEAD and 9.1, also do a bit of wordsmithing on other text on the page.
M doc/src/sgml/catalogs.sgml
Fix some bogosities in pg_dump's foreign-table support.
commit : 9761ad672f5c84e551f56b7923bc9bbba696578d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 12:51:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 12:51:41 -0500
The server name for a foreign table was not quoted at need, as per report
from Ronan Dunklau. Also, queries related to FDW options were inadequately
schema-qualified in places where the search path isn't just pg_catalog, and
were inconsistently formatted everywhere, and we didn't always check that
we got the expected number of rows from them.
M src/bin/pg_dump/pg_dump.c
Add libpq connection option to disable SSL compression
commit : 64aea1ebc70dc597b79e2f7f4451472510a1e9bf
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 28 Nov 2011 13:13:42 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 28 Nov 2011 13:13:42 +0100
This can be used to remove the overhead of SSL compression on
fast networks.
Laurenz Albe
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-secure.c
M src/interfaces/libpq/libpq-int.h
Ensure that whole-row junk Vars are always of composite type.
commit : dd3bab5fd74db009c946278bb314c8458a2fef11
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 22:27:24 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 22:27:24 -0500
The EvalPlanQual machinery assumes that whole-row Vars generated for the
outputs of non-table RTEs will be of composite types. However, for the
case where the RTE is a function call returning a scalar type, we were
doing the wrong thing, as a result of sharing code with a parser case
where the function's scalar output is wanted. (Or at least, that's what
that case has done historically; it does seem a bit inconsistent.)
To fix, extend makeWholeRowVar's API so that it can support both use-cases.
This fixes Belinda Cussen's report of crashes during concurrent execution
of UPDATEs involving joins to the result of UNNEST() --- in READ COMMITTED
mode, we'd run the EvalPlanQual machinery after a conflicting row update
commits, and it was expecting to get a HeapTuple not a scalar datum from
the "wholerowN" variable referencing the function RTE.
Back-patch to 9.0 where the current EvalPlanQual implementation appeared.
In 9.1 and up, this patch also fixes failure to attach the correct
collation to the Var generated for a scalar-result case. An example:
regression=# select upper(x.*) from textcat('ab', 'cd') x;
ERROR: could not determine which collation to use for upper() function
M src/backend/nodes/makefuncs.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/parser/parse_expr.c
M src/backend/rewrite/rewriteHandler.c
M src/include/nodes/makefuncs.h
Make pg_dumpall build with the right object files under MSVC.
commit : 91572ee0a6dfeb62dda6c375f613d1b7fdfc1383
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 20:14:47 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 20:14:47 -0500
This fixes a longstanding but up to now benign bug in the way pg_dumpall
was built. The bug was exposed by recent code adjustments. The Makefile
does not use $(OBJS) to build pg_dumpall, so this fix removes their source
files from the pg_dumpall object and adds in the one source file it
consequently needs.
M src/tools/msvc/Mkvcbuild.pm
Use IEEE infinity, not 1e10, for null-and-not-null case in gistpenalty().
commit : 9f4563f743eab0682f908d51fa3a9c630b31322d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 17:12:54 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 17:12:54 -0500
Use of a randomly chosen large value was never exactly graceful, and
now that there are penalty functions that are intentionally using infinity,
it doesn't seem like a good idea for null-vs-not-null to be using something
less.
M src/backend/access/gist/gistutil.c
Improve GiST range-contained-by searches by adding a flag for empty ranges.
commit : c66e4f138b04d749a713ad075e16f3d60975f5ad
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 16:50:37 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 16:50:37 -0500
In the original implementation, a range-contained-by search had to scan
the entire index because an empty range could be lurking anywhere.
Improve that by adding a flag to upper GiST entries that says whether the
represented subtree contains any empty ranges.
Also, make a simple mod to the penalty function to discourage empty ranges
from getting pushed into subtrees without any. This needs more work, and
the picksplit function should be taught about it too, but that code can be
improved without causing an on-disk compatibility break; so we'll leave it
for another day.
Since we're breaking on-disk compatibility of range values anyway, I took
the opportunity to reorganize the range flags bits; the unused
RANGE_xB_NULL bits are now adjacent, which might open the door for using
them in some other way later.
In passing, remove the GiST range opclass entry for <>, which doesn't seem
like it can really be indexed usefully.
Alexander Korotkov, with some editorializing by Tom
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/include/utils/rangetypes.h
M src/test/regress/expected/opr_sanity.out
Add pg_upgrade test suite
commit : 08da2d282f1c3cbff141ecd218d737990cf6d234
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 Nov 2011 22:42:32 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 27 Nov 2011 22:42:32 +0200
It runs the regression tests, runs pg_upgrade on the populated
database, and compares the before and after dumps. While not actually
a cross-version upgrade, this does detect omissions and bugs in the
involved tools from time to time. It's also possible to do a
cross-version upgrade by manually supplying parameters.
M contrib/pg_upgrade/.gitignore
M contrib/pg_upgrade/Makefile
M contrib/pg_upgrade/TESTING
A contrib/pg_upgrade/test.sh
M src/makefiles/pgxs.mk
M src/test/regress/GNUmakefile
Use the proper macro to convert a bool to a Datum.
commit : 8722a1a06aedbbbeb4f848a7b9ee62d6ae8649c6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 12:57:11 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 12:57:11 -0500
The original coding was
var->value = (Datum) state;
which is bogus, and then in commit 2f0f7b4bce13e68394543728801ef011fd82fac6
it was "corrected" to
var->value = PointerGetDatum(state);
which is a faithful translation but still wrong.
This seems purely cosmetic, though, so no need for a back-patch.
Pavel Stehule
M src/pl/plpgsql/src/pl_exec.c
Fix MSVC builds broken by xsubpp change
commit : 4a9018135a37203e176a561913453b38788ac7da
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 01:23:47 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 01:23:47 -0500
M src/tools/msvc/Mkvcbuild.pm
Move pg_dump memory routines into pg_dumpmem.c/h and restore common.c with its original functions. The previous function migration would cause too many difficulties in back-patching.
commit : 9a7d49d1fba666c8bfb9df0065545e85d54dbc41
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 26 Nov 2011 22:34:36 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 26 Nov 2011 22:34:36 -0500
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.c
D src/bin/pg_dump/dumpcatalog.c
A src/bin/pg_dump/dumpmem.c
R075 src/bin/pg_dump/common.h src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/dumputils.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_files.c
M src/bin/pg_dump/pg_backup_null.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_restore.c
Use the right interpreter for encoding test.
commit : efb0423cc7c6e46c22816e2acc48e8f827e341ed
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 18:39:12 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 18:39:12 -0500
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/sql/plperl.sql
Use the preferred version of xsubpp, not necessarily the one that came with the distro version of perl.
commit : ba00ab0b111a0cbbac612e8ea8b0d5f96534102e
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 15:22:32 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 15:22:32 -0500
David Wheeler and Alex Hunsaker.
Backpatch to 9.1 where it applies cleanly. A simple workaround is available for earlier
branches, and further effort doesn't seem warranted.
M src/pl/plperl/GNUmakefile
M src/tools/msvc/Mkvcbuild.pm
Make GiST index searches smarter about queries against empty ranges.
commit : 5966bcecf6167f2921e614e66499fa4d2c195c64
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 14:27:05 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 14:27:05 -0500
In the cases where the result of the called proc is negated, we should
explicitly test both inputs for empty, to ensure we'll never return "true"
for an unsatisfiable query. In other cases we can rely on the called proc
to say the right thing.
M src/backend/utils/adt/rangetypes_gist.c
Fix overly-aggressive and inconsistent quoting in OS X start script.
commit : 6c8768c3861d6690656b74676c44ffa63c0e4ef7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 13:01:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 13:01:02 -0500
Sidar Lopez, per bug #6310, with some additional improvements by me.
Back-patch to 9.0, where the issue was introduced.
M contrib/start-scripts/osx/PostgreSQL
Ensure plperl strings are always correctly UTF8 encoded.
commit : 4cdb41b54e432ee75e3c61e990b735b15fa66e81
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 12:19:38 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 12:19:38 -0500
Amit Khandekar and Alex Hunsaker.
Backpatched to 9.1 where the problem first occurred.
M src/pl/plperl/GNUmakefile
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/plperl_helpers.h
M src/pl/plperl/sql/plperl.sql
Fix join_path_components() to not add a leading slash when joining to an initial null string.
commit : fd6dbc24ef1dc6b39a795b5e0e959cf500ad71d6
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 26 Nov 2011 09:27:11 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 26 Nov 2011 09:27:11 -0500
Per report from Robert Haas in testing psql \ir.
M src/port/path.c
Take fillfactor into account in the new COPY bulk heap insert code.
commit : dea5f6cefe74a6cb51a1cfd39e12a2e1a026df35
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 26 Nov 2011 12:11:00 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 26 Nov 2011 12:11:00 +0200
Jeff Janes
M src/backend/access/heap/heapam.c
Remove ENABLE_SAME_CATVERSION_UPGRADES as unnecessary.
commit : 32fb4546e3f8cf9c2ef524e9c20766a046521193
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 19:07:48 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 19:07:48 -0500
M contrib/pg_upgrade/check.c
Fix unvalidated check constraints on domains, too
commit : f717f4bca298b0a1170ff506e02142e4859c3dae
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 25 Nov 2011 17:56:55 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 25 Nov 2011 17:56:55 -0300
Same bug as reported by Thom Brown for check constraints on tables: the
constraint must be dumped separately from the domain, otherwise it is
restored before the data and thus prevents potentially-violating data
from being loaded in the first place.
Per Dean Rasheed
M src/bin/pg_dump/pg_dump.c
Modify pg_dump to use error-free memory allocation macros. This avoids ignoring errors and call-site error checking.
commit : 3c0afde11a12bb3ca7c68a30ad0dedaa0d1adef5
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 15:40:51 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 15:40:51 -0500
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
A src/bin/pg_dump/common.h
M src/bin/pg_dump/compress_io.c
A src/bin/pg_dump/dumpcatalog.c
M src/bin/pg_dump/dumputils.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_files.c
M src/bin/pg_dump/pg_backup_null.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.h
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
Allow pg_upgrade to upgrade clusters that use exclusion contraints by fixing pg_dump to properly preserve such indexes.
commit : 35e27226b6751a90c9c911d08cb47b9f8a58825f
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 14:35:52 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 14:35:52 -0500
Backpatch to 9.1 and 9.0 (where the bug was introduced).
M src/bin/pg_dump/pg_dump.c
Improve logging of autovacuum I/O activity
commit : 9d3b50244357ef4c4e3b6e01f91de599077179c8
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 25 Nov 2011 12:10:46 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 25 Nov 2011 12:10:46 -0300
This adds some I/O stats to the logging of autovacuum (when the
operation takes long enough that log_autovacuum_min_duration causes it
to be logged), so that it is easier to tune. Notably, it adds buffer
I/O counts (hits, misses, dirtied) and read and write rate.
Authors: Greg Smith and Noah Misch
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/utils/init/globals.c
M src/include/miscadmin.h
Fix erroneous replay of GIN_UPDATE_META_PAGE WAL records.
commit : 877b67c38b946dcbf70fe11736bdde841e4c826b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 Nov 2011 13:58:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 Nov 2011 13:58:59 -0500
A simple thinko in ginRedoUpdateMetapage, namely failing to increment a
loop counter, led to inserting records into the last pending-list page in
the wrong order (the opposite of that intended). So far as I can tell,
this would not upset the code that eventually flushes pending items into
the main part of the GIN index. But it did break the code that searched
the pending list for matches, resulting in transient failure to find
matching entries during index lookups, as illustrated in bug #6307 from
Maksym Boguk.
Back-patch to 8.4 where the incorrect code was introduced.
M src/backend/access/gin/ginxlog.c
Move "hot" members of PGPROC into a separate PGXACT array.
commit : ed0b409d22346b1b027a4c2099ca66984d94b6dd
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 25 Nov 2011 08:02:10 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 25 Nov 2011 08:02:10 -0500
This speeds up snapshot-taking and reduces ProcArrayLock contention.
Also, the PGPROC (and PGXACT) structures used by two-phase commit are
now allocated as part of the main array, rather than in a separate
array, and we keep ProcArray sorted in pointer order. These changes
are intended to minimize the number of cache lines that must be pulled
in to take a snapshot, and testing shows a substantial increase in
performance on both read and write workloads at high concurrencies.
Pavan Deolasee, Heikki Linnakangas, Robert Haas
M src/backend/access/transam/twophase.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/commands/analyze.c
M src/backend/commands/vacuum.c
M src/backend/postmaster/postmaster.c
M src/backend/replication/walsender.c
M src/backend/storage/ipc/ipci.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/deadlock.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/time/snapmgr.c
M src/include/storage/proc.h
Fix unsupported options in CREATE TABLE ... AS EXECUTE.
commit : 9ed439a9c07b69c2617cc98596611fdbdc22472c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 24 Nov 2011 23:21:06 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 24 Nov 2011 23:21:06 -0500
The WITH [NO] DATA option was not supported, nor the ability to specify
replacement column names; the former limitation wasn't even documented, as
per recent complaint from Naoya Anzai. Fix by moving the responsibility
for supporting these options into the executor. It actually takes less
code this way ...
catversion bump due to change in representation of IntoClause, which might
affect stored rules.
M doc/src/sgml/ref/create_table_as.sgml
M src/backend/executor/execMain.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/include/catalog/catversion.h
M src/include/nodes/primnodes.h
Dump an unvalidated constraint separately from its table
commit : e90710f34a6d5a73475e4241852b377675600325
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 24 Nov 2011 18:35:22 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 24 Nov 2011 18:35:22 -0300
This allows possibly violating data to be imported before the constraint
is installed.
Bug reported by Thom Brown
M src/bin/pg_dump/pg_dump.c
Preserve SQLSTATE when an SPI error is propagated through PL/python exception handler. This was a regression in 9.1, when the capability to catch specific SPI errors was added, so backpatch to 9.1.
commit : f21fc7f9fc63ff86d7d77d352ae274b6e2b6e09e
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 24 Nov 2011 17:18:43 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 24 Nov 2011 17:18:43 +0200
Mika Eloranta, with some editing by Jan Urbański.
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_error.sql
Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing to allow upgrades of the same catalog version. (Doesn't work for tablespaces, as indicated by C comment.)
commit : 5df1403b0f2b44235c8f401bd49dab9a8cf6bf90
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 23 Nov 2011 22:45:50 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 23 Nov 2011 22:45:50 -0500
M contrib/pg_upgrade/check.c
Some more editing of the range-types documentation.
commit : 604d4c4c95c44090af25083ce6624fea3ebb4553
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 19:13:56 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 19:13:56 -0500
Be more thorough about specifying the expectations for canonical and
subtype_diff functions, and move that info to the same place.
M doc/src/sgml/rangetypes.sgml
M doc/src/sgml/ref/create_type.sgml
Adjust range_adjacent to support different canonicalization rules.
commit : b7056b832444696c931d59af057b0a345f5ae178
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 17:13:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 17:13:02 -0500
The original coding would not work for discrete ranges in which the
canonicalization rule is to produce symmetric boundaries (either [] or ()
style), as noted by Jeff Davis. Florian Pflug pointed out that we could
fix that by invoking the canonicalization function to see if the range
"between" the two given ranges normalizes to empty. This implementation
of Florian's idea is a tad slower than the original code, but only in the
case where there actually is a canonicalization function --- if not, it's
essentially the same logic as before.
M src/backend/utils/adt/rangetypes.c
Creator of a range type must have permission to call support functions.
commit : a912a2784be5d144aab89e447dfe8ca74b6ad079
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 12:45:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 12:45:49 -0500
Since range types can be created by non-superusers, we need to consider
their permissions. Ideally we'd check this when the type is used, not
when it's created, but that seems like much more trouble than it's worth.
The existing restriction that the support functions be immutable already
prevents most cases where an unauthorized call to a function might be
thought a security issue, and the fact that the user has no access to
the results of the system's calls to subtype_diff closes off the other
plausible reason for concern. So this check is basically pro-forma,
but let's make it anyway.
M src/backend/commands/typecmds.c
Remove user-selectable ANALYZE option for range types.
commit : 74c1723fc8dca2d70576ef2f0a66f4a7c99c173a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 00:03:22 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 23 Nov 2011 00:03:22 -0500
It's not clear that a per-datatype typanalyze function would be any more
useful than a generic typanalyze for ranges. What *is* clear is that
letting unprivileged users select typanalyze functions is a crash risk or
worse. So remove the option from CREATE TYPE AS RANGE, and instead put in
a generic typanalyze function for ranges. The generic function does
nothing as yet, but hopefully we'll improve that before 9.2 release.
M doc/src/sgml/ref/create_type.sgml
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes.c
M src/bin/pg_dump/pg_dump.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_type.h
M src/include/utils/rangetypes.h
Remove zero- and one-argument range constructor functions.
commit : df73584431e7edb1dd76578777bd0fcc17b916a1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 20:45:05 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 20:45:05 -0500
Per discussion, the zero-argument forms aren't really worth the catalog
space (just write 'empty' instead). The one-argument forms have some use,
but they also have a serious problem with looking too much like functional
cast notation; to the point where in many real use-cases, the parser would
misinterpret what was wanted.
Committing this as a separate patch, with the thought that we might want
to revert part or all of it if we can think of some way around the cast
ambiguity.
M doc/src/sgml/rangetypes.sgml
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/rangetypes.h
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/rangetypes.sql
Improve implementation of range-contains-element tests.
commit : cddc819e45010492da00164d225a749661f43aef
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 17:45:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 17:45:02 -0500
Implement these tests directly instead of constructing a singleton range
and then applying range-contains. This saves a range serialize/deserialize
cycle as well as a couple of redundant bound-comparison steps, and adds
very little code on net.
Remove elem_contained_by_range from the GiST opclass: it doesn't belong
there because there is no way to use it in an index clause (where the
indexed column would have to be on the left). Its commutator is in the
opclass, and that's what counts.
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/test/regress/expected/opr_sanity.out
Check for INSERT privileges in SELECT INTO / CREATE TABLE AS.
commit : f1b4aa2a84732255bd8a34fc9c7994a04409b77a
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 22 Nov 2011 16:16:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 22 Nov 2011 16:16:26 -0500
In the normal course of events, this matters only if ALTER DEFAULT
PRIVILEGES has been used to revoke default INSERT permission. Whether
or not the new behavior is more or less likely to be what the user wants
when dealing only with the built-in privilege facilities is arguable,
but it's clearly better when using a loadable module such as sepgsql
that may use the hook in ExecCheckRTPerms to enforce additional
permissions checks.
KaiGai Kohei, reviewed by Albe Laurenz
M src/backend/executor/execMain.c
M src/test/regress/expected/select_into.out
M src/test/regress/sql/select_into.sql
Still more review for range-types patch.
commit : 766948beddef66dd89563f465919eca6e131861c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 16:05:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 22 Nov 2011 16:05:49 -0500
Per discussion, relax the range input/construction rules so that the
only hard error is lower bound > upper bound. Cases where the lower
bound is <= upper bound, but the range nonetheless normalizes to empty,
are now permitted.
Fix core dump in range_adjacent when bounds are infinite. Marginal
cleanup of regression test cases, some more code commenting.
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/utils/rangetypes.h
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/rangetypes.sql
Small markup and wording improvement
commit : 024ea25ccd553aa0ecb41d626a1016470e25a9a0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 22 Nov 2011 21:14:53 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 22 Nov 2011 21:14:53 +0200
M doc/src/sgml/information_schema.sgml
Continue to allow VACUUM to mark last block of index dirty even when there is no work to do. Further analysis required. Revert of patch c1458cc495ff800cd176a1c2e56d8b62680d9b71
commit : 2d2841a56c8fa37a5dd5c6d33488ba6ca37116ff
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 22 Nov 2011 09:48:06 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 22 Nov 2011 09:48:06 +0000
M src/backend/access/nbtree/nbtpage.c
More code review for rangetypes patch.
commit : a4ffcc8e115ed637f69ecb0295d78cc97f08a483
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 16:19:53 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 16:19:53 -0500
Fix up some infelicitous coding in DefineRange, and add some missing error
checks. Rearrange operator strategy number assignments for GiST anyrange
opclass so that they don't make such a mess of opr_sanity's table of
operator names associated with different strategy numbers. Assign
hopefully-temporary selectivity estimators to range operators that didn't
have one --- poor as the estimates are, they're still a lot better than the
default 0.5 estimate, and they'll shut up the opr_sanity test that wants to
see selectivity estimators on all built-in operators.
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_operator.h
M src/test/regress/expected/opr_sanity.out
M src/test/regress/expected/plpgsql.out
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/opr_sanity.sql
M src/test/regress/sql/plpgsql.sql
M src/test/regress/sql/rangetypes.sql
Fix citext upgrade script to update derived copies of pg_type.typcollation.
commit : 9b97b7f8356c63ea0b6704718d75ea01ec3035bf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 11:24:39 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 11:24:39 -0500
If the existing citext type has not merely been created, but used in any
tables, then the upgrade script wasn't doing enough. We have to update
attcollation for each citext table column, and indcollation for each citext
index column, as well. Per report from Rudolf van der Leeden.
M contrib/citext/citext–unpackaged–1.0.sql
Further code review for range types patch.
commit : b985d48779146b7ba969b0963614ad7683589bc8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 20 Nov 2011 23:50:27 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 20 Nov 2011 23:50:27 -0500
Fix some bugs in coercion logic and pg_dump; more comment cleanup;
minor cosmetic improvements.
M doc/src/sgml/datatype.sgml
M src/backend/catalog/pg_proc.c
M src/backend/commands/typecmds.c
M src/backend/parser/parse_coerce.c
M src/backend/tcop/utility.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/fmgr/funcapi.c
M src/bin/pg_dump/pg_dump.c
M src/include/nodes/parsenodes.h
M src/include/utils/builtins.h
M src/include/utils/rangetypes.h
M src/pl/plpgsql/src/pl_comp.c
Avoid floating-point underflow while tracking buffer allocation rate.
commit : 40d35036bb160d5724305454d41c68ab1637ee6f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 19 Nov 2011 00:35:29 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 19 Nov 2011 00:35:29 -0500
When the system is idle for awhile after activity, the "smoothed_alloc"
state variable in BgBufferSync converges slowly to zero. With standard
IEEE float arithmetic this results in several iterations with denormalized
values, which causes kernel traps and annoying log messages on some
poorly-designed platforms. There's no real need to track such small values
of smoothed_alloc, so we can prevent the kernel traps by forcing it to zero
as soon as it's too small to be interesting for our purposes. This issue
is purely cosmetic, since the iterations don't happen fast enough for the
kernel traps to pose any meaningful performance problem, but still it seems
worth shutting up the log messages.
The kernel log messages were previously reported by a number of people,
but kudos to Greg Matthews for tracking down exactly where they were coming
from.
M src/backend/storage/buffer/bufmgr.c
Further review of range-types patch.
commit : a1a233af66ed14d225ac2d5e7948a5cc8ed2cde6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 18 Nov 2011 18:23:55 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 18 Nov 2011 18:23:55 -0500
Lots of documentation cleanup today, and still more type_sanity tests.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/extend.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/rangetypes.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/rowtypes.sgml
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump_sort.c
M src/include/catalog/pg_range.h
M src/include/catalog/pg_type.h
M src/test/regress/expected/type_sanity.out
M src/test/regress/sql/type_sanity.sql
Avoid marking buffer dirty when VACUUM has no work to do. When wal_level = 'hot_standby' we touched the last page of the relation during a VACUUM, even if nothing else had happened. That would alter the LSN of the last block and set the mtime of the relation file unnecessarily. Noted by Thom Brown.
commit : c1458cc495ff800cd176a1c2e56d8b62680d9b71
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 18 Nov 2011 16:06:53 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 18 Nov 2011 16:06:53 +0000
M src/backend/access/nbtree/nbtpage.c
Do missed autoheader run for previous commit.
commit : f6438f66226e37851e11a93edebae0198a875100
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 22:39:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 22:39:14 -0500
M src/include/pg_config.h.in
Remove scandir() requirement in pg_upgrade; instead just use readdir() --- we were not using the scandir pattern filtering anyway. This also removes the scandir requirement in configure.
commit : 7012b5edb7f12be9f9d2816bb64fcb80515cc18c
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 21:59:04 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 21:59:04 -0500
M configure
M configure.in
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Further consolidation of DROP statement handling.
commit : fc6d1006bda783cc002c61a5f072905849dbde4b
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 21:31:29 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 21:31:29 -0500
This gets rid of an impressive amount of duplicative code, with only
minimal behavior changes. DROP FOREIGN DATA WRAPPER now requires object
ownership rather than superuser privileges, matching the documentation
we already have. We also eliminate the historical warning about dropping
a built-in function as unuseful. All operations are now performed in the
same order for all object types handled by dropcmds.c.
KaiGai Kohei, with minor revisions by me
M src/backend/commands/aggregatecmds.c
M src/backend/commands/dropcmds.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/proclang.c
M src/backend/commands/trigger.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/rewrite/rewriteRemove.c
M src/backend/tcop/utility.c
M src/include/commands/defrem.h
M src/include/commands/proclang.h
M src/include/commands/trigger.h
M src/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
M src/include/rewrite/rewriteRemove.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Declare range inclusion operators as taking anyelement not anynonarray.
commit : 709aca59608395eef9ceb7dcb79fd9d03a0709ef
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 18:56:33 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 18:56:33 -0500
Use of anynonarray was a crude hack to get around ambiguity versus the
array inclusion operators of the same names. My previous patch to extend
the parser's type resolution heuristics makes that unnecessary, so use
the more general declaration instead. This eliminates a wart that these
operators couldn't be used with ranges over arrays, which are otherwise
supported just fine.
Also, mark range_before and range_after as commutator operators,
per discussion with Jeff Davis.
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/rangetypes.sql
Extend the unknowns-are-same-as-known-inputs type resolution heuristic.
commit : 1a8b9fb5499d8646661a57edd3c88c3107622ff8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 18:28:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 18:28:41 -0500
For a very long time, one of the parser's heuristics for resolving
ambiguous operator calls has been to assume that unknown-type literals are
of the same type as the other input (if it's known). However, this was
only used in the first step of quickly checking for an exact-types match,
and thus did not help in resolving matches that require coercion, such as
matches to polymorphic operators. As we add more polymorphic operators,
this becomes more of a problem. This patch adds another use of the same
heuristic as a last-ditch check before failing to resolve an ambiguous
operator or function call. In particular this will let us define the range
inclusion operator in a less limited way (to come in a follow-on patch).
M doc/src/sgml/typeconv.sgml
M src/backend/parser/parse_func.c
Fix range_cmp_bounds for the case of equal-valued exclusive bounds.
commit : bf4f96b5e264f1c0f5d8694f11c6f9f5b3132b3b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 16:50:32 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 17 Nov 2011 16:50:32 -0500
Also improve its comments and related regression tests.
Jeff Davis, with some further adjustments by Tom
M src/backend/utils/adt/rangetypes.c
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/rangetypes.sql
Don't quote language name
commit : ef27c81d891da7c66740da305c7ec4e5bd584607
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 17 Nov 2011 18:35:07 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 17 Nov 2011 18:35:07 -0300
Same as previous patch, but give it actual thought this time
M contrib/isn/isn–1.0.sql
M contrib/pgcrypto/pgcrypto–1.0.sql
Don't quote language name
commit : b44dda715884487b92f14a0ea4addeaf163af802
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 17 Nov 2011 18:27:54 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 17 Nov 2011 18:27:54 -0300
It's been deprecated for ages according to Tom, and it breaks now given
the previous patch anyway.
Per buildfarm
M contrib/citext/citext–1.0.sql
Remove ancient downcasing code from procedural language operations.
commit : 67dc4eed42186ba6a2456578899bfd38d003201a
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 14:20:13 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 14:20:13 -0500
A very long time ago, language names were specified as literals rather
than identifiers, so this code was added to do case-folding. But that
style has ben deprecated for many years so this isn't needed any more.
Language names will still be downcased when specified as unquoted
identifiers, but quoted identifiers or the old style using string
literals will be left as-is.
M doc/src/sgml/ref/create_language.sgml
M src/backend/commands/define.c
M src/backend/commands/functioncmds.c
M src/backend/commands/proclang.c
M src/include/commands/defrem.h
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
commit : ee3ef8f30c4241e95f761c41501979dfd4f22c6a
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:40:44 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:40:44 -0500
M contrib/pg_upgrade/file.c
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes crash on Windows.
commit : 988f907d2437ea0b45aa0002178610bb9d8a399a
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:24:54 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:24:54 -0500
Backpatched to 9.1.
Reported by Mark Dilger
M contrib/pg_upgrade/file.c
Remove pg_upgrade function no longer called (dir_matching_filenames).
commit : b735757c3254679af6d6e768e4c59f937e650eb5
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:16:55 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:16:55 -0500
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
Restructure get_object_address() so it's safe against concurrent DDL.
commit : b3ad5d02c9cd8a4c884cd78480f221afe8ce5590
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 12:41:37 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 17 Nov 2011 12:41:37 -0500
This gives a much better error message when the object of interest is
concurrently dropped and avoids needlessly failing when the object of
interest is concurrently dropped and recreated. It also improves the
behavior of two concurrent DROP IF EXISTS operations targeted at the
same object; as before, one will drop the object, but now the other
will emit the usual NOTICE indicating that the object does not exist,
instead of rolling back. As a fringe benefit, it's also slightly
less code.
M src/backend/catalog/objectaddress.c
Applied Zoltan's patch to correctly align interval and timestamp data in ecpg's sqlda.
commit : 309411a69eb40215fbf37ac16facc10aea7998e5
author : Michael Meskes <meskes@postgresql.org>
date : Thu, 17 Nov 2011 14:07:25 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Thu, 17 Nov 2011 14:07:25 +0100
M src/interfaces/ecpg/ecpglib/sqlda.c
Code review for range-types catalog entries.
commit : 4509033a00df5f49c42a21772d8d617efe83e549
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 16 Nov 2011 18:21:34 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 16 Nov 2011 18:21:34 -0500
Fix assorted infelicities, such as dependency on OIDs that aren't
hardwired, as well as outright misdeclaration of daterange_canonical(),
which resulted in crashes if you invoked it directly. Add some more
regression tests to try to catch similar mistakes in future.
M src/include/catalog/catversion.h
M src/include/catalog/indexing.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_range.h
M src/include/catalog/pg_type.h
M src/test/regress/expected/rangetypes.out
M src/test/regress/expected/type_sanity.out
M src/test/regress/sql/rangetypes.sql
M src/test/regress/sql/type_sanity.sql
Don't elide blank lines when accumulating psql command history.
commit : ff4fd4bf53c5512427f8ecea08d6ca7777efa2c5
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 15 Nov 2011 20:34:47 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 15 Nov 2011 20:34:47 -0500
This can change the meaning of queries, if the blank line happens to
occur in the middle of a quoted literal, as per complaint from Tomas Vondra.
Back-patch to all supported branches.
M src/bin/psql/input.c
Improve caching in range type I/O functions.
commit : 04da3232907680caad3445928c97a246c626a14a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 Nov 2011 15:47:51 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 Nov 2011 15:47:51 -0500
Cache the the element type's I/O info across calls, not only the range
type's info. In passing, also clean up hash_range a bit more.
M src/backend/utils/adt/rangetypes.c
Restructure function-internal caching in the range type code.
commit : 37ee4b75db8f979da6d67ba153d068b012394b46
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 Nov 2011 13:05:45 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 15 Nov 2011 13:05:45 -0500
Move the responsibility for caching specialized information about range
types into the type cache, so that the catalog lookups only have to occur
once per session. Rearrange APIs a bit so that fn_extra caching is
actually effective in the GiST support code. (Use of OidFunctionCallN is
bad enough for performance in itself, but it also prevents the function
from exploiting fn_extra caching.)
The range I/O functions are still not very bright about caching repeated
lookups, but that seems like material for a separate patch.
Also, avoid unnecessary use of memcpy to fetch/store the range type OID and
flags, and don't use the full range_deserialize machinery when all we need
to see is the flags value.
Also fix API error in range_gist_penalty --- it was failing to set *penalty
for any case involving an empty range.
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/cache/typcache.c
M src/include/utils/rangetypes.h
M src/include/utils/typcache.h
Fix alignment and toasting bugs in range types.
commit : ad50934eaadb626de682defe0ad270bbf31e92a2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 21:42:04 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 21:42:04 -0500
A range type whose element type has 'd' alignment must have 'd' alignment
itself, else there is no guarantee that the element value can be used
in-place. (Because range_deserialize uses att_align_pointer which forcibly
aligns the given pointer, violations of this rule did not lead to SIGBUS
but rather to garbage data being extracted, as in one of the added
regression test cases.)
Also, you can't put a toast pointer inside a range datum, since the
referenced value could disappear with the range datum still present.
For consistency with the handling of arrays and records, I also forced
decompression of in-line-compressed bound values. It would work to store
them as-is, but our policy is to avoid situations that might result in
double compression.
Add assorted regression tests for this, and bump catversion because of
fixes to built-in pg_type entries.
Also some marginal cleanup of inconsistent/unnecessary error checks.
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_type.h
M src/test/regress/expected/rangetypes.out
M src/test/regress/expected/type_sanity.out
M src/test/regress/sql/rangetypes.sql
M src/test/regress/sql/type_sanity.sql
Update oidjoins regression test to match git HEAD.
commit : 4165d5b6d7d2e399edbc6d027039358794aa8f04
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 20:28:38 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 20:28:38 -0500
This is mostly to add some sanity checking for the pg_range catalog.
M src/test/regress/expected/oidjoins.out
M src/test/regress/sql/oidjoins.sql
M src/tools/findoidjoins/README
Return NULL instead of throwing error when desired bound is not available.
commit : 4f9e33063cea270166fba12d89fe49876f814398
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 15:34:39 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 15:34:39 -0500
Change range_lower and range_upper to return NULL rather than throwing an
error when the input range is empty or the relevant bound is infinite. Per
discussion, throwing an error seems likely to be unduly hard to work with.
Also, this is more consistent with the behavior of the constructors, which
treat NULL as meaning an infinite bound.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/rangetypes.c
Return FALSE instead of throwing error for comparisons with empty ranges.
commit : 851c83fc81917c61b063c875fc1bca489dfcc482
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 15:15:53 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 15:15:53 -0500
Change range_before, range_after, range_adjacent to return false rather
than throwing an error when one or both input ranges are empty.
The original definition is unnecessarily difficult to use, and also can
result in undesirable planner failures since the planner could try to
compare an empty range to something else while deriving statistical
estimates. (This was, in fact, the cause of repeatable regression test
failures on buildfarm member jaguar, as well as intermittent failures
elsewhere.)
Also tweak rangetypes regression test to not drop all the objects it
creates, so that the final state of the regression database contains
some rangetype objects for pg_dump testing.
M doc/src/sgml/filelist.sgml
M doc/src/sgml/func.sgml
M src/backend/utils/adt/rangetypes.c
M src/test/regress/expected/rangetypes.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/sql/rangetypes.sql
Fix copyright notices, other minor editing in new range-types code.
commit : f1585362856d4da17113ba2e4ba46cf83cba0cf2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 13:59:34 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 14 Nov 2011 13:59:34 -0500
No functional changes in this commit (except I could not resist the
temptation to re-word a couple of error messages). This is just manual
cleanup after pgindent to make the code look reasonably like other PG
code, in preparation for more detailed code review to come.
M src/backend/catalog/pg_range.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/catalog/pg_range.h
M src/include/utils/rangetypes.h
M src/test/regress/expected/rangetypes.out
Rerun pgindent with updated typedef list.
commit : 1a2586c1d0d458235b3241834f3f755410301c64
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 14 Nov 2011 12:12:23 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 14 Nov 2011 12:12:23 -0500
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes.c
M src/tools/pgindent/typedefs.list
Run pgindent on range type files, per request from Tom.
commit : cdaa45fd4b09c64d634818e52ef7a2191ce40667
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 14 Nov 2011 12:08:48 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 14 Nov 2011 12:08:48 -0500
M src/backend/catalog/pg_range.c
M src/backend/commands/typecmds.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
Applied patch by Zoltan to fix copy&paste bug in ecpg's sqlda handling.
commit : 5b5985e6c0733b4a2a62f808a403b4caf7463fe3
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 13 Nov 2011 13:46:45 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 13 Nov 2011 13:46:45 +0100
M src/interfaces/ecpg/ecpglib/sqlda.c
Wakeup WALWriter as needed for asynchronous commit performance. Previously we waited for wal_writer_delay before flushing WAL. Now we also wake WALWriter as soon as a WAL buffer page has filled. Significant effect observed on performance of asynchronous commits by Robert Haas, attributed to the ability to set hint bits on tuples earlier and so reducing contention caused by clog lookups.
commit : 4de82f7d7c50a81ec8e70e2cb0ab413ab9134c0b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Sun, 13 Nov 2011 09:00:57 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Sun, 13 Nov 2011 09:00:57 +0000
M src/backend/access/transam/xlog.c
M src/backend/postmaster/walwriter.c
M src/include/access/xlog.h
In plpgsql, allow foreign tables to define row types.
commit : 02d88efea1f719e59ce684c2e14bad23d55fdd15
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 Nov 2011 18:49:09 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 Nov 2011 18:49:09 -0500
This seems to have been just an oversight in previous foreign-table work.
A quick grep didn't turn up any other places where RELKIND_FOREIGN_TABLE
was obviously omitted.
One change noted by Alexander Soudakov, the other by me.
Back-patch to 9.1.
M src/pl/plpgsql/src/pl_comp.c
Add psql expanded auto mode
commit : 95d2af1646080474ad3e1f1303e68dd5799f9cad
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 Nov 2011 17:03:10 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 12 Nov 2011 17:03:10 +0200
This adds the "auto" option to the \x command, which switches to the
expanded mode when the normal output would be wider than the screen.
reviewed by Noah Misch
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/help.c
M src/bin/psql/print.c
M src/bin/psql/print.h
Avoid retaining multiple relation locks in RangeVarGetRelid.
commit : aa3299f25601c1a27e52c1c49e92b7f11441e76b
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 12 Nov 2011 01:22:45 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 12 Nov 2011 01:22:45 -0500
If it turns out we've locked the wrong OID, release the old lock. In
most cases, it's pretty harmless to retain the extra lock, but this
seems tidier and avoids using lock table slots unnecessarily.
Per discussion with Tom Lane.
M src/backend/catalog/namespace.c
Fix psql's \dd version check for operator families.
commit : a6ce8ba2f3b280bb06cbca84a5375d42a25bea5f
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 11 Nov 2011 23:33:44 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 11 Nov 2011 23:33:44 -0500
Report and patch by Josh Kupershmidt; comment revisions by me.
M src/bin/psql/describe.c
Throw nice error if server is too old to support psql's \ef or \sf command.
commit : 6f3dc00e24aa2a8e7e2c5e5095b6223712b8204c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 18:36:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 18:36:49 -0500
Previously, you'd get "function pg_catalog.pg_get_functiondef(integer) does
not exist", which is at best rather unprofessional-looking. Back-patch
to 8.4 where \ef was introduced.
Josh Kupershmidt
M src/bin/psql/command.c
Correct documentation for trace_userlocks.
commit : 788cb1c2e8c68d054b7b5bb43f659347acf09278
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 18:00:34 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 18:00:34 -0500
M doc/src/sgml/config.sgml
Revert removal of trace_userlocks, because userlocks aren't gone.
commit : 71b2b657c034743f81ae7906d7b0fcc8e9a0a6a3
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 17:54:27 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 17:54:27 -0500
This reverts commit 0180bd6180511875db046bf8ddcaa633a2952dfd.
contrib/userlock is gone, but user-level locking still exists,
and is exposed via the pg_advisory* family of functions.
M doc/src/sgml/config.sgml
M src/backend/storage/lmgr/lock.c
M src/backend/utils/misc/check_guc
M src/backend/utils/misc/guc.c
M src/include/storage/lock.h
Avoid platform-dependent infinite loop in pg_dump.
commit : cf22e851b6ae8737f3e767dffcadf1722fbb36a7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 16:08:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 16:08:14 -0500
If malloc(0) returns NULL, the binary search in findSecLabels() will
probably go into an infinite loop when there are no security labels,
because NULL-1 is greater than NULL after wraparound.
(We've seen this pathology before ... I wonder whether there's a way to
detect the class of bugs automatically?)
Diagnosis and patch by Steve Singer, cosmetic adjustments by me
M src/bin/pg_dump/pg_dump.c
Fix server header file installation with vpath builds
commit : 409b8c75ba71fe6f3a7f9ccc094810966ef3a177
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 Nov 2011 20:52:54 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 Nov 2011 20:52:54 +0200
Several server header files would not be installed in vpath builds
because they live in the build directory.
M src/include/Makefile
Document that PQexec() can handle a NULL res pointer just fine.
commit : d5873b635989e0b780c1c9f07139dfebf0f5e546
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 Nov 2011 13:00:44 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 Nov 2011 13:00:44 -0500
Backpatch to 9.1.
Mark Hills
M doc/src/sgml/libpq.sgml
Fix another bug in the redo of COPY batches.
commit : 2e02280726f5ca7a8e3c76e1491eaf5ab00fc8f4
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 Nov 2011 12:09:33 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 10 Nov 2011 12:09:33 +0200
I got alignment wrong in the redo routine. Spotted by redoing the log
genereated by copy regression test.
M src/backend/access/heap/heapam.c
Only install the extension files for the current Python major version
commit : 6f2efcd557bb3309e70751daf1fb7c74bbaa4061
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 21:43:04 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 21:43:04 +0200
M src/pl/plpython/Makefile
Fix bugs in the COPY heap-insert batching patch.
commit : f81648cb1ee5ce8d2e479a17db512046012c77e7
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 9 Nov 2011 21:24:26 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 9 Nov 2011 21:24:26 +0200
Forgot to call RestoreBkpBlocks() in the redo-function, as pointed out by
Simon Riggs. In redo of a regular heap insert, it's taken care of in
heap_redo(), but this new record type uses the heap2 RM, and heap2_redo()
does not take care of that for you.
Also, failed to reset the vmbuffer and all_visibile_cleared local variables
after switching to a new buffer.
M src/backend/access/heap/heapam.c
Clean gettext-files file in clean target
commit : 3ad2c8e1681ba34a7b764a356489fdc580dc553c
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 20:56:19 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 20:56:19 +0200
It used to be cleaned in maintainer-clean, but that is inconsistent
with other cleaning of NLS files in nls-global.mk, and it's also wrong
overall, because it's not part of the distribution tarball, which is
the base definition of the maintainer-clean target.
M src/backend/nls.mk
Fix compiler warning.
commit : 452d1d193d3b15c4ff8ef56a9b50bdb91ea0665e
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 9 Nov 2011 11:14:50 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 9 Nov 2011 11:14:50 -0500
M src/backend/commands/copy.c
In COPY, insert tuples to the heap in batches.
commit : d326d9e8ea1d690cf6d968000efaa5121206d231
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 9 Nov 2011 10:54:41 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 9 Nov 2011 10:54:41 +0200
This greatly reduces the WAL volume, especially when the table is narrow.
The overhead of locking the heap page is also reduced. Reduced WAL traffic
also makes it scale a lot better, if you run multiple COPY processes at
the same time.
M src/backend/access/heap/heapam.c
M src/backend/commands/copy.c
M src/backend/postmaster/pgstat.c
M src/include/access/heapam.h
M src/include/access/htup.h
M src/include/pgstat.h
Tweak new regression test case for more portability.
commit : 2c30f96103c320d4e3c8cab2807d88476f584278
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 9 Nov 2011 00:13:37 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 9 Nov 2011 00:13:37 -0500
Ensure that same index gets selected on 32-bit and 64-bit machines.
Per buildfarm results.
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Fix random discrepancies between parallel_schedule and serial_schedule.
commit : 6d295b64945cb6ff9b64f55d1e51b5e2a1bb6f84
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 23:05:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 23:05:14 -0500
In particular, my previous patch expected the create_index test to run
before the inherit test; but this was only true in the serial schedule.
Rearrange this portion of the schedules to be more consistent.
Per buildfarm results.
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
Wrap appendrel member outputs in PlaceHolderVars in additional cases.
commit : 57664ed25e5dea117158a2e663c29e60b3546e1c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 21:14:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 21:14:21 -0500
Add PlaceHolderVar wrappers as needed to make UNION ALL sub-select output
expressions appear non-constant and distinct from each other. This makes
the world safe for add_child_rel_equivalences to do what it does. Before,
it was possible for that function to add identical expressions to different
EquivalenceClasses, which logically should imply merging such ECs, which
would be wrong; or to improperly add a constant to an EquivalenceClass,
drastically changing its behavior. Per report from Teodor Sigaev.
The only currently known consequence of this bug is "MergeAppend child's
targetlist doesn't match MergeAppend" planner failures in 9.1 and later.
I am suspicious that there may be other failure modes that could affect
older release branches; but in the absence of any hard evidence, I'll
refrain from back-patching further than 9.1.
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/placeholder.c
M src/include/optimizer/placeholder.h
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Make DatumGetInetP() unpack inet datums with a 1-byte header, and add a new macro, DatumGetInetPP(), that does not. This brings these macros in line with other DatumGet*P() macros.
commit : 3b8161723c645853021b57330dd2ea0484ec6131
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 22:39:43 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 22:39:43 +0200
Backpatch to 8.3, where 1-byte header varlenas were introduced.
M src/backend/utils/adt/network.c
M src/include/utils/inet.h
Rewrite comment for slightly greater accuracy.
commit : 0e1c4b7d974b9ff3b1cd62a9689a8560a8bab60e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 8 Nov 2011 08:11:25 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 8 Nov 2011 08:11:25 -0500
Per an observation from Thom Brown that the old version contained a typo.
M src/backend/commands/vacuumlazy.c
Fix hstore regression tests.
commit : bb1afb528a9154e21fe8ffe7e5c6dbf4a753136c
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 8 Nov 2011 08:07:21 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 8 Nov 2011 08:07:21 -0500
This was an oversight in commit b60653bc0b75b7f3b5dda0a2968a22129aafb2b2.
Also, fix a typo spotted by Thom Brown.
M contrib/hstore/expected/hstore.out
M contrib/hstore/hstore–1.0–1.1.sql
M contrib/hstore/sql/hstore.sql
Adjust range type docs for some last-minute changes I made to the patch. non_empty(anyrange) function was removed, empty(anyrange) was renamed to isempty(anyrange), and !? operators were removed.
commit : fbf99d2f16a82f13564bbd21689d018ecc72de01
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 09:40:37 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 09:40:37 +0200
M doc/src/sgml/func.sgml
M doc/src/sgml/rangetypes.sgml
-DLINUX_OOM_ADJ=0 should be in CPPFLAGS, not CFLAGS
commit : 6477d66780df0682e36e676fd746356bb23bf7ce
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 Nov 2011 06:49:50 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 Nov 2011 06:49:50 +0200
M doc/src/sgml/runtime.sgml
Remove hstore's text => text operator.
commit : b60653bc0b75b7f3b5dda0a2968a22129aafb2b2
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 21:47:45 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 21:47:45 -0500
Since PostgreSQL 9.0, we've emitted a warning message when an operator
named => is created, because the SQL standard now reserves that token
for another use. But we've also shipped such an operator with hstore.
Use of the function hstore(text, text) has been recommended in
preference to =>(text, text). Per discussion, it's now time to take
the next step and stop shipping the operator. This will allow us to
prohibit the use of => as an operator name in a future release if and
when we wish to support the SQL standard use of this token.
The release notes should mention this incompatibility.
Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
M contrib/hstore/Makefile
A contrib/hstore/hstore–1.0–1.1.sql
A contrib/hstore/hstore–1.1.sql
M contrib/hstore/hstore.control
M doc/src/sgml/hstore.sgml
Make VACUUM avoid waiting for a cleanup lock, where possible.
commit : bbb6e559c4ea0fb4c346beda76736451dc24eb4e
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 21:39:40 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 21:39:40 -0500
In a regular VACUUM, it's OK to skip pages for which a cleanup lock
isn't immediately available; the next VACUUM will deal with them. If
we're scanning the entire relation to advance relfrozenxid, we might
need to wait, but only if there are tuples on the page that actually
require freezing. These changes should greatly reduce the incidence
of of vacuum processes getting "stuck".
Simon Riggs and Robert Haas
M src/backend/access/heap/heapam.c
M src/backend/commands/vacuumlazy.c
M src/include/access/heapam.h
Minor grammar improvements.
commit : bd2396988a1afbcb6424700e52a62f34d2951bdd
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 12:27:26 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 7 Nov 2011 12:27:26 -0500
M doc/src/sgml/wal.sgml
Fix assorted bugs in contrib/unaccent's configuration file parsing.
commit : ced3a93ccbbd0a3866f2324662f7a1fa4c31909a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 7 Nov 2011 11:48:53 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 7 Nov 2011 11:48:53 -0500
Make it use t_isspace() to identify whitespace, rather than relying on
sscanf which is known to get it wrong on some platform/locale combinations.
Get rid of fixed-size buffers. Make it actually continue to parse the file
after ignoring a line with untranslatable characters, as was obviously
intended.
The first of these issues is per gripe from J Smith, though not exactly
either of his proposed patches.
M contrib/unaccent/unaccent.c
Fix timestamp range subdiff functions, when using float datetimes.
commit : ffc703a891e336b9bf4b74112bd4684d1f990fab
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 7 Nov 2011 17:33:31 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 7 Nov 2011 17:33:31 +0200
M src/backend/utils/adt/rangetypes.c
On second thought, we'd better just drop these tests altogether.
commit : f62be400c0e2369d68b4327ced721e47250dc40c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 6 Nov 2011 20:12:20 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 6 Nov 2011 20:12:20 -0500
Further experimentation reveals that my previous change didn't fix the
issue entirely: these tests would still fail at the spring-forward DST
transition. There doesn't seem to be any great value in testing this
specific issue for both timestamp and timestamptz, so just lose the
latter tests.
M src/test/regress/expected/horology.out
M src/test/regress/sql/horology.sql
Un-break horology regression test.
commit : 362f731dde94b10f8a01e80fddd2bf99c4f66587
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 6 Nov 2011 18:20:26 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 6 Nov 2011 18:20:26 -0500
Adjust ill-considered timezone-dependent tests added in commit
8a3d33c8e6c681d512f79af4a521ee0c02befcef so that they won't fail on DST
transition days. Per all-pink buildfarm.
M src/test/regress/expected/horology.out
M src/test/regress/sql/horology.sql
Oops, forgot to fix the catversion when I committed the range types patch. It was inadvertently changed to 201111111, which is a wrong date. Change it to current date, and remove the comment that was supposed to remind me to fix it before committing.
commit : 780571cc9fcfc1d2c4a0212c19975f2ef0b2eb42
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 6 Nov 2011 14:33:49 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 6 Nov 2011 14:33:49 +0200
M src/include/catalog/catversion.h
Update regression tests for \d+ modification
commit : 3a6e4076b73b16575373c4a99d3301cdb929fd03
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 16:00:23 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 16:00:23 +0100
Noted by Tom
M src/test/regress/expected/inherit.out
Show statistics target for columns in \d+ on a table
commit : ebcadba29fd1aeef76a4c0c4d1d2adad62fe945a
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 13:02:48 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 13:02:48 +0100
M src/bin/psql/describe.c
Make psql \d on a sequence show the table/column owning it
commit : 6f81a1f6688c2901d82c02158e9c865f5538246d
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 12:54:58 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 5 Nov 2011 12:54:58 +0100
M src/bin/psql/describe.c
Don't assume that a tuple's header size is unchanged during toasting.
commit : 039680affb1b925e8e5c9578b0ab05fa326452fe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 Nov 2011 23:22:50 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 Nov 2011 23:22:50 -0400
This assumption can be wrong when the toaster is passed a raw on-disk
tuple, because the tuple might pre-date an ALTER TABLE ADD COLUMN operation
that added columns without rewriting the table. In such a case the tuple's
natts value is smaller than what we expect from the tuple descriptor, and
so its t_hoff value could be smaller too. In fact, the tuple might not
have a null bitmap at all, and yet our current opinion of it is that it
contains some trailing nulls.
In such a situation, toast_insert_or_update did the wrong thing, because
to save a few lines of code it would use the old t_hoff value as the offset
where heap_fill_tuple should start filling data. This did not leave enough
room for the new nulls bitmap, with the result that the first few bytes of
data could be overwritten with null flag bits, as in a recent report from
Hubert Depesz Lubaczewski.
The particular case reported requires ALTER TABLE ADD COLUMN followed by
CREATE TABLE AS SELECT * FROM ... or INSERT ... SELECT * FROM ..., and
further requires that there be some out-of-line toasted fields in one of
the tuples to be copied; else we'll not reach the troublesome code.
The problem can only manifest in this form in 8.4 and later, because
before commit a77eaa6a95009a3441e0d475d1980259d45da072, CREATE TABLE AS or
INSERT/SELECT wouldn't result in raw disk tuples getting passed directly
to heap_insert --- there would always have been at least a junkfilter in
between, and that would reconstitute the tuple header with an up-to-date
t_natts and hence t_hoff. But I'm backpatching the tuptoaster change all
the way anyway, because I'm not convinced there are no older code paths
that present a similar risk.
M src/backend/access/heap/tuptoaster.c
Fix archive_command example
commit : 27ef415a716d75de3213cb6bcd6cf20e24eb0f4f
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 22:01:35 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 22:01:35 +0200
The given archive_command example didn't use %p or %f, which wouldn't
really work in practice.
M doc/src/sgml/backup.sgml
Add note about using GNU tar warning options for base backups
commit : 39b2d9ffb01ab356f6f5e0d441472ade7608b12a
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 21:52:37 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 21:52:37 +0200
M doc/src/sgml/backup.sgml
Add missing space in comment
commit : 6187df15320fbd958389358f5d4086b694c892ec
author : Magnus Hagander <magnus@hagander.net>
date : Fri, 4 Nov 2011 15:57:43 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Fri, 4 Nov 2011 15:57:43 +0100
M src/bin/psql/describe.c
Silence bogus compiler warning.
commit : b76c61f1e862f5e8e41ffc7154e83688742aab0e
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 4 Nov 2011 10:40:52 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 4 Nov 2011 10:40:52 -0400
M contrib/pg_upgrade/relfilenode.c
Check the return value of getcwd(), instead of assuming success.
commit : c9f48b572c773ab88d02e26ccb5b6ff5fea64c05
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 4 Nov 2011 10:40:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 4 Nov 2011 10:40:25 -0400
Kevin Grittner
M contrib/pg_upgrade/option.c
Move user functions related to WAL into xlogfuncs.c
commit : a030bfa6e41edae8a9a68dc8cef7fc7813f69a0a
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 4 Nov 2011 09:37:17 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 4 Nov 2011 09:37:17 +0000
M src/backend/access/transam/Makefile
M src/backend/access/transam/xlog.c
A src/backend/access/transam/xlogfuncs.c
M src/include/access/xlog.h
Unbreak isolationtester on Win32
commit : e145891c984540a86788f88b604c766c934b17ea
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 3 Nov 2011 23:54:58 -0200
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 3 Nov 2011 23:54:58 -0200
I broke it in a previous commit because I neglected to install the
necessary incantations to have getopt() work on Windows.
Per red blots in buildfarm.
M src/test/isolation/isolationtester.c
Fix bogus code in contrib/ tsearch dictionary examples.
commit : e3e3087d8717c26cd1c4581ba29274ac214eb816
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 19:17:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 19:17:48 -0400
Both dict_int and dict_xsyn were blithely assuming that whatever memory
palloc gives back will be pre-zeroed. This would typically work for
just about long enough to run their regression tests, and no longer :-(.
The pre-9.0 code in dict_xsyn was even lamer than that, as it would
happily give back a pointer to the result of palloc(0), encouraging
its caller to access off the end of memory. Again, this would just
barely fail to fail as long as memory contained nothing but zeroes.
Per a report from Rodrigo Hjort that code based on these examples
didn't work reliably.
M contrib/dict_int/dict_int.c
M contrib/dict_xsyn/dict_xsyn.c
Improve comments for TSLexeme data structure.
commit : a0d2f05a0d433ab68ec378744ff920562a5ef681
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 18:47:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 18:47:28 -0400
Mostly, clean up long-ago pgindent damage.
M src/include/tsearch/ts_public.h
Fix inline_set_returning_function() to allow multiple OUT parameters.
commit : 515e813543dad5464c1a226fd068fd4daf26a7f9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 17:53:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 17:53:13 -0400
inline_set_returning_function failed to distinguish functions returning
generic RECORD (which require a column list in the RTE, as well as run-time
type checking) from those with multiple OUT parameters (which do not).
This prevented inlining from happening. Per complaint from Jay Levitt.
Back-patch to 8.4 where this capability was introduced.
M src/backend/optimizer/util/clauses.c
Role membership of superusers is only by explicit membership for HBA.
commit : f66c8252ab9a64dd49a0af2b481a2621dd008768
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 3 Nov 2011 16:29:41 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 3 Nov 2011 16:29:41 -0400
Document that this rule applies to 'samerole' as well as to named roles.
Per gripe from Tom Lane.
M doc/src/sgml/client-auth.sgml
Adjust pg_upgrade "new database skip" code, e.g. 'postgres', to more cleanly handle old/new database mismatches.
commit : 84b8fcaa923259d6f7daf228183ecbeb924dc950
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 3 Nov 2011 13:56:56 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 3 Nov 2011 13:56:56 -0400
M contrib/pg_upgrade/relfilenode.c
Implement a dry-run mode for isolationtester
commit : 7ed36056751cc900418871b39595100cbb06de21
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 3 Nov 2011 15:06:08 -0200
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 3 Nov 2011 15:06:08 -0200
This mode prints out the permutations that would be run by the given
spec file, in the same format used by the permutation lines in spec
files. This helps in building new spec files.
Author: Alexander Shulgin, with some tweaks by me
M src/test/isolation/isolationtester.c
Do not treat a superuser as a member of every role for HBA purposes.
commit : 94cd0f1ad8af722a48a30a1087377b52ca99d633
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 3 Nov 2011 12:45:02 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 3 Nov 2011 12:45:02 -0400
This makes it possible to use reject lines with group roles.
Andrew Dunstan, reviewd by Robert Haas.
M doc/src/sgml/client-auth.sgml
M src/backend/libpq/hba.c
Properly close replication connection in pg_receivexlog
commit : 3b06105c7d999752177f98fdad20278d57804f8f
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 3 Nov 2011 15:43:25 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 3 Nov 2011 15:43:25 +0100
M src/bin/pg_basebackup/pg_receivexlog.c
Pre-pad WAL files when streaming transaction log
commit : e7cc8437bbff99cbc7f07f852f5169ba1356a414
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 3 Nov 2011 15:37:08 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 3 Nov 2011 15:37:08 +0100
Instead of filling files as they appear, pre-pad the
WAL files received when streaming xlog the same way
that the server does. Data is streamed into a .partial
file which is then renamed()d into palce when it's complete,
but it will always be 16MB.
This also means that the starting position for pg_receivexlog
is now simply right after the last complete segment, and we
never need to deal with partial segments there.
Patch by me, review by Fujii Masao
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Support range data types.
commit : 4429f6a9e3e12bb4af6e3677fbc78cd80f160252
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 3 Nov 2011 13:16:28 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 3 Nov 2011 13:16:28 +0200
Selectivity estimation functions are missing for some range type operators,
which is a TODO.
Jeff Davis
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/extend.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/plpgsql.sgml
A doc/src/sgml/rangetypes.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/xfunc.sgml
M src/backend/catalog/Makefile
M src/backend/catalog/pg_proc.c
A src/backend/catalog/pg_range.c
M src/backend/commands/typecmds.c
M src/backend/executor/functions.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_coerce.c
M src/backend/tcop/utility.c
M src/backend/utils/adt/Makefile
M src/backend/utils/adt/date.c
M src/backend/utils/adt/pseudotypes.c
A src/backend/utils/adt/rangetypes.c
A src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/fmgr/funcapi.c
M src/bin/pg_dump/pg_dump.c
M src/include/catalog/catversion.h
M src/include/catalog/indexing.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_opfamily.h
M src/include/catalog/pg_proc.h
A src/include/catalog/pg_range.h
M src/include/catalog/pg_type.h
M src/include/commands/typecmds.h
M src/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
M src/include/utils/lsyscache.h
A src/include/utils/rangetypes.h
M src/include/utils/syscache.h
M src/pl/plpgsql/src/pl_comp.c
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/opr_sanity.out
M src/test/regress/expected/plpgsql.out
A src/test/regress/expected/rangetypes.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/expected/type_sanity.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
M src/test/regress/sql/collate.linux.utf8.sql
M src/test/regress/sql/opr_sanity.sql
M src/test/regress/sql/plpgsql.sql
A src/test/regress/sql/rangetypes.sql
M src/test/regress/sql/type_sanity.sql
Improve docs for timing and skipping of checkpoints
commit : 43342891861cc2d08dea2b1c8b190e15e5a36551
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 3 Nov 2011 08:52:20 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 3 Nov 2011 08:52:20 +0000
Greg Smith
M doc/src/sgml/wal.sgml
Fix handling of PlaceHolderVars in nestloop parameter management.
commit : 7e3bf99baa18524de6ef1492cb3057314da97e68
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 00:50:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 00:50:58 -0400
If we use a PlaceHolderVar from the outer relation in an inner indexscan,
we need to reference the PlaceHolderVar as such as the value to be passed
in from the outer relation. The previous code effectively tried to
reconstruct the PHV from its component expression, which doesn't work since
(a) the Vars therein aren't necessarily bubbled up far enough, and (b) it
would be the wrong semantics anyway because of the possibility that the PHV
is supposed to have gone to null at some point before the current join.
Point (a) led to "variable not found in subplan target list" planner
errors, but point (b) would have led to silently wrong answers.
Per report from Roger Niederland.
M src/backend/executor/nodeNestloop.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/subselect.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Avoid scanning nulls at the beginning of a btree index scan.
commit : 1a77f8b63d159b88ceb6245fcb5e81a7f9ac9a22
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 19:35:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 19:35:48 -0400
If we have an inequality key that constrains the other end of the index,
it doesn't directly help us in doing the initial positioning ... but it
does imply a NOT NULL constraint on the index column. If the index stores
nulls at this end, we can use the implied NOT NULL condition for initial
positioning, just as if it had been stated explicitly. This avoids wasting
time when there are a lot of nulls in the column. This is the reverse of
the examples given in bugs #6278 and #6283, which were about failing to
stop early when we encounter nulls at the end of the indexscan.
M src/backend/access/nbtree/nbtsearch.c
Fix btree stop-at-nulls logic properly.
commit : 882368e854b6f094f94aca292f390bbd9f44359b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 17:53:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 17:53:49 -0400
As pointed out by Naoya Anzai, my previous try at this was a few bricks
shy of a load, because I had forgotten that the initial-positioning logic
might not try to skip over nulls at the end of the index the scan will
start from. We ought to fix that, because it represents an unnecessary
inefficiency, but first let's get the scan-stop logic back to a safe
state. With this patch, we preserve the performance benefit requested
in bug #6278 for the case of scanning forward into NULLs (in a NULLS
LAST index), but the reverse case of scanning backward across NULLs
when there's no suitable initial-positioning qual is still inefficient.
M src/backend/access/nbtree/nbtutils.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Update more comments about checkpoints being done by bgwriter
commit : 750f70b0fe91258f9f99b1d04a510e5b035e9249
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 17:15:35 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 17:15:35 +0000
M src/backend/access/transam/xlog.c
Reduce checkpoints and WAL traffic on low activity database server Previously, we skipped a checkpoint if no WAL had been written since last checkpoint, though this does not appear in user documentation. As of now, we skip a checkpoint until we have written at least one enough WAL to switch the next WAL file. This greatly reduces the level of activity and number of WAL messages generated by a very low activity server. This is safe because the purpose of a checkpoint is to act as a starting place for a recovery, in case of crash. This patch maintains minimal WAL volume for replay in case of crash, thus maintaining very low crash recovery time.
commit : 18fb9d8d21a28caddb72c7ffbdd7b96d52ff9724
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 15:26:33 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 15:26:33 +0000
M src/backend/access/transam/xlog.c
Refactor xlog.c to create src/backend/postmaster/startup.c Startup process now has its own dedicated file, just like all other special/background processes. Reduces role and size of xlog.c
commit : 9aceb6ab3c202a5bf00d5f00436bb6ad285fc0bf
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 14:25:01 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 14:25:01 +0000
M src/backend/access/transam/xlog.c
M src/backend/bootstrap/bootstrap.c
M src/backend/postmaster/Makefile
A src/backend/postmaster/startup.c
M src/backend/replication/walreceiverfuncs.c
M src/include/access/xlog.h
A src/include/postmaster/startup.h
Derive oldestActiveXid at correct time for Hot Standby. There was a timing window between when oldestActiveXid was derived and when it should have been derived that only shows itself under heavy load. Move code around to ensure correct timing of derivation. No change to StartupSUBTRANS() code, which is where this failed.
commit : 86e33648992cfc104836ab1fbb6e654308beb4a5
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:54:56 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:54:56 +0000
Bug report by Chris Redekop
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
M src/include/storage/procarray.h
M src/include/storage/standby.h
Start Hot Standby faster when initial snapshot is incomplete. If the initial snapshot had overflowed then we can start whenever the latest snapshot is empty, not overflowed or as we did already, start when the xmin on primary was higher than xmax of our starting snapshot, which proves we have full snapshot data.
commit : 10b7c686e52a6d1bb10194ebf9331ef06f044d46
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:47:43 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:47:43 +0000
Bug report by Chris Redekop
M src/backend/storage/ipc/procarray.c
Remove spurious entry from missed catch while patch juggling
commit : 2296e62a326dfd16ecae590f2f29773fd4348e7f
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:37:52 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:37:52 +0000
M src/backend/utils/init/postinit.c
Fix timing of Startup CLOG and MultiXact during Hot Standby
commit : f8409b39d1dae28f063b378b9edee1a657845503
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:07:44 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:07:44 +0000
Patch by me, bug report by Chris Redekop, analysis by Florian Pflug
M src/backend/access/transam/clog.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/xlog.c
M src/backend/utils/init/postinit.c
M src/include/access/clog.h
Initialize myProcLocks queues just once, at postmaster startup.
commit : c2891b46a4b04b80e1fe28ad0bfd75b40e97ea3e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 1 Nov 2011 22:44:54 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 1 Nov 2011 22:44:54 -0400
In assert-enabled builds, we assert during the shutdown sequence that
the queues have been properly emptied, and during process startup that
we are inheriting empty queues. In non-assert enabled builds, we just
save a few cycles.
M src/backend/storage/lmgr/proc.c
Preserve Var location information during flatten_join_alias_vars.
commit : 391af9f7842ba8b8d2195aaf82879662434b97f3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 22:13:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 22:13:11 -0400
This allows us to give correct syntax error pointers when complaining
about ungrouped variables in a join query with aggregates or GROUP BY.
It's pretty much irrelevant for the planner's use of the function, though
perhaps it might aid debugging sometimes.
M src/backend/optimizer/util/var.c
Fix race condition with toast table access from a stale syscache entry.
commit : 08e261cbc94ce9a72c0660b2786eaadae9f6fb41
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 19:48:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 19:48:37 -0400
If a tuple in a syscache contains an out-of-line toasted field, and we
try to fetch that field shortly after some other transaction has committed
an update or deletion of the tuple, there is a race condition: vacuum
could come along and remove the toast tuples before we can fetch them.
This leads to transient failures like "missing chunk number 0 for toast
value NNNNN in pg_toast_2619", as seen in recent reports from Andrew
Hammond and Tim Uckun.
The design idea of syscache is that access to stale syscache entries
should be prevented by relation-level locks, but that fails for at least
two cases where toasted fields are possible: ANALYZE updates pg_statistic
rows without locking out sessions that might want to plan queries on the
same table, and CREATE OR REPLACE FUNCTION updates pg_proc rows without
any meaningful lock at all.
The least risky fix seems to be an idea that Heikki suggested when we
were dealing with a related problem back in August: forcibly detoast any
out-of-line fields before putting a tuple into syscache in the first place.
This avoids the problem because at the time we fetch the parent tuple from
the catalog, we should be holding an MVCC snapshot that will prevent
removal of the toast tuples, even if the parent tuple is outdated
immediately after we fetch it. (Note: I'm not convinced that this
statement holds true at every instant where we could be fetching a syscache
entry at all, but it does appear to hold true at the times where we could
fetch an entry that could have a toasted field. We will need to be a bit
wary of adding toast tables to low-level catalogs that don't have them
already.) An additional benefit is that subsequent uses of the syscache
entry should be faster, since they won't have to detoast the field.
Back-patch to all supported versions. The problem is significantly harder
to reproduce in pre-9.0 releases, because of their willingness to flush
every entry in a syscache whenever the underlying catalog is vacuumed
(cf CatalogCacheFlushRelation); but there is still a window for trouble.
M src/backend/access/heap/tuptoaster.c
M src/backend/utils/cache/catcache.c
M src/include/access/tuptoaster.h
Clean up whitespace and indentation in parser and scanner files
commit : 654e1f96b0642124fb2996f1b7e64140b2898f14
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 1 Nov 2011 21:50:00 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 1 Nov 2011 21:50:00 +0200
These are not touched by pgindent, so clean them up a bit manually.
M contrib/cube/cubeparse.y
M contrib/seg/segparse.y
M src/backend/parser/gram.y
M src/backend/replication/repl_gram.y
M src/backend/replication/repl_scanner.l
M src/backend/utils/misc/guc-file.l
M src/interfaces/ecpg/preproc/ecpg.addons
M src/interfaces/ecpg/preproc/ecpg.header
M src/interfaces/ecpg/preproc/ecpg.trailer
M src/interfaces/ecpg/preproc/pgc.l
M src/pl/plpgsql/src/gram.y
M src/test/isolation/specscanner.l
Comment changes to show bgwriter no longer performs checkpoints.
commit : f3ebaad45b473f3a53de2cd2a5252cd653aa46f3
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:48:47 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:48:47 +0000
M src/backend/access/transam/xlog.c
M src/backend/commands/dbcommands.c
M src/backend/postmaster/bgwriter.c
M src/backend/replication/README
Have checkpointer send stats once each processing loop.
commit : 3ba182056faac66012aad8dedf2cb50ba511d989
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:38:27 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:38:27 +0000
Noted by Fujii Masao
M src/backend/postmaster/checkpointer.c
Update pg_upgrade comment on missing 'postgres' database.
commit : 09d1174e5ad3ec7c90c99e2ad4dd896368b018ce
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 1 Nov 2011 14:33:51 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 1 Nov 2011 14:33:51 -0400
M contrib/pg_upgrade/relfilenode.c
Add new file for checkpointer.c
commit : bf405ba8e460051e715d0a91442b579e590328ce
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:07:29 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 18:07:29 +0000
A src/backend/postmaster/checkpointer.c
Allow pg_upgrade to upgrade an old cluster that doesn't have a 'postgres' database.
commit : a50d860ae1dfca56148dd41692b963bb859bf1d6
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 1 Nov 2011 13:49:03 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 1 Nov 2011 13:49:03 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/function.c
M contrib/pg_upgrade/relfilenode.c
Split work of bgwriter between 2 processes: bgwriter and checkpointer. bgwriter is now a much less important process, responsible for page cleaning duties only. checkpointer is now responsible for checkpoints and so has a key role in shutdown. Later patches will correct doc references to the now old idea that bgwriter performs checkpoints. Has beneficial effect on performance at high write rates, but mainly refactoring to more easily allow changes for power reduction by simplifying previously tortuous code around required to allow page cleaning and checkpointing to time slice in the same process.
commit : 806a2aee3791244bf0f916729bfdb5489936e068
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 17:14:47 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 1 Nov 2011 17:14:47 +0000
Patch by me, Review by Dickson Guedes
M src/backend/bootstrap/bootstrap.c
M src/backend/postmaster/Makefile
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/postmaster.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/smgr/md.c
M src/include/access/xlog_internal.h
M src/include/bootstrap/bootstrap.h
M src/include/postmaster/bgwriter.h
M src/include/storage/proc.h
M src/include/storage/procsignal.h
Document that multiple LDAP servers can be specified
commit : 589adb86ee826190d2b6e744d117eee1fa6bbf75
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 1 Nov 2011 15:44:26 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 1 Nov 2011 15:44:26 +0100
M doc/src/sgml/client-auth.sgml
Stop btree indexscans upon reaching nulls in either direction.
commit : 6980f817e83c242c29c84a44f1e1f09e566439b7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 31 Oct 2011 16:40:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 31 Oct 2011 16:40:04 -0400
The existing scan-direction-sensitive tests were overly complex, and
failed to stop the scan in cases where it's perfectly legitimate to do so.
Per bug #6278 from Maksym Boguk.
Back-patch to 8.3, which is as far back as the patch applies easily.
Doesn't seem worth sweating over a relatively minor performance issue in
8.2 at this late date. (But note that this was a performance regression
from 8.1 and before, so 8.2 is being left as an outlier.)
M src/backend/access/nbtree/nbtutils.c
Support more locale-specific formatting options in cash_out().
commit : 6743a878a4e9442a9846d8c270e5028e514d44f3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 30 Oct 2011 15:02:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 30 Oct 2011 15:02:58 -0400
The POSIX spec defines locale fields for controlling the ordering of the
value, sign, and currency symbol in monetary output, but cash_out only
supported a small subset of these options. Fully implement p/n_sign_posn,
p/n_cs_precedes, and p/n_sep_by_space per spec. Fix up cash_in so that
it will accept all these format variants.
Also, make sure that thousands_sep is only inserted to the left of the
decimal point, as required by spec.
Per bug #6144 from Eduard Kracmar and discussion of bug #6277. This patch
includes some ideas from Alexander Lakhin's proposed patch, though it is
very different in detail.
M src/backend/utils/adt/cash.c
Further improvement of make_greater_string.
commit : eb5834d5af5fd094da2f61a874d9d0ec9c870f6c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 30 Oct 2011 12:21:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 30 Oct 2011 12:21:28 -0400
Make sure that it considers all the possibilities that the old code did,
instead of trying only one possibility per character position. To keep the
runtime in bounds, instead tweak the character incrementers to not try
every possible multibyte character code. Remove unnecessary logic to
restore the old character value on failure. Additional comment and
formatting cleanup.
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/mb/wchar.c
Update visibilitymap.c header comments.
commit : fae54e4a168f9da517be38723fa5f4b7cfeb59c9
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 29 Oct 2011 14:45:39 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 29 Oct 2011 14:45:39 -0400
Recent work on index-only scans left this somewhat out of date.
M src/backend/access/heap/visibilitymap.c
Fix assorted bogosities in cash_in() and cash_out().
commit : 7609239f3e8d1cf8818c186c0cfa39145bf6425a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 29 Oct 2011 14:30:55 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 29 Oct 2011 14:30:55 -0400
cash_out failed to handle multiple-byte thousands separators, as per bug
#6277 from Alexander Law. In addition, cash_in didn't handle that either,
nor could it handle multiple-byte positive_sign. Both routines failed to
support multiple-byte mon_decimal_point, which I did not think was worth
changing, but at least now they check for the possibility and fall back to
using '.' rather than emitting invalid output. Also, make cash_in handle
trailing negative signs, which formerly it would reject. Since cash_out
generates trailing negative signs whenever the locale tells it to, this
last omission represents a fail-to-reload-dumped-data bug. IMO that
justifies patching this all the way back.
M src/backend/utils/adt/cash.c
Improve make_greater_string() with encoding-specific incrementers.
commit : 78d523b633d0c251c904318f2ba9916e2c47b9e8
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 29 Oct 2011 14:22:20 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 29 Oct 2011 14:22:20 -0400
This infrastructure doesn't in any way guarantee that the character
we produce will sort before the one we incremented; but it does at least
make it much more likely that we'll end up with something that is a valid
character, which improves our chances.
Kyotaro Horiguchi, with various adjustments by me.
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/mb/wchar.c
M src/include/mb/pg_wchar.h
Remove pg_upgrade dependency on the 'postgres' database existing in the new cluster. vacuumdb, used by pg_upgrade, still has this dependency.
commit : 51eba98cf4595e90730dedd9305da8aa84b649ee
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 28 Oct 2011 21:18:36 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 28 Oct 2011 21:18:36 -0400
M contrib/pg_upgrade/pg_upgrade.c
Allow hint bits to be set sooner for temporary and unlogged tables.
commit : 53f1ca59b5875f1d3e95ee709ecaddcbdfdbd175
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 17:08:09 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 17:08:09 -0400
We need not wait until the commit record is durably on disk, because
in the event of a crash the page we're updating with hint bits will
be gone anyway. Per off-list report from Heikki Linnakangas, this
can significantly degrade the performance of unlogged tables; I was
able to show a 2x speedup from this patch on a pgbench run with scale
factor 15. In practice, this will mostly help small, heavily updated
tables, because on larger tables you're unlikely to run into the same
row again before the commit record makes it out to disk.
M src/backend/storage/buffer/bufmgr.c
M src/backend/utils/time/tqual.c
M src/include/storage/bufmgr.h
Demote some sanity checks in BufferIsValid() to assertions.
commit : b6335a3f1b33e5dc52e755956d8648f0813252c4
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 17:04:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 17:04:22 -0400
Testing reveals that this macro is a hot-spot for index-only-scans.
Per discussion with Tom Lane.
M src/include/storage/bufmgr.h
Remove hard-coded "\connect postgres" from pg_dumpall.
commit : deb15803249883db031c6cc8af104b575f7809ad
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 15:45:28 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 15:45:28 -0400
This doesn't appear to accompish anything useful, and does make the
restore fail if the postgres database happens to have been dropped.
M src/bin/pg_dump/pg_dumpall.c
De-parallelize ecpg build some more.
commit : 74812624f263a58789e894a643161c9148112f62
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 28 Oct 2011 15:16:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 28 Oct 2011 15:16:40 -0400
Make sure ecpg/include/ is rebuilt before the other subdirectories,
so that ecpg_config.h is up to date. This is not likely to matter
during production builds, only development, so no back-patch.
M src/interfaces/ecpg/Makefile
Clarify that ORDER BY/FOR UPDATE can't malfunction at higher iso levels.
commit : 9cf12dfd4e9e5301d7f8cf48e1eead1626c42127
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 12:02:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 12:02:04 -0400
Kevin Grittner
M doc/src/sgml/ref/select.sgml
Change "and and" to "and".
commit : 6c21105fb40adc22d31ba1b7caf104640347651c
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 11:59:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 11:59:55 -0400
Report by Vik Reykja, patch by Kevin Grittner.
M doc/src/sgml/mvcc.sgml
Clarify pg_upgrade error message that the 'postgres' database must exist in the old cluster.
commit : 9846dcfb9e8273d2ef93a1650225d013a1436349
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 28 Oct 2011 08:07:30 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 28 Oct 2011 08:07:30 -0400
M contrib/pg_upgrade/check.c
Update docs to point to the timezone library's new home at IANA.
commit : ece12659cf1695d318445b837b36edc15b6f25d6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 23:09:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 23:09:05 -0400
The recent unpleasantness with copyrights has accelerated a move that
was already in planning.
M src/timezone/README
Update pg_upgrade testing instructions.
commit : 38f3c7c4ddedf509d8e2bdda4a947df4dc177e5a
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 27 Oct 2011 21:29:03 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 27 Oct 2011 21:29:03 -0400
M contrib/pg_upgrade/TESTING
Fix the number of lwlocks needed by the "fast path" lock patch. It needs one lock per backend or auxiliary process - the need for a lock for each aux processes was not accounted for in NumLWLocks(). No-one noticed, because the three locks needed for the three aux processes fit into the few extra lwlocks we allocate for 3rd party modules that don't call RequestAddinLWLocks() (NUM_USER_DEFINED_LWLOCKS, 4 by default).
commit : cbf65509bb59694412286239fe6db409060f8d69
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 27 Oct 2011 22:39:58 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 27 Oct 2011 22:39:58 +0300
M src/backend/storage/lmgr/lwlock.c
Avoid recursion while processing ELSIF lists in plpgsql.
commit : 051d1ba7a02d0e8930adf228d60e8a044b9fcadb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 15:21:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 15:21:51 -0400
The original implementation of ELSIF in plpgsql converted the construct
into nested simple IF statements. This was prone to stack overflow with
long ELSIF lists, in two different ways. First, it's difficult to generate
the parsetree without using right-recursion in the bison grammar, and
that's prone to parser stack overflow since nothing can be reduced until
the whole list has been read. Second, we'd recurse during execution, thus
creating an unnecessary risk of execution-time stack overflow. Rewrite
so that the ELSIF list is represented as a flat list, scanned via iteration
not recursion, and generated through left-recursion in the grammar.
Per a gripe from Håvard Kongsgård.
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/plpgsql.h
Add simple script to check for right recursion in Bison grammars.
commit : 756a4ed5ad3e57c26a247234de371a6ca21806cd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 13:50:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 13:50:57 -0400
We should generally use left-recursion not right-recursion to parse lists.
Bison hasn't got any built-in way to check for this type of inefficiency,
and I didn't find anything on the net in a quick search, so I wrote a
little Perl script to do it. Add to src/tools/ so we don't have to
re-invent this wheel next time we wonder if we're doing anything stupid.
Currently, the only place that seems to need fixing is plpgsql's stmt_else
production, so the problem doesn't appear to be common enough to warrant
trying to include such a test in our standard build process. If we did
want to do that, we'd need a way to ignore some false positives, such as
a_expr := '-' a_expr
A src/tools/check_bison_recursion.pl
Typo fixes.
commit : bf82013631e32436c9abb23fee8be0a4ce46b3dd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 18:04:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 18:04:13 -0400
expect -> except, noted by Andrew Dunstan. Also, "cannot" seems more
readable here than "can not", per David Wheeler.
M doc/src/sgml/func.sgml
Improve planner's ability to recognize cases where an IN's RHS is unique.
commit : 3e4b3465b6345b75659e8f897976d4c810408762
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 17:52:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 17:52:02 -0400
If the right-hand side of a semijoin is unique, then we can treat it like a
normal join (or another way to say that is: we don't need to explicitly
unique-ify the data before doing it as a normal join). We were recognizing
such cases when the RHS was a sub-query with appropriate DISTINCT or GROUP
BY decoration, but there's another way: if the RHS is a plain relation with
unique indexes, we can check if any of the indexes prove the output is
unique. Most of the infrastructure for that was there already in the join
removal code, though I had to rearrange it a bit. Per reflection about a
recent example in pgsql-performance.
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/util/pathnode.c
M src/include/optimizer/paths.h
Fix pg_bsd_indent bug where newlines were not being trimmed from typedef lines. Update pg_bsd_indent required version to 1.1 (and update ftp site).
commit : 360429e1d17947c17659cd57dbaaba5c10fcbd6a
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 26 Oct 2011 17:23:33 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 26 Oct 2011 17:23:33 -0400
Problem reported by Magnus.
M src/bin/pg_basebackup/pg_basebackup.c
M src/tools/pgindent/indent.bsd.patch
M src/tools/pgindent/pgindent
Implement streaming xlog for backup tools
commit : d9bae5317300cf983dd9f01cc2e561c0eecd109a
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 26 Oct 2011 20:13:33 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 26 Oct 2011 20:13:33 +0200
Add option for parallel streaming of the transaction log while a
base backup is running, to get the logfiles before the server has
removed them.
Also add a tool called pg_receivexlog, which streams the transaction
log into files, creating a log archive without having to wait for
segments to complete, thus decreasing the window of data loss without
having to waste space using archive_timeout. This works best in
combination with archive_command - suggested usage docs etc coming later.
M doc/src/sgml/ref/allfiles.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
A doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/reference.sgml
M src/bin/pg_basebackup/.gitignore
M src/bin/pg_basebackup/Makefile
M src/bin/pg_basebackup/pg_basebackup.c
A src/bin/pg_basebackup/pg_receivexlog.c
A src/bin/pg_basebackup/receivelog.c
A src/bin/pg_basebackup/receivelog.h
A src/bin/pg_basebackup/streamutil.c
A src/bin/pg_basebackup/streamutil.h
M src/tools/msvc/Mkvcbuild.pm
MingW doesn't support wcstombs_s()...
commit : 2b64f3f17a4c1064008ea7cfe52d8eabe0b86370
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 26 Oct 2011 19:26:13 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 26 Oct 2011 19:26:13 +0200
M src/bin/pgevent/pgevent.c
Change FK trigger naming convention to fix self-referential FKs.
commit : 1e3b21dd5e1070d301153690c1751bef74f03fa4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:19:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:19:42 -0400
Use names like "RI_ConstraintTrigger_a_NNNN" for FK action triggers and
"RI_ConstraintTrigger_c_NNNN" for FK check triggers. This ensures the
action trigger fires first in self-referential cases where the very same
row update fires both an action and a check trigger. This change provides
a non-probabilistic solution for bug #6268, at the risk that it could break
client code that is making assumptions about the exact names assigned to
auto-generated FK triggers. Hence, change this in HEAD only. No need for
forced initdb since old triggers continue to work fine.
M src/backend/commands/tablecmds.c
Change FK trigger creation order to better support self-referential FKs.
commit : 58958726ffaec8d1a5d6a63f648443886fde8a21
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:02:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:02:28 -0400
When a foreign-key constraint references another column of the same table,
row updates will queue both the PK's ON UPDATE action and the FK's CHECK
action in the same event. The ON UPDATE action must execute first, else
the CHECK will check a non-final state of the row and possibly throw an
inappropriate error, as seen in bug #6268 from Roman Lytovchenko.
Now, the firing order of multiple triggers for the same event is determined
by the sort order of their pg_trigger.tgnames, and the auto-generated names
we use for FK triggers are "RI_ConstraintTrigger_NNNN" where NNNN is the
trigger OID. So most of the time the firing order is the same as creation
order, and so rearranging the creation order fixes it.
This patch will fail to fix the problem if the OID counter wraps around or
adds a decimal digit (eg, from 99999 to 100000) while we are creating the
triggers for an FK constraint. Given the small odds of that, and the low
usage of self-referential FKs, we'll live with that solution in the back
branches. A better fix is to change the auto-generated names for FK
triggers, but it seems unwise to do that in stable branches because there
may be client code that depends on the naming convention. We'll fix it
that way in HEAD in a separate patch.
Back-patch to all supported branches, since this bug has existed for a long
time.
M src/backend/commands/tablecmds.c
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Fix typo
commit : b0bec068e221f1774b1b444ce687370580b3bc70
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:46:14 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:46:14 +0200
M doc/src/sgml/ref/pg_basebackup.sgml
Make event_source visible on all platforms
commit : a87b9ae1612d0e01093e691a5a6b1a37e1dcb9fb
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:40:58 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:40:58 +0200
On non-windows platform, we just ignore any value set there.
Noted by Jaime Casanova
M src/backend/utils/misc/guc.c
Remove argument decoration that appears unsupported on mingw
commit : 9c4c8c8468bfdcfba67a9e0bd015843dab949dbf
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 21:30:53 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 21:30:53 +0200
M src/bin/pgevent/pgevent.c
Support configurable eventlog application names on Windows
commit : d8ea33f2c02721c89c2434b9fda170afb7fe4999
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 20:02:55 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 20:02:55 +0200
This allows different instances to use the eventlog with different
identifiers, by setting the event_source GUC, similar to how
syslog_ident works.
Original patch by MauMau, heavily modified by Magnus Hagander
M doc/src/sgml/config.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/runtime.sgml
M src/backend/utils/error/elog.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/bin/pgevent/pgevent.c
M src/bin/pgevent/pgevent.def
Add debugging aid in isolationtester
commit : 90d8e8ff7ee94283270cc7b2bc6a986a7cd174fc
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 24 Oct 2011 22:11:10 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 24 Oct 2011 22:11:10 -0300
M src/test/isolation/isolationtester.c
Make TABLE tab complation in psql include all relations
commit : a74a5f59137c778450bafcc1b7de505a7a4a9204
author : Magnus Hagander <magnus@hagander.net>
date : Mon, 24 Oct 2011 13:22:59 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Mon, 24 Oct 2011 13:22:59 +0200
Not just tables, since views also work fine with the
TABLE command.
M src/bin/psql/tab-complete.c
Make psql support tab completion of EXECUTE <prepared-statement-name>.
commit : 8140c1bcf355c4925114cc127de476384053dc96
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 19:25:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 19:25:34 -0400
Andreas Karlsson, reviewed by Josh Kupershmidt
M src/bin/psql/tab-complete.c
Improve git_changelog's handling of inconsistent commit orderings.
commit : 7299778a958112b0339ab29365ba0d654bd5d21c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 14:34:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 14:34:36 -0400
Use the CommitDate not the AuthorDate, as the former is representative of
the order in which things went into the main repository, and the latter
isn't very; we now have instances where the AuthorDate is as much as a
month before the patch really went in. Also, get rid of the "commit order
inversions" heuristic, which turns out not to do anything very desirable.
Instead we just print commits in strict timestamp order, interpreting the
"timestamp" of a merged commit as its timestamp on the newest branch it
appears in. This fixes some cases where very ancient commits were being
printed relatively early in the report.
M src/tools/git_changelog
Don't trust deferred-unique indexes for join removal.
commit : 0f39d5050dc0dce99258381f33f1832c437aff85
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 00:43:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 00:43:39 -0400
The uniqueness condition might fail to hold intra-transaction, and assuming
it does can give incorrect query results. Per report from Marti Raudsepp,
though this is not his proposed patch.
Back-patch to 9.0, where both these features were introduced. In the
released branches, add the new IndexOptInfo field to the end of the struct,
to try to minimize ABI breakage for third-party code that may be examining
that struct.
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/nodes/relation.h
Support synchronization of snapshots through an export/import procedure.
commit : bb446b689b6681eb57a8a50605e119743190c4db
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 22 Oct 2011 18:22:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 22 Oct 2011 18:22:45 -0400
A transaction can export a snapshot with pg_export_snapshot(), and then
others can import it with SET TRANSACTION SNAPSHOT. The data does not
leave the server so there are not security issues. A snapshot can only
be imported while the exporting transaction is still running, and there
are some other restrictions.
I'm not totally convinced that we've covered all the bases for SSI (true
serializable) mode, but it works fine for lesser isolation modes.
Joachim Wieland, reviewed by Marko Tiikkaja, and rather heavily modified
by Tom Lane
M doc/src/sgml/func.sgml
M doc/src/sgml/ref/set_transaction.sgml
M doc/src/sgml/storage.sgml
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/parser/gram.y
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/misc/guc.c
M src/backend/utils/time/snapmgr.c
M src/bin/initdb/initdb.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/parser/kwlist.h
M src/include/storage/predicate.h
M src/include/storage/procarray.h
M src/include/utils/snapmgr.h
Fix overly-complicated usage of errcode_for_file_access().
commit : b436c72f61adf5efab435c282bfb13a29508d475
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 22 Oct 2011 20:16:05 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 22 Oct 2011 20:16:05 +0300
No need to do "errcode(errcode_for_file_access())", just
"errcode_for_file_access()" is enough. The extra errcode() call is useless
but harmless, so there's no user-visible bug here. Nevertheless, backpatch
to 9.1 where this code were added.
M src/backend/replication/basebackup.c
Code review for pgstat_get_crashed_backend_activity patch.
commit : f9c92a5a3ead738c7de0dffa203a92b4d2fec413
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 16:36:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 16:36:04 -0400
Avoid possibly dumping core when pgstat_track_activity_query_size has a
less-than-default value; avoid uselessly searching for the query string
of a successfully-exited backend; don't bother putting out an ERRDETAIL if
we don't have a query to show; some other minor stylistic improvements.
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/adt/ascii.c
M src/include/pgstat.h
M src/include/utils/ascii.h
More cleanup after failed reduced-lock-levels-for-DDL feature.
commit : 5ac5980744149f062ec599015ffe7a7689dd117b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 13:49:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 13:49:51 -0400
Turns out that use of ShareUpdateExclusiveLock or ShareRowExclusiveLock
to protect DDL changes had gotten copied into several places that were
not touched by either of Simon's original patches for the feature, and
thus neither he nor I thought to revert them. (Indeed, it appears that
two of these uses were committed *after* the reversion, which just goes
to show that git merging is no panacea.) Change these places to use
AccessExclusiveLock again. If we ever manage to resurrect that feature,
we're going to have to think a bit harder about how to keep lock level
usage in sync for DDL operations that aren't within the AlterTable
infrastructure.
Two of these bugs are only in HEAD, but one is in the 9.1 branch too.
Alvaro found one of them, I found the other two.
M src/backend/catalog/toasting.c
M src/backend/commands/trigger.c
M src/backend/rewrite/rewriteRemove.c
Try to log current the query string when a backend crashes.
commit : c8e8b5a6e20bf471d83059aebe64bca16f184057
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 13:26:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 13:26:40 -0400
To avoid minimize risk inside the postmaster, we subject this feature
to a number of significant limitations. We very much wish to avoid
doing any complex processing inside the postmaster, due to the
posssibility that the crashed backend has completely corrupted shared
memory. To that end, no encoding conversion is done; instead, we just
replace anything that doesn't look like an ASCII character with a
question mark. We limit the amount of data copied to 1024 characters,
and carefully sanity check the source of that data. While these
restrictions would doubtless be unacceptable in a general-purpose
logging facility, even this limited facility seems like an improvement
over the status quo ante.
Marti Raudsepp, reviewed by PDXPUG and myself
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/adt/ascii.c
M src/include/pgstat.h
M src/include/utils/ascii.h
Fix DROP OPERATOR FAMILY IF EXISTS.
commit : 980261929f2b8c40d6be1979ff81c943cad907b3
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 09:10:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 09:10:46 -0400
Essentially, the "IF EXISTS" portion was being ignored, and an error
thrown anyway if the opfamily did not exist.
I broke this in commit fd1843ff8979c0461fb3f1a9eab61140c977e32d; so
backpatch to 9.1.X.
Report and diagnosis by KaiGai Kohei.
M src/backend/commands/opclasscmds.c
M src/test/regress/expected/drop_if_exists.out
Simplify and improve ProcessStandbyHSFeedbackMessage logic.
commit : b4a0223d008d7c2c9824d846e22b664b2f09cf6e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 19:43:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 19:43:31 -0400
There's no need to clamp the standby's xmin to be greater than
GetOldestXmin's result; if there were any such need this logic would be
hopelessly inadequate anyway, because it fails to account for
within-database versus cluster-wide values of GetOldestXmin. So get rid of
that, and just rely on sanity-checking that the xmin is not wrapped around
relative to the nextXid counter. Also, don't reset the walsender's xmin if
the current feedback xmin is indeed out of range; that just creates more
problems than we already had. Lastly, don't bother to take the
ProcArrayLock; there's no need to do that to set xmin.
Also improve the comments about this in GetOldestXmin itself.
M src/backend/replication/walsender.c
M src/backend/storage/ipc/procarray.c
Rewrite tab completion's previous-word fetching for more sanity.
commit : dce92c6d6abe302c58fd4e4221efed54913aefdb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 15:38:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 15:38:57 -0400
Make it return empty strings when there are no more words to the left of
the current position, instead of sometimes returning NULL and other times
returning copies of the leftmost word. Also, fetch the words in one scan,
rather than the previous wasteful approach of starting from scratch for
each word. Make the code a bit harder to break when someone decides we
need more words of context, too. (There was actually a memory leak here,
because whoever added prev6_wd neglected to free it.)
M src/bin/psql/tab-complete.c
Fix get_object_namespace() not to think extensions are "in" a schema.
commit : 8f3362d4b7430079bb53a954e372955eb285cf52
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 20 Oct 2011 00:05:31 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 20 Oct 2011 00:05:31 -0400
extnamespace means something altogether different in this context.
Mostly by accident, this coding error (introduced in my commit
82a4a777d94bec965ab2f1d04b6e6a3f0447b377) broke the buildfarm instead
of just silently doing the wrong thing.
M src/backend/catalog/objectaddress.c
Add "skipping" to the NOTICE produced by DROP OPERATOR CLASS IF EXISTS.
commit : 1d751018d881f415a61787424d900ae8a7126da3
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:45:31 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:45:31 -0400
This makes this message consistent with all the other similar notices
produced by other DROP IF EXISTS commands.
Noted by KaiGai Kohei
M src/backend/commands/opclasscmds.c
M src/test/regress/expected/drop_if_exists.out
Remove a few of the new DROP-IF-EXISTS regression tests.
commit : 0bf08994934d8e561c2cacc4fb4fc7e7eb602d2e
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:38:06 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:38:06 -0400
Commit 3301c83536e9da1e573e24ded2e610062dbf9cdc broke the build farm.
Let's try to fix that.
M src/test/regress/expected/drop_if_exists.out
M src/test/regress/sql/drop_if_exists.sql
Consolidate DROP handling for some object types.
commit : 82a4a777d94bec965ab2f1d04b6e6a3f0447b377
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:25:20 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 23:25:20 -0400
This gets rid of a significant amount of duplicative code.
KaiGai Kohei, reviewed in earlier versions by Dimitri Fontaine, with
further review and cleanup by me.
M src/backend/catalog/objectaddress.c
M src/backend/commands/Makefile
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
A src/backend/commands/dropcmds.c
M src/backend/commands/extension.c
M src/backend/commands/schemacmds.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/tcop/utility.c
M src/include/catalog/objectaddress.h
M src/include/commands/collationcmds.h
M src/include/commands/conversioncmds.h
M src/include/commands/defrem.h
M src/include/commands/extension.h
M src/include/commands/schemacmds.h
M src/include/commands/typecmds.h
Add some more regression tests for DROP IF EXISTS.
commit : 3301c83536e9da1e573e24ded2e610062dbf9cdc
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 20:55:56 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 20:55:56 -0400
KaiGai Kohei
M src/test/regress/expected/drop_if_exists.out
M src/test/regress/sql/drop_if_exists.sql
Document that postmaster.opts is excluded from base backups
commit : 3716ab2c0c87e9a7c03ce86799006accb674ca6f
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 00:19:43 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 00:19:43 -0400
Fujii Masao
M doc/src/sgml/protocol.sgml
Suppress remaining -Waddress warnings from recent gcc versions.
commit : e331c60ea727f998eb1023e8a2c468692d10032e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 21:44:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 21:44:23 -0400
Still an exercise in satisfying pedants.
M src/bin/psql/psqlscan.l
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/pqexpbuffer.h
Suppress -Wunused-result warnings about write() and fwrite().
commit : aa90e148ca70a235897b1227f1a7cd1c66bc5368
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 21:37:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 21:37:51 -0400
This is merely an exercise in satisfying pedants, not a bug fix, because
in every case we were checking for failure later with ferror(), or else
there was nothing useful to be done about a failure anyway. Document
the latter cases.
M src/backend/access/transam/xlog.c
M src/backend/commands/copy.c
M src/backend/postmaster/pgstat.c
M src/backend/utils/error/elog.c
M src/bin/psql/common.c
Make the CHECKPOINT reference page more clear.
commit : c53d3a9ee1b1c85c7d905fb8ca80d327a55f1dfb
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 18 Oct 2011 20:13:27 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 18 Oct 2011 20:13:27 -0400
Josh Kupershmidt, reviewed by Fujii Masao
M doc/src/sgml/ref/checkpoint.sgml
Reject empty pg_hba.conf files.
commit : e27f52f3a1814e646733f51b8c24547371bef3eb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 20:09:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 20:09:18 -0400
An empty HBA file is surely an error, since it means there is no way to
connect to the server. We've not heard identifiable reports of people
actually doing that, but this will also close off the case Thom Brown just
complained of, namely pointing hba_file at a directory. (On at least some
platforms with some directories, it will read as an empty file.)
Perhaps this should be back-patched, but given the lack of previous
complaints, I won't add extra work for the translators.
M src/backend/libpq/hba.c
Remove unnecessary AssertMacro() to suppress gcc 4.6 compiler warning.
commit : 7c19e0446c049dd41aed62fa398cd809017adf5e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:39:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:39:14 -0400
There's no particular value in doing AssertMacro((tup) != NULL) in front
of code that's certain to crash anyway if tup is NULL. And if "tup" is
actually the address of a local variable, gcc 4.6 whinges about it. That's
arguably pretty broken on gcc's part, but we might as well remove the
useless test to silence the warnings. This gets rid of all the -Waddress
warnings in the backend; there are some in libpq and psql that are a bit
harder to avoid.
M src/include/access/htup.h
Fix pg_dump to dump casts between auto-generated types.
commit : b246207bd7b553317fd90d7aefd9520eed27609a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:10:56 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:10:56 -0400
The heuristic for when to dump a cast failed for a cast between table
rowtypes, as reported by Frédéric Rejol. Fix it by setting
the "dump" flag for such a type the same way as the flag is set for the
underlying table or base type. This won't result in the auto-generated
type appearing in the output, since setting its objType to DO_DUMMY_TYPE
unconditionally suppresses that. But it will result in dumpCast doing what
was intended.
Back-patch to 8.3. The 8.2 code is rather different in this area, and it
doesn't seem worth any risk to fix a corner case that nobody has stumbled
on before.
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_dump.c
Exclude postmaster.opts from base backups
commit : d1e25b78f9988b9917de2818febcbf6c845c6ceb
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 16 Oct 2011 17:42:59 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 16 Oct 2011 17:42:59 +0200
Noted by Fujii Masao
M src/backend/replication/basebackup.c
Avoid assuming that index-only scan data matches the index's rowtype.
commit : 336c1d7a515b4d6de237679022d70082d7b69d9a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 19:15:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 19:15:04 -0400
In general the data returned by an index-only scan should have the
datatypes originally computed by FormIndexDatum. If the index opclasses
use "storage" datatypes different from their input datatypes, the scan
tuple will not have the same rowtype attributed to the index; but we had
a hard-wired assumption that that was true in nodeIndexonlyscan.c. We'd
already hacked around the issue for the one case where the types are
different in btree indexes (btree name_ops), but this would definitely
come back to bite us if we ever implement index-only scans in GiST.
To fix, require the index AM to explicitly provide the tupdesc for the
tuple it is returning. btree can just pass back the index's tupdesc, but
GiST will have to work harder when and if it supports index-only scans.
I had previously proposed fixing this by allowing the index AM to fill the
scan tuple slot directly; but on reflection that seemed like a module
layering violation, since TupleTableSlots are creatures of the executor.
At least in the btree case, it would also be less efficient, since the
tuple deconstruction work would occur even for rows later found to be
invisible to the scan's snapshot.
M doc/src/sgml/indexam.sgml
M src/backend/access/index/genam.c
M src/backend/access/nbtree/nbtree.c
M src/backend/executor/nodeIndexonlyscan.c
M src/include/access/relscan.h
Fix collate.linux.utf8 expected output for recent error message change.
commit : e661c3dfd320487aaa1d6223e732e00c1b5c3cc2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 16:07:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 16:07:40 -0400
Noted by Jeff Davis.
M src/test/regress/expected/collate.linux.utf8.out
Teach btree to handle ScalarArrayOpExpr quals natively.
commit : 9e8da0f75731aaa7605cf4656c21ea09e84d2eb1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 15:39:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 15:39:24 -0400
This allows "indexedcol op ANY(ARRAY[...])" conditions to be used in plain
indexscans, and particularly in index-only scans.
M doc/src/sgml/catalogs.sgml
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/executor/nodeIndexscan.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/access/nbtree.h
M src/include/access/skey.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/include/nodes/relation.h
Marginal improvements to documentation of plpgsql's OPEN cursor statement.
commit : 0898d71f66ed884af726556ac9ffc8081dddc757
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 15 Oct 2011 13:02:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 15 Oct 2011 13:02:37 -0400
Rearrange text to improve clarity, and add an example of implicit reference
to a plpgsql variable in a bound cursor's query. Byproduct of some work
I'd done on the "named cursor parameters" patch before giving up on it.
M doc/src/sgml/plpgsql.sgml
Document that is the psql version number, not the server version number, that controls .psqlrc.
commit : b4aec388d88cb3a27768e5a1cf3a1f6b11a9ede0
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 15 Oct 2011 11:43:19 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 15 Oct 2011 11:43:19 -0400
M doc/src/sgml/ref/psql-ref.sgml
Improve doc wording of drop table permission.
commit : 2deba6d4056f0cc4fa0019471194d6b5942c38ab
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 15 Oct 2011 10:08:02 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 15 Oct 2011 10:08:02 -0400
M doc/src/sgml/ref/drop_table.sgml
Allow a major PG version psql .psqlrc file to be used if a minor matching version file does not exist. This avoids needing to rename .psqlrc files after minor version upgrades.
commit : 2795592e52c88e510ae4bcbc17b305d6adc0b2b6
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 14 Oct 2011 20:26:28 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 14 Oct 2011 20:26:28 -0400
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/startup.c
Fix bugs in information_schema.referential_constraints view.
commit : d26e1ebaf5f8f59c27327e8fd810fa4b26431a1f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 20:24:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 20:24:17 -0400
This view was being insufficiently careful about matching the FK constraint
to the depended-on primary or unique key constraint. That could result in
failure to show an FK constraint at all, or showing it multiple times, or
claiming that it depended on a different constraint than the one it really
does. Fix by joining via pg_depend to ensure that we find only the correct
dependency.
Back-patch, but don't bump catversion because we can't force initdb in back
branches. The next minor-version release notes should explain that if you
need to fix this in an existing installation, you can drop the
information_schema schema then re-create it by sourcing
$SHAREDIR/information_schema.sql in each database (as a superuser of
course).
M src/backend/catalog/information_schema.sql
Measure the number of all-visible pages for use in index-only scan costing.
commit : e6858e665731c0f56d3ecc9fbb245c32d24f8ef7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 17:23:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 17:23:01 -0400
Add a column pg_class.relallvisible to remember the number of pages that
were all-visible according to the visibility map as of the last VACUUM
(or ANALYZE, or some other operations that update pg_class.relpages).
Use relallvisible/relpages, instead of an arbitrary constant, to estimate
how many heap page fetches can be avoided during an index-only scan.
This is pretty primitive and will no doubt see refinements once we've
acquired more field experience with the index-only scan mechanism, but
it's way better than using a constant.
Note: I had to adjust an underspecified query in the window.sql regression
test, because it was changing answers when the plan changed to use an
index-only scan. Some of the adjacent tests perhaps should be adjusted
as well, but I didn't do that here.
M doc/src/sgml/catalogs.sgml
M src/backend/access/hash/hash.c
M src/backend/access/heap/visibilitymap.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/util/plancat.c
M src/backend/optimizer/util/relnode.c
M src/backend/utils/cache/relcache.c
M src/include/access/visibilitymap.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_class.h
M src/include/commands/vacuum.h
M src/include/nodes/relation.h
M src/include/optimizer/plancat.h
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql
Dump all roles first, then all config settings on roles.
commit : dea95c7a7beb5ef66ce89269dd0e84d0c26e5523
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 14 Oct 2011 14:16:02 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 14 Oct 2011 14:16:02 -0400
This way, if a role's config setting uses the name of another role,
the validity of the dump isn't dependent on the order in which those
two roles are dumped.
Code by Phil Sorber, comment by me.
M src/bin/pg_dump/pg_dumpall.c
Avoid potential relcache leak in objectaddress.c.
commit : 393e828e31a27845def4c3ff20cdfbee5cec1da9
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 14 Oct 2011 11:35:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 14 Oct 2011 11:35:40 -0400
Nobody using the missing_ok flag yet, but let's speculate that this will
be a better interface for future callers.
KaiGai Kohei, with some adjustments by me.
M src/backend/catalog/objectaddress.c
Document actual string that has to be returned by the client for MD5 authentication.
commit : ad30d366424aee9736f7a71be87e6941d7dd12df
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 20:48:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 20:48:50 -0400
Report and pseudo code by Cyan Ogilvie
M doc/src/sgml/protocol.sgml
Remove all "traces" of trace_userlocks, because userlocks were removed in PG 8.2.
commit : 0180bd6180511875db046bf8ddcaa633a2952dfd
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 19:59:13 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 19:59:13 -0400
M doc/src/sgml/config.sgml
M src/backend/storage/lmgr/lock.c
M src/backend/utils/misc/check_guc
M src/backend/utils/misc/guc.c
M src/include/storage/lock.h
Fix up Perl-to-Postgres datatype conversions in pl/perl.
commit : 23610daf8af0f5b468b5c0d4774295cc02ad30a9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 18:02:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 18:02:43 -0400
This patch restores the pre-9.1 behavior that pl/perl functions returning
VOID ignore the result value of their last Perl statement. 9.1.0
unintentionally threw an error if the last statement returned a reference,
as reported by Amit Khandekar.
Also, make sure it works to return a string value for a composite type,
so long as the string meets the type's input format. We already allowed
the equivalent behavior for arrays, so it seems inconsistent to not allow
it for composites.
In addition, ensure we throw errors for attempts to return arrays or hashes
when the function's declared result type is not an array or composite type,
respectively. Pre-9.1 versions rather uselessly returned strings like
ARRAY(0x221a9a0) or HASH(0x221aa90), while 9.1.0 threw an error for the
hash case and returned a garbage value for the array case.
Also, clean up assorted grotty coding in Perl array conversion, including
use of a session-lifespan memory context to accumulate the array value
(resulting in session-lifespan memory leak on error), failure to apply the
declared typmod if any, and failure to detect some cases of non-rectangular
multi-dimensional arrays.
Alex Hunsaker and Tom Lane
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/expected/plperl_array.out
M src/pl/plperl/plperl.c
M src/pl/plperl/sql/plperl.sql
M src/pl/plperl/sql/plperl_array.sql
Update documentation about ts_rank().
commit : fb4340c5ea2b11319f220e8bbbf9b3f6bc9d827b
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 14:17:20 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 14:17:20 -0400
M doc/src/sgml/textsearch.sgml
Have pg_ctl return an exit status of 3 if the server is not running, to match the Linux Standard Base Core Specification 3.1.
commit : 12ff9fa7715611d7df6a78447fce6cc5096cf335
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 13:01:56 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 13:01:56 -0400
Aaron W. Swenson
M doc/src/sgml/ref/pg_ctl-ref.sgml
M src/bin/pg_ctl/pg_ctl.c
Fix typo in dummy_seclabel documentation.
commit : de1bf53a254a2a832ddbc46395e9af2b918d9302
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 12:16:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 12:16:07 -0400
dummy_label -> dummy_seclabel
Thom Brown
M doc/src/sgml/dummy-seclabel.sgml
Document who can drop a table (owner and user with permissions).
commit : cf72528e87dd59ba6833c912e3712413dde6669d
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 10:05:54 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 10:05:54 -0400
M doc/src/sgml/ref/drop_table.sgml
Remove tab in sgml file.
commit : 4c32f817667ea5461832897a6374be5cfc9a1bf5
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 09:32:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 09:32:39 -0400
M doc/src/sgml/release.sgml
Don't mark auto-generated types as extension members.
commit : 7b96519fe24b6a675b2cd39ed3b89302b8f1fedb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 18:40:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 18:40:09 -0400
Relation rowtypes and automatically-generated array types do not need to
have their own extension membership dependency entries. If we create such
then it becomes more difficult to remove items from an extension, and it's
also harder for an extension upgrade script to make sure it duplicates the
dependencies created by the extension's regular installation script.
I changed the code in such a way that this happened in commit
988cccc620dd8c16d77f88ede167b22056176324, I think because of worries about
the shell-type-replacement case; but that cure was worse than the disease.
It would only matter if one extension created a shell type that was
replaced with an auto-generated type in another extension, which seems
pretty far-fetched. Better to make this work unsurprisingly in normal
cases.
Report and patch by Robert Haas, comment adjustments by me.
M src/backend/catalog/pg_type.c
Document how to accent Alvaro Herrera in the release notes.
commit : e0b268fb82fadb53171e9e7401ae8090cf36a264
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 17:20:05 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 17:20:05 -0400
M doc/src/sgml/release.sgml
Clarify wording of foreign key documentation to mention null entries as not matching the primary key.
commit : f2b36d8e10b628ffe0ba73c90826c3719ea20176
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 16:58:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 16:58:39 -0400
Report from Marek.Balgar@seznam.cz
M doc/src/sgml/ddl.sgml
Modify RelationGetBufferForTuple() to use a typedef, rather than a struct, to help pgindent.
commit : 484af9b376f3dca3805932d5c40c45ecf6fca0d4
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 16:53:54 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 16:53:54 -0400
M src/backend/access/heap/hio.c
M src/include/access/hio.h
Modify pgindent to use a renamed pg_bsd_indent binary. New features include the ability to supply a typedef file, rather than list them on the command line. Also improve the README.
commit : 6e22ba03a9fe6853e812268ef404e45aac4866ab
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 15:45:46 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 15:45:46 -0400
M src/tools/pgindent/README
M src/tools/pgindent/indent.bsd.patch
M src/tools/pgindent/pgindent
Throw a useful error message if an extension script file is fed to psql.
commit : 458857cc9d7d00711b272a0dabbcb591b506d6b8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 15:45:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 15:45:03 -0400
We have seen one too many reports of people trying to use 9.1 extension
files in the old-fashioned way of sourcing them in psql. Not only does
that usually not work (due to failure to substitute for MODULE_PATHNAME
and/or @extschema@), but if it did work they'd get a collection of loose
objects not an extension. To prevent this, insert an \echo ... \quit
line that prints a suitable error message into each extension script file,
and teach commands/extension.c to ignore lines starting with \echo.
That should not only prevent any adverse consequences of loading a script
file the wrong way, but make it crystal clear to users that they need to
do it differently now.
Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1
... there is not going to be much value in this if we wait till 9.2.
M contrib/adminpack/adminpack–1.0.sql
M contrib/btree_gin/btree_gin–1.0.sql
M contrib/btree_gin/btree_gin–unpackaged–1.0.sql
M contrib/btree_gist/btree_gist–1.0.sql
M contrib/btree_gist/btree_gist–unpackaged–1.0.sql
M contrib/chkpass/chkpass–1.0.sql
M contrib/chkpass/chkpass–unpackaged–1.0.sql
M contrib/citext/citext–1.0.sql
M contrib/citext/citext–unpackaged–1.0.sql
M contrib/cube/cube–1.0.sql
M contrib/cube/cube–unpackaged–1.0.sql
M contrib/dblink/dblink–1.0.sql
M contrib/dblink/dblink–unpackaged–1.0.sql
M contrib/dict_int/dict_int–1.0.sql
M contrib/dict_int/dict_int–unpackaged–1.0.sql
M contrib/dict_xsyn/dict_xsyn–1.0.sql
M contrib/dict_xsyn/dict_xsyn–unpackaged–1.0.sql
M contrib/earthdistance/earthdistance–1.0.sql
M contrib/earthdistance/earthdistance–unpackaged–1.0.sql
M contrib/file_fdw/file_fdw–1.0.sql
M contrib/fuzzystrmatch/fuzzystrmatch–1.0.sql
M contrib/fuzzystrmatch/fuzzystrmatch–unpackaged–1.0.sql
M contrib/hstore/hstore–1.0.sql
M contrib/hstore/hstore–unpackaged–1.0.sql
M contrib/intagg/intagg–1.0.sql
M contrib/intagg/intagg–unpackaged–1.0.sql
M contrib/intarray/intarray–1.0.sql
M contrib/intarray/intarray–unpackaged–1.0.sql
M contrib/isn/isn–1.0.sql
M contrib/isn/isn–unpackaged–1.0.sql
M contrib/lo/lo–1.0.sql
M contrib/lo/lo–unpackaged–1.0.sql
M contrib/ltree/ltree–1.0.sql
M contrib/ltree/ltree–unpackaged–1.0.sql
M contrib/pageinspect/pageinspect–1.0.sql
M contrib/pageinspect/pageinspect–unpackaged–1.0.sql
M contrib/pg_buffercache/pg_buffercache–1.0.sql
M contrib/pg_buffercache/pg_buffercache–unpackaged–1.0.sql
M contrib/pg_freespacemap/pg_freespacemap–1.0.sql
M contrib/pg_freespacemap/pg_freespacemap–unpackaged–1.0.sql
M contrib/pg_stat_statements/pg_stat_statements–1.0.sql
M contrib/pg_stat_statements/pg_stat_statements–unpackaged–1.0.sql
M contrib/pg_trgm/pg_trgm–1.0.sql
M contrib/pg_trgm/pg_trgm–unpackaged–1.0.sql
M contrib/pgcrypto/pgcrypto–1.0.sql
M contrib/pgcrypto/pgcrypto–unpackaged–1.0.sql
M contrib/pgrowlocks/pgrowlocks–1.0.sql
M contrib/pgrowlocks/pgrowlocks–unpackaged–1.0.sql
M contrib/pgstattuple/pgstattuple–1.0.sql
M contrib/pgstattuple/pgstattuple–unpackaged–1.0.sql
M contrib/seg/seg–1.0.sql
M contrib/seg/seg–unpackaged–1.0.sql
M contrib/spi/autoinc–1.0.sql
M contrib/spi/autoinc–unpackaged–1.0.sql
M contrib/spi/insert_username–1.0.sql
M contrib/spi/insert_username–unpackaged–1.0.sql
M contrib/spi/moddatetime–1.0.sql
M contrib/spi/moddatetime–unpackaged–1.0.sql
M contrib/spi/refint–1.0.sql
M contrib/spi/refint–unpackaged–1.0.sql
M contrib/spi/timetravel–1.0.sql
M contrib/spi/timetravel–unpackaged–1.0.sql
M contrib/sslinfo/sslinfo–1.0.sql
M contrib/sslinfo/sslinfo–unpackaged–1.0.sql
M contrib/tablefunc/tablefunc–1.0.sql
M contrib/tablefunc/tablefunc–unpackaged–1.0.sql
M contrib/test_parser/test_parser–1.0.sql
M contrib/test_parser/test_parser–unpackaged–1.0.sql
M contrib/tsearch2/tsearch2–1.0.sql
M contrib/tsearch2/tsearch2–unpackaged–1.0.sql
M contrib/unaccent/unaccent–1.0.sql
M contrib/unaccent/unaccent–unpackaged–1.0.sql
M contrib/uuid-ossp/uuid-ossp–1.0.sql
M contrib/uuid-ossp/uuid-ossp–unpackaged–1.0.sql
M contrib/xml2/xml2–1.0.sql
M contrib/xml2/xml2–unpackaged–1.0.sql
M doc/src/sgml/extend.sgml
M src/backend/commands/extension.c
Modify up/home macro to match standard parameter list; fixes doc build.
commit : e0d273500a84ab94c69cbfa10ea0537604fbdda3
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 14:04:59 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 14:04:59 -0400
M doc/src/sgml/stylesheet.dsl
Improve documentation of psql's \q command.
commit : 80c6409c2bb9417c059603f0b5b88209517c7593
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 13:59:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 13:59:30 -0400
The documentation neglected to explain its behavior in a script file
(it only ends execution of the script, not psql as a whole), and failed
to mention the long form \quit either.
M doc/src/sgml/ref/psql-ref.sgml
Add Up/Home link to the top of the HTML doc output.
commit : b8691d838be0d9a85fa9ede6a931c4f194895c36
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 11:24:13 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 11:24:13 -0400
Backpatch to 9.0.X and 9.1.X.
M doc/src/sgml/stylesheet.dsl
Add comment on why pulling data from a "name" index column can't crash.
commit : 8c8ba6d11b06e5a8b9fe5653a1cd17c437af5f7b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 18:40:53 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 18:40:53 -0400
It's been bothering me for several days that pretending that the cstring
data stored in a btree name_ops column is really a "name" Datum could lead
to reading past the end of memory. However, given the current memory
layout used for index-only scans in the btree code, a crash is in fact not
possible. Document that so we don't break it. I have not thought of any
other solutions that aren't fairly ugly too, and most of them lose the
functionality of index-only scans on name columns altogether, so this seems
like the way to go.
M src/backend/access/nbtree/nbtree.c
Generate index-only scan tuple descriptor from the plan node's indextlist.
commit : cb6771fb32cbdb11c8d84b7d62ee940bdba38d52
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 18:11:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 18:11:51 -0400
Dept. of second thoughts: as long as we've got that tlist hanging around
anyway, we can apply ExecTypeFromTL to it to get a suitable descriptor for
the ScanTupleSlot. This is a nicer solution than the previous one because
it eliminates some hard-wired knowledge about btree name_ops, and because
it avoids the somewhat shaky assumption that we needn't set up the scan
tuple descriptor in EXPLAIN_ONLY mode. It doesn't change what actually
happens at run-time though, and I'm still a bit nervous about that.
M src/backend/executor/nodeIndexonlyscan.c
Improve entab's Makefile install entry.
commit : e991930e8a2394169d95e9a4c175a1fdf812ef04
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 18:03:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 18:03:34 -0400
Andrew Dunstan
M src/tools/entab/Makefile
Document that not backing up postmaster.pid and postmaster.opts might help prevent pg_ctl from getting confused.
commit : 47cacfc0f171c7794a8a953e4676db60e1fb261c
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 17:33:20 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 17:33:20 -0400
Backpatch to 9.1.
M doc/src/sgml/backup.sgml
Consider index-only scans even when there is no matching qual or ORDER BY.
commit : 600d3206d1b3f8b540397b79905486a536ac7f78
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 15:00:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 15:00:30 -0400
By popular demand.
M src/backend/optimizer/path/indxpath.c
Rearrange the implementation of index-only scans.
commit : a0185461dd94c8d31d8d55a7f2839b0d2f172ab9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 14:20:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 11 Oct 2011 14:20:06 -0400
This commit changes index-only scans so that data is read directly from the
index tuple without first generating a faux heap tuple. The only immediate
benefit is that indexes on system columns (such as OID) can be used in
index-only scans, but this is necessary infrastructure if we are ever to
support index-only scans on expression indexes. The executor is now ready
for that, though the planner still needs substantial work to recognize
the possibility.
To do this, Vars in index-only plan nodes have to refer to index columns
not heap columns. I introduced a new special varno, INDEX_VAR, to mark
such Vars to avoid confusion. (In passing, this commit renames the two
existing special varnos to OUTER_VAR and INNER_VAR.) This allows
ruleutils.c to handle them with logic similar to what we use for subplan
reference Vars.
Since index-only scans are now fundamentally different from regular
indexscans so far as their expression subtrees are concerned, I also chose
to change them to have their own plan node type (and hence, their own
executor source file).
M src/backend/commands/explain.c
M src/backend/commands/trigger.c
M src/backend/executor/Makefile
M src/backend/executor/execAmi.c
M src/backend/executor/execCurrent.c
M src/backend/executor/execProcnode.c
M src/backend/executor/execQual.c
M src/backend/executor/execScan.c
M src/backend/executor/execUtils.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeHash.c
A src/backend/executor/nodeIndexonlyscan.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeNestloop.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/print.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/tid.c
A src/include/executor/nodeIndexonlyscan.h
M src/include/executor/nodeIndexscan.h
M src/include/nodes/execnodes.h
M src/include/nodes/nodes.h
M src/include/nodes/plannodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/relation.h
Replace hardcoded switch in object_exists() with a lookup table.
commit : fa351d5a0db0672b6f586315720302e493116f27
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 11 Oct 2011 09:14:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 11 Oct 2011 09:14:30 -0400
There's no particular advantage to this change on its face; indeed,
it's possible that this might be slightly slower than the old way.
But it makes this information more easily accessible to other
functions, and therefore paves the way for future code consolidation.
Performance isn't critical here, so there's no need to be smart about
how we do the search.
This is a heavily cut-down version of a patch from KaiGai Kohei,
with several fixes by me. Additional review from Dimitri Fontaine.
M src/backend/catalog/objectaddress.c
Repair breakage in VirtualXactLock.
commit : e76bcaba9cb330b32e9a80dfe9cd510d802121c4
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 11 Oct 2011 07:39:09 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 11 Oct 2011 07:39:09 -0400
I broke this in commit 84e37126770dd6de903dad88ce150a49b63b5ef9. Report and
fix by Fujii Masao.
M src/backend/storage/lmgr/lock.c
Make the reference to "CREATE USER" in the CREATE ROLE page a link.
commit : 5b9102cef2edcc621daef423d42969b517359136
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:38:32 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:38:32 -0400
This might help to avoid confusion between the CREATE USER command,
and the deprecated CREATEUSER option to CREATE ROLE, as per a recent
complaint from Ron Adams. At any rate, having a cross-link here
seems like a good idea; two commands that are so similar should
reference each other.
M doc/src/sgml/ref/create_role.sgml
Improve documentation of how to fiddle with SCSI drives on FreeBSD.
commit : e8bb5f7245afe5037429d6b20f5f136bf929cc78
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:21:35 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:21:35 -0400
Per suggestions from Achilleas Mantzios and Greg Smith.
M doc/src/sgml/wal.sgml
Fix typo in docs for libpq keepalives_count option.
commit : 322019ed2e08e7cad4ef126e6229a8188643170f
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:10:47 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:10:47 -0400
Shigehiro Honda
M doc/src/sgml/libpq.sgml
Add doc index entry for pg_resetxlog.
commit : 48a62278ed34e17f65b80d5cf1a84c4c1ab5d8b9
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:05:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:05:25 -0400
Fujii Masao
M doc/src/sgml/ref/pg_resetxlog.sgml
Document DELETE/UPDATE command tag behavior when triggers are involved.
commit : 61dd737c29661763448d61786ec1aa260db0412a
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 12:53:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 12:53:04 -0400
Marti Raudsepp
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/update.sgml
Some minor wordsmithing for the cascading replication documentation.
commit : 0ff7ea5d3c6d126ba9fd05ea1845d49e8c0b4fd9
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 10:15:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 10:15:45 -0400
Per report from Thom Brown.
M doc/src/sgml/high-availability.sgml
Mark GUC external_pid_file's default as '' in postgresql.conf, rather than '(none)'.
commit : e26d5fcd94d11c3f367ab5fbe246c0288cc9eb44
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 10 Oct 2011 08:16:36 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 10 Oct 2011 08:16:36 -0400
M src/backend/utils/misc/postgresql.conf.sample
Attempt to reduce local dependencies in regression tests.
commit : 3e9a2672d25aed15ae6b4a09decbd8927d069868
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 07:58:17 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 07:58:17 -0400
This appears to be another case where the relative sort order of letters
vs. numbers can throw things off.
Pavel Stehule
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
In pg_upgrade, add -o/-O options to pass parameters to the servers, and document its use for config-only directory installs.
commit : 0dc3f57ba0aa9a99308d3d097eeb2cbcbd5fb52c
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 10 Oct 2011 07:43:28 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 10 Oct 2011 07:43:28 -0400
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M doc/src/sgml/pgupgrade.sgml
Fix ALTER TABLE ONLY .. DROP CONSTRAINT.
commit : c0f03aae0469e758964faac0fb741685170c39a5
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 23:39:52 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 23:39:52 -0400
When I consolidated two copies of the HOT-chain search logic in commit
4da99ea4231e3d8bbf28b666748c1028e7b7d665, I introduced a behavior
change: the old code wouldn't necessarily traverse the entire chain,
if the most recently returned tuple were updated while the HOT chain
traversal is in progress. The new behavior seems more correct, but
unfortunately, the code here relies on a scan with SnapshotNow failing
to see its own updates. That seems pretty shaky even with the old HOT
chain traversal behavior, since there's no guarantee that these
updates will always be HOT, but it's trivial to broke a failure with
the new HOT search logic. Fix by updating just the first matching
pg_constraint tuple, rather than all of them, since there should be
only one anyway. But since nobody has reproduced this failure on older
versions, no back-patch for now.
Report and test case by Alex Hunsaker; tablecmds.c changes by me.
M src/backend/commands/tablecmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
Revert accidental change to pg_config_manual.h.
commit : c980426c69ae76b04aa9de010027438457aeaa7f
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 22:20:44 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 22:20:44 -0400
This was broken in commit 53dbc27c62d8e1b6c5253feba04a5094cb8fe046, which
introduced unlogged tables. Fortunately, as debugging tools go, this one
is pretty cheap, which is probably why it took nine months for someone to
notice, but it's not intended to be enabled by default, so revert.
Noted by Fujii Masao.
M src/include/pg_config_manual.h
Clean up a couple of box gist helper functions.
commit : d50e1251946a6e59092f0a84fc903532eb599a4f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 9 Oct 2011 18:55:27 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 9 Oct 2011 18:55:27 +0300
The original idea of this patch was to make box picksplit run faster, by
eliminating unnecessary palloc() overhead, but that was obsoleted by the new
double-sorting split algorithm that doesn't call these functions so heavily
anymore. Nevertheless, the code looks better this way.
Original patch by me, reviewed and tidied up after the double-sorting patch
by Kevin Grittner.
M src/backend/access/gist/gistproc.c
Improve index-only scans to avoid repeated access to the index page.
commit : cbfa92c23c3924d53889320cdbe26f23ee23e40c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 9 Oct 2011 00:21:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 9 Oct 2011 00:21:08 -0400
We copy all the matched tuples off the page during _bt_readpage, instead of
expensively re-locking the page during each subsequent tuple fetch. This
costs a bit more local storage, but not more than 2*BLCKSZ worth, and the
reduction in LWLock traffic is certainly worth that. What's more, this
lets us get rid of the API wart in the original patch that said an index AM
could randomly decline to supply an index tuple despite having asserted
pg_am.amcanreturn. That will be important for future improvements in the
index-only-scan feature, since the executor will now be able to rely on
having the index data available.
M doc/src/sgml/indexam.sgml
M src/backend/access/index/indexam.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/executor/nodeIndexscan.c
M src/include/access/nbtree.h
M src/include/access/relscan.h
Prevent index-only scans in stats regression test.
commit : 45401c1c25fe1ef14bf68089de86bcb5cce9f453
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 23:45:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 23:45:58 -0400
This bollixes the test because it's expecting to see the idx_tup_fetch
counter increase, which won't happen if heap fetches were avoided by use
of an index-only scan. Per buildfarm results.
While at it, let's just make sure that enable_seqscan and enable_indexscan
are ON for this test ...
M src/test/regress/expected/stats.out
M src/test/regress/sql/stats.sql
Note that index-only scans can affect idx_tup_fetch.
commit : c78d8cd1464bc6b69fdc72f9ce51407c89554ece
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 11:09:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 11:09:18 -0400
An index-only scan that avoids heap fetches will increment idx_tup_read
but not idx_tup_fetch.
M doc/src/sgml/monitoring.sgml
Fix brain fade in cost estimation for index-only scans.
commit : b324384f6bd5d661efeddb83d7f607781e96947d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 10:41:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 8 Oct 2011 10:41:17 -0400
visibility_fraction should not be applied to regular indexscans.
Noted by Cédric Villemain.
M src/backend/optimizer/path/costsize.c
Don't let transform_null_equals=on affect CASE foo WHEN NULL ... constructs. transform_null_equals is only supposed to affect "foo = NULL" expressions given directly by the user, not the internal "foo = NULL" expression generated from CASE-WHEN.
commit : 1ef60dab7049ffac52dee60b5788b6c7bc1f9d67
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:17:40 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:17:40 +0300
This fixes bug #6242, reported by Sergey. Backpatch to all supported
branches.
M src/backend/parser/parse_expr.c
Fix typo.
commit : 041dceb2590081c397daeda84ff28ffc71a51fb0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:04:07 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:04:07 +0300
M src/include/storage/barrier.h
Add missing space.
commit : 13168ae4ebb6eac6f668a4a157e7fe3ffae22d85
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:48:38 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:48:38 -0400
Dickson S. Guedes
M doc/src/sgml/func.sgml
Try to fix memory barriers on x86_64.
commit : 6a6082c27c148eb452d804af306e8745f6e49b36
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:32:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:32:30 -0400
%esp is no good; must use %rsp there.
M src/include/storage/barrier.h
Support index-only scans using the visibility map to avoid heap fetches.
commit : a2822fb9337a21f98ac4ce850bb4145acf47ca27
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 7 Oct 2011 20:13:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 7 Oct 2011 20:13:02 -0400
When a btree index contains all columns required by the query, and the
visibility map shows that all tuples on a target heap page are
visible-to-all, we don't need to fetch that heap page. This patch depends
on the previous patches that made the visibility map reliable.
There's a fair amount left to do here, notably trying to figure out a less
chintzy way of estimating the cost of an index-only scan, but the core
functionality seems ready to commit.
Robert Haas and Ibrar Ahmed, with some previous work by Heikki Linnakangas.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/indexam.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M src/backend/access/index/genam.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtree.c
M src/backend/commands/explain.c
M src/backend/executor/nodeIndexscan.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/plancat.c
M src/backend/optimizer/util/var.c
M src/backend/tcop/postgres.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/access/genam.h
M src/include/access/relscan.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_am.h
M src/include/nodes/execnodes.h
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/var.h
M src/test/regress/expected/aggregates.out
M src/test/regress/expected/rangefuncs.out
In pg_upgrade, use the new postmaster -C option to get the real data directory, for config-only directory installs. Only works for PG 9.2+ servers.
commit : caa1054df8408b165e5f66ff25c87b6dd0a0a1e7
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 7 Oct 2011 14:40:23 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 7 Oct 2011 14:40:23 -0400
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
In pg_upgrade, improve popen() failure detection by checking for fgets() failures.
commit : a3996754cc0281293cc5bfb90bf594fef41aff5b
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 19:37:29 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 19:37:29 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
Move pg_upgrade doc mention of the port numbers to the same place.
commit : 981e5acd24cc63fa4f27dac3b35e5d0bf3921efc
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 19:31:20 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 19:31:20 -0400
M doc/src/sgml/pgupgrade.sgml
Ensure walsenders can be SIGTERMed while in non-walsender code
commit : 7aeff9f4a4e57dca5727828bf95f12cf63003270
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 6 Oct 2011 21:43:14 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 6 Oct 2011 21:43:14 +0200
In oder to exit on SIGTERM when in non-walsender code,
such as do_pg_stop_backup(), we need to set the interrupt
variables that are used there, and not just the walsender
local ones.
M src/backend/replication/walsender.c
Make pgstatindex respond to cancel interrupts.
commit : 1cb018dd09268cab7f4ac1e8ab59b2277e7709f1
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Oct 2011 12:08:59 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Oct 2011 12:08:59 -0400
A similar problem for pgstattuple() was fixed in April of 2010 by commit
33065ef8bc52253ae855bc959576e52d8a28ba06, but pgstatindex() seems to have
been overlooked.
Back-patch all the way, as with that commit, though not to 7.4 through
8.1, since those are now EOL.
M contrib/pgstattuple/pgstatindex.c
Simplify new pg_ctl newline termination code.
commit : 416e82ce9f0c8c4ec6d377368d670b8ca74097a6
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 10:59:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 10:59:50 -0400
M src/bin/pg_ctl/pg_ctl.c
Add postmaster -C option to query configuration parameters, and have pg_ctl use that to query the data directory for config-only installs. This fixes awkward or impossible pg_ctl operation for config-only installs.
commit : aaa6e1def292cdacb6b27088898793b1b879fedf
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 09:38:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 6 Oct 2011 09:38:39 -0400
M doc/src/sgml/ref/postgres-ref.sgml
M src/backend/main/main.c
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/bin/pg_ctl/pg_ctl.c
Replace the "New Linear" GiST split algorithm for boxes and points with a new double-sorting algorithm. The new algorithm produces better quality trees, making searches faster.
commit : 7f3bd86843e5aad84585a57d3f6b80db3c609916
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 6 Oct 2011 10:03:46 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 6 Oct 2011 10:03:46 +0300
Alexander Korotkov
M src/backend/access/gist/gistproc.c
Improve and simplify CREATE EXTENSION's management of GUC variables.
commit : ba6f629326be365a3124dc80aa5d303e2b0bf46b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Oct 2011 20:44:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Oct 2011 20:44:16 -0400
CREATE EXTENSION needs to transiently set search_path, as well as
client_min_messages and log_min_messages. We were doing this by the
expedient of saving the current string value of each variable, doing a
SET LOCAL, and then doing another SET LOCAL with the previous value at
the end of the command. This is a bit expensive though, and it also fails
badly if there is anything funny about the existing search_path value,
as seen in a recent report from Roger Niederland. Fortunately, there's a
much better way, which is to piggyback on the GUC infrastructure previously
developed for functions with SET options. We just open a new GUC nesting
level, do our assignments with GUC_ACTION_SAVE, and then close the nesting
level when done. This automatically restores the prior settings without a
re-parsing pass, so (in principle anyway) there can't be an error. And
guc.c still takes care of cleanup in event of an error abort.
The CREATE EXTENSION code for this was modeled on some much older code in
ri_triggers.c, which I also changed to use the better method, even though
there wasn't really much risk of failure there. Also improve the comments
in guc.c to reflect this additional usage.
M src/backend/commands/extension.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Change wording for COALESCE docs to use "otherwise".
commit : 3919ad864d7040361fd4b44719acaa1ec0f87bbd
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Oct 2011 22:39:29 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Oct 2011 22:39:29 -0400
Per Tom
M doc/src/sgml/func.sgml
Explain COALESCE example in the docs.
commit : 9d23d7cdafb3540aa2de9310c7f1afee87dfc2f2
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Oct 2011 21:47:07 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 4 Oct 2011 21:47:07 -0400
M doc/src/sgml/func.sgml
Improve define_custom_variable's handling of pre-existing settings.
commit : 41e461d36fb1ef78494429f28ea4b72c759f419d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 19:57:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 19:57:21 -0400
Arrange for any problems with pre-existing settings to be reported as
WARNING not ERROR, so that we don't undesirably abort the loading of the
incoming add-on module. The bad setting is just discarded, as though it
had never been applied at all. (This requires a change in the API of
set_config_option. After some thought I decided the most potentially
useful addition was to allow callers to just pass in a desired elevel.)
Arrange to restore the complete stacked state of the variable, rather than
cheesily reinstalling only the active value. This ensures that custom GUCs
will behave unsurprisingly even when the module loading operation occurs
within nested subtransactions that have changed the active value. Since a
module load could occur as a result of, eg, a PL function call, this is not
an unlikely scenario.
M contrib/tsearch2/tsearch2.c
M src/backend/commands/extension.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Fix uninitialized-variable bug.
commit : fa56a0c3e01c175695e932e6cdc2c6915df5adc6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 17:08:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 17:08:18 -0400
M src/backend/access/transam/slru.c
Add sourcefile/sourceline data to EXEC_BACKEND GUC transmission files.
commit : 4bcb82a7d590afa16507f9089bd68ef4bcebebb1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 16:47:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 16:47:48 -0400
This oversight meant that on Windows, the pg_settings view would not
display source file or line number information for values coming from
postgresql.conf, unless the backend had received a SIGHUP since starting.
In passing, also make the error detection in read_nondefault_variables a
tad more thorough, and fix it to not lose precision on float GUCs (these
changes are already in HEAD as of my previous commit).
M src/backend/utils/misc/guc.c
Remember the source GucContext for each GUC parameter.
commit : 9f5836d224e876399dfdd7d6d4343300dbc2f664
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 16:13:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 16:13:16 -0400
We used to just remember the GucSource, but saving GucContext too provides
a little more information --- notably, whether a SET was done by a
superuser or regular user. This allows us to rip out the fairly dodgy code
that define_custom_variable used to use to try to infer the context to
re-install a pre-existing setting with. In particular, it now works for
a superuser to SET a extension's SUSET custom variable before loading the
associated extension, because GUC can remember whether the SET was done as
a superuser or not. The plperl regression tests contain an example where
this is useful.
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc_tables.h
M src/pl/plperl/expected/plperl_init.out
M src/pl/plperl/expected/plperl_shared.out
M src/pl/plperl/expected/plperlu.out
M src/pl/plperl/sql/plperl_init.sql
M src/pl/plperl/sql/plperl_shared.sql
M src/pl/plperl/sql/plperlu.sql
Use callbacks in SlruScanDirectory for the actual action
commit : 09e196e4539a70c51e828abcfe48dee3efd312d8
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 28 Sep 2011 11:32:38 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 28 Sep 2011 11:32:38 -0300
Previously, the code assumed that the only possible action to take was
to delete files behind a certain cutoff point. The async notify code
was already a crock: it used a different "pagePrecedes" function for
truncation than for regular operation. By allowing it to pass a
callback to SlruScanDirectory it can do cleanly exactly what it needs to
do.
The clog.c code also had its own use for SlruScanDirectory, which is
made a bit simpler with this.
M src/backend/access/transam/clog.c
M src/backend/access/transam/slru.c
M src/backend/commands/async.c
M src/include/access/slru.h
Remove the custom_variable_classes parameter.
commit : 1a00c0ef5368bb7b8ddcb3cf279df36577918ac4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 12:36:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 12:36:18 -0400
This variable provides only marginal error-prevention capability (since
it can only check the prefix of a qualified GUC name), and the consensus
is that that isn't worth the amount of hassle that maintaining the setting
creates for DBAs. So, let's just remove it.
With this commit, the system will silently accept a value for any qualified
GUC name at all, whether it has anything to do with any known extension or
not. (Unqualified names still have to match known built-in settings,
though; and you will get a WARNING at extension load time if there's an
unrecognized setting with that extension's prefix.)
There's still some discussion ongoing about whether to tighten that up and
if so how; but if we do come up with a solution, it's not likely to look
anything like custom_variable_classes.
M doc/src/sgml/auth-delay.sgml
M doc/src/sgml/auto-explain.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/pgstatstatements.sgml
M doc/src/sgml/plperl.sgml
M doc/src/sgml/plpgsql.sgml
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/pl/plperl/expected/plperl_init.out
M src/pl/plperl/expected/plperl_shared.out
M src/pl/plperl/expected/plperlu.out
M src/pl/plperl/sql/plperl_init.sql
M src/pl/plperl/sql/plperl_shared.sql
M src/pl/plperl/sql/plperlu.sql
ProcedureCreate neglected to record dependencies on default expressions.
commit : 76074fcaa04fb5d35e8cf7716587440e3d075d50
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Oct 2011 12:13:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Oct 2011 12:13:15 -0400
Thus, an object referenced in a default expression could be dropped while
the function remained present. This was unaccountably missed in the
original patch to add default parameters for functions. Reported by
Pavel Stehule.
M src/backend/catalog/pg_proc.c
Restructure error handling in reading of postgresql.conf.
commit : d56b3afc0376afe491065d9eca6440b3cc7b1346
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 2 Oct 2011 16:50:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 2 Oct 2011 16:50:04 -0400
This patch has two distinct purposes: to report multiple problems in
postgresql.conf rather than always bailing out after the first one,
and to change the policy for whether changes are applied when there are
unrelated errors in postgresql.conf.
Formerly the policy was to apply no changes if any errors could be
detected, but that had a significant consistency problem, because in some
cases specific values might be seen as valid by some processes but invalid
by others. This meant that the latter processes would fail to adopt
changes in other parameters even though the former processes had done so.
The new policy is that during SIGHUP, the file is rejected as a whole
if there are any errors in the "name = value" syntax, or if any lines
attempt to set nonexistent built-in parameters, or if any lines attempt
to set custom parameters whose prefix is not listed in (the new value of)
custom_variable_classes. These tests should always give the same results
in all processes, and provide what seems a reasonably robust defense
against loading values from badly corrupted config files. If these tests
pass, all processes will apply all settings that they individually see as
good, ignoring (but logging) any they don't.
In addition, the postmaster does not abandon reading a configuration file
after the first syntax error, but continues to read the file and report
syntax errors (up to a maximum of 100 syntax errors per file).
The postmaster will still refuse to start up if the configuration file
contains any errors at startup time, but these changes allow multiple
errors to be detected and reported before quitting.
Alexey Klyukin, reviewed by Andy Colson and av (Alexander ?)
with some additional hacking by Tom Lane
M doc/src/sgml/config.sgml
M src/backend/access/transam/xlog.c
M src/backend/commands/extension.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Improve generated column names for cases involving sub-SELECTs.
commit : 5ec6b7f1b87f0fa006b8e08a11cd4e99bcb67358
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 1 Oct 2011 14:01:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 1 Oct 2011 14:01:46 -0400
We'll now use "exists" for EXISTS(SELECT ...), "array" for ARRAY(SELECT
...), or the sub-select's own result column name for a simple expression
sub-select. Previously, you usually got "?column?" in such cases.
Marti Raudsepp, reviewed by Kyotaro Horiugchi
M doc/src/sgml/ref/select.sgml
M doc/src/sgml/syntax.sgml
M src/backend/parser/parse_target.c
M src/test/regress/expected/aggregates.out
M src/test/regress/expected/subselect.out
M src/test/regress/expected/with.out
In pg_upgrade, remove unnecessary local variable.
commit : 878b74e094a70e660e5ed365a2c4e1b41460515d
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 1 Oct 2011 09:59:27 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 1 Oct 2011 09:59:27 -0400
M contrib/pg_upgrade/server.c
Cache the result of makesign() across calls of gtrgm_penalty().
commit : 0a5d5a49d9965aa092e75ce31a88fbf5f05c5009
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Sep 2011 23:54:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Sep 2011 23:54:27 -0400
Since gtrgm_penalty() is usually called many times in a row with the same
"newval" (to determine which item on an index page newval fits into best),
the makesign() calculation is repetitious. It's expensive enough to make
it worth caching the result, so do so. On my machine this is good for
more than a 40% savings in the time needed to build a trigram index on
/usr/share/dict/words. This is all per a suggestion of Heikki's.
In passing, make some mostly-cosmetic improvements in the caching logic in
the other functions in this file that rely on caching info in fn_extra.
M contrib/pg_trgm/trgm_gist.c
Support GiST index support functions that want to cache data across calls.
commit : d22a09dc70f9830fa78c1cd1a3a453e4e473d354
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Sep 2011 19:48:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 30 Sep 2011 19:48:57 -0400
pg_trgm was already doing this unofficially, but the implementation hadn't
been thought through very well and leaked memory. Restructure the core
GiST code so that it actually works, and document it. Ordinarily this
would have required an extra memory context creation/destruction for each
GiST index search, but I was able to avoid that in the normal case of a
non-rescanned search by finessing the handling of the RBTree. It used to
have its own context always, but now shares a context with the
scan-lifespan data structures, unless there is more than one rescan call.
This should make the added overhead unnoticeable in typical cases.
M doc/src/sgml/gist.sgml
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistscan.c
M src/include/access/gist_private.h
Fix recursion into previously planned sub-query in examine_simple_variable.
commit : 79edb2b1dc33166b576f51a8255a7614f748d9c9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 18:12:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 18:12:34 -0400
This code was looking at the sub-Query tree as seen in the parent query's
RangeTblEntry; but that's the pristine parser output, and what we need to
look at is the tree as it stands at the completion of planning. Otherwise
we might pick up a Var that references a subquery that got flattened and
hence has no RelOptInfo in the subroot. Per report from Peter Geoghegan.
M src/backend/utils/adt/selfuncs.c
Fix pg_upgrade for EXEC_BACKEND builds (e.g. Windows) by properly passing the -b/binary-upgrade flag.
commit : 054219c907a9fe668b2dac4134563b4f38e2b233
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 29 Sep 2011 17:20:53 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 29 Sep 2011 17:20:53 -0400
Backpatch to 9.1.X.
M src/backend/postmaster/postmaster.c
Fix index matching for operators with mixed collatable/noncollatable inputs.
commit : cb37c291060dd13b1a8ff61fceee09efcfbc34e1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 00:43:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 00:43:42 -0400
If an indexable operator for a non-collatable indexed datatype has a
collatable right-hand input type, any OpExpr for it will be marked with a
nonzero inputcollid (since having one collatable input is sufficient to
make that happen). However, an index on a non-collatable column certainly
doesn't have any collation. This caused us to fail to match such operators
to their indexes, because indxpath.c required an exact match of index
collation and clause collation. It seems correct to allow a match when the
index is collation-less regardless of the clause's inputcollid: an operator
with both noncollatable and collatable inputs could perhaps depend on the
collation of the collatable input, but it could hardly expect the index for
the noncollatable input to have that same collation.
Per bug #6232 from Pierre Ducroquet. His example is specifically about
"hstore ? text" but the problem seems quite generic.
M src/backend/optimizer/path/indxpath.c
In pg_upgrade, because toast table names can be mismatched with the heap oid on 8.4, modify the toast name comparison test to only apply to old 9.0+ servers. (The test was previously 8.4+.)
commit : 5e5958428b7c6e91ffddf46bf9aafd920af57a60
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 28 Sep 2011 22:30:44 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 28 Sep 2011 22:30:44 -0400
Backpatch to 9.1.X.
M contrib/pg_upgrade/info.c
Update and extend the EXPLAIN-related documentation.
commit : a32dd16459ae8fbc1e09607d7ed960b3dcce7dba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 28 Sep 2011 19:39:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 28 Sep 2011 19:39:54 -0400
I've made a significant effort at filling in the "Using EXPLAIN" section
to be reasonably complete about mentioning everything that EXPLAIN can
output, including the "Rows Removed" outputs that were added by Marko
Tiikkaja's recent documentation-free patch. I also updated the examples to
be consistent with current behavior; several of them were not close to what
the current code will do. No doubt there's more that can be done here, but
I'm out of patience for today.
M doc/src/sgml/config.sgml
M doc/src/sgml/perform.sgml
M doc/src/sgml/planstats.sgml
M doc/src/sgml/ref/analyze.sgml
M doc/src/sgml/ref/explain.sgml
Take sepgsql regression tests out of the regular regression test mechanism.
commit : cc4ff8742b99d3b20a52f529d03bbe802f4b0053
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Sep 2011 20:07:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Sep 2011 20:07:15 -0400
Because these tests require root privileges, not to mention invasive
changes to the security configuration of the host system, it's not
reasonable for them to be invoked by a regular "make check" or "make
installcheck". Instead, dike out the Makefile's knowledge of the tests,
and change chkselinuxenv (now renamed "test_sepgsql") into a script that
verifies the environment is workable and then runs the tests. It's
expected that test_sepgsql will only be run manually.
While at it, do some cleanup in the error checking in the script, and
do some wordsmithing in the documentation.
M contrib/sepgsql/Makefile
D contrib/sepgsql/chkselinuxenv
A contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
Remove dependency on error ordering in isolation tests
commit : bbd38af3a879604db2b455cbb2b4ec93275249fa
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 27 Sep 2011 16:08:31 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 27 Sep 2011 16:08:31 -0300
We now report errors reported by the just-unblocked and unblocking
transactions identically; this should fix relatively common buildfarm
failures reported by animals that are failing the "wrong" session.
M src/test/isolation/expected/fk-deadlock.out
M src/test/isolation/expected/fk-deadlock2.out
M src/test/isolation/expected/fk-deadlock2_1.out
D src/test/isolation/expected/fk-deadlock2_2.out
M src/test/isolation/expected/fk-deadlock_1.out
M src/test/isolation/isolationtester.c
M src/test/isolation/isolationtester.h
M src/test/isolation/specparse.y
Fix typo
commit : 173499273804f137bbb4a6785d6967b9e2d7e478
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 21 Sep 2011 13:26:19 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 21 Sep 2011 13:26:19 -0300
M src/test/isolation/isolationtester.c
Update comments related to the crash-safety of the visibility map.
commit : f70648d5a16b4b048cacd04b82079e6734449bc2
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 09:30:23 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 09:30:23 -0400
In hio.c, document how we avoid deadlock with respect to visibility map
buffer locks. In visibilitymap.c, update the LOCKING section of the
file header comment.
Both oversights noted by Heikki Linnakangas.
M src/backend/access/heap/hio.c
M src/backend/access/heap/visibilitymap.c
sepgsql uavc comment improvements.
commit : a9d845be496b779efbcf16095bf236639e9e7665
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 08:37:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 08:37:25 -0400
Robert Haas and KaiGai Kohei
M contrib/sepgsql/uavc.c
heap_update() must recheck tuple after unlocking and relocking buffer.
commit : 624f155ffa93d1af4fb9d91fd5c0eb05da1e9e54
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 08:24:18 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 27 Sep 2011 08:24:18 -0400
Bug found by Alvaro Herrera, fix suggested by Heikki Linnakangas
and reviewed by Tom Lane.
M src/backend/access/heap/heapam.c
Fix window functions that sort by expressions involving aggregates.
commit : 269c5dd2f46e3490da05d5dd5dad07828df281d9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 23:48:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 23:48:39 -0400
In commit c1d9579dd8bf3c921ca6bc2b62c40da6d25372e5, I changed things so
that the output of the Agg node that feeds the window functions would not
list any ungrouped Vars directly. Formerly, for example, the Agg tlist
might have included both "x" and "sum(x)", which is not really valid if
"x" isn't a grouping column. If we then had a window function ordering on
something like "sum(x) + 1", prepare_sort_from_pathkeys would find no exact
match for this in the Agg tlist, and would conclude that it must recompute
the expression. But it would break the expression down to just the Var
"x", which it would find in the tlist, and then rebuild the ORDER BY
expression using a reference to the subplan's "x" output. Now, after the
above-referenced changes, "x" isn't in the Agg tlist if it's not a grouping
column, so that prepare_sort_from_pathkeys fails with "could not find
pathkey item to sort", as reported by Bricklen Anderson.
The fix is to not break down Aggrefs into their component parts, but just
treat them as irreducible expressions to be sought in the subplan tlist.
This is definitely OK for the use with respect to window functions in
grouping_planner, since it just built the tlist being used on the same
basis. AFAICT it is safe for other uses too; most of the other call sites
couldn't encounter Aggrefs anyway.
M src/backend/optimizer/plan/createplan.c
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql
Allow snapshot references to still work during transaction abort.
commit : 57eb009092684e6e1788dd0dae641ccee1668b10
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 22:25:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 22:25:28 -0400
In REPEATABLE READ (nee SERIALIZABLE) mode, an attempt to do
GetTransactionSnapshot() between AbortTransaction and CleanupTransaction
failed, because GetTransactionSnapshot would recompute the transaction
snapshot (which is already wrong, given the isolation mode) and then
re-register it in the TopTransactionResourceOwner, leading to an Assert
because the TopTransactionResourceOwner should be empty of resources after
AbortTransaction. This is the root cause of bug #6218 from Yamamoto
Takashi. While changing plancache.c to avoid requesting a snapshot when
handling a ROLLBACK masks the problem, I think this is really a snapmgr.c
bug: it's lower-level than the resource manager mechanism and should not be
shutting itself down before we unwind resource manager resources. However,
just postponing the release of the transaction snapshot until cleanup time
didn't work because of the circular dependency with
TopTransactionResourceOwner. Fix by managing the internal reference to
that snapshot manually instead of depending on TopTransactionResourceOwner.
This saves a few cycles as well as making the module layering more
straightforward. predicate.c's dependencies on TopTransactionResourceOwner
go away too.
I think this is a longstanding bug, but there's no evidence that it's more
than a latent bug, so it doesn't seem worth any risk of back-patching.
M src/backend/access/transam/xact.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/time/snapmgr.c
M src/include/storage/predicate.h
M src/include/utils/snapmgr.h
Speed up array element assignment in plpgsql by caching type information.
commit : 16762b519c9421ad5f1e373b1d89b0f2f6568769
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 15:38:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 15:38:07 -0400
Cache assorted data in the PLpgSQL_arrayelem struct to avoid repetitive
catalog lookups over multiple executions of the same statement.
Pavel Stehule
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Update obsolete comments.
commit : 821fd903f9b7f5a8ca439b9b7cb6d2f54672582f
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 26 Sep 2011 13:12:22 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 26 Sep 2011 13:12:22 -0400
This was partially fixed by 57fdb2b0d835fe201434fc28bf5dabf83ada26d1,
back in 2005, but it missed a couple of spots.
YAMAMOTO Takashi
M src/backend/executor/execProcnode.c
Use a fresh copy of query_list when making a second plan in GetCachedPlan.
commit : 21fb95da46bce8de3e149707c680d489b8a5ffb0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 12:44:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 12:44:17 -0400
The code path that tried a generic plan, didn't like it, and then made a
custom plan was mistakenly passing the same copy of the query_list to the
planner both times. This doesn't work too well for nontrivial queries,
since the planner tends to scribble on its input. Diagnosis and fix by
Yamamoto Takashi.
M src/backend/utils/cache/plancache.c
Fully const-ify PQconnectdbParams, PQconnectStartParams, and PQpingParams.
commit : 2a571bc233821023afdf8729a3ae5071b2343f65
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 18:52:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 18:52:48 -0400
The keywords and values arguments of these functions are more properly
declared "const char * const *" than just "const char **".
Lionel Elie Mamane, reviewed by Craig Ringer
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/libpq-fe.h
Avoid unnecessary snapshot-acquisitions in BuildCachedPlan.
commit : d5aa7a9fe68b2017362421bd853faeb8199a472c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 17:33:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 17:33:32 -0400
I had copied-and-pasted a claim that we couldn't reach this point when
dealing with utility statements, but that was a leftover from when the
caller was required to supply a plan to start with. We now will go
through here at least once when handling a utility statement, so it
seems worth a check to see whether a snapshot is actually needed.
(Note that analyze_requires_snapshot is quite a cheap test.)
Per suggestion from Yamamoto Takashi. I don't think I believe that this
resolves his reported assertion failure; but it's worth changing anyway,
just to save a cycle or two.
M src/backend/utils/cache/plancache.c
In pgrminclude, document requirement to use pgcompinclude, and sort files so include removal is more predictable.
commit : 2594ad74360c647edfd0645c4097d78ff83b4c3b
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 25 Sep 2011 16:57:31 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 25 Sep 2011 16:57:31 -0400
M src/tools/pginclude/pgrminclude
Un-break compression of plain-text output format in pg_dump.
commit : 23fe7a74777eba01835389263418cbe8a546e772
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 13:59:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 13:59:17 -0400
pg_dump has historically understood -Z with no -F switch to mean that
it should emit a gzip-compressed version of its plain text output.
This got broken through a misunderstanding in the 9.1 patch that added
directory output format. Restore the former behavior.
Per complaint from Roger Niederland and diagnosis by Adrian Klaver.
M src/bin/pg_dump/pg_dump.c
Document pgrminclude limitations.
commit : 84bbe57dc128df224614c61f88c350ee9ed92123
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 24 Sep 2011 19:37:54 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 24 Sep 2011 19:37:54 -0400
M src/tools/pginclude/pgrminclude
Recognize self-contradictory restriction clauses for non-table relations.
commit : 7741dd6590073719688891898e85f0cb73453159
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Sep 2011 19:33:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 24 Sep 2011 19:33:16 -0400
The constraint exclusion feature checks for contradictions among scan
restriction clauses, as well as contradictions between those clauses and a
table's CHECK constraints. The first aspect of this testing can be useful
for non-table relations (such as subqueries or functions-in-FROM), but the
feature was coded with only the CHECK case in mind so we were applying it
only to plain-table RTEs. Move the relation_excluded_by_constraints call
so that it is applied to all RTEs not just plain tables. With the default
setting of constraint_exclusion this results in no extra work, but with
constraint_exclusion = ON we will detect optimizations that we missed
before (at the cost of more planner cycles than we expended before).
Per a gripe from Gunnlaugur Þór Briem. Experimentation with
his example also showed we were not being very bright about the case where
constraint exclusion is proven within a subquery within UNION ALL, so tweak
the code to allow set_append_rel_pathlist to recognize such cases.
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/plan/planner.c
M src/include/optimizer/planner.h
Expand pgrminclude to exclude use of macros CppAsString and CppConcat.
commit : 337c0b03614c45516f2c3ec956405713bb264d54
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 24 Sep 2011 09:24:14 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 24 Sep 2011 09:24:14 -0400
M src/tools/pginclude/pgrminclude
Fix typo
commit : 0126db2a469c7dbe540354f4ac6691a6c1e3b94e
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:34:32 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:34:32 +0200
M doc/src/sgml/install-windows.sgml
Note that sslmode=require verifies the CA if root cert is present
commit : 33e81fdfaf6a8d92451cd780e5619ac5be0b44c9
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:25:12 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:25:12 +0200
This mode still exists for backwards compatibility, making
sslmode=require the same as sslmode=verify-ca when the file is present,
but not causing an error when it isn't.
Per bug 6189, reported by Srinivas Aji
M doc/src/sgml/libpq.sgml
Fix our mapping of Windows timezones for Central America.
commit : 4c5d837e69cf92e906acfa3000d848d4524beee9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 22:07:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 22:07:52 -0400
We were mapping "Central America Standard Time" to "CST6CDT", which seems
entirely wrong, because according to the Olson timezone database noplace
in Central America observes daylight savings time on any regular basis ---
and certainly not according to the USA DST rules that are implied by
"CST6CDT". (Mexico is an exception, but they can be disregarded since
they have a separate timezone name in Windows.) So, map this zone name to
plain "CST6", which will provide a fixed UTC offset.
As written, this patch will also result in mapping "Central America
Daylight Time" to CST6. I considered hacking things so that would still
map to CST6CDT, but it seems it would confuse win32tzlist.pl to put those
two names in separate entries. Since there's little evidence that any
such zone name is used in the wild, much less that CST6CDT would be a good
match for it, I'm not too worried about what we do with it.
Per complaint from Pratik Chirania.
M src/bin/initdb/findtimezone.c
Update win32tzlist.pl for the new location of our Windows timezone map.
commit : 14a183261a1f9b15dc73ad34295d118ada538b5b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 21:42:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 21:42:24 -0400
I wasn't aware of this script till Magnus mentioned it just now ...
M src/tools/win32tzlist.pl
Memory barrier support for PostgreSQL.
commit : 0c8eda6258805223fa412ab55a1f130fbc51afa0
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:52:43 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:52:43 -0400
This is not actually used anywhere yet, but it gets the basic
infrastructure in place. It is fairly likely that there are bugs, and
support for some important platforms may be missing, so we'll need to
refine this as we go along.
A src/backend/storage/lmgr/README.barrier
M src/backend/storage/lmgr/s_lock.c
A src/include/storage/barrier.h
Teach sepgsql about database labels.
commit : 291873c1554ceecc71a81c25aef4f1260c15c222
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:09:34 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:09:34 -0400
This is still a bit of a hack, but it's better than the old way, for sure.
KaiGai Kohei, with one change by me to make it compile
M contrib/sepgsql/Makefile
A contrib/sepgsql/database.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql.h
Document some more apparently-harmless error messages.
commit : a5e94ea52b002a049ffa52849f2958c096cc0f92
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:02:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:02:46 -0400
M doc/src/sgml/sepgsql.sgml
Add missing brackets to chkselinuxenv.
commit : e50b052a3bc5611dbf1a521ac7bc3611695a5f22
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:02:09 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 17:02:09 -0400
M contrib/sepgsql/chkselinuxenv
Add --{no-,}replication flags to createuser.
commit : b056b716e28562f5c53dfb143725294d44f14d38
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 09:25:20 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 23 Sep 2011 09:25:20 -0400
Fujii Masao, reviewed by Cédric Villemain, with some doc changes by me.
M doc/src/sgml/ref/createuser.sgml
M src/bin/scripts/createuser.c
synchronous_commit is an enum not a boolean.
commit : e5e2f7b0546c0409323af262bdd17a8e19ca3836
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 23 Sep 2011 08:35:33 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 23 Sep 2011 08:35:33 +0100
Jaime Casanova
M doc/src/sgml/config.sgml
Update release notes for 9.1.1, 9.0.5, 8.4.9, 8.3.16, 8.2.22.
commit : 614421f9aa88826424ce6117518e32b41e4c8182
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Sep 2011 17:39:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Sep 2011 17:39:05 -0400
Man, we fixed a lotta bugs since April.
M doc/src/sgml/release-8.2.sgml
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
Make EXPLAIN ANALYZE report the numbers of rows rejected by filter steps.
commit : f1972723654947f70409716757aa83f3d93c8fab
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Sep 2011 11:29:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 22 Sep 2011 11:29:18 -0400
This provides information about the numbers of tuples that were visited
but not returned by table scans, as well as the numbers of join tuples
that were considered and discarded within a join plan node.
There is still some discussion going on about the best way to report counts
for outer-join situations, but I think most of what's in the patch would
not change if we revise that, so I'm going to go ahead and commit it as-is.
Documentation changes to follow (they weren't in the submitted patch
either).
Marko Tiikkaja, reviewed by Marc Cousin, somewhat revised by Tom
M src/backend/commands/explain.c
M src/backend/commands/trigger.c
M src/backend/executor/execAmi.c
M src/backend/executor/execMain.c
M src/backend/executor/execProcnode.c
M src/backend/executor/execScan.c
M src/backend/executor/instrument.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeBitmapAnd.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeBitmapOr.c
M src/backend/executor/nodeGroup.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeNestloop.c
M src/include/executor/instrument.h
M src/include/nodes/execnodes.h
Fix another bit of unlogged-table-induced breakage.
commit : 4893552e21b93149bb60f6204673cce855881a05
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Sep 2011 10:32:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 21 Sep 2011 10:32:30 -0400
Per bug #6205, reported by Abel Abraham Camarillo Ojeda. This isn't a
particularly elegant fix, but I'm trying to minimize the chances of
causing yet another round of breakage.
Adjust regression tests to exercise this case.
M src/backend/catalog/namespace.c
M src/test/regress/expected/create_table.out
M src/test/regress/sql/create_table.sql
Suppress "unused function" warning when not HAVE_LOCALE_T.
commit : 2562dcea811eb642e1c5442e1ede9fe268278157
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Sep 2011 17:47:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Sep 2011 17:47:21 -0400
Forgot to consider this case ...
M src/backend/utils/adt/pg_locale.c
Improve reporting of newlocale() failures in CREATE COLLATION.
commit : 37d4fd2b9d331076292201ab988fe54f09640850
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Sep 2011 13:23:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 20 Sep 2011 13:23:40 -0400
The standardized errno code for "no such locale" failures is ENOENT, which
we were just reporting at face value, viz "No such file or directory".
Per gripe from Thom Brown, this might confuse users, so add an errdetail
message to clarify what it means. Also, report newlocale() failures as
ERRCODE_INVALID_PARAMETER_VALUE rather than using
errcode_for_file_access(), since newlocale()'s errno values aren't
necessarily tied directly to file access failures.
M src/backend/utils/adt/pg_locale.c
Fix another Assert issue exposed by CLOBBER_CACHE_ALWAYS.
commit : faf5cee7f0189beba206a5d96c0abd8e4382b844
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 18 Sep 2011 23:46:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 18 Sep 2011 23:46:04 -0400
plpgsql's exec_stmt_execsql was Assert'ing that a CachedPlanSource was
is_valid immediately after exec_prepare_plan. The risk factor in this case
is that after building the prepared statement, exec_prepare_plan calls
exec_simple_check_plan, which might try to generate a generic plan --- and
with CLOBBER_CACHE_ALWAYS or other unusual causes of invalidation, that
could result in an invalidation. However, that path could only be taken
for a SELECT query, for which we need not set mod_stmt. So in this case
I think it's best to just remove the Assert; it's okay to look at a
slightly-stale querytree for what we need here. Per buildfarm testing.
M src/pl/plpgsql/src/pl_exec.c
Fix Assert failure in new plancache code.
commit : c4ae968633b37e3b0a5da83e9d7d2a5518191564
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Sep 2011 01:47:33 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 17 Sep 2011 01:47:33 -0400
The regression tests were failing with CLOBBER_CACHE_ALWAYS enabled,
as reported by buildfarm member jaguar. There was an Assert in
BuildCachedPlan that asserted that the CachedPlanSource hadn't been
invalidated since we called RevalidateCachedQuery, which in theory can't
happen because we are holding locks on all the relevant database objects.
However, CLOBBER_CACHE_ALWAYS generates a false positive by making an
invalidation happen anyway; and on reflection, that could also occur as a
result of a badly-timed sinval reset due to queue overflow. We could just
remove the Assert and forge ahead with the not-really-stale querytree, but
it seems safer to do another RevalidateCachedQuery call just to make real
sure everything's OK.
M src/backend/utils/cache/plancache.c
Remove debug logging for pgstat wait timeout.
commit : 99b5454167aab89b94f171e4318ef12443c6cfc4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 18:25:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 18:25:27 -0400
This reverts commit 79b2ee20c8a041a85dd230c4e787bef22edae57b, which proved
to not be very informative; it looks like the "pgstat wait timeout"
warnings in the buildfarm are just a symptom of running on heavily loaded
machines, and there isn't any weird mechanism causing them to appear.
To try to reduce the frequency of buildfarm failures from this effect,
increase PGSTAT_MAX_WAIT_TIME from 5 seconds to 10.
Also, arrange to not send a fresh inquiry message every single time through
the loop, as that seems more likely to cause problems (by swamping the
collector) than fix them. We'll now send an inquiry the first time through
the delay loop, and every 640 msec thereafter.
M src/backend/postmaster/pgstat.c
Add FORCE_NOT_NULL support to the file_fdw foreign data wrapper.
commit : 86a3f2d492f19da1f4be8ba099747ac5c83c43bb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 16:35:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 16:35:51 -0400
This is implemented as a per-column boolean option, rather than trying
to match COPY's convention of a single option listing the column names.
Shigeru Hanada, reviewed by KaiGai Kohei
A contrib/file_fdw/data/text.csv
M contrib/file_fdw/file_fdw.c
M contrib/file_fdw/input/file_fdw.source
M contrib/file_fdw/output/file_fdw.source
M doc/src/sgml/file-fdw.sgml
Avoid unnecessary page-level SSI lock check in heap_insert().
commit : 9d306c66e63eb7f45eab9475b3f96c3134bacac6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 14:47:20 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 14:47:20 -0400
As observed by Heikki, we need not conflict on heap page locks during an
insert; heap page locks are only aggregated tuple locks, they don't imply
locking "gaps" as index page locks do. So we can avoid some unnecessary
conflicts, and also do the SSI check while not holding exclusive lock on
the target buffer.
Kevin Grittner, reviewed by Jeff Davis. Back-patch to 9.1.
M src/backend/access/heap/heapam.c
Ensure generic plan gets used for a plpgsql expression with no parameters.
commit : e6ed34f70d57d102da8383919e0046c577d317e7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 12:31:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 12:31:23 -0400
Now that a NULL ParamListInfo pointer causes significantly different
behavior in plancache.c, be sure to pass it that way when the expression
is known not to reference any plpgsql variables. Saves a few setup
cycles anyway.
M src/pl/plpgsql/src/pl_exec.c
gistendscan() forgot to free so->giststate.
commit : 0a6cc28500b7a8db7a27cbd0d75e18837fb2e367
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 04:27:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 04:27:49 -0400
This oversight led to a massive memory leak --- upwards of 10KB per tuple
--- during creation-time verification of an exclusion constraint based on a
GIST index. In most other scenarios it'd just be a leak of 10KB that would
be recovered at end of query, so not too significant; though perhaps the
leak would be noticeable in a situation where a GIST index was being used
in a nestloop inner indexscan. In any case, it's a real leak of long
standing, so patch all supported branches. Per report from Harald Fuchs.
M src/backend/access/gist/gistscan.c
Redesign the plancache mechanism for more flexibility and efficiency.
commit : e6faf910d75027bdce7cd0f2033db4e912592bcc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 00:42:53 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 16 Sep 2011 00:42:53 -0400
Rewrite plancache.c so that a "cached plan" (which is rather a misnomer
at this point) can support generation of custom, parameter-value-dependent
plans, and can make an intelligent choice between using custom plans and
the traditional generic-plan approach. The specific choice algorithm
implemented here can probably be improved in future, but this commit is
all about getting the mechanism in place, not the policy.
In addition, restructure the API to greatly reduce the amount of extraneous
data copying needed. The main compromise needed to make that possible was
to split the initial creation of a CachedPlanSource into two steps. It's
worth noting in particular that SPI_saveplan is now deprecated in favor of
SPI_keepplan, which accomplishes the same end result with zero data
copying, and no need to then spend even more cycles throwing away the
original SPIPlan. The risk of long-term memory leaks while manipulating
SPIPlans has also been greatly reduced. Most of this improvement is based
on use of the recently-added MemoryContextSetParent primitive.
M contrib/spi/refint.c
M contrib/spi/timetravel.c
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/ref/prepare.sgml
M doc/src/sgml/spi.sgml
M src/backend/catalog/namespace.c
M src/backend/commands/prepare.c
M src/backend/executor/spi.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/mmgr/mcxt.c
M src/backend/utils/mmgr/portalmem.c
M src/include/catalog/namespace.h
M src/include/commands/prepare.h
M src/include/executor/spi.h
M src/include/executor/spi_priv.h
M src/include/nodes/parsenodes.h
M src/include/utils/memutils.h
M src/include/utils/plancache.h
M src/pl/plperl/plperl.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c
M src/pl/tcl/pltcl.c
M src/test/regress/regress.c
Teach the makefile used to build stand-alone libpq on Windows that libpq needs win32setlocale.c now. The cygwin and MSVC build scripts were changed earlier, but this was neglected. This should fix bug report #6203 by Steve.
commit : 09e98a3e170ecdeb25a0e1afe81bdbeeeaf21f48
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Sep 2011 17:57:32 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Sep 2011 17:57:32 +0300
M src/interfaces/libpq/win32.mak
In the manual section on primary_conninfo, recommend using a role with REPLICATION privileges, not SUPERUSER.
commit : 76df369c060695edaed5b9502f85e7a3e07f8b1f
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Sep 2011 09:30:32 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 14 Sep 2011 09:30:32 +0300
Fujii Masao
M doc/src/sgml/recovery-config.sgml
Split walsender.h in public/private headers
commit : 86822df9b5d5fe16d2528c7fc9428137414faa4f
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 12 Sep 2011 15:24:29 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 12 Sep 2011 15:24:29 -0300
This dramatically cuts short the number of headers the public one brings
into whatever includes it.
M src/backend/replication/basebackup.c
M src/backend/replication/repl_gram.y
M src/backend/replication/syncrep.c
M src/backend/replication/walsender.c
M src/include/replication/walsender.h
A src/include/replication/walsender_private.h
deflist_to_tuplestore dumped core on an option with no value.
commit : 6693c9a5ed3ac9c07160039742dde8aa67e96ecf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Sep 2011 11:36:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Sep 2011 11:36:49 -0400
Make it return NULL for the option_value, instead.
Per report from Frank van Vugt. Back-patch to 8.4 where this code was
added.
M src/backend/foreign/foreign.c
Propagate with_system_tzdata setting into initdb build.
commit : 3f3304408cb103745ee0722d303c526594a8046c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Sep 2011 10:58:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 13 Sep 2011 10:58:06 -0400
findtimezone.c needs to know this setting too. Per Peter Eisentraut.
M src/bin/initdb/Makefile
In the final emptying phase of the new GiST buffering build, set the queuedForEmptying flag correctly on buffer when adding it to the queue. Also, don't add buffer to the queue if it's there already. These were harmless oversights; failing to set the flag just means that a buffer might get added to the queue twice if more tuples are added to it (although that can't actually happen at this point because all the upper buffers have already been emptied), and having the same buffer twice in the emptying queue is harmless. But better be tidy.
commit : 8caf6132c7498b2b9400a5496a29e48c1c0aa516
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 12 Sep 2011 13:00:44 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 12 Sep 2011 13:00:44 +0300
M src/backend/access/gist/gistbuild.c
Invent a new memory context primitive, MemoryContextSetParent.
commit : b0025bd95703aaedc4ff23ddcfbde9597fa0919d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Sep 2011 16:29:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Sep 2011 16:29:42 -0400
This function will be useful for altering the lifespan of a context after
creation (for example, by creating it under a transient context and later
reparenting it to belong to a long-lived context). It costs almost no new
code, since we can refactor what was there. Per my proposal of yesterday.
M src/backend/utils/mmgr/mcxt.c
M src/include/utils/memutils.h
Remove no-longer-used variable.
commit : 5f42e5945b3dd96c228531c0730f418846ced04e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Sep 2011 16:18:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 11 Sep 2011 16:18:06 -0400
M contrib/pgbench/pgbench.c
Remove many -Wcast-qual warnings
commit : 1b81c2fe6ee2b26d37610c3d381a87fa17af0a7c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Sep 2011 21:54:32 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Sep 2011 21:54:32 +0300
This addresses only those cases that are easy to fix by adding or
moving a const qualifier or removing an unnecessary cast. There are
many more complicated cases remaining.
M contrib/btree_gist/btree_cash.c
M contrib/btree_gist/btree_date.c
M contrib/btree_gist/btree_float4.c
M contrib/btree_gist/btree_float8.c
M contrib/btree_gist/btree_inet.c
M contrib/btree_gist/btree_int2.c
M contrib/btree_gist/btree_int4.c
M contrib/btree_gist/btree_int8.c
M contrib/btree_gist/btree_interval.c
M contrib/btree_gist/btree_macaddr.c
M contrib/btree_gist/btree_oid.c
M contrib/btree_gist/btree_time.c
M contrib/btree_gist/btree_ts.c
M contrib/dict_xsyn/dict_xsyn.c
M contrib/hstore/hstore_gist.c
M contrib/hstore/hstore_io.c
M contrib/intarray/_int_gist.c
M contrib/intarray/_int_tool.c
M contrib/ltree/_ltree_gist.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_trgm/trgm.h
M contrib/pg_trgm/trgm_gist.c
M contrib/pgcrypto/crypt-blowfish.c
M contrib/pgcrypto/crypt-des.c
M contrib/pgcrypto/crypt-gensalt.c
M contrib/pgcrypto/crypt-md5.c
M src/backend/commands/analyze.c
M src/backend/commands/copy.c
M src/backend/libpq/ip.c
M src/backend/libpq/md5.c
M src/backend/nodes/makefuncs.c
M src/backend/nodes/tidbitmap.c
M src/backend/postmaster/autovacuum.c
M src/backend/storage/lmgr/lock.c
M src/backend/tsearch/dict_synonym.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/tsgistidx.c
M src/backend/utils/adt/tsquery_gist.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/xml.c
M src/backend/utils/mb/conv.c
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_files.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/psql/mbprint.c
M src/bin/psql/mbprint.h
M src/bin/psql/print.c
M src/include/nodes/makefuncs.h
M src/interfaces/ecpg/ecpglib/descriptor.c
M src/interfaces/ecpg/ecpglib/execute.c
Fix additional format warning
commit : 02bca4f35164dd1873eab9b8e6167e42a79157c4
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Sep 2011 15:19:54 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 11 Sep 2011 15:19:54 +0300
Apparently, this only happens on 64-bit platforms.
M src/interfaces/ecpg/ecpglib/error.c
Remove double-quoting of table names in clusterdb. BACKWARD COMPABILITY BREAKAGE.
commit : d68ccf536e950a07b5a7030bf609936fe65aab51
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 16:39:02 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 16:39:02 -0400
Remove double-quoting of index/table names in reindexdb. BACKWARD
COMPABILITY BREAKAGE.
Document thate user/database names are preserved with double-quoting by
command-line tools like vacuumdb.
M doc/src/sgml/ref/createdb.sgml
M doc/src/sgml/ref/createlang.sgml
M doc/src/sgml/ref/droplang.sgml
M doc/src/sgml/reference.sgml
M src/bin/scripts/clusterdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/droplang.c
M src/bin/scripts/reindexdb.c
Add missing format attributes
commit : 52ce20589a8bac4eccaea043b1fe283daaf4f9e3
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 10 Sep 2011 23:12:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 10 Sep 2011 23:12:46 +0300
Add __attribute__ decorations for printf format checking to the places that
were missing them. Fix the resulting warnings. Add
-Wmissing-format-attribute to the standard set of warnings for GCC, so these
don't happen again.
The warning fixes here are relatively harmless. The one serious problem
discovered by this was already committed earlier in
cf15fb5cabfbc71e07be23cfbc813daee6c5014f.
M configure
M configure.in
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pgcrypto/px.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_tar.c
M src/include/lib/stringinfo.h
M src/interfaces/ecpg/ecpglib/descriptor.c
M src/interfaces/ecpg/ecpglib/error.c
M src/interfaces/ecpg/ecpglib/execute.c
M src/interfaces/ecpg/ecpglib/extern.h
Add datatype directory to SUBDIRS. New header datatype/timestamp.h should be installed for server-side dev.
commit : 96a8aed4cb66b9a23e5b566ad549cd0c5eac5a74
author : Itagaki Takahiro <itagaki.takahiro@gmail.com>
date : Sun, 11 Sep 2011 04:07:12 +0900
committer: Itagaki Takahiro <itagaki.takahiro@gmail.com>
date : Sun, 11 Sep 2011 04:07:12 +0900
M src/include/Makefile
Document that only user-defined columns are expanded by SELECT *.
commit : 90108c9aab51840a0fa7bcb11a2da09204d5b003
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 10:45:55 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 10:45:55 -0400
M doc/src/sgml/queries.sgml
Remove unnecessary MATCH FULL specification in example.
commit : c79003ea4f2c40ac957457dbae24928ba255f280
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 09:24:05 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 10 Sep 2011 09:24:05 -0400
Reported by Grzegorz Szpetkowski.
M doc/src/sgml/ref/alter_table.sgml
Try to un-break MSVC build.
commit : 5a8de2f2e7fd5d2265f30206743ba2dd51bff222
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 22:57:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 22:57:08 -0400
I thought we had enough infrastructure to absorb CPPFLAGS changes from
the makefiles, but buildfarm says otherwise.
M src/tools/msvc/Mkvcbuild.pm
Simplify handling of the timezone GUC by making initdb choose the default.
commit : ca4af308c32d03db5fbacb54d6e583ceb904f268
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 17:59:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 17:59:11 -0400
We were doing some amazingly complicated things in order to avoid running
the very expensive identify_system_timezone() procedure during GUC
initialization. But there is an obvious fix for that, which is to do it
once during initdb and have initdb install the system-specific default into
postgresql.conf, as it already does for most other GUC variables that need
system-environment-dependent defaults. This means that the timezone (and
log_timezone) settings no longer have any magic behavior in the server.
Per discussion.
M doc/src/sgml/config.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/ref/set.sgml
M src/backend/bootstrap/bootstrap.c
M src/backend/commands/variable.c
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/backend/utils/error/elog.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/bin/initdb/.gitignore
M src/bin/initdb/Makefile
A src/bin/initdb/findtimezone.c
M src/bin/initdb/initdb.c
M src/include/pgtime.h
M src/include/utils/guc.h
M src/timezone/localtime.c
M src/timezone/pgtz.c
Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h.
commit : a7801b62f21bd051444bd1119cd3745ecc8e14ec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 13:23:41 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 9 Sep 2011 13:23:41 -0400
As per my recent proposal, this refactors things so that these typedefs and
macros are available in a header that can be included in frontend-ish code.
I also changed various headers that were undesirably including
utils/timestamp.h to include datatype/timestamp.h instead. Unsurprisingly,
this showed that half the system was getting utils/timestamp.h by way of
xlog.h.
No actual code changes here, just header refactoring.
M contrib/btree_gist/btree_utils_num.c
M contrib/spi/moddatetime.c
M doc/src/sgml/xfunc.sgml
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/commands/analyze.c
M src/backend/commands/async.c
M src/backend/commands/prepare.c
M src/backend/commands/user.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/variable.c
M src/backend/libpq/crypt.c
M src/backend/parser/parse_node.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgstat.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/nabstime.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/mmgr/portalmem.c
M src/include/access/gist_private.h
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/commands/sequence.h
A src/include/datatype/timestamp.h
M src/include/libpq/libpq-be.h
M src/include/pgstat.h
M src/include/replication/walprotocol.h
M src/include/replication/walsender.h
M src/include/storage/proc.h
M src/include/utils/datetime.h
M src/include/utils/nabstime.h
M src/include/utils/portal.h
M src/include/utils/timestamp.h
round() is not portable. Use rint().
commit : d63de337f3e235f02d79a1df79dddbb002e9fd4e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Sep 2011 16:37:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Sep 2011 16:37:40 -0400
M src/backend/access/gist/gistbuild.c
Tweak string for uniformity
commit : 295e7dc929c346d53e0b55aaed539b0b0d59059f
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 7 Sep 2011 18:19:32 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 7 Sep 2011 18:19:32 -0300
M src/backend/replication/basebackup.c
Add missing format argument to ecpg_log() call
commit : cf15fb5cabfbc71e07be23cfbc813daee6c5014f
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Sep 2011 22:09:08 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 8 Sep 2011 22:09:08 +0300
M src/interfaces/ecpg/ecpglib/execute.c
Fix typo and reword the sentence.
commit : 86ab71d58d4ee7e183e501db75714ad59feef8a5
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Sep 2011 18:17:57 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Sep 2011 18:17:57 +0300
M doc/src/sgml/ref/create_index.sgml
Buffering GiST index build algorithm.
commit : 5edb24a8983e4a103e26153853d91141f818227c
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Sep 2011 17:51:23 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 8 Sep 2011 17:51:23 +0300
When building a GiST index that doesn't fit in cache, buffers are attached
to some internal nodes in the index. This speeds up the build by avoiding
random I/O that would otherwise be needed to traverse all the way down the
tree to the find right leaf page for tuple.
Alexander Korotkov
M doc/src/sgml/gist.sgml
M doc/src/sgml/ref/create_index.sgml
M src/backend/access/common/reloptions.c
M src/backend/access/gist/Makefile
M src/backend/access/gist/README
M src/backend/access/gist/gist.c
A src/backend/access/gist/gistbuild.c
A src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistxlog.c
M src/include/access/gist_private.h
One last round of copy-editing for the 9.1 release notes.
commit : 09b68c70af855a0a69cede14da70968ddd97ba05
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Sep 2011 00:53:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 8 Sep 2011 00:53:11 -0400
Also set the documented release date to 2011-09-12.
M doc/src/sgml/release-9.1.sgml
Fix corner case bug in numeric to_char().
commit : f0bedf3e456c52274995d32d4c0c8a250de5c1ca
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 17:06:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 17:06:10 -0400
Trailing-zero stripping applied by the FM specifier could strip zeroes
to the left of the decimal point, for a format with no digit positions
after the decimal point (such as "FM999.").
Reported and diagnosed by Marti Raudsepp, though I didn't use his patch.
M src/backend/utils/adt/formatting.c
M src/test/regress/expected/numeric.out
M src/test/regress/sql/numeric.sql
Allow bcc32 and win32 batch files to compile libpq.
commit : 7b8e10f2bed1d450a9f9b211ae1b883227443912
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 15:43:50 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 15:43:50 -0400
Backpatch to 9.1.
By Hiroshi Saito
M src/interfaces/libpq/bcc32.mak
M src/interfaces/libpq/win32.mak
In pg_upgrade, disallow migration of 8.3 clusters using contrib/ltree because its internal format was changed in 8.4.
commit : 3ced32d24e14af1877171c085a635b4ccdf8930c
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 14:42:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 14:42:34 -0400
Backpatch to 9.0 and 9.1.
Report by depesz, diagnosis by Tom.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/version_old_8_3.c
M doc/src/sgml/pgupgrade.sgml
Fix typo in error message.
commit : 99155aaa33f417daabd38c8b225c09a3c6da71ba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 13:29:26 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 13:29:26 -0400
Per Euler Taveira de Oliveira.
M src/backend/commands/collationcmds.c
Fix get_name_for_var_field() to deal with RECORD Params.
commit : a7d9203cc4edfbcc283732efea6d54db0399ccee
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 13:01:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 7 Sep 2011 13:01:15 -0400
With 9.1's use of Params to pass down values from NestLoop join nodes
to their inner plans, it is possible for a Param to have type RECORD, in
which case the set of fields comprising the value isn't determinable by
inspection of the Param alone. However, just as with a Var of type RECORD,
we can find out what we need to know if we can locate the expression that
the Param represents. We already knew how to do this in get_parameter(),
but I'd overlooked the need to be able to cope in get_name_for_var_field(),
which led to EXPLAIN failing with "record type has not been registered".
To fix, refactor the search code in get_parameter() so it can be used by
both functions.
Per report from Marti Raudsepp.
M src/backend/utils/adt/ruleutils.c
Have pgrminclude skip files that use CppAsString2 because CppAsString2 will expaned undefined identifiers.
commit : f19593754a1b9293b098975fc43263125a40a4c3
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 12:59:17 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 12:59:17 -0400
M src/tools/pginclude/pgrminclude
Fix bug introduced by pgrminclude where the tablespace version name was not expanded.
commit : f81fb4f690355bc88fee69624103956fb4576fe5
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 12:41:16 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 12:41:16 -0400
Bump catalog version number to force initdb for all tablespaces.
M src/include/catalog/catalog.h
M src/include/catalog/catversion.h
Fix to_date() and to_timestamp() to handle year masks of length < 4 so they wrap toward year 2020, rather than the inconsistent behavior we had before.
commit : 029dfdf1157b6d837a7b7211cd35b00c6bcd767c
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 09:47:51 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 09:47:51 -0400
M doc/src/sgml/func.sgml
M src/backend/utils/adt/formatting.c
Revert documentation patch about NEW/OLD and triggers.
commit : 8eacb25cbe9100b9cf441d4cbca4cec8fa5e3f52
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 09:24:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 7 Sep 2011 09:24:01 -0400
Backpatch to 9.0 and 9.1.
Patch from Josh Kupershmidt.
M doc/src/sgml/plpgsql.sgml
Partially revoke attempt to improve performance with many savepoints. Maintain difference between subtransaction release and commit introduced by earlier patch.
commit : df383b03e6f761c9b5bb12aa2339795ab44aa054
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 7 Sep 2011 12:11:26 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 7 Sep 2011 12:11:26 +0100
M src/backend/access/transam/xact.c
Emit cascaded standby message on shutdown only when appropriate. Adds additional test for active walsenders and closes a race condition for when we failover when a new walsender was connecting.
commit : dde70cc313683e47e71997759c6029b4220f71c0
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 7 Sep 2011 09:09:47 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 7 Sep 2011 09:09:47 +0100
Reported and fixed bu Fujii Masao. Review by Heikki Linnakangas
M src/backend/postmaster/postmaster.c
M src/backend/replication/walsender.c
Properly document the existance of OLD/NEW trigger pl/pgsql trigger fields.
commit : 39039e6d7a48d37aedcfca7973cea3288ce356d4
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 22:54:16 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 22:54:16 -0400
Backpatch to 9.0 and 9.1.
Report from Pavel Stehule, patch from Josh Kupershmidt
M doc/src/sgml/plpgsql.sgml
Fix spelling mistake in pgpass documentation change.
commit : d858abfdfdcfb11c5eff08c8368c27a3f66964d2
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 19:42:46 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 19:42:46 -0400
Per Peter.
M doc/src/sgml/libpq.sgml
Add documentation suggestion about adding a comment to the top of pgpass.
commit : a25fc9edcb6b1ed589d9767b4b8c1cdae21c3cc3
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 17:32:14 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 17:32:14 -0400
Backpatch to 9.1.
M doc/src/sgml/libpq.sgml
Improve comment about handling of temp tables in shared-inval code.
commit : db10f01baa2148f1773cacfcbadc7158ae94c081
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 17:05:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 17:05:48 -0400
M src/backend/utils/cache/inval.c
Correct ancient logic mistake in assertion
commit : e6d800981ed0cd8889660d40cb5e813dfad87344
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 6 Sep 2011 23:05:02 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 6 Sep 2011 23:05:02 +0300
Found by gcc -Wlogical-op
M src/backend/bootstrap/bootstrap.c
Fix plpgsql "PERFORM" markup.
commit : ba3de10c4ea3c70d4e36181e563a4ebffaf4e022
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 15:20:14 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 15:20:14 -0400
Backpatch to 9.0 and 9.1.
M doc/src/sgml/plpgsql.sgml
Avoid possibly accessing off the end of memory in SJIS2004 conversion.
commit : 623f77e9d1338720512430a0b8e824d7359739b8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 14:50:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 14:50:28 -0400
The code in shift_jis_20042euc_jis_2004() would fetch two bytes even when
only one remained in the string. Since conversion functions aren't
supposed to assume null-terminated input, this poses a small risk of
fetching past the end of memory and incurring SIGSEGV. No such crash has
been identified in the field, but we've certainly seen the equivalent
happen in other code paths, so patch this one all the way back.
Report and patch by Noah Misch.
M src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
Avoid possibly accessing off the end of memory in examine_attribute().
commit : 780a342c900fa085e8c065b3282b491de69ab10d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 14:35:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 14:35:19 -0400
Since the last couple of columns of pg_type are often NULL,
sizeof(FormData_pg_type) can be an overestimate of the actual size of the
tuple data part. Therefore memcpy'ing that much out of the catalog cache,
as analyze.c was doing, poses a small risk of copying past the end of
memory and incurring SIGSEGV. No such crash has been identified in the
field, but we've certainly seen the equivalent happen in other code paths,
so patch this one all the way back.
Per valgrind testing by Noah Misch, though this is not his proposed patch.
I chose to use SearchSysCacheCopy1 rather than inventing special-purpose
infrastructure for copying only the minimal part of a pg_type tuple.
M src/backend/commands/analyze.c
Document PERFORM limitation when using WITH queries.
commit : 6f94280dee9f8b6c511f00a50531b981faa73b54
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 13:41:28 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 13:41:28 -0400
Backpatch to 9.0 and 9.1.
Report from depstein@alliedtesting.com.
M doc/src/sgml/plpgsql.sgml
Add an "incompatibility" entry to 9.1 release notes about CREATE EXTENSION.
commit : ae92eff6b93c6ee18ca5c48958c355f5a448f8f5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 12:36:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 12:36:40 -0400
We've now seen more than one gripe from somebody who didn't get the memo
about how to install contrib modules in 9.1. Try to make it a little more
prominent that you aren't supposed to call the scripts directly anymore.
M doc/src/sgml/release-9.1.sgml
Update type-conversion documentation for long-ago changes.
commit : b7f83e70d9758c5dd480c9dbba1668ddeec37916
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 12:14:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 6 Sep 2011 12:14:51 -0400
This example wasn't updated when we changed the behavior of bpcharlen()
in 8.0, nor when we changed the number of parameters taken by the bpchar()
cast function in 7.3. Per report from lsliang.
M doc/src/sgml/typeconv.sgml
Properly document semphore requirements by accounting for worker processes.
commit : d764835bbc705f38311b5a6fe14a9aff4feb6fc3
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 11:08:32 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 6 Sep 2011 11:08:32 -0400
Backpatch to 9.1 and 9.0.
Submitted by Anton Yuzhaninov, confirmed by Robert Haas
M doc/src/sgml/runtime.sgml
Add documentation link to strftime supported options.
commit : 5c8676ea71754b5ebd4a5e4ad3ffb173ef6db32d
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 22:58:10 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 22:58:10 -0400
M doc/src/sgml/config.sgml
Add C comment about why we send cache invalidation messages for session-local objects.
commit : f458c90bff45ecae91fb55ef2b938af37d977af3
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 22:08:14 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 22:08:14 -0400
M src/backend/utils/cache/inval.c
Adjust translator comment format to xgettext expectations
commit : 56a9ed92b664af191040d848ca923fb3234671ee
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Sep 2011 18:52:49 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Sep 2011 18:52:49 -0300
M src/backend/access/transam/xlog.c
M src/backend/catalog/dependency.c
M src/bin/scripts/common.c
Mark some untranslatable messages with errmsg_internal
commit : b64f18c583675684766e364754bd3c9f702c549d
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Sep 2011 17:47:18 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 5 Sep 2011 17:47:18 -0300
M src/backend/access/transam/xlog.c
Improve "invalid byte sequence for encoding" message
commit : a2a5ce68266d879c7acd292952adc376966622e0
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Sep 2011 23:36:06 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 5 Sep 2011 23:36:06 +0300
It used to say
ERROR: invalid byte sequence for encoding "UTF8": 0xdb24
Change this to
ERROR: invalid byte sequence for encoding "UTF8": 0xdb 0x24
to make it clear that this is a byte sequence and not a code point.
Also fix the adjacent "character has no equivalent" message that has
the same issue.
M src/backend/utils/mb/wchar.c
Add mention that UTC really means UT1.
commit : 7cb99b269667ef3d8869bc9f7681debc12c45b1d
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 15:37:58 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 15:37:58 -0400
Backpatch to 9.1.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/func.sgml
Update time zone data files to tzdata release 2011i.
commit : 0b88af150e3a26f9e41da89da0c507eac550e46b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Sep 2011 14:46:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 Sep 2011 14:46:31 -0400
DST law changes in Canada, Egypt, Russia, Samoa, South Sudan.
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/iso3166.tab
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab
Document that contrib/pgtrgm only processes ASCII alphanumeric characters.
commit : d235f828d74daaabdeb97efa4499cfb30ee65d09
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 13:24:45 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 5 Sep 2011 13:24:45 -0400
Backpatch to 9.0 and 9.1.
M doc/src/sgml/pgtrgm.sgml
Guard against using plperl's Makefile without specifying --with-perl.
commit : 6a24742c1a1bd04c02da24c4739811b068a84367
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 20:07:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 20:07:34 -0400
The $(PERL) macro will be set by configure if it finds perl at all,
but $(perl_privlibexp) isn't configured unless you said --with-perl.
This results in confusing error messages if someone cd's into
src/pl/plperl and tries to build there despite the configure omission,
as reported by Tomas Vondra in bug #6198. Add simple checks to
provide a more useful report, while not disabling other use of the
makefile such as "make clean".
Back-patch to 9.0, which is as far as the patch applies easily.
M src/pl/plperl/GNUmakefile
Change get_variable_numdistinct's API to flag default estimates explicitly.
commit : 4c2777d0b733220d9029f78817af8ce671e4a5ad
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 15:41:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 15:41:49 -0400
Formerly, callers tested for DEFAULT_NUM_DISTINCT, which had the problem
that a perfectly solid estimate might be mistaken for a content-free
default.
M src/backend/utils/adt/selfuncs.c
M src/include/utils/selfuncs.h
Dig down into sub-selects to look for column statistics.
commit : 1cb108efb0e60d87e4adec38e7636b6e8efbeb57
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 15:13:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 15:13:46 -0400
If a sub-select's output column is a simple Var, recursively look for
statistics applying to that Var, and use them if available. The need for
this was foreseen ages ago, but we didn't have enough infrastructure to do
it with reasonable speed until just now.
We punt and stick with default estimates if the subquery uses set
operations, GROUP BY, or DISTINCT, since those operations would change the
underlying column statistics (particularly, the relative frequencies of
different values) beyond recognition. This means that the types of
sub-selects for which this improvement applies are fairly limited, since
most subqueries satisfying those restrictions would have gotten flattened
into the parent query anyway. But it does help for some cases, such as
subqueries with ORDER BY or LIMIT.
M src/backend/utils/adt/selfuncs.c
Can't print PlannerGlobal's subroots list in outfuncs.
commit : 698df3350d37cdaa5b9fcbcb78b5ad5e66e99348
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 14:43:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 14:43:52 -0400
Since the subroots will surely link back to the same glob struct, this
necessarily leads to infinite recursion. Doh. Found while trying to
debug some other code.
M src/backend/nodes/outfuncs.c
Clean up the #include mess a little.
commit : 1609797c25f6b440371045039733d69fe8cb9410
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 01:13:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 4 Sep 2011 01:13:16 -0400
walsender.h should depend on xlog.h, not vice versa. (Actually, the
inclusion was circular until a couple hours ago, which was even sillier;
but Bruce broke it in the expedient rather than logically correct
direction.) Because of that poor decision, plus blind application of
pgrminclude, we had a situation where half the system was depending on
xlog.h to include such unrelated stuff as array.h and guc.h. Clean up
the header inclusion, and manually revert a lot of what pgrminclude had
done so things build again.
This episode reinforces my feeling that pgrminclude should not be run
without adult supervision. Inclusion changes in header files in particular
need to be reviewed with great care. More generally, it'd be good if we
had a clearer notion of module layering to dictate which headers can sanely
include which others ... but that's a big task for another day.
M contrib/auto_explain/auto_explain.c
M contrib/cube/cube.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/tsearch2/tsearch2.c
M src/backend/access/common/reloptions.c
M src/backend/access/gin/ginarrayproc.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/twophase_rmgr.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlogutils.c
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/dependency.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/catalog/pg_constraint.c
M src/backend/commands/analyze.c
M src/backend/commands/discard.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablespace.c
M src/backend/commands/vacuum.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeTidscan.c
M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_clause.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/walwriter.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/storage/ipc/procarray.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/smgr/smgr.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/relmapper.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/hash/dynahash.c
M src/backend/utils/resowner/resowner.c
M src/backend/utils/time/combocid.c
M src/backend/utils/time/snapmgr.c
M src/include/access/gin.h
M src/include/access/heapam.h
M src/include/access/xact.h
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/catalog/storage.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/portalcmds.h
M src/include/commands/sequence.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/executor/execdesc.h
M src/include/executor/functions.h
M src/include/executor/spi.h
M src/include/replication/syncrep.h
M src/include/replication/walsender.h
M src/include/storage/standby.h
M src/include/tcop/pquery.h
M src/include/tcop/tcopprot.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_handler.c
Remove unnecessary and circular #include.
commit : f116b1f5b8d36e54404b36f1aba1295cbcfc4fdc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 22:14:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 22:14:45 -0400
storage/proc.h should not include replication/syncrep.h, especially not
when the latter includes storage/proc.h; but in any case this was a pretty
poor thing from a modular layering standpoint.
M src/include/storage/proc.h
walsender.h doesn't need xlog.h, per Tom.
commit : 5bce637a4b92ed083f2c21cff63917cb2849b851
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 21:25:00 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 21:25:00 -0400
M src/include/replication/walsender.h
Move AllowCascadeReplication() define from xlog.h to replication include file.
commit : 85e6e1662b2c475a408afc1ea2ddade7974eddbb
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 20:46:19 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 20:46:19 -0400
Per suggestion from Alvaro.
M src/include/access/xlog.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
Remove find_lt sgml tool, as it is not needed.
commit : ca598c18c678895fd625a68a4bf21d202c586b47
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 19:08:59 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 3 Sep 2011 19:08:59 -0400
Per suggestion from Peter.
M src/tools/RELEASE_CHANGES
D src/tools/find_lt
Fix typo in pg_srand48 (srand48 in older branches).
commit : 48e4b8dc08ea7ec0cc7cd8e5001f8a29e1c0b987
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 16:17:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 16:17:34 -0400
">" should be ">>". This typo results in failure to use all of the bits
of the provided seed.
This might rise to the level of a security bug if we were relying on
srand48 for any security-critical purposes, but we are not --- in fact,
it's not used at all unless the platform lacks srandom(), which is
improbable. Even on such a platform the exposure seems minimal.
Reported privately by Andres Freund.
M src/port/erand48.c
Rearrange planner to save the whole PlannerInfo (subroot) for a subquery.
commit : b3aaf9081a1a95c245fd605dcf02c91b3a5c3a29
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 15:35:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 3 Sep 2011 15:35:12 -0400
Formerly, set_subquery_pathlist and other creators of plans for subqueries
saved only the rangetable and rowMarks lists from the lower-level
PlannerInfo. But there's no reason not to remember the whole PlannerInfo,
and indeed this turns out to simplify matters in a number of places.
The immediate reason for doing this was so that the subroot will still be
accessible when we're trying to extract column statistics out of an
already-planned subquery. But now that I've done it, it seems like a good
code-beautification effort in its own right.
I also chose to get rid of the transient subrtable and subrowmark fields in
SubqueryScan nodes, in favor of having setrefs.c look up the subquery's
RelOptInfo. That required changing all the APIs in setrefs.c to pass
PlannerInfo not PlannerGlobal, which was a large but quite mechanical
transformation.
One side-effect not foreseen at the beginning is that this finally broke
inheritance_planner's assumption that replanning the same subquery RTE N
times would necessarily give interchangeable results each time. That
assumption was always pretty risky, but now we really have to make a
separate RTE for each instance so that there's a place to carry the
separate subroots.
M src/backend/executor/nodeSubqueryscan.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/createplan.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/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/relnode.c
M src/backend/rewrite/rewriteManip.c
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/planmain.h
Add archive_command example
commit : 42ad992fdc25fa69db03ff242216f6712da2c56a
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Sep 2011 01:29:09 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Sep 2011 01:29:09 +0300
M src/backend/utils/misc/postgresql.conf.sample
Whitespace adjustment for consistency in the file
commit : f1e4f3d44f38b76afbdccf92573c797805f5d62d
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Sep 2011 01:28:05 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 3 Sep 2011 01:28:05 +0300
M src/backend/access/transam/recovery.conf.sample
Teach ANALYZE to clear pg_class.relhassubclass when appropriate.
commit : 5b562644fec696977df4a82790064e8287927891
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Sep 2011 14:29:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 2 Sep 2011 14:29:31 -0400
In the past, relhassubclass always remained true if a relation had ever had
child relations, even if the last subclass was long gone. While this had
only marginal performance implications in most cases, it was annoying, and
I'm now considering some planner changes that would raise the cost of a
false positive. It was previously impractical to fix this because of race
condition concerns. However, given the recent change that made tablecmds.c
take ShareExclusiveLock on relations that are gaining a child (commit
fbcf4b92aa64d4577bcf25925b055316b978744a), we can now allow ANALYZE to
clear the flag when it's no longer relevant. There is no additional
locking cost to do so, since ANALYZE takes ShareExclusiveLock anyway.
M src/backend/catalog/pg_inherits.c
M src/backend/commands/analyze.c
M src/backend/commands/tablecmds.c
M src/include/commands/tablecmds.h
Fix brace indentation of commit 63d06ef59156719efd0208c62e764a69611b3f12 to fit PostgreSQL style.
commit : 2f72d5df6a876406cf5f2f8d7800d591dff3e2e3
author : Michael Meskes <meskes@postgresql.org>
date : Fri, 2 Sep 2011 09:45:11 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Fri, 2 Sep 2011 09:45:11 +0200
M src/interfaces/ecpg/ecpglib/execute.c
Improve method of avoiding fcinfo compile errors.
commit : 418d04ea73afd3df1fec9670f5f47827aeaf5a25
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 14:15:36 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 14:15:36 -0400
Fix pgrminclude C comment marker.
M src/include/libpq/hba.h
M src/tools/pginclude/pgcompinclude
M src/tools/pginclude/pgdefine
M src/tools/pginclude/pgrminclude
Remove spurious comma. Spotted by Tom.
commit : e4df03733086543accba97be241d9d133b273dda
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 19:59:09 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 19:59:09 +0300
M src/interfaces/libpq/Makefile
Add C comment about needed include.
commit : 10af3ab2b29186735308f49f50520839a75352cb
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 12:53:45 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 12:53:45 -0400
M src/backend/utils/adt/inet_net_pton.c
libpq compiles various pgport files like ecpg does, and needs similar Makefile changes for the win32 setlocale() wrapper I put into ecpg, to make it compile on MinGW.
commit : 5066e55d612788cd17c536558f8e5b0aa44d9f31
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 18:58:50 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 18:58:50 +0300
M src/interfaces/libpq/Makefile
Put back improperly removed #include.
commit : e5b012b788800470f3b670e013e9e52b615a018c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Sep 2011 11:57:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Sep 2011 11:57:09 -0400
M src/backend/utils/adt/inet_net_pton.c
Add C comment about necessary NetBSD include.
commit : 7805b118560fa8a394823c57b46b70799e2431bb
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 11:20:47 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 11:20:47 -0400
M src/include/libpq/hba.h
Add missing hba.h include for NetBSD.
commit : 5352bf39ffc5e5f54c3729d61e36b8a9568e4c35
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:34:04 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:34:04 -0400
M src/include/libpq/hba.h
In SGML we only need to worry about "<", not ">"; update scripts.
commit : b3d32ebac62d89eaedc740af5d3592ac019b8533
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:17:04 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:17:04 -0400
M src/tools/RELEASE_CHANGES
D src/tools/find_gt_lt
A src/tools/find_lt
Remove unnecessary #include references, per pgrminclude script.
commit : 6416a82a62db4e66b2edb0fa8fc83a580c3f1931
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:03:22 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 10:03:22 -0400
M contrib/auto_explain/auto_explain.c
M contrib/btree_gin/btree_gin.c
M contrib/btree_gist/btree_gist.h
M contrib/btree_gist/btree_utils_num.h
M contrib/btree_gist/btree_utils_var.h
M contrib/citext/citext.c
M contrib/cube/cube.c
M contrib/dblink/dblink.c
M contrib/dict_int/dict_int.c
M contrib/dict_xsyn/dict_xsyn.c
M contrib/fuzzystrmatch/fuzzystrmatch.c
M contrib/hstore/hstore_compat.c
M contrib/hstore/hstore_gist.c
M contrib/hstore/hstore_io.c
M contrib/hstore/hstore_op.c
M contrib/intarray/_int_op.c
M contrib/lo/lo.c
M contrib/ltree/_ltree_gist.c
M contrib/ltree/_ltree_op.c
M contrib/ltree/lquery_op.c
M contrib/ltree/ltree_gist.c
M contrib/ltree/ltree_op.c
M contrib/pageinspect/btreefuncs.c
M contrib/pageinspect/fsmfuncs.c
M contrib/pageinspect/heapfuncs.c
M contrib/pageinspect/rawpage.c
M contrib/pg_buffercache/pg_buffercache_pages.c
M contrib/pg_freespacemap/pg_freespacemap.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_trgm/trgm_gin.c
M contrib/pg_trgm/trgm_gist.c
M contrib/pg_trgm/trgm_op.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade_support/pg_upgrade_support.c
M contrib/pgcrypto/crypt-blowfish.c
M contrib/pgcrypto/crypt-des.c
M contrib/pgcrypto/crypt-gensalt.c
M contrib/pgcrypto/internal.c
M contrib/pgcrypto/md5.c
M contrib/pgcrypto/pgcrypto.c
M contrib/pgcrypto/pgp-pgsql.c
M contrib/pgcrypto/sha1.c
M contrib/pgrowlocks/pgrowlocks.c
M contrib/seg/seg.c
M contrib/tablefunc/tablefunc.c
M contrib/tsearch2/tsearch2.c
M contrib/unaccent/unaccent.c
M contrib/vacuumlo/vacuumlo.c
M src/backend/access/common/heaptuple.c
M src/backend/access/common/reloptions.c
M src/backend/access/gin/ginarrayproc.c
M src/backend/access/gin/ginbtree.c
M src/backend/access/gin/gindatapage.c
M src/backend/access/gin/ginentrypage.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gin/ginvacuum.c
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistscan.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hashinsert.c
M src/backend/access/hash/hashovfl.c
M src/backend/access/hash/hashpage.c
M src/backend/access/hash/hashsearch.c
M src/backend/access/hash/hashutil.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/syncscan.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/nbtinsert.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/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/rmgr.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/twophase_rmgr.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlogutils.c
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/indexing.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_conversion.c
M src/backend/catalog/pg_db_role_setting.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_inherits.c
M src/backend/catalog/pg_largeobject.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/toasting.c
M src/backend/commands/alter.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/dbcommands.c
M src/backend/commands/discard.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/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/schemacmds.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/commands/tablespace.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/executor/execGrouping.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeFunctionscan.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeTidscan.c
M src/backend/executor/nodeValuesscan.c
M src/backend/foreign/foreign.c
M src/backend/libpq/be-fsstubs.c
M src/backend/nodes/bitmapset.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/params.c
M src/backend/nodes/print.c
M src/backend/nodes/tidbitmap.c
M src/backend/optimizer/path/clausesel.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/initsplan.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/preptlist.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/pathnode.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/restrictinfo.c
M src/backend/optimizer/util/tlist.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/dynloader/aix.h
M src/backend/port/dynloader/bsdi.h
M src/backend/port/dynloader/cygwin.h
M src/backend/port/dynloader/dgux.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/sunos4.h
M src/backend/port/dynloader/svr4.h
M src/backend/port/dynloader/univel.h
M src/backend/port/dynloader/unixware.h
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/walwriter.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteRemove.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/snowball/dict_snowball.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/freespace/freespace.c
M src/backend/storage/freespace/indexfsm.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/large_object/inv_api.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/page/bufpage.c
M src/backend/storage/smgr/smgr.c
M src/backend/tcop/pquery.c
M src/backend/tsearch/dict_ispell.c
M src/backend/tsearch/dict_simple.c
M src/backend/tsearch/dict_synonym.c
M src/backend/tsearch/dict_thesaurus.c
M src/backend/tsearch/to_tsany.c
M src/backend/tsearch/ts_parse.c
M src/backend/tsearch/ts_typanalyze.c
M src/backend/tsearch/ts_utils.c
M src/backend/tsearch/wparser.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/domains.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/inet_net_pton.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/lockfuncs.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/trigfuncs.c
M src/backend/utils/adt/tsgistidx.c
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsquery_cleanup.c
M src/backend/utils/adt/tsquery_gist.c
M src/backend/utils/adt/tsquery_op.c
M src/backend/utils/adt/tsquery_rewrite.c
M src/backend/utils/adt/tsquery_util.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/tsvector.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/tsvector_parser.c
M src/backend/utils/cache/attoptcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/relmapper.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/hash/dynahash.c
M src/backend/utils/hash/hashfn.c
M src/backend/utils/resowner/resowner.c
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/sort/tuplestore.c
M src/backend/utils/time/combocid.c
M src/backend/utils/time/snapmgr.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/psql/mbprint.c
M src/bin/psql/settings.h
M src/include/access/genam.h
M src/include/access/gin.h
M src/include/access/heapam.h
M src/include/access/tuptoaster.h
M src/include/access/twophase.h
M src/include/access/xact.h
M src/include/access/xlog_internal.h
M src/include/access/xlogutils.h
M src/include/catalog/catalog.h
M src/include/catalog/dependency.h
M src/include/catalog/pg_db_role_setting.h
M src/include/catalog/storage.h
M src/include/commands/alter.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/portalcmds.h
M src/include/commands/prepare.h
M src/include/commands/seclabel.h
M src/include/commands/sequence.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/executor/execdesc.h
M src/include/executor/functions.h
M src/include/executor/hashjoin.h
M src/include/executor/spi.h
M src/include/executor/tuptable.h
M src/include/libpq/hba.h
M src/include/libpq/ip.h
M src/include/nodes/execnodes.h
M src/include/nodes/print.h
M src/include/nodes/relation.h
M src/include/optimizer/geqo_misc.h
M src/include/postmaster/autovacuum.h
M src/include/replication/walsender.h
M src/include/storage/freespace.h
M src/include/storage/fsm_internals.h
M src/include/storage/procarray.h
M src/include/storage/smgr.h
M src/include/storage/standby.h
M src/include/tcop/pquery.h
M src/include/tcop/tcopprot.h
M src/include/tsearch/ts_cache.h
M src/include/utils/inval.h
M src/include/utils/lsyscache.h
M src/include/utils/relcache.h
M src/include/utils/resowner.h
M src/include/utils/snapmgr.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpgsql/src/plpgsql.h
In ecpglib restore LC_NUMERIC in case of an error.
commit : 63d06ef59156719efd0208c62e764a69611b3f12
author : Michael Meskes <meskes@postgresql.org>
date : Thu, 1 Sep 2011 15:27:38 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Thu, 1 Sep 2011 15:27:38 +0200
M src/interfaces/ecpg/ecpglib/execute.c
Minor improvements to mbregress.sh script.
commit : 48fb49e39445a5429b24111658b193ed36b09da3
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 09:21:10 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 09:21:10 -0400
1. Use new dropdb --if-exists option, to avoid alarming the user if
the database being dropped doesn't already exist.
2. Bail out if createdb fails.
3. exit 1 if the checks fail.
4. Make it executable.
Josh Kupershmidt, with some kibitzing by me.
M src/test/mb/mbregress.sh
Userspace access vector cache for contrib/sepgsql.
commit : 4232c4b406c94b433c149ac792d7e68665948cf1
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 08:37:33 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 08:37:33 -0400
KaiGai Kohei
M configure
M configure.in
M contrib/sepgsql/Makefile
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql.h
A contrib/sepgsql/uavc.c
M doc/src/sgml/sepgsql.sgml
Fix "is db labeled test?" in chkselinuxenv script.
commit : 3d14bd2563cc527f250eed8d6d83e3ff62318675
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 08:28:26 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 1 Sep 2011 08:28:26 -0400
Don't test whether the number of labels is numerically equal to zero;
count(*) isn't going return zero anyway, and the current coding blows
up if it returns an empty string or an error.
M contrib/sepgsql/chkselinuxenv
Remove "fmgr.h" include in cube contrib --- caused crash on a Gentoo builfarm member.
commit : d5321842528dfb73f8254a48556b4adb1b6d1c5a
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 07:22:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 1 Sep 2011 07:22:01 -0400
M contrib/cube/cubedata.h
Fix MinGW build, broken by my previous patch to add a setlocale() wrapper on Windows. ecpglib doesn't link with libpgport, but picks and compiles the .c files it needs individually. To cope with that, move the setlocale() wrapper from chklocale.c to a separate setlocale.c file, and include that in ecpglib.
commit : 65e899b2fb0703c9685c3b185fc1bfe206cde3b4
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 14:02:40 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 14:02:40 +0300
M configure
M configure.in
M src/interfaces/ecpg/ecpglib/Makefile
M src/port/chklocale.c
A src/port/win32setlocale.c
M src/tools/msvc/Mkvcbuild.pm
setlocale() on Windows doesn't work correctly if the locale name contains dots. I previously worked around this in initdb, mapping the known problematic locale names to aliases that work, but Hiroshi Inoue pointed out that that's not enough because even if you use one of the aliases, like "Chinese_HKG", setlocale(LC_CTYPE, NULL) returns back the long form, ie. "Chinese_Hong Kong S.A.R.". When we try to restore an old locale value by passing that value back to setlocale(), it fails. Note that you are affected by this bug also if you use one of those short-form names manually, so just reverting the hack in initdb won't fix it.
commit : a88b6e4cfbff9802906dd400ef334ffa49e7f286
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 11:08:32 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 11:08:32 +0300
To work around that, move the locale name mapping from initdb to a wrapper
around setlocale(), so that the mapping is invoked on every setlocale() call.
Also, add a few checks for failed setlocale() calls in the backend. These
calls shouldn't fail, and if they do there isn't much we can do about it,
but at least you'll get a warning.
Backpatch to 9.1, where the initdb hack was introduced. The Windows bug
affects older versions too if you set locale manually to one of the aliases,
but given the lack of complaints from the field, I'm hesitent to backpatch.
M src/backend/utils/adt/pg_locale.c
M src/bin/initdb/initdb.c
M src/include/port.h
M src/port/chklocale.c
Move the line to undefine setlocale() macro on Win32 outside USE_REPL_SNPRINTF ifdef block. It has nothing to do with whether the replacement snprintf function is used. It caused no live bug, because the replacement snprintf function is always used on Win32, but it was nevertheless misplaced.
commit : 8ea02570677d2cebe681584fd4c22716f1a1e1a7
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 09:13:37 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 1 Sep 2011 09:13:37 +0300
M src/include/port.h
Further repair of eqjoinsel ndistinct-clamping logic.
commit : 0d3b231eebf41170f15605a943eb58e8d3d18374
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Sep 2011 00:18:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Sep 2011 00:18:28 -0400
Examination of examples provided by Mark Kirkwood and others has convinced
me that actually commit 7f3eba30c9d622d1981b1368f2d79ba0999cdff2 was quite
a few bricks shy of a load. The useful part of that patch was clamping
ndistinct for the inner side of a semi or anti join, and the reason why
that's needed is that it's the only way that restriction clauses
eliminating rows from the inner relation can affect the estimated size of
the join result. I had not clearly understood why the clamping was
appropriate, and so mis-extrapolated to conclude that we should clamp
ndistinct for the outer side too, as well as for both sides of regular
joins. These latter actions were all wrong, and are reverted with this
patch. In addition, the clamping logic is now made to affect the behavior
of both paths in eqjoinsel_semi, with or without MCV lists to compare.
When we have MCVs, we suppose that the most common values are the ones
that are most likely to survive the decimation resulting from a lower
restriction clause, so we think of the clamping as eliminating non-MCV
values, or potentially even the least-common MCVs for the inner relation.
Back-patch to 8.4, same as previous fixes in this area.
M src/backend/utils/adt/selfuncs.c
Fix pg_upgrade to preserve toast relfrozenxids for old 8.3 servers.
commit : 7971a57fd4ca4253393b77700d59670b5c6ec252
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 31 Aug 2011 21:49:58 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 31 Aug 2011 21:49:58 -0400
This fixes a pg_upgrade bug that could lead to query errors when
clog files are improperly removed.
Backpatch to 8.4, 9.0, 9.1.
M src/bin/pg_dump/pg_dump.c
Improve eqjoinsel's ndistinct clamping to work for multiple levels of join.
commit : 97930cf578e28c01f67fe4006ffcdbb5aedf18c2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 31 Aug 2011 16:04:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 31 Aug 2011 16:04:48 -0400
This patch fixes an oversight in my commit
7f3eba30c9d622d1981b1368f2d79ba0999cdff2 of 2008-10-23. That patch
accounted for baserel restriction clauses that reduced the number of rows
coming out of a table (and hence the number of possibly-distinct values of
a join variable), but not for join restriction clauses that might have been
applied at a lower level of join. To account for the latter, look up the
sizes of the min_lefthand and min_righthand inputs of the current join,
and clamp with those in the same way as for the base relations.
Noted while investigating a complaint from Ben Chobot, although this in
itself doesn't seem to explain his report.
Back-patch to 8.4; previous versions used different estimation methods
for which this heuristic isn't relevant.
M src/backend/utils/adt/selfuncs.c
The replication status values in pg_stat_replication was changed to lowercase earlier, but documentation was not updated. Update the docs.
commit : 5cfe33fe7bb5f5a29e9c2f6780c8278b8a7e5735
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 31 Aug 2011 12:37:37 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 31 Aug 2011 12:37:37 +0300
Fujii Masao
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
Fix not-backwards-compatible pg_upgrade test for prepared transactions.
commit : 731ebb64b77571e1dc391ba96c4bf9c685a07f2a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 30 Aug 2011 17:15:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 30 Aug 2011 17:15:00 -0400
There's no reason for this test to use the undocumented pg_prepared_xact()
function, when it can use the stable API pg_prepared_xacts instead.
Fixes breakage against 8.3, as reported by Justin Arnold.
M contrib/pg_upgrade/check.c
Fix a missed case in code for "moving average" estimate of reltuples.
commit : 5bba65de94498f99bcf133ce590802d8196042fa
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 30 Aug 2011 14:49:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 30 Aug 2011 14:49:45 -0400
It is possible for VACUUM to scan no pages at all, if the visibility map
shows that all pages are all-visible. In this situation VACUUM has no new
information to report about the relation's tuple density, so it wasn't
changing pg_class.reltuples ... but it updated pg_class.relpages anyway.
That's wrong in general, since there is no evidence to justify changing the
density ratio reltuples/relpages, but it's particularly bad if the previous
state was relpages=reltuples=0, which means "unknown tuple density".
We just replaced "unknown" with "zero". ANALYZE would eventually recover
from this, but it could take a lot of repetitions of ANALYZE to do so if
the relation size is much larger than the maximum number of pages ANALYZE
will scan, because of the moving-average behavior introduced by commit
b4b6923e03f4d29636a94f6f4cc2f5cf6298b8c8.
The only known situation where we could have relpages=reltuples=0 and yet
the visibility map asserts everything's visible is immediately following
a pg_upgrade. It might be advisable for pg_upgrade to try to preserve the
relpages/reltuples statistics; but in any case this code is wrong on its
own terms, so fix it. Per report from Sergey Koposov.
Back-patch to 8.4, where the visibility map was introduced, same as the
previous change.
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/utils/cache/relcache.c
Clean up pg_regress --help output
commit : b83bb97fdbab135a4bf3af8a9bfa06aaa66f0205
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 30 Aug 2011 21:25:10 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 30 Aug 2011 21:25:10 +0300
Put options listing in a less random order, fix capitalization, and
some typos.
M src/test/regress/pg_regress.c
Some markup cleanup to deconfuse the find_gt_lt tool
commit : aeabbccea099cb90ae4584207bb77f7f34eda8d7
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 30 Aug 2011 20:32:49 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 30 Aug 2011 20:32:49 +0300
Josh Kupershmidt
M doc/src/sgml/ltree.sgml
M doc/src/sgml/plhandler.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/rollback_to.sgml
M doc/src/sgml/textsearch.sgml
M doc/src/sgml/user-manag.sgml
Repair brain fade in previous commit, per Josh Kupershmidt.
commit : 083549e43a8f717a16e4cb3f23649e13574ff226
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 12:49:18 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 12:49:18 -0400
M doc/src/sgml/ref/dropuser.sgml
Add --if-exists option to dropdb and dropuser.
commit : 7fe33a51b962ac3c745f4f820646f8d948960d5e
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 12:06:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 12:06:40 -0400
Josh Kupershmidt, with some further editing by me.
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/dropuser.sgml
M src/bin/scripts/dropdb.c
M src/bin/scripts/dropuser.c
Detect out of date flex in MSVC builds.
commit : 94478aa8b1a19cb0cb423cbc1f8167a4275ad30a
author : Andrew Dunstan <andrew@dunslane.net>
date : Tue, 30 Aug 2011 12:06:32 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Tue, 30 Aug 2011 12:06:32 -0400
Per recent discussion, following a report from Quan Zongliang.
The same logic is used as in pgbison.pl.
M src/tools/msvc/pgflex.pl
Fix parsing of time string followed by yesterday/today/tomorrow.
commit : 8a3d33c8e6c681d512f79af4a521ee0c02befcef
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 11:34:29 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 30 Aug 2011 11:34:29 -0400
Previously, 'yesterday 04:00:00'::timestamp didn't do the same thing as
'04:00:00 yesterday'::timestamp, and the return value from the latter
was midnight rather than the specified time.
Dean Rasheed, with some stylistic changes
M src/backend/utils/adt/datetime.c
M src/test/regress/expected/horology.out
M src/test/regress/sql/horology.sql
Remove some tabs from README file.
commit : eab2ef6164ae2d0e5a72501de9c09474fd94a394
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 29 Aug 2011 22:25:17 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 29 Aug 2011 22:25:17 -0400
Some of the ASCII art expected 8-space tab stops, and some of it
expected 4-space tab stops.
Per report from YAMAMOTO Takashi.
M src/backend/access/transam/README
Fix concat_ws() to not insert a separator after leading NULL argument(s).
commit : a5b7640ba0efd670e6f513bf6b5589504a5d5475
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 29 Aug 2011 15:20:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 29 Aug 2011 15:20:57 -0400
Per bug #6181 from Itagaki Takahiro. Also do some marginal code cleanup
and improve error handling.
M src/backend/utils/adt/varlena.c
Use a non-locking test in TAS_SPIN() on all IA64 platforms.
commit : be1e8053f48f76ac718a03d6526e34e2f2489f5c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 29 Aug 2011 13:18:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 29 Aug 2011 13:18:44 -0400
Per my testing, this works just as well with gcc as it does with HP's
compiler; and there is no reason to think that the effect doesn't occur
with icc, either.
Also, rewrite the header comment about enforcing sequencing around spinlock
operations, per Robert's gripe that it was misleading.
M src/include/storage/s_lock.h
Improve spinlock performance for HP-UX, ia64, non-gcc.
commit : c01c25fbe525869fa81237954727e1eb4b7d4a14
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 29 Aug 2011 10:05:48 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 29 Aug 2011 10:05:48 -0400
At least on this architecture, it's very important to spin on a
non-atomic instruction and only retry the atomic once it appears
that it will succeed. To fix this, split TAS() into two macros:
TAS(), for trying to grab the lock the first time, and TAS_SPIN(),
for spinning until we get it. TAS_SPIN() defaults to same as TAS(),
but we can override it when we know there's a better way.
It's likely that some of the other cases in s_lock.h require
similar treatment, but this is the only one we've got conclusive
evidence for at present.
M src/backend/storage/lmgr/s_lock.c
M src/include/storage/s_lock.h
Actually, all of parallel restore's limitations should be tested earlier.
commit : 6e1f1fee97839599cf59f37f7051786a09f3b240
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 22:27:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 22:27:48 -0400
On closer inspection, whining in restore_toc_entries_parallel is really
much too late for any user-facing error case. The right place to do it
is at the start of RestoreArchive(), before we've done anything interesting
(suh as trying to DROP all the targets ...)
Back-patch to 8.4, where parallel restore was introduced.
M src/bin/pg_dump/pg_backup_archiver.c
Be more user-friendly about unsupported cases for parallel pg_restore.
commit : d6e7abe45a64378113c1c717a831b7aac9c451df
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 21:48:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 21:48:58 -0400
If we are unable to do a parallel restore because the input file is stdin
or is otherwise unseekable, we should complain and fail immediately, not
after having done some of the restore. Complaining once per thread isn't
so cool either, and the messages should be worded to make it clear this is
an unsupported case not some weird race-condition bug. Per complaint from
Lonni Friedman.
Back-patch to 8.4, where parallel restore was introduced.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
Include $cc_string in the info reported by a configure run.
commit : 2c5d6f1fb570db1a287532d3291d284710e756bf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 17:14:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 28 Aug 2011 17:14:52 -0400
Without this, it's not very easy to tell which compiler version a buildfarm
animal is actually using at the moment.
M configure
M configure.in
Modify pgrminclude -v to report include files that can't be compiled on their own.
commit : 94db6664e2238c4f3879be67bcded085d5a1b872
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 28 Aug 2011 13:04:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 28 Aug 2011 13:04:01 -0400
Avoid compile problems with defines being redefined after the removal of
the #if blocks.
Change script to use shell functions for simplicity.
M src/tools/pginclude/pgrminclude
Don't assume that "E" response to NEGOTIATE_SSL_CODE means pre-7.0 server.
commit : a49fbaaf8d461ff91912c30b3563d54649474c80
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 27 Aug 2011 16:36:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 27 Aug 2011 16:36:57 -0400
These days, such a response is far more likely to signify a server-side
problem, such as fork failure. Reporting "server does not support SSL"
(in sslmode=require) could be quite misleading. But the results could
be even worse in sslmode=prefer: if the problem was transient and the
next connection attempt succeeds, we'll have silently fallen back to
protocol version 2.0, possibly disabling features the user needs.
Hence, it seems best to just eliminate the assumption that backing off
to non-SSL/2.0 protocol is the way to recover from an "E" response, and
instead treat the server error the same as we would in non-SSL cases.
I tested this change against a pre-7.0 server, and found that there
was a second logic bug in the "prefer" path: the test to decide whether
to make a fallback connection attempt assumed that we must have opened
conn->ssl, which in fact does not happen given an "E" response. After
fixing that, the code does indeed connect successfully to pre-7.0,
as long as you didn't set sslmode=require. (If you did, you get
"Unsupported frontend protocol", which isn't completely off base
given the server certainly doesn't support SSL.)
Since there seems no reason to believe that pre-7.0 servers exist anymore
in the wild, back-patch to all supported branches.
M src/interfaces/libpq/fe-connect.c
Document minimum required version of DocBook XSL stylesheets
commit : f44d275b6df71281a8a4068aa8f468f4d2b733d2
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 23:28:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 23:28:55 +0300
M doc/src/sgml/docguide.sgml
Ensure we discard unread/unsent data when abandoning a connection attempt.
commit : 724e30c9f886efd852f714d47c56336ffa6916ec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 27 Aug 2011 14:16:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 27 Aug 2011 14:16:14 -0400
There are assorted situations wherein PQconnectPoll() will abandon a
connection attempt and try again with different parameters (eg, SSL versus
not SSL). However, the code forgot to discard any pending data in libpq's
I/O buffers when doing this. In at least one case (server returns E
message during SSL negotiation), there is unread input data which bollixes
the next connection attempt. I have not checked to see whether this is
possible in the other cases where we close the socket and retry, but it
seems like a matter of good defensive programming to add explicit
buffer-flushing code to all of them.
This is one of several issues exposed by Daniel Farina's report of
misbehavior after a server-side fork failure.
This has been wrong since forever, so back-patch to all supported branches.
M src/interfaces/libpq/fe-connect.c
Allow more include files to be compiled in their own by adding missing include dependencies.
commit : 4bd7333b14786a2d757195e907709d2aee116809
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 27 Aug 2011 11:05:33 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 27 Aug 2011 11:05:33 -0400
Modify pgcompinclude to skip a common fcinfo error.
M contrib/cube/cubedata.h
M src/backend/replication/repl_gram.y
M src/include/access/gin_private.h
M src/include/access/hash.h
M src/include/access/htup.h
M src/include/access/nbtree.h
M src/include/access/xlog.h
M src/tools/pginclude/pgcompinclude
Add support for #elif to pgrminclude.
commit : d010391ac8f706e17998671534ca1230f68d2f38
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 27 Aug 2011 09:24:27 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 27 Aug 2011 09:24:27 -0400
M src/tools/pginclude/pgrminclude
Implement the information schema with_hierarchy column
commit : fd5b397ca4963bf91a54678be51207bf827e512a
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 15:03:02 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 15:03:02 +0300
In PostgreSQL, this is included in the SELECT privilege, so show YES
or NO depending on whether SELECT is granted.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Spelling improvement
commit : 3104cc89be65614ef3d0748e1cc19fb5394969e9
author : Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 08:07:58 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sat, 27 Aug 2011 08:07:58 +0300
M doc/src/sgml/ref/psql-ref.sgml
Add another pgdefine path check, and a cvs-git change.
commit : 68c019a5383bae89794b8a37001a7b8801e9a19b
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:52:35 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:52:35 -0400
M src/tools/make_mkid
M src/tools/pginclude/pgcompinclude
M src/tools/pginclude/pgrminclude
Change references of CVS to .git.
commit : e7088713cd2bb6ce2ce630d07feb45b011308932
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:43:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:43:34 -0400
M src/tools/pginclude/pgcompinclude
M src/tools/pginclude/pgfixinclude
Add postgres.h to *.c files for pg_upgrade, ltree, and btree_gist, and remove from local *.h files.
commit : f1312b5ed32630ae479e61e2a58cfac56ae46dd8
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:16:24 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 21:16:24 -0400
Per suggestion from Alvaro.
M contrib/btree_gist/btree_bit.c
M contrib/btree_gist/btree_bytea.c
M contrib/btree_gist/btree_cash.c
M contrib/btree_gist/btree_date.c
M contrib/btree_gist/btree_float4.c
M contrib/btree_gist/btree_float8.c
M contrib/btree_gist/btree_gist.c
M contrib/btree_gist/btree_gist.h
M contrib/btree_gist/btree_inet.c
M contrib/btree_gist/btree_int2.c
M contrib/btree_gist/btree_int4.c
M contrib/btree_gist/btree_int8.c
M contrib/btree_gist/btree_interval.c
M contrib/btree_gist/btree_macaddr.c
M contrib/btree_gist/btree_numeric.c
M contrib/btree_gist/btree_oid.c
M contrib/btree_gist/btree_text.c
M contrib/btree_gist/btree_time.c
M contrib/btree_gist/btree_ts.c
M contrib/btree_gist/btree_utils_num.c
M contrib/btree_gist/btree_utils_var.c
M contrib/ltree/crc32.c
M contrib/ltree/ltree.h
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.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/page.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/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
Fix missing pgdefine detection in pgrminclude.
commit : 8b0f0822fd5111118a7d147344ee1253acb601f2
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 18:21:32 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 18:21:32 -0400
M src/tools/pginclude/pgrminclude
Modify pgrminclude to include all code, even in #if blocks. Process .h include files before .c files.
commit : f8e41abd8a11d562c3ed97427d6dec9b383f628a
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 18:14:35 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 18:14:35 -0400
Mark some includes as needed to be ignored by pgrminclude.
M src/tools/pginclude/pgrminclude
Cleanup of script.
commit : c6e9da17a1820bde0c51c8a23b24dff6b8b96c6b
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 17:58:18 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 17:58:18 -0400
M src/tools/pginclude/pgrminclude
Add missing includes after pgrminclude run.
commit : f261deb4b41e73f612705c0f852fdb132d74bf4e
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:52:16 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:52:16 -0400
M src/backend/access/transam/xlogutils.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/smgr/md.c
do include files first
commit : 987214b4d5118a6adf51945d6e266bb464cdd3ec
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:10:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:10:34 -0400
M src/tools/pginclude/pgrminclude
Add markers.
commit : 48423d949f6bf8f21505a00571aa2f9559952016
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:04:29 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 16:04:29 -0400
M src/bin/scripts/common.h
M src/include/pg_trace.h
Add another marker.
commit : 455d08b2855af0e7748bbc7602605ceb48492b3a
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 15:13:41 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 15:13:41 -0400
M src/pl/plpgsql/src/pl_comp.c
Add markers for skips.
commit : f8fc37b337982fb97de9504f00381d1a54566c5f
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 13:51:26 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 13:51:26 -0400
M src/backend/port/darwin/system.c
M src/backend/port/dynloader/nextstep.h
M src/backend/port/dynloader/win32.h
M src/backend/regex/regerror.c
M src/include/snowball/header.h
Fix #if blocks.
commit : ac5f11e0ec23e70a5749c5caee890f0b9addfc85
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 13:09:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 13:09:39 -0400
M src/tools/pginclude/pgrminclude
Fix potential memory clobber in tsvector_concat().
commit : 00eb036c111b8f72a34ca729efccd785761d977e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 16:51:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 16:51:34 -0400
tsvector_concat() allocated its result workspace using the "conservative"
estimate of the sum of the two input tsvectors' sizes. Unfortunately that
wasn't so conservative as all that, because it supposed that the number of
pad bytes required could not grow. Which it can, as per test case from
Jesper Krogh, if there's a mix of lexemes with positions and lexemes
without them in the input data. The fix is to assume that we might add
a not-previously-present pad byte for each and every lexeme in the two
inputs; which really is conservative, but it doesn't seem worthwhile to
try to be more precise.
This is an aboriginal bug in tsvector_concat, so back-patch to all
versions containing it.
M src/backend/utils/adt/tsvector_op.c
Improve comments describing tsvector data structure.
commit : 40271811cb9c4906041afc21a3b2c2f31f534fd8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 16:17:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 16:17:42 -0400
M src/include/tsearch/ts_type.h
Clean up weird corner cases in lexing of psql meta-command arguments.
commit : 928311a463d480ca566e2905a369ac6aa0c3e210
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 13:52:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 13:52:23 -0400
These changes allow backtick command evaluation and psql variable
interpolation to happen on substrings of a single meta-command argument.
Formerly, no such evaluations happened at all if the backtick or colon
wasn't the first character of the argument, and we considered an argument
completed as soon as we'd processed one backtick, variable reference, or
quoted substring. A string like 'FOO'BAR was thus taken as two arguments
not one, not exactly what one would expect. In the new coding, an argument
is considered terminated only by unquoted whitespace or backslash.
Also, clean up a bunch of omissions, infelicities and outright errors in
the psql documentation of variables and metacommand argument syntax.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/psqlscan.h
M src/bin/psql/psqlscan.l
Support non-ASCII letters in psql variable names.
commit : e86fdb0ab224eaa73d907ab16a2dd0e0058699e0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 10:41:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 26 Aug 2011 10:41:31 -0400
As in the backend, the implementation actually accepts any non-ASCII
character, but we only document that you can use letters.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/psqlscan.l
M src/bin/psql/variables.c
M src/bin/psql/variables.h
Fix pgrminclude regex pattern.
commit : 910725b49ddf5c827658717f458fb14d0044f251
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:32:26 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:32:26 -0400
M src/tools/pginclude/pgrminclude
Unbreak MSVC build broken by my port of flex check.
commit : 6a56a38f017718f23b001050e3a69662b83373da
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 26 Aug 2011 10:21:43 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 26 Aug 2011 10:21:43 -0400
flex puts lex.backup in the current working directory regardless
of where the input and output are.
M src/tools/msvc/pgflex.pl
In pgrminclude, add code to skip includes with a marker comment.
commit : 6f9afc351b81a46ce9dc0f48c8a4c0af3de924e9
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:08:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:08:39 -0400
M src/tools/pginclude/pgrminclude
In pgrminclude, make skipped include names constent and skip files with #if/#ifdefs.
commit : 4399e817492222623c5e7541ca8488ae460c2d54
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:06:01 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 10:06:01 -0400
M src/tools/pginclude/pgrminclude
In pg_upgrade, limit schema name filter to include toast tables. Bug introduced recently when trying to filter out temp tables.
commit : eb013ede590dc62ca5b52144ff41e7fd6e4c2251
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 00:12:32 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 26 Aug 2011 00:12:32 -0400
Backpatch to 9.0 and 9.1.
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/version_old_8_3.c
Port backup check on psql lexer to MSVC.
commit : 7327cb6420106d60d3a1a817648b145d602fbc52
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 25 Aug 2011 17:27:36 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 25 Aug 2011 17:27:36 -0400
M src/tools/msvc/pgflex.pl
Add expected isolationtester output when prepared xacts are disabled
commit : 28190bacfd4657954c2cd594cc1c3e6b691538b9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 25 Aug 2011 17:35:57 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 25 Aug 2011 17:35:57 -0300
This was deemed unnecessary initially but in later discussion it was
agreed otherwise.
Original file from Kevin Grittner, allegedly from Dan Ports.
I had to clean up whitespace a bit per changes from Heikki.
A src/test/isolation/expected/prepared-transactions_1.out
M src/test/isolation/isolation_schedule
Add makefile rules to check for backtracking in backend and psql lexers.
commit : ecf248737a4c0705bf7d79fdd52b5271618f7103
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 14:44:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 14:44:17 -0400
Per discussion, we should enforce the policy of "no backtracking" in these
performance-sensitive scanners.
M src/backend/parser/Makefile
M src/backend/parser/scan.l
M src/bin/psql/Makefile
Fix psql lexer to avoid use of backtracking.
commit : 77ce50a40364a3605f775d3f0efca2e1caa70291
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 14:33:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 14:33:08 -0400
Per previous experimentation, backtracking slows down lexing performance
significantly (by about a third). It's usually pretty easy to avoid, just
need to have rules that accept an incomplete construct and do whatever the
lexer would have done otherwise.
The backtracking was introduced by the patch that added quoted variable
substitution. Back-patch to 9.0 where that was added.
M src/bin/psql/psqlscan.l
Add "%option warn" to all flex input files that lacked it.
commit : 2e95f1f002bc3f0504dffa6d9ffed0dc914ecec1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 13:55:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 13:55:57 -0400
This is recommended in the flex manual, and there seems no good reason
not to use it everywhere.
M contrib/cube/cubescan.l
M contrib/seg/segscan.l
M src/backend/bootstrap/bootscanner.l
M src/backend/utils/misc/guc-file.l
M src/bin/psql/psqlscan.l
M src/interfaces/ecpg/preproc/pgc.l
M src/test/isolation/specscanner.l
Change format of SQL/MED generic options in psql backslash commands.
commit : 0371d4d0632221957a60d4cdb70a898caf7ce6cf
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 12:47:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 12:47:30 -0400
Rather than dumping out the raw array as PostgreSQL represents it
internally, we now print it out in a format similar to the one in
which the user input it, which seems a lot more user friendly.
Shigeru Hanada
M src/bin/psql/describe.c
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Properly quote SQL/MED generic options in pg_dump output.
commit : 0a803d65e4ae1f6817dcc196f7e59f36e438df52
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 12:37:32 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 12:37:32 -0400
Shigeru Hanada
M src/bin/pg_dump/pg_dump.c
Tweak postgresql.conf.sample's comments on listen_addresess.
commit : 48bc57657dc9a6e1091ee0dc837caccfb32a2eba
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 09:39:35 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 09:39:35 -0400
This makes it slightly more clear that '*' is not part of the default
value, in case that wasn't obvious.
As requested by Dougal Sutherland.
M src/backend/utils/misc/postgresql.conf.sample
Adjust CREATE DOMAIN example for standard_conforming_strings=on.
commit : 6fc726adac3001f8e1f3215ad4c874f58cd7f445
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 09:35:38 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 25 Aug 2011 09:35:38 -0400
Noted by Hitoshi Harada.
M doc/src/sgml/ref/create_domain.sgml
Add a regression test for pgstattuple.
commit : bd165757f4e0914efb808927482c46f719adcbc5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 00:06:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 25 Aug 2011 00:06:16 -0400
This is mainly to prove that the NaN fix actually works cross-platform.
A contrib/pgstattuple/.gitignore
M contrib/pgstattuple/Makefile
A contrib/pgstattuple/expected/pgstattuple.out
A contrib/pgstattuple/sql/pgstattuple.sql
Fix pgstatindex() to give consistent results for empty indexes.
commit : af7d181298fbcd4eb225ee349598edd4611c652d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 23:50:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 23:50:10 -0400
For an empty index, the pgstatindex() function would compute 0.0/0.0 for
its avg_leaf_density and leaf_fragmentation outputs. On machines that
follow the IEEE float arithmetic standard with any care, that results in
a NaN. However, per report from Rushabh Lathia, Microsoft couldn't
manage to get this right, so you'd get a bizarre error on Windows.
Fix by forcing the results to be NaN explicitly, rather than relying on
the division operator to give that or the snprintf function to print it
correctly. I have some doubts that this is really the most useful
definition, but it seems better to remain backward-compatible with
those platforms for which the behavior wasn't completely broken.
Back-patch to 8.2, since the code is like that in all current releases.
M contrib/pgstattuple/pgstatindex.c
Update FK alternative test output to new whitespace rules
commit : f18795e7b74c3c67fb65f253562f241f26f405c8
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 24 Aug 2011 18:21:19 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 24 Aug 2011 18:21:19 -0300
With these changes, the isolation tests pass again on isolation levels
serializable and repeatable read.
Author: Kevin Grittner
M src/test/isolation/expected/fk-deadlock2_1.out
M src/test/isolation/expected/fk-deadlock2_2.out
M src/test/isolation/expected/fk-deadlock_1.out
Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS.
commit : d1d388603e4f9233d3e01847405b239972a54fdf
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 15:16:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 15:16:17 -0400
The previous coding resulted in contrib modules unintentionally overriding
the use of CONTRIB_TESTDB. There seems no particularly good reason to
allow that (after all, the makefile can set CONTRIB_TESTDB if that's really
what it intends).
In passing, document REGRESS_OPTS where the other pgxs.mk options are
documented.
Back-patch to 9.1 --- in prior versions, there were no cases of contrib
modules setting REGRESS_OPTS without including the --dbname switch, so
while the coding was fragile there was no actual bug.
M contrib/sepgsql/Makefile
M doc/src/sgml/extend.sgml
M src/makefiles/pgxs.mk
Build src/ before contrib/ in make world
commit : 4803de6f8932e2f2b96bb1243ba07a05cd2c3ae5
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 24 Aug 2011 21:34:49 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 24 Aug 2011 21:34:49 +0300
This fixes failures under parallel make when contrib modules use a
generated backend header file (such as errcodes.h).
M GNUmakefile.in
Avoid locale dependency in expected output.
commit : ba69b419a8015986d018e25173f8cf4233a3c2d9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 13:47:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 13:47:01 -0400
We'll have to settle for just listing the extensions' data types,
since function arguments seem to sort differently in different locales.
Per buildfarm results.
M contrib/earthdistance/expected/earthdistance.out
M contrib/earthdistance/sql/earthdistance.sql
Fix multiple bugs in extension dropping.
commit : cb5c2ba2d82688d29b5902d86b993a54355cad4d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 13:09:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 24 Aug 2011 13:09:06 -0400
When we implemented extensions, we made findDependentObjects() treat
EXTENSION dependency links similarly to INTERNAL links. However, that
logic contained an implicit assumption that an object could have at most
one INTERNAL dependency, so it did not work correctly for objects having
both INTERNAL and DEPENDENCY links. This led to failure to drop some
extension member objects when dropping the extension. Furthermore, we'd
never actually exercised the case of recursing to an internally-referenced
(owning) object from anything other than a NORMAL dependency, and it turns
out that passing the incoming dependency's flags to the owning object is
the Wrong Thing. This led to sometimes dropping a whole extension silently
when we should have rejected the drop command for lack of CASCADE.
Since we obviously were under-testing extension drop scenarios, add some
regression test cases. Unfortunately, such test cases require some
extensions (duh), so we can't test for problems in the core regression
tests. I chose to add them to the earthdistance contrib module, which is
a good test case because it has a dependency on the cube contrib module.
Back-patch to 9.1. Arguably these are pre-existing bugs in INTERNAL
dependency handling, but since it appears that the cases can never arise
pre-9.1, I'll refrain from back-patching the logic changes further than
that.
M contrib/earthdistance/expected/earthdistance.out
M contrib/earthdistance/sql/earthdistance.sql
M src/backend/catalog/dependency.c
Make CREATE EXTENSION check schema creation permissions.
commit : d4aa491493e6cfa7542d16deba4018c2fd7af9fd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 23 Aug 2011 21:49:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 23 Aug 2011 21:49:07 -0400
When creating a new schema for a non-relocatable extension, we neglected
to check whether the calling user has permission to create schemas.
That didn't matter in the original coding, since we had already checked
superuserness, but in the new dispensation where users need not be
superusers, we should check it. Use CreateSchemaCommand() rather than
calling NamespaceCreate() directly, so that we also enforce the rules
about reserved schema names.
Per complaint from KaiGai Kohei, though this isn't the same as his patch.
M src/backend/commands/extension.c
Fix overoptimistic assumptions in column width estimation for subqueries.
commit : 43f0c20839aa82705700e4de5bb452b7f044c838
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 23 Aug 2011 17:11:41 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 23 Aug 2011 17:11:41 -0400
set_append_rel_pathlist supposed that, while computing per-column width
estimates for the appendrel, it could ignore child rels for which the
translated reltargetlist entry wasn't a Var. This gave rise to completely
silly estimates in some common cases, such as constant outputs from some or
all of the arms of a UNION ALL. Instead, fall back on get_typavgwidth to
estimate from the value's datatype; which might be a poor estimate but at
least it's not completely wacko.
That problem was exposed by an Assert in set_subquery_size_estimates, which
unfortunately was still overoptimistic even with that fix, since we don't
compute attr_widths estimates for appendrels that are entirely excluded by
constraints. So remove the Assert; we'll just fall back on get_typavgwidth
in such cases.
Also, since set_subquery_size_estimates calls set_baserel_size_estimates
which calls set_rel_width, there's no need for set_subquery_size_estimates
to call get_typavgwidth; set_rel_width will handle it for us if we just
leave the estimate set to zero. Remove the unnecessary code.
Per report from Erik Rijkers and subsequent investigation.
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
Use consistent format for reporting GetLastError()
commit : 1af55e2751cdf3bf3bf25993c34be1fa9ad1e342
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 23 Aug 2011 22:00:52 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 23 Aug 2011 22:00:52 +0300
Use something like "error code %lu" for reporting GetLastError()
values on Windows. Previously, a mix of different wordings and
formats were in use.
M src/backend/libpq/auth.c
M src/backend/port/win32/crashdump.c
M src/backend/port/win32/mingwcompat.c
M src/backend/port/win32/security.c
M src/backend/port/win32/signal.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/port/win32_shmem.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/varlena.c
M src/bin/initdb/initdb.c
M src/bin/pg_ctl/pg_ctl.c
M src/port/exec.c
M src/test/regress/pg_regress.c
M src/timezone/pgtz.c
Add recovery.conf to the index in the user manual.
commit : 6c6a4153338c2b2e33203bfb02a26ff8e3d2abd4
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 23 Aug 2011 11:55:21 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 23 Aug 2011 11:55:21 +0300
Fujii Masao
M doc/src/sgml/recovery-config.sgml
Add missing include so include file compiles cleanly on its own.
commit : 2ab15afcdd28ce3d52a9b01d41f67687ac7170d8
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 23:19:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 23:19:21 -0400
M src/include/commands/tablecmds.h
Mark cpluspluscheck as excutable in git.
commit : 034dda61ddf83a2f976271ecb0cc5ee0151a0639
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 22:14:23 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 22:14:23 -0400
M src/tools/pginclude/cpluspluscheck
Typo fix.
commit : 7488936478cbe2de19a94cb9fbde78e6cd6db947
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 22 Aug 2011 12:16:03 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 22 Aug 2011 12:16:03 -0400
M src/backend/storage/lmgr/lock.c
Fix handling of extension membership when filling in a shell operator.
commit : 660a081c3f6892dae353136fa0883cd3c69813d4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 22 Aug 2011 10:55:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 22 Aug 2011 10:55:47 -0400
The previous coding would result in deleting and not re-creating the
extension membership pg_depend rows, since there was no
CommandCounterIncrement that would allow recordDependencyOnCurrentExtension
to see that the deletion had happened. Make it work like the shell type
case, ie, keep the existing entries (and then throw an error if they're for
the wrong extension).
Per bug #6172 from Hitoshi Harada. Investigation and fix by Dimitri
Fontaine.
M src/backend/catalog/pg_operator.c
Properly call strerror() in thread test; add comments.
commit : 5473f283f501ff9f5e38e89d3a2e89f738a7e76f
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 09:04:48 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 22 Aug 2011 09:04:48 -0400
M src/test/thread/thread_test.c
Simplify errno generating in thread testing program.
commit : e319ec4b7378e047e6bb92bd1bb7ff7d515d64a3
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 21 Aug 2011 21:24:03 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 21 Aug 2011 21:24:03 -0400
M src/test/thread/thread_test.c
Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist.
commit : b33f78df17c32364d51f6e5128f8d81d7d3013a2
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 21 Aug 2011 18:15:55 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 21 Aug 2011 18:15:55 -0400
Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER
ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger
fired for the same update. Fix by not trying to overload the use of
estate->es_trig_tuple_slot. Per report from Yoran Heling.
Back-patch to 9.0, when trigger WHEN conditions were introduced.
M src/backend/commands/trigger.c
M src/backend/executor/execMain.c
M src/backend/executor/execUtils.c
M src/include/nodes/execnodes.h
M src/test/regress/expected/triggers.out
M src/test/regress/sql/triggers.sql
Have thread_test create its test files in the current directory, rather than /tmp. Also cleanup C defines and add comments.
commit : 6cc08e703bb078ee1e8d183caf4596d62bf12bf7
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 20 Aug 2011 18:21:53 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 20 Aug 2011 18:21:53 -0400
Per report by Alex Soto
M src/test/thread/thread_test.c
Fix performance problem when building a lossy tidbitmap.
commit : 08e1eedf247e04a9652d997a74ceb46d889124ba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 20 Aug 2011 14:51:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 20 Aug 2011 14:51:02 -0400
As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can
make building a large tidbitmap into an O(N^2) operation. To fix, make
sure we remove more than the minimum amount of information per call, and
add a fallback path to behave sanely if we're unable to fit the bitmap
within the requested amount of memory.
This has been wrong since the tidbitmap code was written, so back-patch
to all supported branches.
M src/backend/nodes/tidbitmap.c
Fix copyright.pl to properly us 'tie' function.
commit : ee639d277787a75183d3763728f02da0d0a6ae52
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 19:31:12 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 19:31:12 -0400
Kris Jurka
M src/tools/backend/flow.gif
M src/tools/copyright.pl
Fix problem with regex in copyright test.
commit : 6dfcadafd3458221aff39b784b5456ac2002653a
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:45:10 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:45:10 -0400
Report and fix by Kris Jurka
M src/tools/copyright.pl
Remove use of 'tie' in perl for copyright.pl; instead use normal file open/close.
commit : 272c289a46d90d7d23947be9b6ffc5fb3ae8df83
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:43:32 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:43:32 -0400
M src/tools/copyright.pl
Add executable bit to file.
commit : da64fb93e5ac3f9521490414369d39c98ac54067
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:18:06 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 17:18:06 -0400
M src/tools/copyright.pl
Implement src/tools/copyright as a Perl program, so anyone can run it.
commit : 739e3f10506c0639eaf3a552936fb82b9628c735
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 13:50:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 13:50:39 -0400
David Fetter
D src/tools/copyright
A src/tools/copyright.pl
Clean up 'chkselinuxenv' script.
commit : a4b3feebc44dcb872fc7a765c4d48627c97421ed
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 13:09:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 13:09:40 -0400
Eliminate dependencies on "which", as we don't really need that to be
installed for proper testing. Don't number the tests, as that increases
the footprint of every patch that wants to add or remove tests. Make
the test output more informative, so that it's a bit easier to see what
went right (or wrong). Spelling and grammar improvements.
M contrib/sepgsql/chkselinuxenv
Fix contrib/sepgsql and contrib/xml2 to always link required libraries.
commit : 10c378f2350a8321ea76fc02d821a9e7707c7563
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 11:57:38 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 11:57:38 -0400
contrib/xml2 can get by without libxslt; the relevant features just
won't work. But if doesn't have libxml2, or if sepgsql doesn't have
libselinux, the link succeeds but the module then fails to work at load
time. To avoid that, link the require libraries unconditionally, so
that it will be clear at link-time that there is a problem.
Per discussion with Tom Lane and KaiGai Kohei.
M contrib/sepgsql/Makefile
M contrib/xml2/Makefile
Allow sepgsql regression tests to be run from a user homedir.
commit : a64bdf5f657f4dd58f1b2df7b69f890d84952597
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 11:51:10 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 19 Aug 2011 11:51:10 -0400
KaiGai Kohei, with some changes by me.
M contrib/sepgsql/chkselinuxenv
M contrib/sepgsql/sepgsql-regtest.te
In pg_upgrade, don't copy visibility map files from clusters that did not have crash-safe visibility maps to clusters that expect crash-safety.
commit : 00a7c9014a8fbb7388a807daeba3e0a85b49a747
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 11:20:30 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 19 Aug 2011 11:20:30 -0400
Request from Robert Haas.
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Typo fix.
commit : ffaf9eca4c27d0a63639ffb3022035a297df9900
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 13:10:18 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 13:10:18 -0400
M contrib/sepgsql/chkselinuxenv
Explain max_prepared_transactions requirement in isolation tests' README.
commit : 11c88e59a60b2096ab42fa7cf9bff542717ec1e0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 18 Aug 2011 11:45:25 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 18 Aug 2011 11:45:25 -0400
Now that we have a test that requires nondefault settings to pass, it seems
like we'd better mention that detail in the directions about how to run the
tests.
Also do some very minor copy-editing.
M src/test/isolation/README
Add an SSI regression test that tests all interesting permutations in the order of begin, prepare, and commit of three concurrent transactions that have conflicts between them.
commit : af35737313f92fcbe227baf51bb69b8650acc41a
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 18 Aug 2011 13:36:37 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 18 Aug 2011 13:36:37 +0300
The test runs for a quite long time, and the expected output file is huge,
but this test caught some serious bugs during development, so seems
worthwhile to keep. The test uses prepared transactions, so it fails if the
server has max_prepared_transactions=0. Because of that, it's marked as
"ignore" in the schedule file.
Dan Ports
A src/test/isolation/expected/prepared-transactions.out
M src/test/isolation/isolation_schedule
M src/test/isolation/isolationtester.c
A src/test/isolation/specs/prepared-transactions.spec
Strip whitespace from SQL blocks in the isolation test suite. This is purely cosmetic, it removes a lot of IMHO ugly whitespace from the expected output.
commit : 62fd1afc55368a2d4a15b60cda80bb5b1c594abc
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 18 Aug 2011 12:16:10 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 18 Aug 2011 12:16:10 +0300
M src/test/isolation/expected/classroom-scheduling.out
M src/test/isolation/expected/fk-contention.out
M src/test/isolation/expected/fk-deadlock.out
M src/test/isolation/expected/fk-deadlock2.out
M src/test/isolation/expected/multiple-row-versions.out
M src/test/isolation/expected/partial-index.out
M src/test/isolation/expected/project-manager.out
M src/test/isolation/expected/receipt-report.out
M src/test/isolation/expected/referential-integrity.out
M src/test/isolation/expected/ri-trigger.out
M src/test/isolation/expected/simple-write-skew.out
M src/test/isolation/expected/temporal-range-integrity.out
M src/test/isolation/expected/total-cash.out
M src/test/isolation/expected/two-ids.out
M src/test/isolation/specscanner.l
Make lazy_vacuum_rel call pg_rusage_init only if needed.
commit : 0f7acbeddfba502587065a5aa6da5b0d1fac4f38
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 09:55:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 09:55:04 -0400
do_analyze_rel already does it this way.
Euler Taveira de Oliveira
M src/backend/commands/vacuumlazy.c
Remove obsolete README file.
commit : 24bf1552f6fa9dbecbd264d1208a100bf9d68940
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 09:49:41 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 18 Aug 2011 09:49:41 -0400
Perhaps we ought to add some other kind of documentation here instead,
but for now let's get rid of this woefully obsolete description of the
sinval machinery.
D src/backend/storage/ipc/README
Improve detection of Python 3.2 installations
commit : f8c2029ef0bf83ceb2bb10ee28362305cfa9cdf2
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 14:43:16 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 14:43:16 +0300
Because of ABI tagging, the library version number might no longer be
exactly the Python version number, so do extra lookups. This affects
installations without a shared library, such as ActiveState's
installer.
Also update the way to detect the location of the 'config' directory,
which can also be versioned.
Ashesh Vashi
M config/python.m4
M configure
Change PyInit_plpy to external linkage
commit : e1f9aa4eaecd8107230df1a1b698e8caf0fba4f8
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 12:53:32 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 12:53:32 +0300
Module initialization functions in Python 3 must have external
linkage, because PyMODINIT_FUNC does dllexport on Windows-like
platforms. Without this change, the build with Python 3 fails on
Windows.
M src/pl/plpython/plpython.c
Hide unused variable warnings under Python 3
commit : f684bcb5238c13c8ba5a3770f4d0856677f99b35
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 11:40:30 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 18 Aug 2011 11:40:30 +0300
M src/pl/plpython/plpython.c
Update 9.1 release notes to reflect commits through today.
commit : 1a998474a7d88e8b340b179130b8368b734a3c30
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 17 Aug 2011 20:18:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 17 Aug 2011 20:18:15 -0400
Also do another pass of copy-editing.
M doc/src/sgml/release-9.1.sgml
Fix two issues in plpython's handling of composite results.
commit : 2dada0cc85ee36f4e2b32a0463cb75ad9466589a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 17 Aug 2011 17:07:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 17 Aug 2011 17:07:16 -0400
Dropped columns within a composite type were not handled correctly.
Also, we did not check for whether a composite result type had changed
since we cached the information about it.
Jan Urbański, per a bug report from Jean-Baptiste Quenot
M src/pl/plpython/expected/plpython_record.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_record.sql
Properly handle empty arrays returned from plperl functions.
commit : 68c903a66ce6f766a8c99d07034374109859624f
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 17 Aug 2011 11:59:18 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 17 Aug 2011 11:59:18 -0400
Bug reported by David Wheeler, fix by Alex Hunsaker.
M src/pl/plperl/plperl.c
Translation updates
commit : 1bf80041e316392b2b602ed5c90904035ca3ac10
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 14:02:24 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 14:02:24 +0300
M src/backend/po/de.po
M src/backend/po/fr.po
M src/backend/po/ja.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/ja.po
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/es.po
A src/bin/pg_basebackup/po/fr.po
A src/bin/pg_basebackup/po/ja.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
M src/bin/pg_dump/po/fr.po
M src/bin/pg_dump/po/ja.po
M src/bin/psql/po/de.po
M src/bin/psql/po/fr.po
M src/bin/psql/po/ja.po
M src/bin/scripts/po/de.po
M src/interfaces/libpq/po/de.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/fr.po
M src/interfaces/libpq/po/ja.po
M src/interfaces/libpq/po/pt_BR.po
M src/pl/plperl/po/fr.po
M src/pl/plperl/po/ja.po
M src/pl/plperl/po/pt_BR.po
M src/pl/plpgsql/src/nls.mk
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/ja.po
A src/pl/plpgsql/src/po/pl.po
M src/pl/plpython/po/fr.po
M src/pl/plpython/po/ja.po
Teach pg_controldata and pg_resetxlog about the new backupEndRequired field in control file.
commit : a1a847d31f37b8063d8478b56e07856d53132b05
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 17 Aug 2011 12:36:41 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 17 Aug 2011 12:36:41 +0300
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
Fix comment about which version had BACKUP METHOD line in backup_lable, again. It was invalidated again by Fujii's patch to 9.1.
commit : 1d0392b2457e0cb845ea498849541f7eb94616d7
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 17 Aug 2011 11:47:45 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 17 Aug 2011 11:47:45 +0300
M src/backend/access/transam/xlog.c
Adjust wording now that estimated size can increase
commit : e5cb7563612b7056d9f97e65d4f4bef3930219dc
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 17 Aug 2011 11:01:06 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 17 Aug 2011 11:01:06 +0200
Per comment form Fujii Masao.
M doc/src/sgml/ref/pg_basebackup.sgml
Move \r out of translatable strings
commit : 7f699804b12e480a07727472b9b8cf3886dbb897
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 10:52:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 10:52:35 +0300
The translation tools are very unhappy about seeing \r in translatable
strings, so move it to a separate fprintf call.
M src/bin/pg_basebackup/pg_basebackup.c
MacOS -> Mac OS
commit : 1368409034f3d5280d7af6a0f59ab8bb96b07edc
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 10:05:22 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 17 Aug 2011 10:05:22 +0300
Josh Kupershmidt
M doc/src/sgml/dfunc.sgml
M doc/src/sgml/release-old.sgml
M doc/src/sgml/runtime.sgml
Revise sinval code to remove no-longer-used tuple TID from inval messages.
commit : b5282aa893e565b7844f8237462cb843438cdd5e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 19:27:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 19:27:46 -0400
This requires adjusting the API for syscache callback functions: they now
get a hash value, not a TID, to identify the target tuple. Most of them
weren't paying any attention to that argument anyway, but plancache did
require a small amount of fixing.
Also, improve performance a trifle by avoiding sending duplicate inval
messages when a heap_update isn't changing the catcache lookup columns.
M src/backend/access/heap/heapam.c
M src/backend/catalog/namespace.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_oper.c
M src/backend/utils/adt/acl.c
M src/backend/utils/cache/attoptcache.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/misc/superuser.c
M src/include/nodes/plannodes.h
M src/include/storage/sinval.h
M src/include/utils/catcache.h
M src/include/utils/inval.h
Forget about targeting catalog cache invalidations by tuple TID.
commit : 632ae6829f7abda34e15082c91d9dfb3fc0f298b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 15:26:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 15:26:22 -0400
The TID isn't stable enough: we might queue an sinval event before a VACUUM
FULL, and then process it afterwards, when the target tuple no longer has
the same TID. So we must invalidate entries on the basis of hash value
only. The old coding can be shown to result in various bizarre,
hard-to-reproduce errors in the presence of concurrent VACUUM FULLs on
system catalogs, and could easily result in permanent catalog corruption,
up to and including complete loss of tables.
This commit is just a minimal fix that removes the unsafe comparison.
We should remove transmission of the tuple TID from sinval messages
altogether, and then arrange to suppress the extra message in the common
case of a heap_update that doesn't change the key hashvalue. But that's
going to be much more invasive, and will only produce a probably-marginal
performance gain, so it doesn't seem like material for a back-patch.
Back-patch to 9.0. Before that, VACUUM FULL refused to do any tuple moving
if it found any INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples (and
CLUSTER would give up altogether), so there was no risk of moving a tuple
that might be the subject of an unsent sinval message.
M src/backend/utils/cache/catcache.c
Fix incorrect order of operations during sinval reset processing.
commit : f4d7f1adbae831a37686d28cc5f89f0fcff48a54
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 14:38:20 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 14:38:20 -0400
We have to be sure that we have revalidated each nailed-in-cache relcache
entry before we try to use it to load data for some other relcache entry.
The introduction of "mapped relations" in 9.0 broke this, because although
we updated the state kept in relmapper.c early enough, we failed to
propagate that information into relcache entries soon enough; in
particular, we could try to fetch pg_class rows out of pg_class before
we'd updated its relcache entry's rd_node.relNode value from the map.
This bug accounts for Dave Gould's report of failures after "vacuum full
pg_class", and I believe that there is risk for other system catalogs
as well.
The core part of the fix is to copy relmapper data into the relcache
entries during "phase 1" in RelationCacheInvalidate(), before they'll be
used in "phase 2". To try to future-proof the code against other similar
bugs, I also rearranged the order in which nailed relations are visited
during phase 2: now it's pg_class first, then pg_class_oid_index, then
other nailed relations. This should ensure that RelationClearRelation can
apply RelationReloadIndexInfo to all nailed indexes without risking use
of not-yet-revalidated relcache entries.
Back-patch to 9.0 where the relation mapper was introduced.
M src/backend/utils/cache/relcache.c
Preserve toast value OIDs in toast-swap-by-content for CLUSTER/VACUUM FULL.
commit : 7b0d0e9356963d5c3e4d329a917f5fbb82a2ef05
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 13:48:04 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 13:48:04 -0400
This works around the problem that a catalog cache entry might contain a
toast pointer that we try to dereference just as a VACUUM FULL completes
on that catalog. We will see the sinval message on the cache entry when
we acquire lock on the toast table, but by that point we've already told
tuptoaster.c "here's the pointer to fetch", so it's difficult from a code
structural standpoint to update the pointer before we use it. Much less
painful to ensure that toast pointers are not invalidated in the first
place. We have to add a bit of code to deal with the case that a value
that previously wasn't toasted becomes so; but that should be a
seldom-exercised corner case, so the inefficiency shouldn't be significant.
Back-patch to 9.0. In prior versions, we didn't allow CLUSTER on system
catalogs, and VACUUM FULL didn't result in reassignment of toast OIDs, so
there was no problem.
M src/backend/access/heap/tuptoaster.c
M src/backend/commands/cluster.c
Fix race condition in relcache init file invalidation.
commit : 2ada6779c5d3fcc31568ba263f8a0cc9bb8318c1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 13:11:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 16 Aug 2011 13:11:54 -0400
The previous code tried to synchronize by unlinking the init file twice,
but that doesn't actually work: it leaves a window wherein a third process
could read the already-stale init file but miss the SI messages that would
tell it the data is stale. The result would be bizarre failures in catalog
accesses, typically "could not read block 0 in file ..." later during
startup.
Instead, hold RelCacheInitLock across both the unlink and the sending of
the SI messages. This is more straightforward, and might even be a bit
faster since only one unlink call is needed.
This has been wrong since it was put in (in 2002!), so back-patch to all
supported releases.
M src/backend/access/transam/twophase.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/relcache.c
M src/include/utils/relcache.h
Adjust total size in pg_basebackup progress report when reality changes
commit : 1bb69245ab234634013c543927e6fa76009622fa
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 16 Aug 2011 16:56:47 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 16 Aug 2011 16:56:47 +0200
When streaming including WAL, the size estimate will always be incorrect,
since we don't know how much WAL is included. To make sure the output doesn't
look completely unreasonable, this patch increases the total size whenever we
go past the estimate, to make sure we never go above 100%.
M src/bin/pg_basebackup/pg_basebackup.c
Fix bogus comment that claimed that the new BACKUP METHOD line in backup_label was new in 9.0. Spotted by Fujii Masao.
commit : 2877c67bc24510c30bca477c876f5de427c85588
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 16 Aug 2011 12:21:50 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 16 Aug 2011 12:21:50 +0300
M src/backend/access/transam/xlog.c
Make pg_basebackup progress report translatable
commit : 3b3f09351b48f3081021ce60964c92cec42b7c3d
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 16 Aug 2011 11:24:08 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 16 Aug 2011 11:24:08 +0300
Also fix a potential portability bug, because INT64_FORMAT is only
guaranteed to be available with snprintf, not fprintf.
M src/bin/pg_basebackup/pg_basebackup.c
Use less cryptic variable names
commit : 005e5c30d162447da81d5d5e118a5ea4613dc944
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 16 Aug 2011 11:19:50 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 16 Aug 2011 11:19:50 +0300
M src/bin/pg_basebackup/pg_basebackup.c
In pg_upgrade, avoid dumping orphaned temporary tables. This makes the pg_upgrade schema matching pattern match pg_dump/pg_dumpall.
commit : 2411fbdac448045a23eebf4f0dbfd5790ebad720
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 15 Aug 2011 22:39:31 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 15 Aug 2011 22:39:31 -0400
Fix for 9.0, 9.1, and 9.2.
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/version_old_8_3.c
Adjust regression tests for error message change
commit : 5845f42721c359dd1f6940995381be4000767117
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 15 Aug 2011 17:27:10 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 15 Aug 2011 17:27:10 +0300
M src/test/regress/expected/prepared_xacts.out
Add "Reason code" prefix to internal SSI error messages
commit : e5475a80d2fd1b99a7939a81a44b746821287a06
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 15 Aug 2011 15:20:16 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 15 Aug 2011 15:20:16 +0300
This makes it clearer that the error message is perhaps not supposed
to be understood by users, and it also makes it somewhat clearer that
it was not accidentally omitted from translation.
Idea from Heikki Linnakangas, except that we don't mark "Reason code"
for translation at this point, because that would make the
implementation too cumbersome.
M src/backend/storage/lmgr/predicate.c
Fix unsafe order of operations in foreign-table DDL commands.
commit : 52994e9e5686b10a92bc93ec0f4e15c7fbc18242
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 14 Aug 2011 15:40:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 14 Aug 2011 15:40:21 -0400
When updating or deleting a system catalog tuple, it's necessary to acquire
RowExclusiveLock on the catalog before looking up the tuple; otherwise a
concurrent VACUUM FULL on the catalog might move the tuple to a different
TID before we can apply the update. Coding patterns that find the tuple
via a table scan aren't at risk here, but when obtaining the tuple from a
catalog cache, correct ordering is important; and several routines in
foreigncmds.c got it wrong. Noted while running the regression tests in
parallel with VACUUM FULL of assorted system catalogs.
For consistency I moved all the heap_open calls to the starts of their
functions, including a couple for which there was no actual bug.
Back-patch to 8.4 where foreigncmds.c was added.
M src/backend/commands/foreigncmds.c
Message style improvements
commit : 85612039b9eab75c2a29399f3a394acd4ca4cc3f
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 14 Aug 2011 21:03:08 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 14 Aug 2011 21:03:08 +0300
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
Fix typo
commit : 7431cb251a6c36ea520f955dd03d4b35b0f0f3e4
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 14 Aug 2011 10:40:50 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 14 Aug 2011 10:40:50 +0300
M doc/src/sgml/ecpg.sgml
Fix incorrect timeout handling during initial authentication transaction.
commit : 592b615d71caac8a3504276a805a6fd024c40041
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 13 Aug 2011 17:52:24 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 13 Aug 2011 17:52:24 -0400
The statement start timestamp was not set before initiating the transaction
that is used to look up client authentication information in pg_authid.
In consequence, enable_sig_alarm computed a wrong value (far in the past)
for statement_fin_time. That didn't have any immediate effect, because the
timeout alarm was set without reference to statement_fin_time; but if we
subsequently blocked on a lock for a short time, CheckStatementTimeout
would consult the bogus value when we cancelled the lock timeout wait,
and then conclude we'd timed out, leading to immediate failure of the
connection attempt. Thus an innocent "vacuum full pg_authid" would cause
failures of concurrent connection attempts. Noted while testing other,
more serious consequences of vacuum full on system catalogs.
We should set the statement timestamp before StartTransactionCommand(),
so that the transaction start timestamp is also valid. I'm not sure if
there are any non-cosmetic effects of it not being valid, but the xact
timestamp is at least sent to the statistics machinery.
Back-patch to 9.0. Before that, the client authentication timeout was done
outside any transaction and did not depend on this state to be valid.
M src/backend/utils/init/postinit.c
Make USECS_PER_* timestamp macros visible even when we are not using integer timestamps.
commit : 6d7bd5dec9e073018d9c2bea51d8e271cf5a5af6
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 12 Aug 2011 21:32:19 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 12 Aug 2011 21:32:19 -0400
M src/include/utils/timestamp.h
Add major features list and introductory text for 9.1 release notes.
commit : eb72adc82e933f135369d846c2151c7694ffaa36
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 11 Aug 2011 16:36:56 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 11 Aug 2011 16:36:56 -0400
Backpatch to 9.1, obviously.
M doc/src/sgml/release-9.1.sgml
Teach unix_latch.c to use poll() where available.
commit : a180776f7a1c4554f214bd9e67bd63bfaf33e339
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 11 Aug 2011 12:49:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 11 Aug 2011 12:49:45 -0400
poll() is preferred over select() on platforms where both are available,
because it tends to be a bit faster and it doesn't have an arbitrary limit
on the range of FD numbers that can be accessed. The FD range limit does
not appear to be a risk factor for any 9.1 usages, so this doesn't need to
be back-patched, but we need to have it in place if we keep on expanding
the uses of WaitLatch.
M src/backend/port/unix_latch.c
Display both per-table and per-column FDW options in psql's \d output.
commit : d82d84864ca8ee2960a1a5d7a3f051290ac1e42f
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:45:47 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:45:47 -0400
Along the way, rename "Options" to "FDW Options" in various places for
consistency and clarity.
Shigeru Hanada
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c
M src/test/regress/expected/foreign_data.out
Unbreak legacy syntax "COMMENT ON RULE x IS y", with no relation name.
commit : 5057366eedaccef1f4c25a7c5de0d6c1c5a291f1
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:23:51 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:23:51 -0400
check_object_ownership() isn't happy about the null relation pointer.
We could fix it there, but this seems more future-proof.
M src/backend/catalog/objectaddress.c
Change psql's \dd command to do something more useful.
commit : 59414cdedbc2ed418d66eddc0fcaf9dc40fbc27f
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:16:29 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 11 Aug 2011 11:16:29 -0400
Instead of displaying comments on an arbitrary subset of the object
types which support them, make \dd display comments on exactly those
object types which don't have their own backlash commands. We now
regard the display of comments as properly the job of the relevant
backslash command (though many of them do so only in verbose mode)
rather than something that \dd should be responsible for. However,
a handful of object types have no backlash command, so make \dd
give information about those.
Josh Kupershmidt
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c
M src/bin/psql/help.c
Remove wal_sender_delay GUC, because it's no longer useful.
commit : cff75130b5f63e45423c2ed90d6f2e84c21ef840
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 18:50:28 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 18:50:28 -0400
The latch infrastructure is now capable of detecting all cases where the
walsender loop needs to wake up, so there is no reason to have an arbitrary
timeout.
Also, modify the walsender loop logic to follow the standard pattern of
ResetLatch, test for work to do, WaitLatch. The previous coding was both
hard to follow and buggy: it would sometimes busy-loop despite having
nothing available to do, eg between receipt of a signal and the next time
it was caught up with new WAL, and it also had interesting choices like
deciding to update to WALSNDSTATE_STREAMING on the strength of information
known to be obsolete.
M doc/src/sgml/config.sgml
M src/backend/replication/walsender.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/replication/walsender.h
Add a bit of debug logging to backend_read_statsfile().
commit : 79b2ee20c8a041a85dd230c4e787bef22edae57b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 16:45:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 16:45:43 -0400
This is in hopes of learning more about what causes "pgstat wait timeout"
warnings in the buildfarm. This patch should probably be reverted once
we've learned what we can. As coded, it will result in regression test
"failures" at half the delay that the existing code does, so I expect
to see a few more than before.
M src/backend/postmaster/pgstat.c
Change the autovacuum launcher to use WaitLatch instead of a poll loop.
commit : 4dab3d5ae1498eb4246e54225a48cf667ab693da
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 12:20:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 10 Aug 2011 12:20:30 -0400
In pursuit of this (and with the expectation that WaitLatch will be needed
in more places), convert the latch field that was already added to PGPROC
for sync rep into a generic latch that is activated for all PGPROC-owning
processes, and change many of the standard backend signal handlers to set
that latch when a signal happens. This will allow WaitLatch callers to be
wakened properly by these signals.
In passing, fix a whole bunch of signal handlers that had been hacked to do
things that might change errno, without adding the necessary save/restore
logic for errno. Also make some minor fixes in unix_latch.c, and clean
up bizarre and unsafe scheme for disowning the process's latch. Much of
this has to be back-patched into 9.1.
Peter Geoghegan, with additional work by Tom
M src/backend/access/transam/xlog.c
M src/backend/port/unix_latch.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgarch.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/include/replication/syncrep.h
M src/include/storage/proc.h
Oops, we're working on version 9.2 already, not 9.1. Update the PG_CONTROL_VERSION accordingly; I updated it wrong in previous commit.
commit : 1f1b70a7cf957b88433f871f3732ad5701b6ad8b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 10 Aug 2011 09:28:26 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 10 Aug 2011 09:28:26 +0300
M src/include/catalog/pg_control.h
If backup-end record is not seen, and we reach end of recovery from a streamed backup, throw an error and refuse to start up. The restore has not finished correctly in that case and the data directory is possibly corrupt. We already errored out in case of archive recovery, but could not during crash recovery because we couldn't distinguish between the case that pg_start_backup() was called and the database then crashed (must not error, data is OK), and the case that we're restoring from a backup and not all the needed WAL was replayed (data can be corrupt).
commit : 41f9ffd928b6fdcedd685483e777b0fa71ece47c
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 10 Aug 2011 09:16:29 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 10 Aug 2011 09:16:29 +0300
To distinguish those cases, add a line to backup_label to indicate
whether the backup was taken with pg_start/stop_backup(), or by streaming
(ie. pg_basebackup).
This requires re-initdb, because of a new field added to the control file.
M src/backend/access/transam/xlog.c
M src/include/catalog/pg_control.h
Measure WaitLatch's timeout parameter in milliseconds, not microseconds.
commit : 9f17ffd8660243382809b8023ff3d38fbfac4e8b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 18:52:29 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 18:52:29 -0400
The original definition had the problem that timeouts exceeding about 2100
seconds couldn't be specified on 32-bit machines. Milliseconds seem like
sufficient resolution, and finer grain than that would be fantasy anyway
on many platforms.
Back-patch to 9.1 so that this aspect of the latch API won't change between
9.1 and later releases.
Peter Geoghegan
M src/backend/access/transam/xlog.c
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/postmaster/pgarch.c
M src/backend/replication/syncrep.c
M src/backend/replication/walsender.c
Documentation improvement and minor code cleanups for the latch facility.
commit : 4e15a4db5e65e43271f8d20750d6500ab12632d0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 15:30:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 15:30:45 -0400
Improve the documentation around weak-memory-ordering risks, and do a pass
of general editorialization on the comments in the latch code. Make the
Windows latch code more like the Unix latch code where feasible; in
particular provide the same Assert checks in both implementations.
Fix poorly-placed WaitLatch call in syncrep.c.
This patch resolves, for the moment, concerns around weak-memory-ordering
bugs in latch-related code: we have documented the restrictions and checked
that existing calls meet them. In 9.2 I hope that we will install suitable
memory barrier instructions in SetLatch/ResetLatch, so that their callers
don't need to be quite so careful.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/replication/syncrep.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/latch.h
Avoid creating PlaceHolderVars immediately within PlaceHolderVars.
commit : cff60f2dfa470d5736a19d36eb910844e31db764
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 11:33:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 11:33:46 -0400
Such a construction is useless since the lower PlaceHolderVar is already
nullable; no need to make it more so. Noted while pursuing bug #6154.
This is just a minor planner efficiency improvement, since the final plan
will come out the same anyway after PHVs are flattened. So not worth the
risk of back-patching.
M src/backend/optimizer/prep/prepjointree.c
Use clearer notation for getnameinfo() return handling
commit : f4a9da0a150ead846be33c38f665f4337a81054e
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 9 Aug 2011 18:28:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 9 Aug 2011 18:28:35 +0300
Writing
if (getnameinfo(...))
handle_error();
reads quite strangely, so use something like
if (getnameinfo(...) != 0)
handle_error();
instead.
M src/backend/libpq/hba.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/adt/network.c
M src/backend/utils/adt/pgstatfuncs.c
Change the way string relopts are allocated.
commit : 77949a2913b3cbaa7b2e2a73f014d541e251f18b
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 9 Aug 2011 15:25:44 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 9 Aug 2011 15:25:44 +0300
Don't try to allocate the default value for a string relopt in the same
palloc chunk as the relopt_string struct. That didn't work too well if you
added a built-in string relopt in the stringRelOpts array, as it's not
possible to have an initializer for a variable length struct in C. This
makes the code slightly simpler too.
While we're at it, move the call to validator function in
add_string_reloption to before the allocation, so that if someone does pass
a bogus default value, we don't leak memory.
M src/backend/access/common/reloptions.c
M src/include/access/reloptions.h
Fix grammar and spelling in log message.
commit : 5b6c8436d7e696cced4db14c885eff23f87dc712
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 9 Aug 2011 11:43:57 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 9 Aug 2011 11:43:57 +0300
M src/backend/postmaster/postmaster.c
Fix nested PlaceHolderVar expressions that appear only in targetlists.
commit : 77ba23256404d6f975a80d5402e62f6047c67b3a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 00:48:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 9 Aug 2011 00:48:51 -0400
A PlaceHolderVar's expression might contain another, lower-level
PlaceHolderVar. If the outer PlaceHolderVar is used, the inner one
certainly will be also, and so we have to make sure that both of them get
into the placeholder_list with correct ph_may_need values during the
initial pre-scan of the query (before deconstruct_jointree starts).
We did this correctly for PlaceHolderVars appearing in the query quals,
but overlooked the issue for those appearing in the top-level targetlist;
with the result that nested placeholders referenced only in the targetlist
did not work correctly, as illustrated in bug #6154.
While at it, add some error checking to find_placeholder_info to ensure
that we don't try to create new placeholders after it's too late to do so;
they have to all be created before deconstruct_jointree starts.
Back-patch to 8.4 where the PlaceHolderVar mechanism was introduced.
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/util/placeholder.c
M src/include/optimizer/placeholder.h
M src/include/optimizer/planmain.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Teach psql to display the comments on SQL/MED objects in verbose mode.
commit : d82a9d2a600b764aabdc37507c50d9229f8310b5
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 16:29:57 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 16:29:57 -0400
The relevant backslash commands already exist, so we're just adding an
additional column. With this commit, all objects that have psql backslash
commands and accept comments should now display those comments at least
in verbose mode.
Josh Kupershmidt, with doc additions by me.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c
M src/test/regress/expected/foreign_data.out
Teach psql to display the comments on conversions and domains.
commit : c9ac00e6ecfaad4d6a3e1ee478b912c7227ae62a
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 12:26:13 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 12:26:13 -0400
\dc and \dD now accept a "+" option, which will cause the comments to
be displayed. Along the way, correct a few oversights in the previous
commit in this area, 3b17efdfdd846c9bfad1637686e6f18198ea3df5 - namely,
(1) when \dL+ is used, make description still be the last column, for
consistency with what we've done elsewhere; and (2) document the
difference between \dC and \dC+.
Josh Kupershmidt, with a couple of doc changes by me.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
Teach vacuumlo to limit number of removals, via new -l option.
commit : b69f2e36402aaa222ed03c1769b3de6d5be5f302
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 09:12:16 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 8 Aug 2011 09:12:16 -0400
Also, handle failure better: don't just blindly keep trying to delete
stuff after the transaction has already failed.
Tim Lewis, reviewed by Josh Kupershmidt, with further hacking by me.
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/vacuumlo.sgml
Correct the lie in pg_config.h.win32 about having inttypes.h.
commit : f54e373d93f72d87ce2cafd7373bd7b0534b2065
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 8 Aug 2011 08:52:05 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 8 Aug 2011 08:52:05 -0400
This lie has been harmless until now, but has been exposed by the
change to include postgres.h before the python headers, which
in some versions include inttypes.h if HAVE_INTTYPES_H is set.
M src/include/pg_config.h.win32
Add "Compatibility" section to ALTER EXTENSION reference page
commit : 04b17684af24791b18e414e304fb6d9b57a36c5e
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 22:15:38 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 22:15:38 +0300
Almost all other pages have one; this one must have been forgotten.
M doc/src/sgml/ref/alter_extension.sgml
Remove whitespace from end of lines
commit : f29a004496b3378f98b24c088cd846877eacf582
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 16:11:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 16:11:55 +0300
M doc/src/sgml/auth-delay.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/install-windows.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/ref/drop_foreign_table.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/sepgsql.sgml
Rename "Example" sections to "Examples" in dblink chapter
commit : a559ed5ed611f7937cc87d4fd420a63ab2a27356
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 15:51:04 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 15:51:04 +0300
For consistency with other man pages.
M doc/src/sgml/dblink.sgml
Fix a whitespace issue with the man pages
commit : 6ef24487967692604b07a4a54e71821a60fb729a
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 10:49:45 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 7 Aug 2011 10:49:45 +0300
There is what may actually be a mistake in our markup. The problem is
in a situation like
<para>
<command>FOO</command> is ...
there is strictly speaking a line break before "FOO". In the HTML
output, this does not appear to be a problem, but in the man page
output, this shows up, so you get double blank lines at odd places.
So far, we have attempted to work around this with an XSL hack, but
that causes other problems, such as creating run-ins in places like
<acronym>SQL</acronym> <command>COPY</command>
So fix the problem properly by removing the extra whitespace. I only
fixed the problems that affect the man page output, not all the
places.
M doc/src/sgml/dblink.sgml
M doc/src/sgml/ref/abort.sgml
M doc/src/sgml/ref/alter_aggregate.sgml
M doc/src/sgml/ref/alter_collation.sgml
M doc/src/sgml/ref/alter_conversion.sgml
M doc/src/sgml/ref/alter_database.sgml
M doc/src/sgml/ref/alter_default_privileges.sgml
M doc/src/sgml/ref/alter_domain.sgml
M doc/src/sgml/ref/alter_extension.sgml
M doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_function.sgml
M doc/src/sgml/ref/alter_group.sgml
M doc/src/sgml/ref/alter_index.sgml
M doc/src/sgml/ref/alter_operator.sgml
M doc/src/sgml/ref/alter_role.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_tablespace.sgml
M doc/src/sgml/ref/alter_trigger.sgml
M doc/src/sgml/ref/alter_type.sgml
M doc/src/sgml/ref/alter_user_mapping.sgml
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/begin.sgml
M doc/src/sgml/ref/close.sgml
M doc/src/sgml/ref/cluster.sgml
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/comment.sgml
M doc/src/sgml/ref/commit.sgml
M doc/src/sgml/ref/commit_prepared.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/create_conversion.sgml
M doc/src/sgml/ref/create_domain.sgml
M doc/src/sgml/ref/create_extension.sgml
M doc/src/sgml/ref/create_foreign_data_wrapper.sgml
M doc/src/sgml/ref/create_foreign_table.sgml
M doc/src/sgml/ref/create_function.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_language.sgml
M doc/src/sgml/ref/create_operator.sgml
M doc/src/sgml/ref/create_role.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/create_schema.sgml
M doc/src/sgml/ref/create_sequence.sgml
M doc/src/sgml/ref/create_server.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/create_tablespace.sgml
M doc/src/sgml/ref/create_trigger.sgml
M doc/src/sgml/ref/create_user_mapping.sgml
M doc/src/sgml/ref/createdb.sgml
M doc/src/sgml/ref/declare.sgml
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/discard.sgml
M doc/src/sgml/ref/do.sgml
M doc/src/sgml/ref/drop_aggregate.sgml
M doc/src/sgml/ref/drop_cast.sgml
M doc/src/sgml/ref/drop_collation.sgml
M doc/src/sgml/ref/drop_conversion.sgml
M doc/src/sgml/ref/drop_domain.sgml
M doc/src/sgml/ref/drop_foreign_data_wrapper.sgml
M doc/src/sgml/ref/drop_foreign_table.sgml
M doc/src/sgml/ref/drop_function.sgml
M doc/src/sgml/ref/drop_index.sgml
M doc/src/sgml/ref/drop_language.sgml
M doc/src/sgml/ref/drop_operator.sgml
M doc/src/sgml/ref/drop_role.sgml
M doc/src/sgml/ref/drop_rule.sgml
M doc/src/sgml/ref/drop_schema.sgml
M doc/src/sgml/ref/drop_sequence.sgml
M doc/src/sgml/ref/drop_server.sgml
M doc/src/sgml/ref/drop_table.sgml
M doc/src/sgml/ref/drop_tablespace.sgml
M doc/src/sgml/ref/drop_trigger.sgml
M doc/src/sgml/ref/drop_type.sgml
M doc/src/sgml/ref/drop_user_mapping.sgml
M doc/src/sgml/ref/drop_view.sgml
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/droplang.sgml
M doc/src/sgml/ref/dropuser.sgml
M doc/src/sgml/ref/ecpg-ref.sgml
M doc/src/sgml/ref/end.sgml
M doc/src/sgml/ref/fetch.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/insert.sgml
M doc/src/sgml/ref/listen.sgml
M doc/src/sgml/ref/lock.sgml
M doc/src/sgml/ref/notify.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
M doc/src/sgml/ref/prepare_transaction.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/reindex.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/reset.sgml
M doc/src/sgml/ref/revoke.sgml
M doc/src/sgml/ref/rollback.sgml
M doc/src/sgml/ref/rollback_prepared.sgml
M doc/src/sgml/ref/rollback_to.sgml
M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/ref/select.sgml
M doc/src/sgml/ref/select_into.sgml
M doc/src/sgml/ref/set.sgml
M doc/src/sgml/ref/show.sgml
M doc/src/sgml/ref/truncate.sgml
M doc/src/sgml/ref/unlisten.sgml
M doc/src/sgml/ref/update.sgml
M doc/src/sgml/ref/vacuum.sgml
M doc/src/sgml/ref/vacuumdb.sgml
M doc/src/sgml/ref/values.sgml
M doc/src/sgml/spi.sgml
M doc/src/sgml/stylesheet-man.xsl
Clean up ill-advised attempt to invent a private set of Node tags.
commit : 05e83968929f4ec1eba058fcae755fd2df98864e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 6 Aug 2011 14:53:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 6 Aug 2011 14:53:49 -0400
Somebody thought it'd be cute to invent a set of Node tag numbers that were
defined independently of, and indeed conflicting with, the main tag-number
list. While this accidentally failed to fail so far, it would certainly
lead to trouble as soon as anyone wanted to, say, apply copyObject to these
node types. Clang was already complaining about the use of makeNode on
these tags, and I think quite rightly so. Fix by pushing these node
definitions into the mainstream, including putting replnodes.h where it
belongs.
M src/backend/replication/repl_gram.y
M src/backend/replication/walsender.c
M src/include/nodes/nodes.h
R080 src/include/replication/replnodes.h src/include/nodes/replnodes.h
M src/include/replication/basebackup.h
Fix thinko in documentation of local_preload_libraries.
commit : ffcf5a6c41ce91c55991b04eea1fcb94e4d0faa0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 5 Aug 2011 21:18:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 5 Aug 2011 21:18:02 -0400
Somebody added a cross-reference to shared_preload_libraries, but wrote the
wrong variable name when they did it (and didn't bother to make it a link
either).
Spotted by Christoph Anton Mitterer.
M doc/src/sgml/config.sgml
Reduce PG_SYSLOG_LIMIT to 900 bytes.
commit : 375aa7b393843800a2bfefcbc13fa68ca82dee53
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 5 Aug 2011 21:02:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 5 Aug 2011 21:02:31 -0400
The previous limit of 1024 was set on the assumption that all modern syslog
implementations have line length limits of 2KB or so. However, this is
false, as at least Solaris and sysklogd truncate at only 1KB. 900 seems
to leave enough room for the max likely length of the tacked-on prefixes,
so let's go with that.
As with the previous change, it doesn't seem wise to back-patch this into
already-released branches; but it should be OK to sneak it into 9.1.
Noah Misch
M src/backend/utils/error/elog.c
Allow per-column foreign data wrapper options.
commit : c4096c76399ad99dce35cd62f60599ea8748a3dd
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 13:24:03 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 13:24:03 -0400
Shigeru Hanada, with fairly minor editing by me.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/information_schema.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/create_foreign_table.sgml
M doc/src/sgml/ref/psql-ref.sgml
M src/backend/access/common/tupdesc.c
M src/backend/catalog/genbki.pl
M src/backend/catalog/heap.c
M src/backend/catalog/information_schema.sql
M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.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/catalog/catversion.h
M src/include/catalog/pg_attribute.h
M src/include/catalog/pg_class.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Modestly improve pgbench's checking for invalid ranges.
commit : 68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 12:48:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 12:48:45 -0400
The old check against MAX_RANDOM_VALUE is clearly irrelevant since
getrand() no longer calls random(). Instead, check whether min and max
are close enough together to avoid an overflow inside getrand(), as
suggested by Tom Lane. This is still somewhat silly, because we're
using atoi(), which doesn't check for overflow anyway and (at least on
my system) will cheerfully return 0 when given "4294967296". But that's
a problem for another commit.
M contrib/pgbench/pgbench.c
Tweak PQresStatus() to avoid a clang compiler warning.
commit : b43bf617fdb3ecde709892c3bd8997ac41410f2f
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 12:06:29 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 5 Aug 2011 12:06:29 -0400
The previous test for status < 0 test is in fact testing nothing if the
compiler considers an enum to be an unsigned data type. clang doesn't
like tautologies, so do this instead.
Report by Peter Geoghegan, fix as suggested by Tom Lane.
M src/interfaces/libpq/fe-exec.c
Fix markup for recent wal_level clarification.
commit : 4262e61d6424a38150f125b612fd900267718148
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 4 Aug 2011 15:02:02 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 4 Aug 2011 15:02:02 -0400
Backpatch to 9.1 and 9.0.
M doc/src/sgml/config.sgml
Restore the primacy of postgres.h in plpython.c.
commit : a11cf4334138c3af8504c71a091b4f5c317776ef
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 4 Aug 2011 13:05:32 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 4 Aug 2011 13:05:32 -0400
To avoid having the python headers hijack various definitions,
we now include them after all the system headers we want, having
first undefined some of the things they want to define. After that's
done we restore the things they scribbled on that matter, namely our
snprintf and vsnprintf macros, if we're using them.
M src/pl/plpython/plpython.c
Create VXID locks "lazily" in the main lock table.
commit : 84e37126770dd6de903dad88ce150a49b63b5ef9
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 4 Aug 2011 12:38:33 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 4 Aug 2011 12:38:33 -0400
Instead of entering them on transaction startup, we materialize them
only when someone wants to wait, which will occur only during CREATE
INDEX CONCURRENTLY. In Hot Standby mode, the startup process must also
be able to probe for conflicting VXID locks, but the lock need never be
fully materialized, because the startup process does not use the normal
lock wait mechanism. Since most VXID locks never need to touch the
lock manager partition locks, this can significantly reduce blocking
contention on read-heavy workloads.
Patch by me. Review by Jeff Davis.
M src/backend/commands/indexcmds.c
M src/backend/postmaster/autovacuum.c
M src/backend/storage/ipc/sinvaladt.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/README
M src/backend/storage/lmgr/lmgr.c
M src/backend/storage/lmgr/lock.c
M src/include/storage/lmgr.h
M src/include/storage/lock.h
M src/include/storage/proc.h
M src/include/storage/sinvaladt.h
Teach psql to display comments on languages and casts.
commit : 3b17efdfdd846c9bfad1637686e6f18198ea3df5
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 4 Aug 2011 12:22:26 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 4 Aug 2011 12:22:26 -0400
The output of \dL (list languages) is fairly narrow, so we just always
display the comment. \dC (list casts) can get fairly wide, so we only
display comments if the new \dC+ option is specified.
Josh Kupershmidt
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
In documentaiton, clarify which commands have reduced WAL volume for wal_level = minimum.
commit : 38de5aad54b3eb37981cacd391fcde82f86d00fb
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 4 Aug 2011 12:06:53 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 4 Aug 2011 12:06:53 -0400
Backpatch to 9.1 and 9.0.
M doc/src/sgml/config.sgml
Make pgbench use erand48() rather than random().
commit : 4af43ee3f165c8e4b332a7e680a44f4b7ba2d3c1
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 3 Aug 2011 16:26:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 3 Aug 2011 16:26:40 -0400
glibc renders random() thread-safe by wrapping a futex lock around it;
testing reveals that this limits the performance of pgbench on machines
with many CPU cores. Rather than switching to random_r(), which is
only available on GNU systems and crashes unless you use undocumented
alchemy to initialize the random state properly, switch to our built-in
implementation of erand48(), which is both thread-safe and concurrent.
Since the list of reasons not to use the operating system's erand48()
is getting rather long, rename ours to pg_erand48() (and similarly
for our implementations of lrand48() and srand48()) and just always
use those. We were already doing this on Cygwin anyway, and the
glibc implementation is not quite thread-safe, so pgbench wouldn't
be able to use that either.
Per discussion with Tom Lane.
M configure
M configure.in
M contrib/pgbench/pgbench.c
M src/backend/optimizer/geqo/geqo_random.c
M src/backend/optimizer/geqo/geqo_selection.c
M src/include/optimizer/geqo.h
M src/include/pg_config.h.in
M src/include/port.h
M src/port/Makefile
M src/port/erand48.c
M src/port/random.c
M src/port/srandom.c
Move CheckRecoveryConflictDeadlock() call to a safer place.
commit : ac36e6f71f197540b8ee83c97f338ae5e5163f30
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 2 Aug 2011 15:16:29 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 2 Aug 2011 15:16:29 -0400
This kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in particular
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock
will not get cleaned up if the ereport is thrown. This seems to not cause
any observable problem in trivial test cases, because LockReleaseAll will
silently clean up the debris; but I was able to cause failures with tests
involving subtransactions.
Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/standby.h
Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.
commit : 2e53bd5517431637e495c7614761e5aae46b4eba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 2 Aug 2011 13:23:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 2 Aug 2011 13:23:52 -0400
It was initialized in the wrong place and to the wrong value. With bad
luck this could result in incorrect query-cancellation failures in hot
standby sessions, should a HS backend be holding pin on buffer number 1
while trying to acquire a lock.
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/proc.h
Avoid integer overflow when LIMIT + OFFSET >= 2^63.
commit : 89df948ec26679e09f71baf6bbb9b06f9d329712
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 2 Aug 2011 10:47:17 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 2 Aug 2011 10:47:17 +0300
This fixes bug #6139 reported by Hitoshi Harada.
M src/backend/executor/nodeLimit.c
Minor stylistic corrections.
commit : 85b436f7b1f06a6ffa8d2f29b03d6e440de18784
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 1 Aug 2011 08:24:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 1 Aug 2011 08:24:45 -0400
M src/backend/storage/ipc/sinvaladt.c
Add host name resolution information to pg_hba.conf error messages
commit : 8a0fa9cad9939f53f0b496d95d7e7fd9cfab0e9c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 31 Jul 2011 18:03:43 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 31 Jul 2011 18:03:43 +0300
This is to be able to analyze issues with host names in pg_hba.conf.
M src/backend/libpq/auth.c
Fix pg_update to properly test for the data directory's existence on Win32.
commit : a31dc392d684627d0943fe67491bea91c5e619aa
author : Bruce Momjian <bruce@momjian.us>
date : Sat, 30 Jul 2011 01:50:18 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sat, 30 Jul 2011 01:50:18 -0400
Backpatch to 9.1.
M contrib/pg_upgrade/exec.c
Reduce sinval synchronization overhead.
commit : b4fbe392f8ff6ff1a66b488eb7197eef9e1770a4
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 29 Jul 2011 16:46:13 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 29 Jul 2011 16:46:13 -0400
Testing shows that the overhead of acquiring and releasing
SInvalReadLock and msgNumLock on high-core count boxes can waste a lot
of CPU time and hurt performance. This patch adds a per-backend flag
that allows us to skip all that locking in most cases. Further
testing shows that this improves performance even when sinval traffic
is very high.
Patch by me. Review and testing by Noah Misch.
M src/backend/storage/ipc/sinvaladt.c
Move new pgbench options to correct section of --help output.
commit : 60fb25a3f56bd78e961cc7263e5ae11e1eceeb5e
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 29 Jul 2011 16:43:57 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 29 Jul 2011 16:43:57 -0400
M contrib/pgbench/pgbench.c
Fix pg_restore's direct-to-database mode for standard_conforming_strings.
commit : 6545a901aaf84cb05212bb6a7674059908f527c3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 28 Jul 2011 14:06:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 28 Jul 2011 14:06:57 -0400
pg_backup_db.c contained a mini SQL lexer with which it tried to identify
boundaries between SQL commands, but that code was not designed to cope
with standard_conforming_strings, and would get the wrong answer if a
backslash immediately precedes a closing single quote in such a string,
as per report from Julian Mehnle. The bug only affects direct-to-database
restores from archive files made with standard_conforming_strings = on.
Rather than complicating the code some more to try to fix that, let's just
rip it all out. The only reason it was needed was to cope with COPY data
embedded into ordinary archive entries, which was a layout that was used
only for about the first three weeks of the archive format's existence,
and never in any production release of pg_dump. Instead, just rely on the
archive file layout to tell us whether we're printing COPY data or not.
This bug represents a data corruption hazard in all releases in which
standard_conforming_strings can be turned on, ie 8.2 and later, so
back-patch to all supported branches.
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_db.c
M src/bin/pg_dump/pg_backup_db.h
Minor message style adjustment
commit : 0fe8150827693fca429a01b1cf2914f7f14d3b2d
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 27 Jul 2011 23:54:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 27 Jul 2011 23:54:46 +0300
M src/backend/storage/lmgr/predicate.c
Fix typo.
commit : a8302803ab225e87458037b922aceee9864d9f54
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 27 Jul 2011 11:20:07 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 27 Jul 2011 11:20:07 -0400
Noted by Josh Kupershmidt.
M doc/src/sgml/ref/comment.sgml
Check to see whether libxml2 handles error context the way we expect.
commit : c1420fcf7d9e899b3378e25f5e21776f6461b4a4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 26 Jul 2011 16:29:53 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 26 Jul 2011 16:29:53 -0400
It turns out to be possible to link against a libxml2.so that does this
differently than the version we configured and built against, so we need
a runtime check to avoid bizarre behavior. Per report from Bernd Helmle.
Patch by Florian Pflug.
M src/backend/utils/adt/xml.c
Add missing newlines at end of error messages
commit : e67efb01e886d69d40d1cd87fba4507e8bb1035e
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 26 Jul 2011 23:23:18 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 26 Jul 2011 23:23:18 +0300
M src/bin/psql/command.c
M src/bin/psql/common.c
Replace printf format %i by %d
commit : ce8d7bb6440710058503d213b2aafcdf56a5b481
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 26 Jul 2011 22:54:29 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 26 Jul 2011 22:54:29 +0300
They are identical, but the overwhelming majority of the code uses %d,
so standardize on that.
M src/backend/libpq/auth.c
M src/backend/port/win32/socket.c
M src/backend/port/win32_latch.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/psql/command.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/win32.c
M src/timezone/pgtz.c
Only display column comments for relkinds that support them.
commit : 8c18f3f0e15738633231b31d8937b2710b38975f
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jul 2011 09:52:31 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jul 2011 09:52:31 -0400
Josh Kupershmidt, with minor modifications by me.
M src/bin/psql/describe.c
Clarify which relkinds accept column comments.
commit : c80be8a816ac4bf8b910aaaec599c683804bcd77
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jul 2011 09:34:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 26 Jul 2011 09:34:55 -0400
Per discussion with Josh Kupershmidt.
M doc/src/sgml/ref/comment.sgml
Don't build replacement getpeereid function on mingw.
commit : c9737310d5f9b87b5edb3674b5d34eea2f198a0b
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 25 Jul 2011 23:48:44 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 25 Jul 2011 23:48:44 -0400
Windows doesn't have Unix sockets, so it's not needed, and moreover causes compile warnings.
M configure
M configure.in
Silence compiler warning about uninitialized variable.
commit : 74e6d37276564d4be1f60d9edb76d7d066395773
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 25 Jul 2011 19:37:17 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 25 Jul 2011 19:37:17 -0400
It is set correctly on the only path that uses it, but the
compiler can't know that.
M src/backend/port/win32_latch.c
Add some environment checks prior to sepgsql regression testing.
commit : 8cca49d8a0d969e1c0f08779e8230466e395b813
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 10:51:02 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 10:51:02 -0400
This probably needs more work, but it's a start.
KaiGai Kohei
M contrib/sepgsql/Makefile
A contrib/sepgsql/chkselinuxenv
M src/makefiles/pgxs.mk
Improvements to SQL/MED documentation.
commit : f5af8eed9201e50bc5c761809ff57ef1ace91502
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 09:37:06 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 09:37:06 -0400
Laurenz Albe, somewhat modified by me.
M doc/src/sgml/ddl.sgml
M doc/src/sgml/fdwhandler.sgml
Add new pgbench options, --tablespace and --index-tablespace.
commit : 7c26395661ce549621db6fa93c0abb9cdbac9837
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 09:16:14 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 09:16:14 -0400
Per a request from Greg Smith.
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Add new pgbench switch, --unlogged-tables.
commit : 2d6fee09eba8474d9a69c08bf716f3e2d31e5fdf
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 06:49:00 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 25 Jul 2011 06:49:00 -0400
This entails adjusting pgbench to use getopt_long() rather
than getopt().
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Fix previous patch so it also works if not USE_SSL (mea culpa).
commit : bcf23ba4bf8323f875168c5dbc93265a140753e8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 23:29:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 23:29:03 -0400
On balance, the need to cover this case changes my mind in favor of pushing
all error-message generation duties into the two fe-secure.c routines.
So do it that way.
M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-secure.c
Improve libpq's error reporting for SSL failures.
commit : fee476da952a1f02f7ccf6e233fb4824c2bf6af4
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 16:29:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 16:29:07 -0400
In many cases, pqsecure_read/pqsecure_write set up useful error messages,
which were then overwritten with useless ones by their callers. Fix this
by defining the responsibility to set an error message to be entirely that
of the lower-level function when using SSL.
Back-patch to 8.3; the code is too different in 8.2 to be worth the
trouble.
M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-secure.c
Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.
commit : d0c23026b2499ba9d6797359241ade076a5a677d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 15:17:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 24 Jul 2011 15:17:51 -0400
This disables an entirely unnecessary "sanity check" that causes failures
in nonblocking mode, because OpenSSL complains if we move or compact the
write buffer. The only actual requirement is that we not modify pending
data once we've attempted to send it, which we don't. Per testing and
research by Martin Pihlak, though this fix is a lot simpler than his patch.
I put the same change into the backend, although it's less clear whether
it's necessary there. We do use nonblock mode in some situations in
streaming replication, so seems best to keep the same behavior in the
backend as in libpq.
Back-patch to all supported releases.
M src/backend/libpq/be-secure.c
M src/interfaces/libpq/fe-secure.c
In pg_upgrade on Windows, check if the directory is writable by actually creating and removing a file because access() doesn't work on that platform.
commit : 081a5518c0a7dcccfc76a12ae9d593648b68ce53
author : Bruce Momjian <bruce@momjian.us>
date : Sun, 24 Jul 2011 01:42:45 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Sun, 24 Jul 2011 01:42:45 -0400
Backpatch to 9.1 where this check was added.
M contrib/pg_upgrade/exec.c
Unbreak Windows builds broken by EDITOR_LINENUMBER_ARG change.
commit : e399eb74d96270bf1d4a0bb9f4503cac3d90c1e2
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 23 Jul 2011 19:33:17 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 23 Jul 2011 19:33:17 -0400
M src/bin/psql/command.c
Change EDITOR_LINENUMBER_SWITCH to an environment variable
commit : 79b3ca06d820032ad84446e0a021b56422172d86
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 24 Jul 2011 00:25:29 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 24 Jul 2011 00:25:29 +0300
Also change "switch" to "arg" because "switch" is a bit of a sloppy
term. So the environment variable is called
PSQL_EDITOR_LINENUMBER_ARG. Set "+" as hardcoded default value on
Unix (since "vi" is the hardcoded default editor), so many users won't
have to configure this at all. Move the documentation around a bit to
centralize the editor configuration under environment variables,
rather than repeating bits of it under every backslash command that
invokes an editor.
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/release-9.1.sgml
M src/bin/psql/command.c
M src/bin/psql/settings.h
Rethink behavior of CREATE OR REPLACE during CREATE EXTENSION.
commit : 988cccc620dd8c16d77f88ede167b22056176324
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 23 Jul 2011 16:59:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 23 Jul 2011 16:59:39 -0400
The original implementation simply did nothing when replacing an existing
object during CREATE EXTENSION. The folly of this was exposed by a report
from Marc Munro: if the existing object belongs to another extension, we
are left in an inconsistent state. We should insist that the object does
not belong to another extension, and then add it to the current extension
if not already a member.
M src/backend/catalog/heap.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_type.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/proclang.c
M src/backend/commands/tsearchcmds.c
M src/include/catalog/dependency.h
Unbreak unlogged tables.
commit : 6f1be5a67a758499beab0082b6e63b3040913268
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 22 Jul 2011 16:15:43 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 22 Jul 2011 16:15:43 -0400
I broke this in commit 5da79169d3e9f0fab47da03318c44075b3f824c5, which
was obviously insufficiently well tested. Add some regression tests
in the hope of making future slip-ups more likely to be noticed.
M src/backend/catalog/namespace.c
M src/test/regress/expected/create_table.out
M src/test/regress/sql/create_table.sql
In pg_upgrade, add C comment about why we don't try to do shared file writes for logging.
commit : 43aa40e1551b9e8d30b376de6d6a9b976ae54332
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 21 Jul 2011 17:12:35 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 21 Jul 2011 17:12:35 -0400
M contrib/pg_upgrade/pg_upgrade.h
Fix PQsetvalue() to avoid possible crash when adding a new tuple.
commit : a9f0dbc39df88ea7672352d3e7070d2603491bec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jul 2011 12:24:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jul 2011 12:24:14 -0400
PQsetvalue unnecessarily duplicated the logic in pqAddTuple, and didn't
duplicate it exactly either --- pqAddTuple does not care what is in the
tuple-pointer array positions beyond the last valid entry, whereas the
code in PQsetvalue assumed such positions would contain NULL. This led
to possible crashes if PQsetvalue was applied to a PGresult that had
previously been enlarged with pqAddTuple, for instance one built from a
server query. Fix by relying on pqAddTuple instead of duplicating logic,
and not assuming anything about the contents of res->tuples[res->ntups].
Back-patch to 8.4, where PQsetvalue was introduced.
Andrew Chernow
M src/interfaces/libpq/fe-exec.c
Make xpath() do something useful with XPath expressions that return scalars.
commit : 0ce7676aa03a2501fde949fea211ba5cd84c2ded
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jul 2011 11:32:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 21 Jul 2011 11:32:46 -0400
Previously, xpath() simply returned an empty array if the expression did
not yield a node set. This is useless for expressions that return scalars,
such as one with name() at the top level. Arrange to return the scalar
value as a single-element xml array, instead. (String values will be
suitably escaped.)
This change will also cause xpath_exists() to return true, not false,
for such expressions.
Florian Pflug, reviewed by Radoslaw Smogura
M doc/src/sgml/func.sgml
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
Ensure that xpath() escapes special characters in string values.
commit : aaf15e5c1cf8d2c27d2f9841343f00027762cb4e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 20 Jul 2011 18:44:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 20 Jul 2011 18:44:09 -0400
Without this it's possible for the output to not be legal XML, as
illustrated by the added regression test cases.
NB: this change will need to be called out as an incompatibility in the
9.2 release notes, since it's possible somebody was relying on the old
behavior, even though it's clearly wrong.
Florian Pflug, reviewed by Radoslaw Smogura
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
In pg_upgrade, fix the -l/log option to work on Windows.
commit : 17a16eeb7c4fd0c6dce80521247a20d76706b2bb
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 20 Jul 2011 18:31:03 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 20 Jul 2011 18:31:03 -0400
Also, double-quote the log file name in all places, to allow (on all
platforms) log file names with spaces.
Back patch to 9.0 and 9.1.
M contrib/pg_upgrade/check.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
In pg_upgrade, use pg_strudup(), for consistency.
commit : 6b43fddee4cbc1bca71546e15e898d19bee7bcb1
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 20 Jul 2011 16:37:17 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 20 Jul 2011 16:37:17 -0400
M contrib/pg_upgrade/util.c
Support SECURITY LABEL on databases, tablespaces, and roles.
commit : 463f2625a5fb183b6a8925ccde98bb3889f921d9
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 13:18:24 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 13:18:24 -0400
This requires a new shared catalog, pg_shseclabel.
Along the way, fix the security_label regression tests so that they
don't monkey with the labels of any pre-existing objects. This is
unlikely to matter in practice, since only the label for the "dummy"
provider was being manipulated. But this way still seems cleaner.
KaiGai Kohei, with fairly extensive hacking by me.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/security_label.sgml
M src/backend/catalog/Makefile
M src/backend/catalog/catalog.c
M src/backend/catalog/system_views.sql
M src/backend/commands/dbcommands.c
M src/backend/commands/seclabel.c
M src/backend/commands/tablespace.c
M src/backend/commands/user.c
M src/backend/parser/gram.y
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/include/catalog/catversion.h
M src/include/catalog/indexing.h
A src/include/catalog/pg_shseclabel.h
M src/include/commands/seclabel.h
M src/test/regress/expected/rules.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/input/security_label.source
M src/test/regress/output/security_label.source
Rewrite libxml error handling to be more robust.
commit : cacd42d62cb2ddf32135b151f627780a5509780f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 20 Jul 2011 13:03:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 20 Jul 2011 13:03:12 -0400
libxml reports some errors (like invalid xmlns attributes) via the error
handler hook, but still returns a success indicator to the library caller.
This causes us to miss some errors that are important to report. Since the
"generic" error handler hook doesn't know whether the message it's getting
is for an error, warning, or notice, stop using that and instead start
using the "structured" error handler hook, which gets enough information
to be useful.
While at it, arrange to save and restore the error handler hook setting in
each libxml-using function, rather than assuming we can set and forget the
hook. This should improve the odds of working nicely with third-party
libraries that also use libxml.
In passing, volatile-ize some local variables that get modified within
PG_TRY blocks. I noticed this while testing with an older gcc version
than I'd previously tried to compile xml.c with.
Florian Pflug and Tom Lane, with extensive review/testing by Noah Misch
M configure
M configure.in
M contrib/xml2/xpath.c
M contrib/xml2/xslt_proc.c
M src/backend/utils/adt/xml.c
M src/include/pg_config.h.in
M src/include/utils/xml.h
M src/test/regress/expected/xml.out
M src/test/regress/expected/xml_1.out
M src/test/regress/sql/xml.sql
Improve sepgsql and SECURITY LABEL documentation.
commit : d79a601fd9ec59772395d16b33fe79296021a350
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 09:22:57 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 09:22:57 -0400
KaiGai Kohei, based on feedback from Yeb Havinga, with some
corrections by me.
M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/sepgsql.sgml
Minor improvement to pg_seclabel documentation.
commit : 550cd074f9436c0500c1718e792d3d72a304bf8b
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 09:12:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 20 Jul 2011 09:12:42 -0400
This is a bit more consistent with the way pg_description is
documented, and also include a useful cross-link.
M doc/src/sgml/catalogs.sgml
Make isolationtester more robust on locked commands
commit : c8dfc892327b1a1e14efe110b0f1f267ef56c7a9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 14:22:42 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 14:22:42 -0400
Noah Misch diagnosed the buildfarm problems in the isolation tests
partly as failure to differentiate backends properly; the old code was
using backend IDs, which is not good enough because a new backend might
use an already used ID. Use PIDs instead.
Also, the code was purposely careless about other concurrent activity,
because it isn't expected; and in fact, it doesn't affect the vast
majority of the time. However, it can be observed that autovacuum can
block tables for long enough to cause sporadic failures. The new code
accounts for that by ignoring locks held by processes not explicitly
declared in our spec file.
Author: Noah Misch
M src/test/isolation/isolationtester.c
Increase deadlock_timeout to 100ms in FK isolation tests
commit : d6db0e4e0e382cd5683a767424d05a0361af232a
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 13:07:16 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 13:07:16 -0400
The previous value of 20ms is dangerously close to the time actually
spent just waiting for the deadlock to happen, so on occasion it causes
the test to fail simply because the other session didn't get to run
early enough, not managing to cause the deadlock that needs to be
detected. With this new value, it's expected that most machines on
normal load will be able to pass the test.
Author: Noah Misch
M src/test/isolation/specs/fk-deadlock.spec
M src/test/isolation/specs/fk-deadlock2.spec
Add expected regress output on stricter isolation levels
commit : a0eae1a2eeb6c0e9deffeccad2f9921d8e561fb5
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 12:43:16 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 19 Jul 2011 12:43:16 -0400
These new files allow the new FK tests on isolationtester to pass on the
serializable and repeatable read isolation levels (which are untested
by the buildfarm).
Author: Kevin Grittner
Reviewed by Noah Misch
A src/test/isolation/expected/fk-deadlock2_1.out
A src/test/isolation/expected/fk-deadlock2_2.out
A src/test/isolation/expected/fk-deadlock_1.out
Remove O(N^2) performance issue with multiple SAVEPOINTs. Subtransaction locks now released en masse at main commit, rather than repeatedly re-scanning for locks as we ascend the nested transaction tree. Split transaction state TBLOCK_SUBEND into two states, TBLOCK_SUBCOMMIT and TBLOCK_SUBRELEASE to allow the commit path to be optimised using the existing code in ResourceOwnerRelease() which appears to have been intended for this usage, judging from comments therein.
commit : 7cb7122800ec996d4849ce9b4ad3065db19a2aae
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 17:21:24 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 17:21:24 +0100
M src/backend/access/transam/xact.c
Some refinement for the "fast path" lock patch.
commit : 8e5ac74c1249820ca55481223a95b9124b4a4f95
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 19 Jul 2011 12:10:15 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 19 Jul 2011 12:10:15 -0400
1. In GetLockStatusData, avoid initializing instance before we've ensured
that the array is large enough. Otherwise, if repalloc moves the block
around, we're hosed.
2. Add the word "Relation" to the name of some identifiers, to avoid
assuming that the fast-path mechanism will only ever apply to relations
(though these particular parts certainly will). Some of the macros
could possibly use similar treatment, but the names are getting awfully
long already.
3. Add a missing word to comment in AtPrepare_Locks().
M src/backend/storage/lmgr/lock.c
Remove superfluous variable.
commit : cdd61237d6265fa355afa772ca3eee39e4905bcb
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 19 Jul 2011 10:30:03 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 19 Jul 2011 10:30:03 -0400
Reported by Peter Eisentraut.
M src/backend/commands/indexcmds.c
Minor doc additions for cascading replication.
commit : 6ba77bce9378cb9c5fb89a4d30bf77c2a17b0d64
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 09:07:42 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 09:07:42 +0100
M doc/src/sgml/config.sgml
M doc/src/sgml/monitoring.sgml
Introduce sending servers as new category for replication params
commit : 4bd8ed31b76fde16ee00c123751e25019e4d9854
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 08:59:55 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 08:59:55 +0100
Fujii Masao
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/utils/guc_tables.h
Fix typo
commit : 6307fff3586294214e3f256035b82bbba9a9054a
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 08:02:34 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 08:02:34 +0300
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.linux.utf8.sql
M src/test/regress/sql/collate.sql
Put inline declaration before return type
commit : bf6be7af2532da6674dcb9335c0953044a787427
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 07:57:38 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 07:57:38 +0300
gcc -Wextra complains that the other way around is obsolescent, and
this was the only place where it was written in this order.
M contrib/fuzzystrmatch/fuzzystrmatch.c
Change debug message from ereport to elog
commit : 30f854537d0d2e9220976fe7016c909daabea612
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 07:50:10 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 19 Jul 2011 07:50:10 +0300
M src/backend/storage/file/reinit.c
Cascading replication feature for streaming log-based replication. Standby servers can now have WALSender processes, which can work with either WALReceiver or archive_commands to pass data. Fully updated docs, including new conceptual terms of sending server, upstream and downstream servers. WALSenders terminated when promote to master.
commit : 5286105800c7d5902f98f32e11b209c471c0c69c
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 03:40:03 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 19 Jul 2011 03:40:03 +0100
Fujii Masao, review, rework and doc rewrite by Simon Riggs
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
M src/backend/access/transam/xlog.c
M src/backend/postmaster/postmaster.c
M src/backend/replication/basebackup.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
M src/include/replication/walsender.h
Add GET STACKED DIAGNOSTICS plpgsql command to retrieve exception info.
commit : 3d4890c0c5d27dfdf7d1a8816d7bdcdba3c39d21
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 18 Jul 2011 14:46:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 18 Jul 2011 14:46:27 -0400
This is more SQL-spec-compliant, more easily extensible, and better
performing than the old method of inventing special variables.
Pavel Stehule, reviewed by Shigeru Hanada and David Wheeler
M doc/src/sgml/plpgsql.sgml
M src/backend/utils/errcodes.txt
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Adapted expected result for latest change to ecpglib.
commit : 3406dd22fdd794d90c75a1272a57db8faa7c826d
author : Michael Meskes <meskes@postgresql.org>
date : Mon, 18 Jul 2011 18:56:15 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Mon, 18 Jul 2011 18:56:15 +0200
M src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr
Avoid index rebuild for no-rewrite ALTER TABLE .. ALTER TYPE.
commit : 367bc426a1c22b9f6badb06cd41fc438fd034639
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 18 Jul 2011 11:02:48 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 18 Jul 2011 11:02:48 -0400
Noah Misch. Review and minor cosmetic changes by me.
M doc/src/sgml/xindex.sgml
M src/backend/bootstrap/bootparse.y
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/storage.c
M src/backend/catalog/toasting.c
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/tcop/utility.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/relmapper.c
M src/include/catalog/heap.h
M src/include/catalog/index.h
M src/include/catalog/storage.h
M src/include/commands/defrem.h
M src/include/nodes/parsenodes.h
M src/include/utils/relcache.h
Made ecpglib write double with a precision of 15 digits.
commit : 8f8a273c4d2433de57f6f0356f44ab47b7387641
author : Michael Meskes <meskes@postgresql.org>
date : Mon, 18 Jul 2011 16:25:27 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Mon, 18 Jul 2011 16:25:27 +0200
Patch originally by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
M src/interfaces/ecpg/ecpglib/execute.c
Create a "fast path" for acquiring weak relation locks.
commit : 3cba8999b343648c4c528432ab3d51400194e93b
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 28 May 2011 19:52:00 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 28 May 2011 19:52:00 -0400
When an AccessShareLock, RowShareLock, or RowExclusiveLock is requested
on an unshared database relation, and we can verify that no conflicting
locks can possibly be present, record the lock in a per-backend queue,
stored within the PGPROC, rather than in the primary lock table. This
eliminates a great deal of contention on the lock manager LWLocks.
This patch also refactors the interface between GetLockStatusData() and
pg_lock_status() to be a bit more abstract, so that we don't rely so
heavily on the lock manager's internal representation details. The new
fast path lock structures don't have a LOCK or PROCLOCK structure to
return, so we mustn't depend on that for purposes of listing outstanding
locks.
Review by Jeff Davis.
M doc/src/sgml/catalogs.sgml
M src/backend/postmaster/postmaster.c
M src/backend/storage/lmgr/README
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/adt/lockfuncs.c
M src/include/catalog/pg_proc.h
M src/include/storage/lock.h
M src/include/storage/proc.h
M src/test/regress/expected/rules.out
Remove claim that the project is not represented in the SQL working group
commit : 7ed8f6c517ba6bada6bfb9a4dd4216e3b97bc2ba
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jul 2011 07:30:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jul 2011 07:30:00 +0300
We have a few people involved there now.
M doc/src/sgml/features.sgml
Note that information_schema.sql_languages was removed in SQL:2008
commit : 3835855589d8fe8bd5ea0fa51a5a539756223612
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jul 2011 07:26:30 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 18 Jul 2011 07:26:30 +0300
M doc/src/sgml/information_schema.sgml
Add pg_opfamily_is_visible.
commit : b59d2fe4970e689a50e802960ef0812acaf88221
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 17 Jul 2011 23:23:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 17 Jul 2011 23:23:55 -0400
We already have similar functions for many other object types, including
operator classes, so it seems like we should have this one, too.
Extracted from a larger patch by Josh Kupershmidt
M doc/src/sgml/func.sgml
M src/backend/catalog/namespace.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
Further thoughts about temp_file_limit patch.
commit : 9473bb96d0eb7ed73f1bf5269613e6266f64ad85
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 17 Jul 2011 15:05:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 17 Jul 2011 15:05:44 -0400
Move FileClose's decrement of temporary_files_size up, so that it will be
executed even if elog() throws an error. This is reasonable since if the
unlink() fails, the fact the file is still there is not our fault, and we
are going to forget about it anyhow. So we won't count it against
temp_file_limit anymore.
Update fileSize and temporary_files_size correctly in FileTruncate.
We probably don't have any places that truncate temp files, but fd.c
surely should not assume that.
M src/backend/storage/file/fd.c
Add temp_file_limit GUC parameter to constrain temporary file space usage.
commit : 23e5b16c71f2706978c5f54aabd28ed23a54b6a5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 17 Jul 2011 14:19:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 17 Jul 2011 14:19:31 -0400
The limit is enforced against the total amount of temp file space used by
each session.
Mark Kirkwood, reviewed by Cédric Villemain and Tatsuo Ishii
M doc/src/sgml/config.sgml
M src/backend/storage/file/fd.c
M src/backend/utils/errcodes.txt
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/utils/guc.h
M src/include/utils/guc_tables.h
Improve make_subplanTargetList to avoid including Vars unnecessarily.
commit : 1bc16a946008a7cbb33a9a06a7c6765a807d7f59
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 16:46:55 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 16:46:55 -0400
If a Var was used only in a GROUP BY expression, the previous
implementation would include the Var by itself (as well as the expression)
in the generated targetlist. This wouldn't affect the efficiency of the
scan/join part of the plan at all, but it could result in passing
unnecessarily-wide rows through sorting and grouping steps. It turns out
to take only a little more code, and not noticeably more time, to generate
a tlist without such redundancy, so let's do that. Per a recent gripe from
HarmeekSingh Bedi.
M src/backend/optimizer/plan/planner.c
Replace errdetail("%s", ...) with errdetail_internal("%s", ...).
commit : 1af37ec96d97722aeb527f5f43d6f6f2304f0861
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 14:21:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 14:21:12 -0400
There may be some other places where we should use errdetail_internal,
but they'll have to be evaluated case-by-case. This commit just hits
a bunch of places where invoking gettext is obviously a waste of cycles.
M contrib/dblink/dblink.c
M src/backend/commands/trigger.c
M src/backend/commands/user.c
M src/backend/libpq/auth.c
M src/backend/nodes/print.c
M src/backend/storage/lmgr/deadlock.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/xml.c
M src/backend/utils/fmgr/dfmgr.c
M src/backend/utils/misc/guc.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c
Use errdetail_internal() for SSI transaction cancellation details.
commit : 3ee7c8710defb63490d90cfff09a773d764aa05d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 13:49:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 13:49:44 -0400
Per discussion, these seem too technical to be worth translating.
Kevin Grittner
M src/backend/storage/lmgr/predicate.c
Add an errdetail_internal() ereport auxiliary routine.
commit : ed7ed76712263717477487d326d3e86cfb0ad31c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 13:41:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Jul 2011 13:41:48 -0400
This function supports untranslated detail messages, in the same way that
errmsg_internal supports untranslated primary messages. We've needed this
for some time IMO, but discussion of some cases in the SSI code provided
the impetus to actually add it.
Kevin Grittner, with minor adjustments by me
M doc/src/sgml/sources.sgml
M src/backend/utils/error/elog.c
M src/include/utils/elog.h
Fix SSPI login when multiple roundtrips are required
commit : 0886dde5f83611d1d84a29cb3c4549bf6588668e
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 16 Jul 2011 19:58:53 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 16 Jul 2011 19:58:53 +0200
This fixes SSPI login failures showing "The function
requested is not supported", often showing up when connecting
to localhost. The reason was not properly updating the SSPI
handle when multiple roundtrips were required to complete the
authentication sequence.
Report and analysis by Ahmed Shinwari, patch by Magnus Hagander
M src/backend/libpq/auth.c
Set different deadlock_timeout on each session in new isolation tests
commit : d71197cd35db0b0e66120f37443be6a5dfc2669d
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 15 Jul 2011 18:43:33 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 15 Jul 2011 18:43:33 -0400
This provides deterministic deadlock-detection ordering for new
isolation tests, fixing the sporadic failures in them.
Author: Noah Misch
M src/test/isolation/expected/fk-deadlock.out
M src/test/isolation/expected/fk-deadlock2.out
M src/test/isolation/specs/fk-deadlock.spec
M src/test/isolation/specs/fk-deadlock2.spec
Set information_schema.tables.commit_action to null
commit : bf3c5856818a88b963748402f4f7e0274fe3859d
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jul 2011 21:11:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 15 Jul 2011 21:11:14 +0300
The commit action of temporary tables is currently not cataloged, so
we can't easily show it. The previous value was outdated from before
we had different commit actions.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Doc clarification for pg_locks columns.
commit : c1129a14e192755e001ba7899d4a9ca216e4ec3c
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jul 2011 13:12:36 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 15 Jul 2011 13:12:36 -0400
Florian Pflug
M doc/src/sgml/catalogs.sgml
Change the way the offset of downlink is stored in GISTInsertStack. GISTInsertStack.childoffnum used to mean "offset of the downlink in this node, pointing to the child node in the stack". It's now replaced with downlinkoffnum, which means "offset of the downlink in the parent of this node". gistFindPath() already used childoffnum with this new meaning, and had an extra step at the end to pull all the childoffnum values down one node in the stack, to adjust the stack for the meaning that childoffnum had elsewhere. That's no longer required.
commit : 8d260911e8de9c3e55bfcc4b4b9f0b5848a5c9f7
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 15 Jul 2011 12:11:17 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 15 Jul 2011 12:11:17 +0300
The reason to do this now is this new representation is more convenient for
the GiST fast build patch that Alexander Korotkov is working on.
While we're at it, replace the linked list used in gistFindPath with a
standard List, and make gistFindPath() static.
Alexander Korotkov, with some changes by me.
M src/backend/access/gist/gist.c
M src/include/access/gist_private.h
Fix two ancient bugs in GiST code to re-find a parent after page split:
commit : bc175eb8051510a3edd2a561fcfac476e511177c
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 15 Jul 2011 10:54:56 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 15 Jul 2011 10:54:56 +0300
First, when following a right-link, we incorrectly marked the current page
as the parent of the right sibling. In reality, the parent of the right page
is the same as the parent of the current page (or some page to the right of
it, gistFindCorrectParent() will sort that out).
Secondly, when we follow a right-link, we must prepend, not append, the right
page to our list of pages to visit. That's because we assume that once we
hit a leaf page in the list, all the rest are leaf pages too, and give up.
To hit these bugs, you need concurrent actions and several unlucky accidents.
Another backend must split the root page, while you're in process of
splitting a lower-level page. Furthermore, while you scan the internal nodes
to re-find the parent, another backend needs to again split some more internal
pages. Even then, the bugs don't necessarily manifest as user-visible errors
or index corruption.
While we're at it, make the error reporting a bit better if gistFindPath()
fails to re-find the parent. It used to be an assertion, but an elog() seems
more appropriate.
Backpatch to all supported branches.
M src/backend/access/gist/gist.c
In docs, start window function sentence with "The asterisk (*)" rather than "*"; it is confusing to start a sentence with a symbol.
commit : 1be9cdf6aa635a038b37076c29943b7cb262eb4b
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 14 Jul 2011 17:59:12 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 14 Jul 2011 17:59:12 -0400
M doc/src/sgml/syntax.sgml
In planner, don't assume that empty parent tables aren't really empty.
commit : f3ff0433ab32fdc69da3c8f8e691ef6b4366559c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 14 Jul 2011 17:30:57 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 14 Jul 2011 17:30:57 -0400
There's a heuristic in estimate_rel_size() to clamp the minimum size
estimate for a table to 10 pages, unless we can see that vacuum or analyze
has been run (and set relpages to something nonzero, so this will always
happen for a table that's actually empty). However, it would be better
not to do this for inheritance parent tables, which very commonly are
really empty and can be expected to stay that way. Per discussion of a
recent pgsql-performance report from Anish Kejariwal. Also prevent it
from happening for indexes (although this is more in the nature of
documentation, since CREATE INDEX normally initializes relpages to
something nonzero anyway).
Back-patch to 9.0, because the ability to collect statistics across a
whole inheritance tree has improved the planner's estimates to the point
where this relatively small error makes a significant difference. In the
referenced report, merge or hash joins were incorrectly estimated as
cheaper than a nestloop with inner indexscan on the inherited table.
That was less likely before 9.0 because the lack of inherited stats would
have resulted in a default (and rather pessimistic) estimate of the cost
of a merge or hash join.
M src/backend/optimizer/util/plancat.c
Fix broken markup
commit : c529f8800e33bc969a9e5ce18294930837f279a2
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 14 Jul 2011 13:43:01 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 14 Jul 2011 13:43:01 -0400
M doc/src/sgml/information_schema.sgml
Set information_schema.routines.is_udt_dependent to NO
commit : f4678c205ab1394a5f0e4fe219027b26a507d941
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 19:18:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 19:18:17 +0300
It previously said YES, but that is incorrect.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Small update on suggested startup file locations
commit : a99d45b805ae3ca230d54222fd25a020fcaa6d5c
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 19:07:39 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 19:07:39 +0300
Debian/Ubuntu don't have a /etc/rc.d/ directory, so add some
alternative names as suggestions.
M doc/src/sgml/runtime.sgml
Remove README.mb.big5 and README.mb.jp
commit : 469a1087e26fb4e17db9449c05fd9b0df2ab5b0c
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 18:28:07 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 14 Jul 2011 18:28:07 +0300
They were wildly outdated.
D doc/README.mb.big5
D doc/README.mb.jp
Update some comments to clarify who does what in targetlist creation.
commit : 96f990e23bae0559ede95e94340d2fc918dfde44
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jul 2011 20:23:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 13 Jul 2011 20:23:09 -0400
No code changes; just avoid blaming query_planner for things it doesn't
really do.
M src/backend/optimizer/plan/planner.c
Implement information schema interval_type columns
commit : 0527a454ec1801358a1f6d873ae48dcc89a217cf
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 13 Jul 2011 20:30:40 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 13 Jul 2011 20:30:40 +0300
Also correct reporting of interval precision when field restrictions
are specified in the typmod.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Use clearer woring for pg_locks columns, identifying which items are related to lock objects.
commit : 80a1d16935099124047bc6faaf9f549130a172b3
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 13 Jul 2011 11:41:39 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 13 Jul 2011 11:41:39 -0400
M doc/src/sgml/catalogs.sgml
Blind attempt at fixing isolation_tester on Win32
commit : 0d29c375cc33a7b5a51ef1cb66ff9d7af1f7dfff
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 13 Jul 2011 01:10:26 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 13 Jul 2011 01:10:26 -0400
M src/tools/msvc/Mkvcbuild.pm
Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window.
commit : c1d9579dd8bf3c921ca6bc2b62c40da6d25372e5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 12 Jul 2011 18:23:55 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 12 Jul 2011 18:23:55 -0400
Regular aggregate functions in combination with, or within the arguments
of, window functions are OK per spec; they have the semantics that the
aggregate output rows are computed and then we run the window functions
over that row set. (Thus, this combination is not really useful unless
there's a GROUP BY so that more than one aggregate output row is possible.)
The case without GROUP BY could fail, as recently reported by Jeff Davis,
because sloppy construction of the Agg node's targetlist resulted in extra
references to possibly-ungrouped Vars appearing outside the aggregate
function calls themselves. See the added regression test case for an
example.
Fixing this requires modifying the API of flatten_tlist and its underlying
function pull_var_clause. I chose to make pull_var_clause's API for
aggregates identical to what it was already doing for placeholders, since
the useful behaviors turn out to be the same (error, report node as-is, or
recurse into it). I also tightened the error checking in this area a bit:
if it was ever valid to see an uplevel Var, Aggref, or PlaceHolderVar here,
that was a long time ago, so complain instead of ignoring them.
Backpatch into 9.1. The failure exists in 8.4 and 9.0 as well, but seeing
that it only occurs in a basically-useless corner case, it doesn't seem
worth the risks of changing a function API in a minor release. There might
be third-party code using pull_var_clause.
M src/backend/catalog/heap.c
M src/backend/commands/trigger.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/equivclass.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/preptlist.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/tlist.c
M src/backend/optimizer/util/var.c
M src/backend/utils/adt/selfuncs.c
M src/include/optimizer/clauses.h
M src/include/optimizer/tlist.h
M src/include/optimizer/var.h
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql
Add support for blocked commands in isolationtester
commit : 846af54dd5a77dc02feeb5e34283608012cfb217
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 12 Jul 2011 16:35:09 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 12 Jul 2011 16:35:09 -0400
This enables us to test that blocking commands (such as foreign keys
checks that conflict with some other lock) act as intended. The set of
tests that this adds is pretty minimal, but can easily be extended by
adding new specs.
The intention is that this will serve as a basis for ensuring that
further tweaks of locking implementation preserve (or improve) existing
behavior.
Author: Noah Misch
M src/test/isolation/README
A src/test/isolation/expected/fk-contention.out
A src/test/isolation/expected/fk-deadlock.out
A src/test/isolation/expected/fk-deadlock2.out
M src/test/isolation/isolation_schedule
M src/test/isolation/isolationtester.c
A src/test/isolation/specs/fk-contention.spec
A src/test/isolation/specs/fk-deadlock.spec
A src/test/isolation/specs/fk-deadlock2.spec
perltidy run over msvc build system
commit : fd6913a18955b0f89ca994b5036c103bcea23f28
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 12 Jul 2011 15:25:08 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 12 Jul 2011 15:25:08 +0100
M src/tools/msvc/Install.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/builddoc.pl
M src/tools/msvc/vcregress.pl
Make pg_upgrade output more consistent with project style
commit : 912bc4f038b3daaea4477c4b4e79fbd8c15e67a0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 12 Jul 2011 07:13:51 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 12 Jul 2011 07:13:51 +0300
Add errno-based output to error messages where appropriate, reformat
blocks to about 72 characters per line, use spaces instead of tabs for
indentation, and other style adjustments.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.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/page.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
Add C comment that txid_current() assigns an XID if one is not already assigned.
commit : afc9635c600ace716294a12d78abd37f65abd0ea
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 11 Jul 2011 20:32:29 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 11 Jul 2011 20:32:29 -0400
M src/backend/utils/adt/txid.c
Fix and clarify information schema interval_precision fields
commit : 3315020a091f64c8d08c3b32a2abd46431dcf857
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 11 Jul 2011 18:49:44 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 11 Jul 2011 18:49:44 +0300
The fields were previously wrongly typed as character_data; change to
cardinal_number. Update the documentation and the implementation to
show more clearly that this applies to a feature not available in
PostgreSQL, rather than just not yet being implemented in the
information schema.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Improve wording of documentation on default privileges.
commit : 75726307e6164673c48d6ce1d143a075b8ce18fa
author : Andrew Dunstan <andrew@dunslane.net>
date : Mon, 11 Jul 2011 11:12:34 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Mon, 11 Jul 2011 11:12:34 -0400
Per recent -hackers discussion.
M doc/src/sgml/ref/grant.sgml
Try to acquire relation locks in RangeVarGetRelid.
commit : 4240e429d0c2d889d0cda23c618f94e12c13ade7
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 8 Jul 2011 22:19:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 8 Jul 2011 22:19:30 -0400
In the previous coding, we would look up a relation in RangeVarGetRelid,
lock the resulting OID, and then AcceptInvalidationMessages(). While
this was sufficient to ensure that we noticed any changes to the
relation definition before building the relcache entry, it didn't
handle the possibility that the name we looked up no longer referenced
the same OID. This was particularly problematic in the case where a
table had been dropped and recreated: we'd latch on to the entry for
the old relation and fail later on. Now, we acquire the relation lock
inside RangeVarGetRelid, and retry the name lookup if we notice that
invalidation messages have been processed meanwhile. Many operations
that would previously have failed with an error in the presence of
concurrent DDL will now succeed.
There is a good deal of work remaining to be done here: many callers
of RangeVarGetRelid still pass NoLock for one reason or another. In
addition, nothing in this patch guards against the possibility that
the meaning of an unqualified name might change due to the creation
of a relation in a schema earlier in the user's search path than the
one where it was previously found. Furthermore, there's nothing at
all here to guard against similar race conditions for non-relations.
For all that, it's a start.
Noah Misch and Robert Haas
M src/backend/access/heap/heapam.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/commands/alter.c
M src/backend/commands/indexcmds.c
M src/backend/commands/lockcmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/vacuum.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_type.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteRemove.c
M src/backend/storage/ipc/sinval.c
M src/backend/storage/lmgr/lmgr.c
M src/backend/tcop/utility.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/adt/ruleutils.c
M src/include/catalog/namespace.h
M src/include/commands/trigger.h
M src/include/rewrite/rewriteRemove.h
M src/include/storage/sinval.h
M src/pl/plpgsql/src/pl_comp.c
Fix another oversight in logging of changes in postgresql.conf settings.
commit : 9d522cb35d8b4f266abadd0d019f68eb8802ae05
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 8 Jul 2011 17:02:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 8 Jul 2011 17:02:58 -0400
We were using GetConfigOption to collect the old value of each setting,
overlooking the possibility that it didn't exist yet. This does happen
in the case of adding a new entry within a custom variable class, as
exhibited in bug #6097 from Maxim Boguk.
To fix, add a missing_ok parameter to GetConfigOption, but only in 9.1
and HEAD --- it seems possible that some third-party code is using that
function, so changing its API in a minor release would cause problems.
In 9.0, create a near-duplicate function instead.
M src/backend/commands/extension.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Introduce a pipe between postmaster and each backend, which can be used to detect postmaster death. Postmaster keeps the write-end of the pipe open, so when it dies, children get EOF in the read-end. That can conveniently be waited for in select(), which allows eliminating some of the polling loops that check for postmaster death. This patch doesn't yet change all the loops to use the new mechanism, expect a follow-on patch to do that.
commit : 89fd72cbf26f5d2e3d86ab19c1ead73ab8fac0fe
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 18:27:49 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 18:27:49 +0300
This changes the interface to WaitLatch, so that it takes as argument a
bitmask of events that it waits for. Possible events are latch set, timeout,
postmaster death, and socket becoming readable or writeable.
The pipe method behaves slightly differently from the kill() method
previously used in PostmasterIsAlive() in the case that postmaster has died,
but its parent has not yet read its exit code with waitpid(). The pipe
returns EOF as soon as the process dies, but kill() continues to return
true until waitpid() has been called (IOW while the process is a zombie).
Because of that, change PostmasterIsAlive() to use the pipe too, otherwise
WaitLatch() would return immediately with WL_POSTMASTER_DEATH, while
PostmasterIsAlive() would claim it's still alive. That could easily lead to
busy-waiting while postmaster is in zombie state.
Peter Geoghegan with further changes by me, reviewed by Fujii Masao and
Florian Pflug.
M src/backend/access/transam/xlog.c
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/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/walwriter.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/storage/ipc/pmsignal.c
M src/include/postmaster/postmaster.h
M src/include/storage/latch.h
M src/include/storage/pmsignal.h
Fix one overflow and one signedness error, caused by the patch to calculate OLDSERXID_MAX_PAGE based on BLCKSZ. MSVC compiler warned about these.
commit : 9598afa3b0f7a7fdcf3740173346950b2bd5942c
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 17:28:27 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 17:28:27 +0300
M src/backend/storage/lmgr/predicate.c
Add item about Clang support to 9.1 release notes
commit : 7544064b15d290047e13078f4e99a8b677e79c54
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jul 2011 17:04:49 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jul 2011 17:04:49 +0300
M doc/src/sgml/release-9.1.sgml
Message style improvements
commit : f05c65090a964b30135236a90fc85986e0ca56a6
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jul 2011 07:37:04 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 8 Jul 2011 07:37:04 +0300
M doc/src/sgml/func.sgml
M src/backend/commands/alter.c
M src/backend/replication/basebackup.c
M src/backend/replication/walsender.c
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/text.out
Update examples for string-related functions.
commit : c59b8ba6cd48e0fc0c1be8d86d4a19e7bf37d7e0
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 19:34:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 19:34:19 -0400
In the example for decode(), show the bytea result in hex format,
since that's now the default. Use an E'' string in the example for
quote_literal(), so that it works regardless of the
standard_conforming_strings setting. On the functions-for-binary-strings
page, leave the examples as-is for readability, but add a note pointing out
that they are shown in escape format. Per comments from Thom Brown.
Also, improve the description for encode() and decode() a tad.
Backpatch to 9.0, where bytea_output was introduced.
M doc/src/sgml/func.sgml
Update 9.1 release notes to reflect commits through today.
commit : 997d5b488a9a580ef853256e188975f7ac05fb75
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 17:55:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 17:55:14 -0400
M doc/src/sgml/release-9.1.sgml
There's a small window wherein a transaction is committed but not yet on the finished list, and we shouldn't flag it as a potential conflict if so. We can also skip adding a doomed transaction to the list of possible conflicts because we know it won't commit.
commit : bdaabb9b22caa71021754d3967b4032b194d9880
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 00:36:30 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Fri, 8 Jul 2011 00:36:30 +0300
Dan Ports and Kevin Grittner.
M src/backend/storage/lmgr/predicate.c
SSI has a race condition, where the order of commit sequence numbers of transactions might not match the order the work done in those transactions become visible to others. The logic in SSI, however, assumed that it does. Fix that by having two sequence numbers for each serializable transaction, one taken before a transaction becomes visible to others, and one after it. This is easier than trying to make the the transition totally atomic, which would require holding ProcArrayLock and SerializableXactHashLock at the same time. By using prepareSeqNo instead of commitSeqNo in a few places where commit sequence numbers are compared, we can make those comparisons err on the safe side when we don't know for sure which committed first.
commit : 406d61835b97a801807913e0fc67eadd9c6a3ffa
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 7 Jul 2011 22:35:09 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 7 Jul 2011 22:35:09 +0300
Per analysis by Kevin Grittner and Dan Ports, but this approach to fix it
is different from the original patch.
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h
Fix use of unportable %m format
commit : d7fb49314defee9fdbfcf3847d0855ac6ef4d166
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 7 Jul 2011 21:21:57 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 7 Jul 2011 21:21:57 +0300
M contrib/pg_upgrade/file.c
Reclassify replication-related GUC variables as "master" and "standby".
commit : 60a81ad13374265cf9aecdc72daecd0410936779
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 15:10:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 15:10:32 -0400
Per discussion, this structure seems more understandable than what was
there before. Make config.sgml and postgresql.conf.sample agree.
In passing do a bit of editorial work on the variable descriptions.
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/utils/guc_tables.h
Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.
commit : 5b2b444f66363ee4132b9e398c0535fa59765a63
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 7 Jul 2011 15:05:21 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 7 Jul 2011 15:05:21 -0400
The value when BLCKSZ = 8192 is unchanged, but with larger-than-normal
block sizes we might need to crank things back a bit, as we'll have
more entries per page than normal in that case.
Kevin Grittner
M src/backend/storage/lmgr/predicate.c
Finish disabling reduced-lock-levels-for-DDL feature.
commit : a195e3c34f1eeb6a607c342121edf48e49067ea9
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 13:14:46 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 7 Jul 2011 13:14:46 -0400
Previous patch only covered the ALTER TABLE changes, not changes in other
commands; and it neglected to revert the documentation changes.
M doc/src/sgml/mvcc.sgml
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/rewrite/rewriteDefine.c
Fix a bug with SSI and prepared transactions:
commit : 928408d9e5b4b389897b799b3b6af505d719a3f6
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 7 Jul 2011 18:04:37 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 7 Jul 2011 18:04:37 +0300
If there's a dangerous structure T0 ---> T1 ---> T2, and T2 commits first,
we need to abort something. If T2 commits before both conflicts appear,
then it should be caught by OnConflict_CheckForSerializationFailure. If
both conflicts appear before T2 commits, it should be caught by
PreCommit_CheckForSerializationFailure. But that is actually run when
T2 *prepares*. Fix that in OnConflict_CheckForSerializationFailure, by
treating a prepared T2 as if it committed already.
This is mostly a problem for prepared transactions, which are in prepared
state for some time, but also for regular transactions because they also go
through the prepared state in the SSI code for a short moment when they're
committed.
Kevin Grittner and Dan Ports
M src/backend/storage/lmgr/predicate.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/expected/prepared_xacts_1.out
M src/test/regress/sql/prepared_xacts.sql
Fix comments over eagerly c&p'd.
commit : b2e3be41a604a36d6586c6e24d93349ca098f0c3
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 7 Jul 2011 03:53:49 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 7 Jul 2011 03:53:49 -0400
M src/tools/msvc/pgbison.bat
M src/tools/msvc/pgflex.bat
Reimplement pgbison and pgflex as perl scripts instead of bat files.
commit : c895e775a57072b075b230d60381ac432520b1a8
author : Andrew Dunstan <andrew@dunslane.net>
date : Wed, 6 Jul 2011 18:45:29 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Wed, 6 Jul 2011 18:45:29 -0400
In the process, remove almost all knowledge of individual .y and .l files,
and instead get invocation settings from the relevant make files.
The exception is plpgsql's gram.y, which has a target with a different
name. It is hoped that this will make the scripts more future-proof,
so that they won't require adjustment every time we add a new .l or .y
file.
The logic is also notably less tortured than that forced on us
by the idiosyncrasies of the Windows command processor.
The .bat files are kept as thin wrappers for the perl scripts.
M src/tools/msvc/pgbison.bat
A src/tools/msvc/pgbison.pl
M src/tools/msvc/pgflex.bat
A src/tools/msvc/pgflex.pl
Remove assumptions that not-equals operators cannot be in any opclass.
commit : 14f67192c25a130a354f3e3e6db3dfd49d2f5c86
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 6 Jul 2011 14:53:16 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 6 Jul 2011 14:53:16 -0400
get_op_btree_interpretation assumed this in order to save some duplication
of code, but it's not true in general anymore because we added <> support
to btree_gist. (We still assume it for btree opclasses, though.)
Also, essentially the same logic was baked into predtest.c. Get rid of
that duplication by generalizing get_op_btree_interpretation so that it
can be used by predtest.c.
Per bug report from Denis de Bernardy and investigation by Jeff Davis,
though I didn't use Jeff's patch exactly as-is.
Back-patch to 9.1; we do not support this usage before that.
M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_expr.c
M src/backend/utils/cache/lsyscache.c
M src/include/utils/lsyscache.h
Add \ir command to psql.
commit : c7f23494c1103f87bcf1ef7cbfcd626e73edb337
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 6 Jul 2011 11:45:13 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 6 Jul 2011 11:45:13 -0400
\ir is short for "include relative"; when used from a script, the
supplied pathname will be interpreted relative to the input file,
rather than to the current working directory.
Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further
cleanup by me.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/command.h
M src/bin/psql/help.c
M src/bin/psql/settings.h
M src/bin/psql/startup.c
M src/bin/psql/tab-complete.c
M src/include/port.h
M src/port/path.c
Attempt to standardize formatting of psql queries.
commit : 5ac6b767893281cab5c974b039400118851d548b
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 6 Jul 2011 10:11:20 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 6 Jul 2011 10:11:20 -0400
Most queries end with a backslash, but not a newline, so try to
standardize on that, for the convenience of people using psql -E to
extract queries.
Josh Kupershmidt, reviewed by Merlin Moncure.
M src/bin/psql/describe.c
Make the file_fdw validator check that a filename option has been provided.
commit : 6e6cc5910b6b5db5e3662dc389e749763e5717f5
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 18:46:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 18:46:03 -0400
This was already a runtime failure condition, but it's better to check
at validation time if possible. Lightly modified version of a patch
by Shigeru Hanada.
M contrib/file_fdw/file_fdw.c
M contrib/file_fdw/input/file_fdw.source
M contrib/file_fdw/output/file_fdw.source
Call FDW validator functions even when the options list is empty.
commit : 2e56fa863221d60d8bf8a8b946aaf8ba28ed05e7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 18:21:12 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 18:21:12 -0400
This is useful since a validator might want to require certain options
to be provided. The passed array is an empty text array in this case.
Per suggestion by Laurenz Albe, though this is not quite his patch.
M src/backend/commands/foreigncmds.c
Message style improvements of errmsg_internal() calls
commit : 9a0bdc8db5ceac574a2ae91cdf985499cd7c2b0c
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 22:56:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 22:56:55 +0300
M src/backend/libpq/auth.c
M src/backend/libpq/be-secure.c
M src/backend/port/pipe.c
M src/backend/port/win32/signal.c
M src/backend/port/win32/socket.c
M src/backend/port/win32/timer.c
M src/backend/postmaster/postmaster.c
Restructure foreign data wrapper chapter so it has more than one section.
commit : 3b3152853a13addc7eeab0e83a8e12f580d87e34
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 15:54:00 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 15:54:00 -0400
As noted by Laurenz Albe, our SGML tools deal rather oddly with chapters
having just one <sect1>. Perhaps the tooling could be fixed, but really
the design of this chapter's introduction is pretty bogus anyhow. Split
it into a true introduction and a <sect1> about the FDW functions, so
that it reads better and dodges the lack-of-a-chapter-TOC problem.
M doc/src/sgml/fdwhandler.sgml
Postgres -> PostgreSQL in error message
commit : 76dfcb942f37ebd6999c711d0e887ac42d6f138a
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 22:32:12 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 22:32:12 +0300
M contrib/pg_upgrade/controldata.c
Improve documentation about foreign data wrapper validator functions.
commit : 52a4255055f2f50c7f20917a47e2da04b8068fd6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 15:38:18 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 15:38:18 -0400
Modified version of a patch by Shigeru Hanada.
M doc/src/sgml/fdwhandler.sgml
Fix psql's counting of script file line numbers during COPY.
commit : cab19af9fb573f87b713b604a99799a6a242668b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 12:04:40 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 5 Jul 2011 12:04:40 -0400
handleCopyIn incremented pset.lineno for each line of COPY data read from
a file. This is correct when reading from the current script file (i.e.,
we are doing COPY FROM STDIN followed by in-line data), but it's wrong if
the data is coming from some other file. Per bug #6083 from Steve Haslam.
Back-patch to all supported versions.
M src/bin/psql/copy.c
Fix typo in sslmode documentation
commit : cd34647c666be867f95ef8fc0492c30356043f10
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jul 2011 09:45:19 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 5 Jul 2011 09:45:19 +0200
Per bug #6089, noted by Sidney Cadot
M doc/src/sgml/libpq.sgml
Message style tweaks
commit : 27af66162baed6a964466b92902accebdd5ae7c7
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 00:01:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 00:01:35 +0300
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/win32/crashdump.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/misc/guc.c
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/text.out
M src/test/regress/sql/foreign_data.sql
Small documentation tweaks
commit : d479a0f92fa9d28772d12fb461888efb3815480f
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 00:00:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 5 Jul 2011 00:00:14 +0300
M doc/src/sgml/config.sgml
Set user_defined_types.data_type to null
commit : 6fbc80349f601dc32f38b89a997913ea684b9f32
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 4 Jul 2011 23:09:42 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 4 Jul 2011 23:09:42 +0300
On re-reading the standard, this field is only used for distinct or
reference types.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Clarify that you need ActiveState perl 5.8 *or later* to build on Windows.
commit : e24662c4233ecdad9e55c184aedce9b114877b48
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 4 Jul 2011 22:30:27 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 4 Jul 2011 22:30:27 +0300
M doc/src/sgml/install-windows.sgml
Move Trigger and TriggerDesc structs out of rel.h into a new reltrigger.h
commit : b93f5a5673b4bb09e14eb80fe28aa21fc20a6271
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 23 Feb 2011 14:18:09 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 23 Feb 2011 14:18:09 -0300
This lets us stop including rel.h into execnodes.h, which is a widely
used header.
M contrib/dblink/dblink.c
M contrib/file_fdw/file_fdw.c
M contrib/lo/lo.c
M contrib/pageinspect/btreefuncs.c
M contrib/pageinspect/rawpage.c
M contrib/pgrowlocks/pgrowlocks.c
M contrib/pgstattuple/pgstatindex.c
M contrib/spi/autoinc.c
M contrib/spi/insert_username.c
M contrib/spi/moddatetime.c
M contrib/spi/refint.c
M contrib/spi/timetravel.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/gininsert.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistget.c
M src/backend/access/hash/hash.c
M src/backend/access/hash/hashutil.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/heap.c
M src/backend/catalog/indexing.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/toasting.c
M src/backend/commands/alter.c
M src/backend/commands/constraint.c
M src/backend/commands/copy.c
M src/backend/commands/explain.c
M src/backend/commands/extension.c
M src/backend/commands/schemacmds.c
M src/backend/commands/trigger.c
M src/backend/commands/typecmds.c
M src/backend/executor/execAmi.c
M src/backend/executor/execCurrent.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/nodeTidscan.c
M src/backend/executor/spi.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_utilcmd.c
M src/backend/postmaster/autovacuum.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/trigfuncs.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/fmgr/funcapi.c
M src/include/nodes/execnodes.h
M src/include/utils/rel.h
A src/include/utils/reltrigger.h
M src/pl/plperl/plperl.c
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c
M src/pl/tcl/pltcl.c
M src/test/regress/regress.c
Don't try to use a constraint name as domain name
commit : d665162077862ef9e5886f870bf5ce909fc9342c
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 4 Jul 2011 14:28:05 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 4 Jul 2011 14:28:05 -0400
The bug that caused this to be discovered is that the code was trying to
dereference a NULL or ill-defined pointer, as reported by Michael Mueller;
but what it was doing was wrong anyway, per Heikki.
This patch is Heikki's suggested fix.
M src/backend/commands/typecmds.c
Remove unused variable to silence compiler warning
commit : 9f084527a48f7c9ceb995d7bc39da63ae1941a3c
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 4 Jul 2011 18:03:17 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 4 Jul 2011 18:03:17 +0300
M src/backend/commands/typecmds.c
Remove missed reference to SilentMode.
commit : e54ae784e60e08edf7e9da07e452cb279386c603
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jul 2011 10:35:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 4 Jul 2011 10:35:52 -0400
M src/include/postmaster/postmaster.h
Remove silent_mode. You get the same functionality with "pg_ctl -l postmaster.log", or nohup.
commit : f7ea6beaf4ca02b8e6dc576255e35a5b86035cb9
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 4 Jul 2011 14:35:44 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 4 Jul 2011 14:35:44 +0300
There was a small issue with LINUX_OOM_ADJ and silent_mode, namely that with
silent_mode the postmaster process incorrectly used the OOM settings meant
for backend processes. We certainly could've fixed that directly, but since
silent_mode was redundant anyway, we might as well just remove it.
M doc/src/sgml/config.sgml
M src/backend/postmaster/postmaster.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
Alter test results to comply with new ALTER TABLE behaviour.
commit : f563afd433e07a2eb7db614005141f21613d4d61
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 4 Jul 2011 11:09:51 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 4 Jul 2011 11:09:51 +0100
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
Reset ALTER TABLE lock levels to AccessExclusiveLock in all cases. Locks on inheritance parent remain at lower level, as they were before. Remove entry from 9.1 release notes.
commit : 2c3d9db56d5d49bdc777b174982251c01348e3d8
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 4 Jul 2011 09:31:40 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 4 Jul 2011 09:31:40 +0100
M doc/src/sgml/release-9.1.sgml
M src/backend/commands/tablecmds.c
Fix omissions in documentation of the pg_roles view.
commit : 4fa046a39ebdaf4c9191ffff8a57b0759c52f3f3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 22:12:14 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 22:12:14 -0400
Somehow, column rolconfig got removed from the documentation of the
pg_roles view in the 9.0 cycle, although the column is actually still
there. In 9.1, we'd also forgotten to document the rolreplication column.
Spotted by Sakamoto Masahiko.
M doc/src/sgml/catalogs.sgml
Put comments on the installable procedural languages.
commit : 99e47ed0b2d2c559da813e679260e218f2c1d2ee
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 19:03:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 19:03:51 -0400
Per suggestion from Josh Kupershmidt.
M src/pl/plperl/plperl–1.0.sql
M src/pl/plperl/plperlu–1.0.sql
M src/pl/plpgsql/src/plpgsql–1.0.sql
M src/pl/plpython/plpython2u–1.0.sql
M src/pl/plpython/plpython3u–1.0.sql
M src/pl/plpython/plpythonu–1.0.sql
M src/pl/tcl/pltcl–1.0.sql
M src/pl/tcl/pltclu–1.0.sql
Fix bugs in relpersistence handling during table creation.
commit : 5da79169d3e9f0fab47da03318c44075b3f824c5
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 3 Jul 2011 17:34:47 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 3 Jul 2011 17:34:47 -0400
Unlike the relistemp field which it replaced, relpersistence must be
set correctly quite early during the table creation process, as we
rely on it quite early on for a number of purposes, including security
checks. Normally, this is set based on whether the user enters CREATE
TABLE, CREATE UNLOGGED TABLE, or CREATE TEMPORARY TABLE, but a
relation may also be made implicitly temporary by creating it in
pg_temp. This patch fixes the handling of that case, and also
disables creation of unlogged tables in temporary tablespace (such
table indeed skip WAL-logging, but we reject an explicit
specification) and creation of relations in the temporary schemas of
other sessions (which is not very sensible, and didn't work right
anyway).
Report by Amit Khandekar.
M src/backend/catalog/namespace.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/parser/parse_utilcmd.c
M src/include/catalog/namespace.h
M src/test/regress/expected/create_view.out
Make distprep and *clean build targets recurse into all subdirectories.
commit : acb9198b960caaa2fe9f31258116eaa7c1154093
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 13:55:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 3 Jul 2011 13:55:02 -0400
Certain subdirectories do not get built if corresponding options are not
selected at configure time. However, "make distprep" should visit such
directories anyway, so that constructing derived files to be included in
the tarball happens without requiring all configure options to be given
in the tarball build script. Likewise, it's better if cleanup actions
unconditionally visit all directories (for example, this ensures proper
cleanup if someone has done a manual make in such a subdirectory).
To handle this, set up a convention that subdirectories that are
conditionally included in SUBDIRS should be added to ALWAYS_SUBDIRS
instead when they are excluded.
Back-patch to 9.1, so that plpython's spiexceptions.h will get provided
in 9.1 tarballs. There don't appear to be any instances where distprep
actions got missed in previous releases, and anyway this fix requires
gmake 3.80 so we don't want to apply it before 9.1.
M contrib/Makefile
M src/Makefile.global.in
M src/bin/Makefile
M src/pl/Makefile
M src/pl/plpython/Makefile
Fix bat file quoting of %ENV.
commit : 19b7fac86d85c89f2c9173906722da70c6eebad2
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 3 Jul 2011 10:36:56 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 3 Jul 2011 10:36:56 -0400
M src/tools/msvc/install.bat
M src/tools/msvc/pgbison.bat
M src/tools/msvc/pgflex.bat
Mark pg_stat_reset_shared as strict
commit : 24e2d4b6ba99985d5b710983714f0133e94dc343
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 3 Jul 2011 13:15:58 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 3 Jul 2011 13:15:58 +0200
This is the proper fix for bug #6082 about
pg_stat_reset_shared(NULL) causing a crash, and it reverts
commit 79aa44536f3980d324f486504cde643ce23bf5c6 on head.
The workaround of throwing an error from inside the function is
left on backbranches (including 9.1) since this change requires
a new initdb.
M src/backend/utils/adt/pgstatfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
Suppress compiler warning about potentially uninitialized variable.
commit : 426cafc46c8bf5aeda38e8d17f1d86a48e627e43
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 1 Jul 2011 20:57:34 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 1 Jul 2011 20:57:34 -0400
Maybe some compilers are smart enough to not complain about the previous
coding ... but mine isn't.
M src/backend/commands/typecmds.c
In the pg_upgrade docs, move 50432 port mention to the place where we talk about client access.
commit : cc81d9969c6ac32f8482b3fc1a1775d212222fa7
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jul 2011 18:36:00 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jul 2011 18:36:00 -0400
M doc/src/sgml/pgupgrade.sgml
Change pg_upgrade to use port 50432 by default to avoid unintended client connections during the upgrade. Also rename data/bin/port environment variables to being with 'PG'. Also no longer honor PGPORT.
commit : a88f4496b75a756df371a405ce608ceb06c8fbd7
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jul 2011 18:17:12 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 1 Jul 2011 18:17:12 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h
M doc/src/sgml/pgupgrade.sgml
Enable CHECK constraints to be declared NOT VALID
commit : 897795240cfaaed724af2f53ed2c50c9862f951f
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 1 Jun 2011 18:43:50 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 1 Jun 2011 18:43:50 -0400
This means that they can initially be added to a large existing table
without checking its initial contents, but new tuples must comply to
them; a separate pass invoked by ALTER TABLE / VALIDATE can verify
existing data and ensure it complies with the constraint, at which point
it is marked validated and becomes a normal part of the table ecosystem.
An non-validated CHECK constraint is ignored in the planner for
constraint_exclusion purposes; when validated, cached plans are
recomputed so that partitioning starts working right away.
This patch also enables domains to have unvalidated CHECK constraints
attached to them as well by way of ALTER DOMAIN / ADD CONSTRAINT / NOT
VALID, which can later be validated with ALTER DOMAIN / VALIDATE
CONSTRAINT.
Thanks to Thom Brown, Dean Rasheed and Jaime Casanova for the various
reviews, and Robert Hass for documentation wording improvement
suggestions.
This patch was sponsored by Enova Financial.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/alter_domain.sgml
M doc/src/sgml/ref/alter_table.sgml
M src/backend/access/common/tupdesc.c
M src/backend/catalog/heap.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/gram.y
M src/backend/tcop/utility.c
M src/backend/utils/cache/relcache.c
M src/include/access/tupdesc.h
M src/include/catalog/heap.h
M src/include/commands/typecmds.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/domain.out
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/domain.sql
Fix outdated comment
commit : b36927fbe922d1aac5d6e42c04eecf65bf37f5f3
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 29 Jun 2011 19:39:33 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Wed, 29 Jun 2011 19:39:33 -0400
Extracted from a patch by Bernd Helmle
M src/backend/parser/parse_utilcmd.c
Restore correct btree preprocessing of "indexedcol IS NULL" conditions.
commit : a5652d3e05380edcd35236e94b924c8c105eaefd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Jun 2011 19:46:47 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 29 Jun 2011 19:46:47 -0400
Such a condition is unsatisfiable in combination with any other type of
btree-indexable condition (since we assume btree operators are always
strict). 8.3 and 8.4 had an explicit test for this, which I removed in
commit 29c4ad98293e3c5cb3fcdd413a3f4904efff8762, mistakenly thinking that
the case would be subsumed by the more general handling of IS (NOT) NULL
added in that patch. Put it back, and improve the comments about it, and
add a regression test case.
Per bug #6079 from Renat Nasyrov, and analysis by Dean Rasheed.
M src/backend/access/nbtree/nbtutils.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Move the PredicateLockRelation() call from nodeSeqscan.c to heapam.c. It's more consistent that way, since all the other PredicateLock* calls are made in various heapam.c and index AM functions. The call in nodeSeqscan.c was unnecessarily aggressive anyway, there's no need to try to lock the relation every time a tuple is fetched, it's enough to do it once.
commit : cd70dd6bef515a573a5af1756ce6a8b8406bb5d4
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Jun 2011 21:43:53 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Jun 2011 21:43:53 +0300
This has the user-visible effect that if a seq scan is initialized in the
executor, but never executed, we now acquire the predicate lock on the heap
relation anyway. We could avoid that by taking the lock on the first
heap_getnext() call instead, but it doesn't seem worth the trouble given
that it feels more natural to do it in heap_beginscan().
Also, remove the retail PredicateLockTuple() calls from heap_getnext(). In
a seqscan, started with heap_begin(), we're holding a whole-relation
predicate lock on the heap so there's no need to lock the tuples
individually.
Kevin Grittner and me
M src/backend/access/heap/heapam.c
M src/backend/executor/nodeSeqscan.c
M src/include/access/relscan.h
Grab predicate locks on matching tuples in a lossy bitmap heap scan. Non-lossy case was already handled correctly.
commit : d9fe63acb033141be695815a8a663de8dae4f8af
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Jun 2011 21:40:27 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 29 Jun 2011 21:40:27 +0300
Kevin Grittner
M src/backend/executor/nodeBitmapHeapscan.c
Protect pg_stat_reset_shared() against NULL input
commit : 79aa44536f3980d324f486504cde643ce23bf5c6
author : Magnus Hagander <magnus@hagander.net>
date : Wed, 29 Jun 2011 19:35:11 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Wed, 29 Jun 2011 19:35:11 +0200
Per bug #6082, reported by Steve Haslam
M src/backend/utils/adt/pgstatfuncs.c
Unify spelling of "canceled", "canceling", "cancellation"
commit : 21f1e15aafb13ab2430e831a3da7d4d4f525d1ce
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 29 Jun 2011 09:26:14 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 29 Jun 2011 09:26:14 +0300
We had previously (af26857a2775e7ceb0916155e931008c2116632f)
established the U.S. spellings as standard.
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/indexam.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/ref/set_transaction.sgml
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 doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.1.sgml
M src/backend/access/transam/xlog.c
M src/backend/commands/vacuum.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/lmgr/README-SSI
M src/backend/storage/lmgr/deadlock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/backend/utils/cache/relcache.c
M src/bin/psql/common.c
M src/bin/scripts/common.c
M src/port/path.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
Introduce compact WAL record for the common case of commit (non-DDL). XLOG_XACT_COMMIT_COMPACT leaves out invalidation messages and relfilenodes, saving considerable space for the vast majority of transaction commits. XLOG_XACT_COMMIT keeps same definition as XLOG_PAGE_MAGIC 0xD067 and earlier.
commit : 465883b0a2b4236ba6b31b648a9eabef3b7cdddb
author : Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 28 Jun 2011 22:58:17 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Tue, 28 Jun 2011 22:58:17 +0100
Leonardo Francalanci and Simon Riggs
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/include/access/xact.h
M src/include/access/xlog_internal.h
Remove rel.h from objectaddress.h; only relcache.h is necessary.
commit : 6f3efa76b042cdc457dba5bf8d8257f3ae83fb10
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 26 Mar 2011 00:10:07 -0300
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Sat, 26 Mar 2011 00:10:07 -0300
Add rel.h to some files that now need it.
M contrib/dummy_seclabel/dummy_seclabel.c
M src/backend/catalog/pg_collation.c
M src/backend/commands/collationcmds.c
M src/backend/commands/comment.c
M src/backend/commands/seclabel.c
M src/include/catalog/objectaddress.h
Modernise pg_hba.conf token processing
commit : e5e2fc842c418432756d8b5825ff107c6c5fc4c3
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 20 Jun 2011 17:20:14 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 20 Jun 2011 17:20:14 -0400
The previous coding was ugly, as it marked special tokens as such in the
wrong stage, relying on workarounds to figure out if they had been
quoted in the original or not. This made it impossible to have specific
keywords be recognized as such only in certain positions in HBA lines,
for example. Fix by restructuring the parser code so that it remembers
whether tokens were quoted or not. This eliminates widespread knowledge
of possible known keywords for all fields.
Also improve memory management in this area, to use memory contexts that
are reset as a whole instead of using retail pfrees; this removes a
whole lotta crufty (and probably slow) code.
Instead of calling strlen() three times in next_field_expand on the
returned token to find out whether there was a comma (and strip it),
pass back the info directly from the callee, which is simpler.
In passing, update historical artifacts in hba.c API.
Authors: Brendan Jurd, Alvaro Herrera
Reviewed by Pavel Stehule
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/include/libpq/hba.h
Implement the collation columns of various information schema views
commit : 615c3849722ade16282750aa17658a2543fd2acf
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Jun 2011 17:49:28 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Jun 2011 17:49:28 +0300
Fill in the collation columns of the views attributes, columns,
domains, and element_types. Also update collation information in
sql_implementation_info.
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Add composite-type attributes to information_schema.element_types view
commit : 5594d14696f916e4aad14a3a12a4c15d2e7123bc
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Jun 2011 16:07:23 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 28 Jun 2011 16:07:23 +0300
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Add a missing_ok argument to get_object_address().
commit : c533c1477f6beede766034c1226a20ac08320b05
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 21:17:25 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 21:17:25 -0400
This lays the groundwork for an upcoming patch to streamline the
handling of DROP commands.
KaiGai Kohei
M src/backend/catalog/objectaddress.c
M src/backend/commands/comment.c
M src/backend/commands/extension.c
M src/backend/commands/seclabel.c
M src/backend/rewrite/rewriteSupport.c
M src/include/catalog/objectaddress.h
M src/include/rewrite/rewriteSupport.h
Reduce impact of btree page reuse on Hot Standby by fixing off-by-1 error. WAL records of type XLOG_BTREE_REUSE_PAGE were generated using a latestRemovedXid one higher than actually needed because xid used was page opaque->btpo.xact rather than an actually removed xid. Noticed on an otherwise quiet system by Noah Misch.
commit : e1cd66f74862936d84acf3008118d6094c56ad58
author : Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 27 Jun 2011 22:12:09 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Mon, 27 Jun 2011 22:12:09 +0100
Noah Misch and Simon Riggs
M src/backend/access/nbtree/nbtpage.c
Allow callers to pass a missing_ok flag when opening a relation.
commit : 9abbed0629c862710bdc0f0dd3565e069ecab9da
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 15:06:32 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 15:06:32 -0400
Since the names try_relation_openrv() and try_heap_openrv() don't seem
quite appropriate, rename the functions to relation_openrv_extended()
and heap_openrv_extended(). This is also more general, if we have a
future need for additional parameters that are of interest to only a
few callers.
This is infrastructure for a forthcoming patch to allow
get_object_address() to take a missing_ok argument as well.
Patch by me, review by Noah Misch.
M src/backend/access/heap/heapam.c
M src/backend/parser/parse_relation.c
M src/include/access/heapam.h
M src/pl/tcl/pltcl.c
Try again to make the visibility map crash safe.
commit : e16954f3d27fa8e16c379ff6623ae18d6250a39c
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 13:55:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 13:55:55 -0400
My previous attempt was quite a bit less than half-baked with respect to
heap_update().
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/include/access/hio.h
Mention that SSPI authentication can use GSSAPI on non-Windows systems.
commit : 66a36ef949e4e6b8dbcc8a024eecfeca967d1d9c
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 10:38:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 10:38:45 -0400
As noted by Christian Ullrich.
M doc/src/sgml/client-auth.sgml
Avoid having two copies of the HOT-chain search logic.
commit : 4da99ea4231e3d8bbf28b666748c1028e7b7d665
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 10:27:17 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 27 Jun 2011 10:27:17 -0400
It's been like this since HOT was originally introduced, but the logic
is complex enough that this is a recipe for bugs, as we've already
found out with SSI. So refactor heap_hot_search_buffer() so that it
can satisfy the needs of index_getnext(), and make index_getnext() use
that rather than duplicating the logic.
This change was originally proposed by Heikki Linnakangas as part of a
larger refactoring oriented towards allowing index-only scans. I
extracted and adjusted this part, since it seems to have independent
merit. Review by Jeff Davis.
M src/backend/access/heap/heapam.c
M src/backend/access/index/genam.c
M src/backend/access/index/indexam.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/include/access/heapam.h
M src/include/access/relscan.h
Add some strings that were not marked for translation
commit : 8c8745b298d20b49e64c77c1e4ba4c8ac300e9e6
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 15:46:21 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 15:46:21 +0300
M src/bin/pg_ctl/pg_ctl.c
Remove redundant DEF_PGPORT handling
commit : 4635d3c527916555773a6eb128fb4a410d585d9d
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 15:40:55 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 15:40:55 +0300
DEF_PGPORT already comes in from pg_config.h, so we don't need to pass
it in again with a -D option. Apparently a leftover from the shell
script conversion.
M src/bin/pg_ctl/Makefile
Add missing file to GETTEXT_FILES
commit : cc06e4a1aae0858603fbb56c021e5504458d2f15
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 00:58:35 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 00:58:35 +0300
This doesn't actually change the resulting set of strings, but better
be correct.
M src/interfaces/ecpg/ecpglib/nls.mk
Add the possibility to pass --flag arguments to xgettext calls
commit : cb5a7bc2dce4377036bd70a69b2b7b3bc821036f
author : Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 00:13:10 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Mon, 27 Jun 2011 00:13:10 +0300
The --flag argument can be used to tell xgettext the arguments of
which functions should be flagged with c-format in the PO files,
instead of guessing based on the presence of format specifiers, which
fails if no format specifiers are present but the translation
accidentally introduces one.
Appropriate flag settings have been added for each message catalog.
based on a patch by Christoph Berg for bug #6066
M src/backend/nls.mk
M src/bin/pg_dump/nls.mk
M src/bin/psql/nls.mk
M src/interfaces/ecpg/ecpglib/nls.mk
M src/interfaces/ecpg/preproc/nls.mk
M src/interfaces/libpq/nls.mk
M src/nls-global.mk
M src/pl/plperl/nls.mk
M src/pl/plpgsql/src/nls.mk
M src/pl/plpython/nls.mk
M src/pl/tcl/nls.mk
Refactor common gettext triggers
commit : 7a5a843a2a63636458397823f090d5e28a02b6a4
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:50:21 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:50:21 +0300
Put gettext trigger words that are common to the backend and backend
modules into a makefile variable to include everywhere, to avoid
error-prone repetitions.
M src/backend/nls.mk
M src/nls-global.mk
M src/pl/plperl/nls.mk
M src/pl/plpgsql/src/nls.mk
M src/pl/plpython/nls.mk
M src/pl/tcl/nls.mk
Replace tabs by spaces in makefile comment
commit : e8e2fba1fee225bdfeda82c2b9e14aa0cb13d2f0
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:38:29 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:38:29 +0300
M src/nls-global.mk
Make _ be automatically included in GETTEXT_TRIGGERS
commit : c6ef13937652850267e5422213af67144f4b5e1d
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:05:30 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 23:05:30 +0300
Since it's globally defined in c.h, it should be treated as a gettext
trigger everywhere.
M src/backend/nls.mk
M src/bin/initdb/nls.mk
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_config/nls.mk
M src/bin/pg_controldata/nls.mk
M src/bin/pg_ctl/nls.mk
M src/bin/pg_dump/nls.mk
M src/bin/pg_resetxlog/nls.mk
M src/bin/psql/nls.mk
M src/bin/scripts/nls.mk
M src/interfaces/ecpg/preproc/nls.mk
M src/nls-global.mk
M src/pl/plpgsql/src/nls.mk
Replace := by = in nls.mk files
commit : 1b11e239cac545b86886a30fa15ae1f7c2d6e385
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 20:08:38 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 20:08:38 +0300
It currently doesn't make a difference, but it's inconsistent with
most other usage, and it might interfere with a future patch, so I'll
change it all in a separate commit.
Also, replace tabs with spaces for alignment.
M src/backend/nls.mk
M src/bin/initdb/nls.mk
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_config/nls.mk
M src/bin/pg_controldata/nls.mk
M src/bin/pg_ctl/nls.mk
M src/bin/pg_dump/nls.mk
M src/bin/pg_resetxlog/nls.mk
M src/bin/psql/nls.mk
M src/bin/scripts/nls.mk
M src/interfaces/ecpg/ecpglib/nls.mk
M src/interfaces/ecpg/preproc/nls.mk
M src/interfaces/libpq/nls.mk
M src/pl/plperl/nls.mk
M src/pl/plpgsql/src/nls.mk
M src/pl/plpython/nls.mk
M src/pl/tcl/nls.mk
Remove some cruft from nls.mk files
commit : 314837ec3b00bb387f1bd601faa9d535fa2dc80b
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 15:36:15 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 26 Jun 2011 15:36:15 +0300
M src/bin/pg_ctl/nls.mk
M src/pl/plpgsql/src/nls.mk
Async dblink functions require a named connection, and therefore should use DBLINK_GET_NAMED_CONN rather than DBLINK_GET_CONN. Problem found by Peter Eisentraut and patch by Fujii Masao.
commit : 8af3596d6bb6cfffb57161a62aa2f7f56d5ea3eb
author : Joe Conway <mail@joeconway.com>
date : Sat, 25 Jun 2011 15:58:07 -0700
committer: Joe Conway <mail@joeconway.com>
date : Sat, 25 Jun 2011 15:58:07 -0700
M contrib/dblink/dblink.c
Documentation improvements for pg_locks with respect to SSI.
commit : eb03cff8208aa959aabb91aaac0e21fc88966409
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 24 Jun 2011 16:06:57 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 24 Jun 2011 16:06:57 -0400
Explain that querying pg_locks does not simultaneously lock both the
normal lock manager and the predicate lock manager.
Per discussion with Kevin Grittner.
M doc/src/sgml/catalogs.sgml
In pg_upgrade docs, clarify that link mode uses "hard" links.
commit : 194e6ee74b0282d0a7b8d0c815ea7204fc23cec9
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 23 Jun 2011 19:57:42 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 23 Jun 2011 19:57:42 -0400
Backpatch to 9.1 and 9.0.
M doc/src/sgml/pgupgrade.sgml
Add information schema views role_udt_grants, udt_privileges, user_defined_types
commit : d34e142c511c779a294ce96eee0e9ab535b24de3
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Jun 2011 22:12:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Jun 2011 22:12:46 +0300
M doc/src/sgml/information_schema.sgml
M src/backend/catalog/information_schema.sql
Add a bit of markup
commit : 2c262ea9fef2652fd51582a364c69708879398e3
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Jun 2011 08:03:38 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 23 Jun 2011 08:03:38 +0300
M doc/src/sgml/information_schema.sgml
Undo overly enthusiastic de-const-ification.
commit : 223be216afa13b708904ca1d72898f2ccf5cef40
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 23:03:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 23:03:11 -0400
s/const//g wasn't exactly what I was suggesting here ... parameter
declarations of the form "const structtype *param" are good and useful,
so put those occurrences back. Likewise, avoid casting away the const
in a "const void *" parameter.
M src/backend/storage/lmgr/predicate.c
In pg_upgrade, check that the binary and data directories are the same major version.
commit : 0b44818ead933f9a09c85045003eafbcb4b2f3bc
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 20:48:34 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 20:48:34 -0400
Backpatch to 9.1.
Dan McGee
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
In pg_upgrade, fix odd function parameter wrapping.
commit : 3b3c2cf18005fdf0175eacebd200cee924c5048a
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 19:30:12 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 19:30:12 -0400
M contrib/pg_upgrade/check.c
Update alternative expected file for recent sequence test changes.
commit : c6c4177f1084fec693a90c1e68aaa004768209de
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 19:28:51 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 19:28:51 -0400
M src/test/regress/expected/sequence_1.out
Revert "Don't select log_cnt in sequence regression tests."
commit : 6aab24d7bc82bb6ca022358e05182fa537db293e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 19:21:29 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 19:21:29 -0400
This reverts commit addf11f9a264417aa467d4e135b9a8afc59f172a.
The right fix for the problem is to update the alternative expected
file, not to lobotomize the test case.
M src/test/regress/expected/sequence.out
M src/test/regress/sql/sequence.sql
Rename pg_upgrade directory validation function, for clarity.
commit : effbe6ecb4848aee867ebd867d0978c5e81fa598
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 17:50:40 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 17:50:40 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
Adjust pg_upgrade check for pg_upgrade_support to happen after the binary directory has been validated.
commit : 559b114dd466db05125b9b88270988a994976a8d
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 17:47:23 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 17:47:23 -0400
Backpatch to 9.1.
Dan McGee
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h
Fix pg_upgrade status message capitalization mistake.
commit : b06ad7def83669f2ddd218a184956c38a5039b6d
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 14:48:59 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 22 Jun 2011 14:48:59 -0400
Backpatch to 9.1 and 9.0.
Dan McGee
M contrib/pg_upgrade/check.c
Add missing -I switch for VPATH builds.
commit : 9cc2c182fc20d5734b3a43834d4fb738b7d95bb3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 13:20:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 13:20:03 -0400
Per bug #6073 from Hartmut Raschick.
M src/backend/replication/Makefile
Fix symlink for errcodes.h so it works in VPATH builds from tarballs.
commit : 0ade8421b5b2c85185fdfddbd5833222e5d4146b
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 13:08:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 22 Jun 2011 13:08:08 -0400
backend/Makefile was treating errcodes.h as a header always generated
during build, but actually it's a header provided in tarballs. Hence,
must use the absolute-symlink recipe, not the relative-symlink one.
Per bug #6072 from Hartmut Raschick.
M src/backend/Makefile
Don't select log_cnt in sequence regression tests.
commit : addf11f9a264417aa467d4e135b9a8afc59f172a
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Jun 2011 09:39:31 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 22 Jun 2011 09:39:31 -0400
It's not entirely stable.
Per suggestion from Josh Kupershmidt.
M src/test/regress/expected/sequence.out
M src/test/regress/sql/sequence.sql
Remove pointless const qualifiers from function arguments in the SSI code. As Tom Lane pointed out, "const Relation foo" doesn't guarantee that you can't modify the data the "foo" pointer points to. It just means that you can't change the pointer to point to something else within the function, which is not very useful.
commit : 5da417f7c4b2adb5b2aa4d6c86354f8de87dcde9
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 22 Jun 2011 12:18:39 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 22 Jun 2011 12:18:39 +0300
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
Make the visibility map crash-safe.
commit : 503c7305a1e379f95649eef1a694d0c1dbdc674a
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 23:04:40 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 23:04:40 -0400
This involves two main changes from the previous behavior. First,
when we set a bit in the visibility map, emit a new WAL record of type
XLOG_HEAP2_VISIBLE. Replay sets the page-level PD_ALL_VISIBLE bit and
the visibility map bit. Second, when inserting, updating, or deleting
a tuple, we can no longer get away with clearing the visibility map
bit after releasing the lock on the corresponding heap page, because
an intervening crash might leave the visibility map bit set and the
page-level bit clear. Making this work requires a bit of interface
refactoring.
In passing, a few minor but related cleanups: change the test in
visibilitymap_set and visibilitymap_clear to throw an error if the
wrong page (or no page) is pinned, rather than silently doing nothing;
this case should never occur. Also, remove duplicate definitions of
InvalidXLogRecPtr.
Patch by me, review by Noah Misch.
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/transam/transam.c
M src/backend/access/transam/xlog.c
M src/backend/commands/vacuumlazy.c
M src/include/access/heapam.h
M src/include/access/hio.h
M src/include/access/htup.h
M src/include/access/transam.h
M src/include/access/visibilitymap.h
M src/include/access/xlog_internal.h
Add some regression tests for serial pseudotypes.
commit : 431ab0e82819b31fcd1e33ecb52c2cd3b4b41da7
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:57:08 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:57:08 -0400
Josh Kupershmidt
M src/test/regress/expected/sequence.out
M src/test/regress/sql/sequence.sql
Add smallserial pseudotype.
commit : 61307dccc5f2f352d7dfed5c13abf3f0e26ec85d
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:52:52 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:52:52 -0400
This is just like serial and bigserial, except it generates an int2
column rather than int4 or int8.
Mike Pultz, reviewed by Brar Piening and Josh Kupershmidt
M doc/src/sgml/datatype.sgml
M doc/src/sgml/ecpg.sgml
M doc/src/sgml/func.sgml
M src/backend/parser/parse_utilcmd.c
Make deadlock_timeout PGC_SUSET rather than PGC_SIGHUP.
commit : 7095003cbef630fe29c2299cc819fd37c691d0b0
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:32:30 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:32:30 -0400
This allows deadlock_timeout to be reduced for transactions that are
particularly likely to be involved in a deadlock, thus detecting it
more quickly. It is also potentially useful as a poor-man's deadlock
priority mechanism: a transaction with a high deadlock_timeout is less
likely to be chosen as the victim than one with a low
deadlock_timeout. Since that could be used to game the system, we
make this PGC_SUSET rather than PGC_USERSET.
At some point, it might be worth thinking about a more explicit
priority mechanism, since using this is far from fool-proof. But
let's see whether there's enough use case to justify the additional
work before we go down that route.
Noah Misch, reviewed by Shigeru Hanada
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc.c
Add notion of a "transform function" that can simplify function calls.
commit : 8f9fe6edce358f7904e0db119416b4d1080a83aa
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:15:24 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 22:15:24 -0400
Initially, we use this only to eliminate calls to the varchar()
function in cases where the length is not being reduced and, therefore,
the function call is equivalent to a RelabelType operation. The most
significant effect of this is that we can avoid a table rewrite when
changing a varchar(X) column to a varchar(Y) column, where Y > X.
Noah Misch, reviewed by me and Alexey Klyukin
M doc/src/sgml/catalogs.sgml
M src/backend/catalog/pg_proc.c
M src/backend/commands/tablecmds.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_clause.c
M src/backend/utils/adt/varchar.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_proc.h
M src/include/parser/parse_clause.h
M src/include/utils/builtins.h
Performance tuning advice for SSI.
commit : 771a9f69f70e0b4fa95347df7ab346e5bdbc85f2
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 21:54:36 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 21 Jun 2011 21:54:36 -0400
Kevin Grittner, with additional wordsmithing by me.
M doc/src/sgml/mvcc.sgml
Minor editing for README-SSI.
commit : a3290f655e12f43943bdabc9fd91477316af24a7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Jun 2011 18:00:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Jun 2011 18:00:09 -0400
Fix some grammatical issues, try to clarify a couple of proofs, make the
terminology more consistent.
M src/backend/storage/lmgr/README-SSI
Message style and spelling improvements
commit : e2a0cb1a803b8a4a2b705728e13d61e6d2b17a71
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 22 Jun 2011 00:33:20 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 22 Jun 2011 00:33:20 +0300
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistvacuum.c
M src/backend/commands/extension.c
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/replication/syncrep.c
M src/backend/utils/misc/guc.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/rowtypes.out
Apply upstream fix for blowfish signed-character bug (CVE-2011-2483).
commit : ca59dfa6f727fe3bf3a01904ec30e87f7fa5a67e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Jun 2011 14:41:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 21 Jun 2011 14:41:05 -0400
A password containing a character with the high bit set was misprocessed
on machines where char is signed (which is most). This could cause the
preceding one to three characters to fail to affect the hashed result,
thus weakening the password. The result was also unportable, and failed
to match some other blowfish implementations such as OpenBSD's.
Since the fix changes the output for such passwords, upstream chose
to provide a compatibility hack: password salts beginning with $2x$
(instead of the usual $2a$ for blowfish) are intentionally processed
"wrong" to give the same hash as before. Stored password hashes can
thus be modified if necessary to still match, though it'd be better
to change any affected passwords.
In passing, sync a couple other upstream changes that marginally improve
performance and/or tighten error checking.
Back-patch to all supported branches. Since this issue is already
public, no reason not to commit the fix ASAP.
M contrib/pgcrypto/crypt-blowfish.c
M contrib/pgcrypto/px-crypt.c
Adjust the alternative expected output file for prepared_xacts test case, used when max_prepared_transactions=0, for the recent changes in the test case.
commit : 38c0e7218065d9be47b16f2b36264bcefbabd046
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 17:07:10 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 17:07:10 +0300
M src/test/regress/expected/prepared_xacts_1.out
Fix bug in PreCommit_CheckForSerializationFailure. A transaction that has already been marked as PREPARED cannot be killed. Kill the current transaction instead.
commit : 1eea8e8a06bc718836c34b8f7da9420b38fc4851
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 14:32:11 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 14:32:11 +0300
One of the prepared_xacts regression tests actually hits this bug. I
removed the anomaly from the duplicate-gids test so that it fails in the
intended way, and added a new test to check serialization failures with
a prepared transaction.
Dan Ports
M src/backend/storage/lmgr/predicate.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/sql/prepared_xacts.sql
Fix bug introduced by recent SSI patch to merge ROLLED_BACK and MARKED_FOR_DEATH flags into one. We still need the ROLLED_BACK flag to mark transactions that are in the process of being rolled back. To be precise, ROLLED_BACK now means that a transaction has already been discounted from the count of transactions with the oldest xmin, but not yet removed from the list of active transactions.
commit : 7cb2ff9621a6129cc251f9d06bf23d3f9d426173
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 14:12:40 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 21 Jun 2011 14:12:40 +0300
Dan Ports
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h
Fix missed use of "cp -i" in an example, per Fujii Masao.
commit : 31e8ab4dd98dbe702df8b2029cf6e2424b12850e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Jun 2011 16:27:32 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Jun 2011 16:27:32 -0400
Also be more careful about markup: use & not just &.
M doc/src/sgml/backup.sgml
Fix thinko in previous patch for optimizing EXISTS-within-EXISTS.
commit : cd1f0d04bf06938c0ee5728fc8424d62bcf2eef3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Jun 2011 14:33:20 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 20 Jun 2011 14:33:20 -0400
When recursing after an optimization in pull_up_sublinks_qual_recurse, the
available_rels value passed down must include only the relations that are
in the righthand side of the new SEMI or ANTI join; it's incorrect to pull
up a sub-select that refers to other relations, as seen in the added test
case. Per report from BangarRaju Vadapalli.
While at it, rethink the idea of recursing below a NOT EXISTS. That is
essentially the same situation as pulling up ANY/EXISTS sub-selects that
are in the ON clause of an outer join, and it has the same disadvantage:
we'd force the two joins to be evaluated according to the syntactic nesting
order, because the lower join will most likely not be able to commute with
the ANTI join. That could result in having to form a rather large join
product, whereas the handling of a correlated subselect is not quite that
dumb. So until we can handle those cases better, #ifdef NOT_USED that
case. (I think it's okay to pull up in the EXISTS/ANY cases, because SEMI
joins aren't so inflexible about ordering.)
Back-patch to 8.4, same as for previous patch in this area. Fortunately
that patch hadn't made it into any shipped releases yet.
M src/backend/optimizer/prep/prepjointree.c
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
Remove extra copying of TupleDescs for heap_create_with_catalog
commit : a40a5d9468a5f9f11d355ebf07f7741f5c267588
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 17 Jun 2011 09:43:32 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Fri, 17 Jun 2011 09:43:32 -0400
Some callers were creating copies of tuple descriptors to pass to that
function, stating in code comments that it was necessary because it
modified the passed descriptor. Code inspection reveals this not to be
true, and indeed not all callers are passing copies in the first place.
So remove the extra ones and the misleading comments about this behavior
as well.
M src/backend/commands/cluster.c
M src/backend/executor/execMain.c
Fixed string in German translation that causes segfault.
commit : bddc35ac664bc16a8953d0d46bf85e80b78bc493
author : Michael Meskes <meskes@postgresql.org>
date : Mon, 20 Jun 2011 13:53:15 +0200
committer: Michael Meskes <meskes@postgresql.org>
date : Mon, 20 Jun 2011 13:53:15 +0200
Applied patch by Christoph Berg <cb@df7cb.de> to replace placeholder "%s" by
correct string.
M src/backend/po/de.po
Produce HISTORY file consistently as ASCII
commit : 811f1cec8cd39d426a824223e3c4a6fa5b0f856e
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 23:27:56 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 23:27:56 +0300
The release notes may contain non-ASCII characters (for contributor
names), which lynx converts to the encoding determined by the current
locale. The get output that is deterministic and easily readable by
everyone, we make lynx produce LATIN1 and then convert that to ASCII
with transliteration for the non-ASCII characters.
M doc/src/sgml/Makefile
Add REL9_1_STABLE to the set of branches tracked by git_changelog.
commit : 2ed81ebfaf2b4393b76fb36c121374da7ff563ec
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Jun 2011 14:16:41 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Jun 2011 14:16:41 -0400
M src/tools/git_changelog
Fix thinko in previous patch to always update pg_class.reltuples/relpages.
commit : 63513b207df618b52cf0bdf42c1ec3f6e9378f40
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Jun 2011 14:00:48 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 19 Jun 2011 14:00:48 -0400
I mis-simplified the test where ANALYZE decided if it could get away
without doing anything: under the new regime, that's never allowed. Per
bug #6068 from Jeff Janes. Back-patch to 8.4, just like previous patch.
M src/backend/commands/analyze.c
Capitalization fixes
commit : 8a8fbe7e799cfc0d8dc5ffef5640df6dac8acd6c
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 00:37:30 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 00:37:30 +0300
M doc/src/sgml/config.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/spi.sgml
M doc/src/sgml/storage.sgml
M src/backend/bootstrap/bootparse.y
M src/backend/port/ipc_test.c
M src/backend/port/win32/signal.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/ipc/sinvaladt.c
M src/backend/storage/lmgr/proc.c
M src/backend/storage/smgr/smgrtype.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/init/postinit.c
M src/interfaces/ecpg/ecpglib/execute.c
M src/test/examples/testlibpq2.c
M src/test/regress/pg_regress.c
Make external_pid_file world readable
commit : 223d14a984e677823bd4f865ff22e14dd3fe9b76
author : Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 00:34:32 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Sun, 19 Jun 2011 00:34:32 +0300
M src/backend/postmaster/postmaster.c
Remove redundant lib*dll.def rules from .gitignore
commit : 110c88d35cfcbe63dbb87a88d72f3e2a67a60f65
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 18 Jun 2011 18:26:35 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 18 Jun 2011 18:26:35 +0200
Since we now have a global rule in the root .gitignore,
there's no need to keep directory-specific ones as well.
Noted by Peter Eisentraut
M src/interfaces/ecpg/compatlib/.gitignore
M src/interfaces/ecpg/ecpglib/.gitignore
M src/interfaces/ecpg/pgtypeslib/.gitignore
M src/interfaces/libpq/.gitignore
Don't use "cp -i" in the example WAL archive_command.
commit : a2624c687db3a3edcf5995773e47e9fef3e62a8c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Jun 2011 19:13:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Jun 2011 19:13:03 -0400
This is a dangerous example to provide because on machines with GNU cp,
it will silently do the wrong thing and risk archive corruption. Worse,
during the 9.0 cycle somebody "improved" the discussion by removing the
warning that used to be there about that, and instead leaving the
impression that the command would work as desired on most Unixen.
It doesn't. Try to rectify the damage by providing an example that is safe
most everywhere, and then noting that you can try cp -i if you want but
you'd better test that.
In back-patching this to all supported branches, I also added an example
command for Windows, which wasn't provided before 9.0.
M doc/src/sgml/backup.sgml
Set FLEXIBLE_ARRAY_MEMBER to empty for MSVC.
commit : ddef31c15c663626fc1804467f4c2ce420598796
author : Andrew Dunstan <andrew@dunslane.net>
date : Fri, 17 Jun 2011 18:22:03 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Fri, 17 Jun 2011 18:22:03 -0400
Per gripe from Tom Lane. I have tested this with VC 2008, and assume
it will work with earlier versions.
M src/include/pg_config.h.win32
Obtain table locks as soon as practical during pg_dump.
commit : 68d977a73797a129913179010eea088f30e370b7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Jun 2011 18:19:02 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 17 Jun 2011 18:19:02 -0400
For some reason, when we (I) added table lock acquisition to pg_dump,
we didn't think about making it happen as soon as possible after the
start of the transaction. What with subsequent additions, there was
actually quite a lot going on before we got around to that; which sort
of defeats the purpose. Rearrange the order of calls in dumpSchema()
to close the risk window as much as we easily can. Back-patch to all
supported branches.
M src/bin/pg_dump/common.c
Add overflow checks to int4 and int8 versions of generate_series().
commit : 062780ec35f9db630e784b27a54440017df77531
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 14:28:45 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 14:28:45 -0400
The previous code went into an infinite loop after overflow. In fact,
an overflow is not really an error; it just means that the current
value is the last one we need to return. So, just arrange to stop
immediately when overflow is detected.
Back-patch all the way.
M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c
Fix crash in CREATE UNLOGGED TABLE.
commit : bf347c60bdd7e05800f0c06d03e2ad87aeaa5e09
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 13:34:39 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 13:34:39 -0400
The code that created the init fork neglected to make sure that the
relation was open at the smgr level before attempting to invoke smgr.
This didn't happen every time; only when the relcache entry was rebuilt
along the way.
Per report from Garick Hamlin.
M src/backend/catalog/heap.c
Fix minor thinko in ProcGlobalShmemSize().
commit : c573486ce9752afb9a8431089762d6845cf1429d
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 09:12:19 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 09:12:19 -0400
There's no need to add space for startupBufferPinWaitBufId, because
it's part of the PROC_HDR object for which this function already
allocates space.
This has been wrong for a while, but the only consequence is that our
shared memory allocation is increased by 4 bytes, so no back-patch.
M src/backend/storage/lmgr/proc.c
Fix typo.
commit : d61ec7c7a7ec822862880467a5722ccfb0dd9b82
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 00:54:08 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 17 Jun 2011 00:54:08 -0400
Per Josh Kupershmidt and Tom Lane.
M doc/src/sgml/ref/psql-ref.sgml
Define FLEXIBLE_ARRAY_MEMBER for MSVC.
commit : 236a11dc65906cc200bce4e6db26d20b299cd1b0
author : Andrew Dunstan <andrew@dunslane.net>
date : Thu, 16 Jun 2011 22:30:24 -0400
committer: Andrew Dunstan <andrew@dunslane.net>
date : Thu, 16 Jun 2011 22:30:24 -0400
M src/include/pg_config.h.win32
Index tuple data arrays using Anum_xxx symbolic constants instead of "i++".
commit : bfcb9328e51eaaa21c92a1f2d7262758afb843e8
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Jun 2011 17:03:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Jun 2011 17:03:58 -0400
We had already converted most places to this style, but this patch gets the
last few that were still doing it the old way. The main advantage is that
this exposes a greppable name for each target column, rather than having
to rely on comments (which a couple of places failed to provide anyhow).
Richard Hopkins, additional work by me to clean up update_attstats() too
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_type.c
M src/backend/commands/analyze.c
M src/backend/commands/comment.c
M src/backend/rewrite/rewriteDefine.c
Avoid compiler warnings due to possibly unused variables
commit : 7357558fc8866e3a449aa9473c419b593d67b5b6
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 16 Jun 2011 23:38:46 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 16 Jun 2011 23:38:46 +0300
gcc 4.6 complains about these because of the new option
-Wunused-but-set-variable which comes in with -Wall, so cast them to
void, which avoids the warning.
M src/backend/nodes/read.c
M src/backend/nodes/readfuncs.c
Start using flexible array members
commit : dbbba5279f66f95805c1e084e6f646d174931e56
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 16 Jun 2011 22:39:09 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 16 Jun 2011 22:39:09 +0300
Flexible array members are a C99 feature that avoids "cheating" in the
declaration of variable-length arrays at the end of structs. With
Autoconf support, this should be transparent for older compilers.
We start with one use in gist.h because gcc 4.6 started to raise a
warning there. Over time, it can be expanded to other places in the
source, but they will likely need some review of sizeof and offsetof
usage. The current change in gist.h appears to be safe in this
regard.
M configure
M configure.in
M src/include/access/gist.h
M src/include/pg_config.h.in
Update README-SSI. Add a section to describe the "dangerous structure" that SSI is based on, as well as the optimizations about relative commit times and read-only transactions. Plus a bunch of other misc fixes and improvements.
commit : 78475b0ecac4e7793366d2dba0cb875a8fde6bb0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Jun 2011 21:12:56 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Jun 2011 21:12:56 +0300
Dan Ports
M src/backend/storage/lmgr/README-SSI
Fix typo
commit : f3008c31f02948290f2edde9c39dc83371acbab9
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 16 Jun 2011 12:10:57 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Thu, 16 Jun 2011 12:10:57 -0400
M src/backend/catalog/heap.c
Remove another no-longer-needed inclusion of predicate.h.
commit : 307a4c2cbbb8e824163fca354783e79d2892d231
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Jun 2011 11:43:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 16 Jun 2011 11:43:30 -0400
M src/backend/executor/nodeBitmapHeapscan.c
pgindent run of recent SSI changes. Also, remove an unnecessary #include.
commit : cb94db91b257c6375f597d9e9df2f48d5326a967
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Jun 2011 16:16:34 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 16 Jun 2011 16:16:34 +0300
Kevin Grittner
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/transam/twophase_rmgr.c
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
M src/include/storage/predicate_internals.h
Respect Hot Standby controls while recycling btree index pages. Btree pages were recycled after VACUUM deletes all records on a page and then a subsequent VACUUM occurs after the RecentXmin horizon is reached. Using RecentXmin meant that we did not respond correctly to the user controls provide to avoid Hot Standby conflicts and so spurious conflicts could be generated in some workload combinations. We now reuse pages only when we reach RecentGlobalXmin, which can be much later in the presence of long running queries and is also controlled by vacuum_defer_cleanup_age and hot_standby_feedback.
commit : 758bd2a433d64bed00ca084203b3e5ccfdea4499
author : Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 16 Jun 2011 10:19:10 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Thu, 16 Jun 2011 10:19:10 +0100
Noah Misch and Simon Riggs
M src/backend/access/nbtree/nbtpage.c
Use single quotes in preference to double quotes for protecting pathnames.
commit : 1568fa75bcf393977425ccb73752b98883a9f375
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 21:45:23 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 21:45:23 -0400
Per recommendation from Peter. Neither choice is bulletproof, but this
is the existing style and it does help prevent unexpected environment
variable substitution.
M src/Makefile.global.in
M src/Makefile.shlib
M src/backend/Makefile
M src/interfaces/ecpg/test/Makefile
M src/makefiles/Makefile.aix
M src/test/isolation/Makefile
Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.
commit : e1ccaff6eea1b48f4b9b28cabaf0f990119b0d19
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 19:05:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 19:05:11 -0400
The initial commit of the ALTER TABLE ADD FOREIGN KEY NOT VALID feature
failed to support labeling such constraints as deferrable. The best fix
for this seems to be to fold NOT VALID into ConstraintAttributeSpec.
That's a bit more general than the documented syntax, but it allows
better-targeted syntax error messages.
In addition, do some mostly-but-not-entirely-cosmetic code review for
the whole NOT VALID patch.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/alter_table.sgml
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/utils/adt/ruleutils.c
M src/include/nodes/parsenodes.h
M src/interfaces/ecpg/preproc/ecpg.addons
In pg_upgrade, clean up code layout in validateDirectoryOption().
commit : e3df3572f66aa099d337f013dceef7d519ef8398
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Jun 2011 17:23:02 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 15 Jun 2011 17:23:02 -0400
M contrib/pg_upgrade/option.c
Fix failure to account for memory used by tuplestore_putvalues().
commit : 10db3de66eb226e9aed32e789abd532c41f0f471
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 14:05:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 14:05:22 -0400
This oversight could result in a tuplestore using much more than the
intended amount of memory. It would only happen in a code path that loaded
a tuplestore via tuplestore_putvalues(), and many of those won't emit huge
amounts of data; but cases such as holdable cursors and plpgsql's RETURN
NEXT command could have the problem. The fix ensures that the tuplestore
will switch to write-to-disk mode when it overruns work_mem.
The potential overrun was finite, because we would still count the space
used by the tuple pointer array, so the tuplestore code would eventually
flip into write-to-disk mode anyway. When storing wide tuples we would
go far past the expected work_mem usage before that happened; but this
may account for the lack of prior reports.
Back-patch to 8.4, where tuplestore_putvalues was introduced.
Per bug #6061 from Yann Delorme.
M src/backend/utils/sort/tuplestore.c
Fix oversights in pg_basebackup's -z (compression) option.
commit : 31156ce8b95c5e9fa8cb01f08de008c3289c1086
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 13:15:05 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 15 Jun 2011 13:15:05 -0400
The short-form -z switch didn't work, for lack of telling getopt_long
about it; and even if specified long-form, it failed to do anything,
because the various tests elsewhere in the file would take
Z_DEFAULT_COMPRESSION (which is -1) as meaning "don't compress".
Per bug #6060 from Shigehiro Honda, though I editorialized on his patch
a bit.
M src/bin/pg_basebackup/pg_basebackup.c
The rolled-back flag on serializable xacts was pointless and redundant with the marked-for-death flag. It was only set for a fleeting moment while a transaction was being cleaned up at rollback. All the places that checked for the rolled-back flag should also check the marked-for-death flag, as both flags mean that the transaction will roll back. I also renamed the marked-for-death into "doomed", which is a lot shorter name.
commit : 264a6b127a918800d9f8bac80b5f4a8a8799d0f1
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 15 Jun 2011 13:35:28 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 15 Jun 2011 13:35:28 +0300
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h
Make non-MVCC snapshots exempt from predicate locking. Scans with non-MVCC snapshots, like in REINDEX, are basically non-transactional operations. The DDL operation itself might participate in SSI, but there's separate functions for that.
commit : 0a0e2b52a5a53b8747c165ff5c976f27df05a2e1
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 15 Jun 2011 11:43:05 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 15 Jun 2011 11:43:05 +0300
Kevin Grittner and Dan Ports, with some changes by me.
M src/backend/access/heap/heapam.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/executor/nodeSeqscan.c
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
Allow psql \d tab completion to complete all relation kinds
commit : 707195c8f487a39c34ea4d965140465594eb5c21
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:45:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:45:00 +0300
This matches what \d actually accepts.
M src/bin/psql/tab-complete.c
Document that psql's \d also works with composite types
commit : da023acd1aec18e715789540f150c77b919c65a0
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:44:01 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:44:01 +0300
This has always been true, it was just never documented.
M doc/src/sgml/ref/psql-ref.sgml
In pg_upgrade, document that link mode has to have data directories on the same file system, and that authentication should lock out normal users.
commit : 776fa183594f6e7184183ab632c87996e96f7cf6
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Jun 2011 16:46:52 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Jun 2011 16:46:52 -0400
Per suggestsion from #postgresql irc channel.
Backpatch to 9.1.
M doc/src/sgml/pgupgrade.sgml
Fix assorted issues with build and install paths containing spaces.
commit : a61b6b7d184dc7aa2475eb4d293990404be5fedd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Jun 2011 12:00:37 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 14 Jun 2011 12:00:37 -0400
Apparently there is no buildfarm critter exercising this case after all,
because it fails in several places. With this patch, build, install,
check-world, and installcheck-world pass for me on OS X.
M src/Makefile.global.in
M src/Makefile.shlib
M src/interfaces/ecpg/test/Makefile
M src/test/isolation/Makefile
Remove unused variable
commit : 90132f62a2847fb2bc93a7c2366a139fe12bf365
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:00:43 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 23:00:43 +0300
The variable became obsolete in commit
68739ba856c52e6721d6cffec21f1bf0327a9a7b, but only gcc 4.6 shows the
warning.
M src/backend/parser/parse_utilcmd.c
Add comment that attributes.is_nullable was removed from SQL standard
commit : efb224a4392326fd6ae3eabdc170a246978d3f09
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 22:53:02 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 22:53:02 +0300
We don't have to remove the column if no one is bothered, but it's
useful to comment on it in case someone looks for it in newer
standards versions.
M src/backend/catalog/information_schema.sql
In pg_upgrade, check there are no prepared transactions.
commit : 07d17a73ec9485d6fa096d29d26647459fb9cbb7
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Jun 2011 14:53:35 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 14 Jun 2011 14:53:35 -0400
M contrib/pg_upgrade/check.c
Fix grammatical mistake introduced by previous commit
commit : 8cfd59dd65fe992fda0358a4bdca9e610c624a3c
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 14 Jun 2011 13:48:23 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 14 Jun 2011 13:48:23 -0400
Per note from Tom
M doc/src/sgml/ddl.sgml
Mention DROP TABLE as well as ALTER TABLE NO INHERIT
commit : fc7e99872cb3595638fc00ab96cf433bfa77fb14
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 14 Jun 2011 11:20:52 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Tue, 14 Jun 2011 11:20:52 -0400
... when talking about how good they are in replacement of bulk DELETE
in partitioned setups.
The original wording was a bit confusing.
Per an observation from David Wheeler.
M doc/src/sgml/ddl.sgml
Improve accuracy of ON_ERROR_STOP documentation.
commit : c3ad1e8dbd6cf1ff6d29bd2edb2da2c35187e768
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 14 Jun 2011 11:05:54 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 14 Jun 2011 11:05:54 -0400
Per a gripe from Tom Lane.
M doc/src/sgml/ref/psql-ref.sgml
Oops, forgot to change the order of entries in 2PC callback arrays when I renumbered the resource managers. This should fix the buildfarm..
commit : 85ea93384ae21ff59f5e5b292884a86f9c10b852
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 14 Jun 2011 15:16:36 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 14 Jun 2011 15:16:36 +0300
M src/backend/access/transam/twophase_rmgr.c
Renumber 2PC resource managers so that compared to 9.0, predicate lock rmgr is added to the end, and existing resource managers keep their old ids. We're not going to guarantee on-disk compatibility for 2PC state files over major releases, but it seems better to avoid changing the ids them anyway. It will help anyone who might want to write external tools to inspect the state files to work with files from different versions, if nothing else. Per complaint from Tom Lane.
commit : b81831acbc671445061ed41a55fb1cc21d8e2979
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 14 Jun 2011 12:32:45 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 14 Jun 2011 12:32:45 +0300
M src/include/access/twophase_rmgr.h
Move parse2.pl to parse.pl
commit : 030a2831a8df7829d606a873e28330ea2310fd64
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 07:34:00 +0300
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 14 Jun 2011 07:34:00 +0300
We have a SCM, so we don't need to keep old versions of files around.
M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/ecpg/preproc/README.parser
M src/interfaces/ecpg/preproc/ecpg.trailer
M src/interfaces/ecpg/preproc/parse.pl
D src/interfaces/ecpg/preproc/parse2.pl
Document that bits to the right of the CIDR mask "should" be zero, not "must".
commit : 2fccc881a9184879deeb9580bc25e7c420c580f8
author : Bruce Momjian <bruce@momjian.us>
date : Mon, 13 Jun 2011 20:54:45 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Mon, 13 Jun 2011 20:54:45 -0400
M doc/src/sgml/client-auth.sgml
Fix aboriginal copy-paste mistake in error message
commit : 8f59e023ef05d4f45e1c10a8bbc96bf8b4a96a89
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 13 Jun 2011 17:50:30 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 13 Jun 2011 17:50:30 -0400
Spotted by Jaime Casanova
M src/backend/catalog/pg_shdepend.c
Expand warnings on locks acquired by CREATE INDEX CONCURRENTLY
commit : a03feb9354bda5084f19cc952bc52ba7be89f372
author : Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 13 Jun 2011 17:12:26 -0400
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 13 Jun 2011 17:12:26 -0400
The previous wording wasn't explicit enough, which could misled readers
into thinking that the locks acquired are more restricted in nature than
they really are. The resulting optimism can be damaging to morale when
confronted with reality, as has been observed in the field.
Greg Smith
M doc/src/sgml/ref/create_index.sgml
Remove parentheses from mention of current_schemas function.
commit : 2202891669735242a24299f85a788a3aa0461404
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 13:02:54 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 13:02:54 -0400
This is more consistent with what we do elsewhere, and hopefully avoids
creating the perception that current_schemas takes no arguments.
As suggested by Brendan Jurd
M doc/src/sgml/config.sgml
Clarify that NATURAL without matching columns is like CROSS JOIN.
commit : 6b02ed66e2856abb1d5eef64747badd4fc78cef9
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:59:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:59:04 -0400
As suggested by Grzegorz Szpetkowski.
M doc/src/sgml/queries.sgml
Add doc cross-reference to search_path discussion of current_schemas().
commit : 2a890421424da5cca4226ee8afd562c356205815
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:37:49 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:37:49 -0400
Brendan Jurd
M doc/src/sgml/config.sgml
Document GUC context for synchronous_standby_names/hot_standby_feedback.
commit : dfe8ec3ab9a39cd50774036632f9f645b567eea3
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:23:42 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 12:23:42 -0400
Fujii Masao
M doc/src/sgml/config.sgml
In ALTER EXTENSION docs, document left_type/right_type.
commit : d4c7e934dfe1ecb4cb4139e4a5e6bfd88c94df66
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 10:23:14 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 10:23:14 -0400
Noted by Daniele Varrazzo.
M doc/src/sgml/ref/alter_extension.sgml
Markup fix.
commit : 9052e285b53e26727a28ac376b1418c0202533d1
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 10:14:02 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 10:14:02 -0400
Fujii Masao
M doc/src/sgml/ddl.sgml
More foreign table documentation improvements.
commit : 43ea23a346cd32d5ae2ca1d465db6f3beb65bf13
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 08:28:41 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 13 Jun 2011 08:28:41 -0400
Shigeru Hanada, with some additional wordsmithing by me
M doc/src/sgml/ddl.sgml
M doc/src/sgml/fdwhandler.sgml
Remove now-unnecessary casts.
commit : 13000b44d6069743db98ec753763d882b9a0beaf
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 12 Jun 2011 22:49:33 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sun, 12 Jun 2011 22:49:33 +0300
Kevin Grittner
M src/backend/storage/lmgr/predicate.c
Corrections to ALTER FOREIGN TABLE documentation.
commit : 5fe241c5f91b3bb0c9ef4d80d402dd83812de3e6
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 12 Jun 2011 00:18:43 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 12 Jun 2011 00:18:43 -0400
Shigeru Hanada, with a minor grammar correction.
M doc/src/sgml/ref/alter_foreign_table.sgml
Code cleanup for InitProcGlobal.
commit : 47ebcecc3ef862c6ad961539638123af63407ac9
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 12 Jun 2011 00:07:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 12 Jun 2011 00:07:04 -0400
The old code creates three separate arrays when only one is needed,
using two different shmem allocation functions for no obvious reason.
It also strangely splits up the initialization of AuxilaryProcs
between the top and bottom of the function to no evident purpose.
Review by Tom Lane.
M src/backend/storage/lmgr/proc.c
Tab completion improvements for COMMENT.
commit : c878cbe158b6cc20fe5dc65481885f3b2758f432
author : Robert Haas <rhaas@postgresql.org>
date : Sat, 11 Jun 2011 23:52:44 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sat, 11 Jun 2011 23:52:44 -0400
These pertain to object types introduced in PostgreSQL 9.1, so back-patch.
Josh Kupershmidt, with some kibitzing by me.
M src/bin/psql/tab-complete.c
Stamp HEAD as 9.2devel.
commit : c9627922115a56cfd1bc966b62108efba581662c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Jun 2011 17:46:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 11 Jun 2011 17:46:49 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
M src/interfaces/libpq/libpq.rc.in
M src/port/win32ver.rc
M src/tools/version_stamp.pl