PostgreSQL 9.2.0 commit log

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    

Click here for diff

  
  

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    

Click here for diff

  
This affects initdb, clusterdb, reindexdb, and vacuumdb in master  
and 9.2; in earlier branches, only initdb is affected.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Shigeru Hanada  
  

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    

Click here for diff

  
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,  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Also, set the release date to 2012-09-10, since we're pretty well  
committed to that now.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This is just neatnik-ism, but since we do it for comparable code in elog.c,  
we may as well do it here.  
  

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    

Click here for diff

  
Reported by Peter Eisentraut.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2 - code before that is quite different and should  
not have these defects.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Jeff Janes  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Per note from Peter Eisentraut.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Clarify the compatibility notes about EXTRACT() and about statistics  
timing columns.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
It still thought that the --xlog-method option argument could be  
empty, as in a previous version of this feature.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
When an invalid query parameter is reported, some memory leaks.  
  
found by Coverity  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This is open to debate of course, but it's past time we had *something*  
here.  
  

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    

Click here for diff

  
A very large number of small improvements ...  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
I was unable to entirely resist the temptation to copy-edit related  
entries, but will save most of that for a separate pass.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
Jeff Janes  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Fujii Masao, simplified and extended to cover streaming by Simon Riggs  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Noted by Noah Misch, patch by Fujii Masao  
  

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    

Click here for diff

  
Spotted by Fujii Masao, fix by Fujii Masao and Simon Riggs  
  

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    

Click here for diff

  
The directions explaining about running the prepared-transactions test  
were not updated in commit ae55d9fbe3871a5e6309d9b91629f1b0ff2b8cba.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Dave Kerr  
  

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    

Click here for diff

  
Noted by Thom Brown.  
  

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    

Click here for diff

  
Craig Ringer, edited fairly heavily by me  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Backpatch to 9.1 and 9.2.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
Backpatch to 9.2  
  
Erik Rijkers  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
Backpatch to 9.2 and 9.1.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

  
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    

Click here for diff

  
Backpatch from 9.0 to current.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Patch to 9.0 and later, where script is mentioned.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
mkdir() can check for errors itself.  We don't need to code that  
ourselves again.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The upstream XSLT stylesheets missed that case.  
  
found by Álvaro Herrera  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
Back-patch of commits 628cbb50ba80c83917b07a7609ddec12cda172d0 and  
c6aae3042be5249e672b731ebeb21875b5343010.  This has been broken since  
7.3, so back-patch to all supported branches.  
  

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    

Click here for diff

  
Back-patch of commits 72dd6291f216440f6bb61a8733729a37c7e3b2d2,  
f6a05fd973a102f7e66c491d3f854864b8d24844, and  
60e9c224a197aa37abb1aa3aefa3aad42da61f7f.  
  
This is needed to support fixing the regex prefix extraction bug in  
back branches.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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 ...  
  

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    

Click here for diff

  
Commit 2b443063 changed wording for some of the error messages, but  
neglected updating the regress output to match.  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

  
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    

Click here for diff

  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
Run on HEAD and 9.2.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Also remove special references to downloads off pgfoundry since they are  
not correct - downloads are done through the main website.  
  

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    

Click here for diff

  
gabrielle  
  

  
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    

Click here for diff

  
pgfoundry is deprectaed and no longer accepting new projects,  
so we really shouldn't be directing people there.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
This has apparently been wrong since event_source was added.  
  
Alexander Lakhin  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Solaris Studio warns about this, and some compilers might think it's an  
outright syntax error.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
In passing, reword another instance of the same message that was  
gratuitously different.  
  
Author: Josh Kupershmidt  
after a bug report by Bosco Rama  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
To avoid divergent names on related pages, avoid ambiguities, and  
reduce translation work a little.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
pointed out by Stefan Kaltenbrunner  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  
Per suggestion from Noah Misch  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  

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    

Click here for diff

  
Backpatch to 9.2.  
  
Per report from Evan D. Hoffman  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Even though we can't do much about the case with multiple plurals in  
one sentence, we can fix the other cases.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
I had this slightly wrong, as noted by Noah Misch.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Backpatch to 9.1.  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
Improve commenting, conform to project style for use of ++ etc.  
No functional changes.  
  

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    

Click here for diff

  
Per gripe from Tom Lane.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
"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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Fixes bug #6661 reported by Valentine Gogichashvili.  
  
Analysis and fix by Andres Freund  
  

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    

Click here for diff

  
Dan Farina  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Andres Freund and Simon Riggs  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Found by Fujii Masao  
  

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    

Click here for diff

  
Noted by Erik Rijkers  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

  
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    

Click here for diff

  
Noah Misch, reviewed by Simon Riggs  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Requested/spotted by Magnus Hagander  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Bug report from Jaime Casanova  
  

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    

Click here for diff

  
DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands,  
Gaza, Haiti, Hebron, Morocco, Syria, Tokelau Islands.  
Historical corrections for Canada.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This was from a time when readline support wasn't standard.  And it  
doesn't help analyzing current line editing library problems.  
  

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    

Click here for diff

  
This is related to aa90e148ca70a235897b1227f1a7cd1c66bc5368, but this  
code is only used under -DLINUX_OOM_ADJ, so it was apparently  
overlooked then.  
  

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    

Click here for diff

  
Use SvREFCNT_inc_simple_void() instead of SvREFCNT_inc() to avoid  
warning about unused return value.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Avoids the need for an external script in the most common  
scenario. Behavior can be overridden using the -n/--noloop  
commandline parameter.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
For space reasons, drop SQL:1999 and SQL:2003.  Only keep the latest  
two and SQL-92 for historical comparison.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Fujii Masao  
  

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    

Click here for diff

  
And align a bit better with the rest of the debug output.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Document some more things as incompatibilities, and improve wording of  
another item.  
  
Noah Misch  
  

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    

Click here for diff

  
Magnus Hagander, reviewed by Fujii Masao, with slight wording changes  
by me.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The list was neither logical nor numerical nor alphabetical.  Let's go  
with alphabetical.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Josh Kupershmidt  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Detectable by gcc -Wlogical-op.  
  
Add two regression test cases that would previously allow incorrect  
values to pass.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The hint looked a bit confusing when there were no valid options to  
hint about.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
See 6ef24487967692604b07a4a54e71821a60fb729a for an explanation.  This  
is the same for the new man pages.  
  

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    

Click here for diff

  
pgindent and perltidy should clean up the rest.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
We were using memcpy() to copy to a possibly overlapping memory region,  
which is a no-no. Use memmove() instead.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This reverts commit 7d88bb73f755f7fb5d847ef2319c21076054fb0e.  
That instrumentation has served its purpose.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The input should've been validated well before it hits the input function.  
Doing so again is a waste of cycles.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
These should have been removed when the BeOS port was removed in  
44f90212236bfb6fc1279e95dc8fa315104d964e.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
All other --help output has = signs between long options and their  
arguments, so do it here as well.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
gcc -Wextra/-Wold-style-declaration thinks that "inline" should go  
before the function return type.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Correct some comments, order some operations a bit more consistently.  
No functional changes.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Fixes bug #6635, reported by Akira Kurosawa.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Catalog version bump so everyone has the same comment for beta1.  
  

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    

Click here for diff

  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Jan Urbański  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
Fix a couple of typos, add missing filename tags, and add a link to the doc  
section on timezone guc.  
  

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    

Click here for diff

  
Show a proper error message instead of a SQL error.  
  
Josh Kupershmidt  
  

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    

Click here for diff

  
Multi-insert records observe XLOG_HEAP_INIT_PAGE flag too, as Andres Freund  
pointed out.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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().  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Placeholders such as OPTION are typically kept in singular.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
Josh Kupershmidt  
  

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    

Click here for diff

  
These should not be needed anymore, at least after the recent port  
removals.  So let's see whether we can do without them.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
"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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Found these with grep -r "for for ".  
  

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    

Click here for diff

  
Both terms still appear in a few places, but I thought it best to leave  
those alone in context.  
  

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    

Click here for diff

  
Noah Misch  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

Fix display of 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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
All related functions were already so marked.  
  

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    

Click here for diff

  
Noted by Peter Geoghegan.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
This seems more consistent with the pre-existing choices for names of  
other statistics columns.  Rename assorted internal identifiers to match.  
  

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    

Click here for diff

  
This spelling seems significantly more readable to me.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Instead of writing out the .c -> .o rule, use the default one, so that  
dependency tracking can be used.  
  

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    

Click here for diff

  
Fix a bunch of typos, improve markup, make wording more uniform, rearrange  
some material.  No substantive changes.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This oversight caused the reported times to accumulate in an O(N^2)  
fashion the longer a backend runs.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
	--details-after  
	--master-only  
	--oldest-first  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Add/complete support for:  
  
- ALTER DOMAIN / VALIDATE CONSTRAINT  
- ALTER DOMAIN / RENAME  
- ALTER DOMAIN / RENAME CONSTRAINT  
- ALTER TABLE / RENAME CONSTRAINT  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Predominant standard is two spaces, so adjust outliers to that.  
  

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    

Click here for diff

  
A few simplifications and stylistic improvements, found while grepping  
around for makefile problems elsewhere.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Noted by Guillaume Smet.  
  

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    

Click here for diff

  
Josh Kupershmidt  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Fix typo spotted by Thom Brown, and improve wording in another area  
where Thom spotted a typo.  
  

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    

Click here for diff

  
Josh Kupershmidt  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Like with SGML files, using tabs in these files is confusing and  
unnecessary.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Noah Misch spotted the fact that the old comment is in fact incorrect, due  
to memory ordering hazards.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Noah Misch  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Fujii Masao  
  

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    

Click here for diff

  
Previously, the use of the optional key word WITH was not supported.  
  
Josh Kupershmidt  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Kyotaro HORIGUCHI  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Fujii Masao, per discussion on pgsql-hackers  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Etsuro Fujita  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Christoph Berg  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
The previous comment described how things worked in PostgreSQL 8.2  
and prior.  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Per bug report from Ants Aasma.  
  
Backpatch to 9.1 and 9.0.  
  

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    

Click here for diff

  
Since xgettext provides options to do this now, we might as well use  
them.  
  

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    

Click here for diff

  
Only match when WITH is the first word, as WITH may appear in many  
other contexts.  
  
Josh Kupershmidt  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Patch by me; review by Tom Lane and others.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Report by Guillaume Lelarge.  
  

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    

Click here for diff

  
Report by Andrew Dunstan.  
  

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    

Click here for diff

  
The option --no-wrap prevents wars with (most?) editors about proper  
line wrapping.  --sort-by-file ensures consistent file order, for  
easier diffing.  
  

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    

Click here for diff

  
Greg Smith and Jaime Casanova, reviewed by Alex Shulgin and myself.  
e  
  

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    

Click here for diff

  
Greg Smith, Peter Geoghegan, and Robert Haas  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The views are in milliseconds, but the raw functions return  
microseconds.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Extracted from Joachim Wieland's parallel pg_dump patch, with some  
additional comments by me.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Use msgmerge --lang option to seed the Language field, recently  
introduced by gettext, in the header of the new PO file.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Per buildfarm, this is now needed by contrib/pg_stat_statements.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
see also ce8d7bb6440710058503d213b2aafcdf56a5b481  
  

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    

Click here for diff

  
Otherwise, the availability of these variables depends on what  
happened to be available at the time the PostgreSQL build was  
configured.  
  

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    

Click here for diff

  
Fujii Masao, plus a comment by me.  While I'm at it, correctly tabify  
this chunk of code.  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Bug report from Daniel Farina  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
The intent is to allow configure --enable-nls=xx for installation  
speed and size, but have maintainer-check check all source files  
regardless.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Per buildfarm, and Álvaro Herrera.  
  

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    

Click here for diff

  
Thomas Ogrisegg and Fujii Masao  
  

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    

Click here for diff

  
Fujii Masao  
  

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    

Click here for diff

  
Fujii Masao  
  

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    

Click here for diff

  
Ants Aasma, Greg Smith  
  

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    

Click here for diff

  
Ants Aasma, reviewed by Greg Smith, with very minor tweaks by me.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Organize the function descriptions as a list instead of running text,  
for easier access.  
  

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    

Click here for diff

  
found by Coverity  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Per compiler warnings on buildfarm member black_firefly.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
Per discussion with Dmitriy Igrishin and Tom Lane.  
  

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    

Click here for diff

  
Jay Levitt, reviewed by Tom Lane.  
  

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    

Click here for diff

  
Since 9.1, the minimum overhead is three bytes, not five.  
  
Fujii Masao  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Alex Shulgin, lightly edited by me  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
And minor other pgindent documentation tweaks.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
I should have done this in b93f5a5673b4bb09e14eb80fe28aa21fc20a6271 but  
didn't notice the problem at the time.  
  
Per report from Marco Nenciarini  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
This bug was introduced while refactoring in commit 1631598e --- no need  
to back-patch.  
  
Bug report and fix from Joachim Wieland.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Backpatch to 9.1.  
  
Report from Àlvaro  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
suggested by Josh Berkus  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Since mbvalidate() can alter the string it validates, having the  
callers claim that the strings they accept are const is inappropriate.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
found by Coverity  
  

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    

Click here for diff

  
Just for consistency with the other code paths.  
  
found by Coverity  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Use an explicit argument to tell whether to include the time zone in  
the output, rather than using some undocumented pointer magic.  
  

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    

Click here for diff

  
found by Coverity  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
It was already checking for invalid data after "BACKUP FROM", but  
would possibly crash if "BACKUP FROM" was missing altogether.  
  
found by Coverity  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
We forgot to free the per-attribute array element descriptors.  
  
Jan Urbański  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Jaime Casanova, reviewed by Noah Misch, slightly modified by me.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
	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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Probably no practical impact, since all pointers ought to have the  
same size, but it was wrong nonetheless.  Found by Coverity.  
  

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    

Click here for diff

  
For clarity, following other sites, and to silence Coverity.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Thomas Hunger  
  

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    

Click here for diff

  
Per Koizumi Satoru  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
Typo spotted by Erik Rijkers.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
reviewed by Josh Berkus and Dimitri Fontaine  
  

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    

Click here for diff

  
KaiGai Kohei  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Kevin Grittner  
  

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    

Click here for diff

  
Apparently a copy-and-paste mistake introduced in  
8ddd22f2456af0155f9c183894f481203e86b76e.  
  
found by Coverity  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
In a rare case, one byte past the end of memory belonging to the  
sqlca_t structure would be written to.  
  
found by Coverity  
  

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    

Click here for diff

  
found by Coverity  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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)  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Fixes a regression in commit 08146775acd8bfe0fcc509c71857abb928697171.  
  
Noah Misch  
  

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    

Click here for diff

  
In expanded auto mode, a lot of allocated memory was not cleaned up.  
  
found by Coverity  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
If a client encoding is specified as a connection parameter (or  
environment variable), internal storage allocated for it would never  
be freed.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Fujii Masao  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
Per suggesgtions from Robert and ^!C^!^@lvaro  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
PSQL_HISTORY provides an alternative for the command history file,  
and PSQLRC provides an alternative location for the .psqlrc file.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This effectively reverts 7886cc73ad12fb9b5a729b6c8152f11a309f5d65,  
which was done under the impression that isolationtester needs libpq,  
which it no longer does (and never really did).  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
reviewed by Jaime Casanova  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
(And why in the world is this OBJS list not being scraped from the  
corresponding Makefile?)  
  

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    

Click here for diff

  
Haifeng Liu  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This only produces warnings under -Wcast-qual, but it's more correct  
and consistent in any case.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
For that purpose, have check_keywords.pl print errors to stderr and  
return a useful exit status.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Thom Brown  
  

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    

Click here for diff

  
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.  
  

Make each pgstat 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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Error reported by David Wheeler.  
  

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    

Click here for diff

  
Security: CVE-2012-0866, CVE-2012-0867, CVE-2012-0868  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
And adjust wording for consistency.  
  

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    

Click here for diff

  
This is a fixup for commit a445cb92ef5b3a31313ebce30e18cc1d6e0bdecb.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Also expose the new counters through pg_stat_statements.  
  
Patch by me.  Review by Fujii Masao and Greg Smith.  
  

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    

Click here for diff

  
Sandro Santilli  
  

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    

Click here for diff

  
  -l, --logfile=FILENAME        log internal activity to file\n\  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
This was overlooked when implementing those kinds of objects, in commit  
cae565e503c42a0942ca1771665243b4453c5770.  
  
Per report from Pawel Casperek.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Mostly, fixing overlooked comments.  
  

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    

Click here for diff

  
This causes an exception when running under a debugger or in particular  
when running on a debug version of Windows.  
  
Patch from MauMau  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Set the PGAPPNAME environment variable in pg_regress so that it  
identifies itself as such instead of "psql".  
  

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    

Click here for diff

  
According to Chris Rees, this has worked for awhile, and the current  
FreeBSD port is removing the test anyway.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.)  
  

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    

Click here for diff

  
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:]].  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
This file was missed in commit 4c6cedd1b014abf2046886a9a92e10e18f0d658e.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Per recent discussions on pgsql-hackers regarding parallel pg_dump.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
The relevant commit is 337b6f5ecf05b21b5e997986884d097d60e4e3d0.  
  

  
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    

Click here for diff

  
Idea from Peter.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Along the way, move create_function_3 into a parallel schedule.  
  
KaiGai Kohei  
  

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    

Click here for diff

  
Because it isn't good to be able to turn things on, and not off again.  
  

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    

Click here for diff

  
Per report from Christoph Berg.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Per buildfarm.  
  

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    

Click here for diff

  
Per buildfarm.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
With a unique counter being added anyway, there is no need anymore to have the variable name listed, too.  
  

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    

Click here for diff

  
Problem reported by Peter Eisentraut.  
  
Backpatched to release 9.0.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Alex Hunsaker  
  

  
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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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...  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

  
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    

Click here for diff

  
Thanks to Andrew Dunstan for bringing this to my attention.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Noah Misch, per a review comment from me.  
  

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    

Click here for diff

  
This prevents pg_basebackup and pg_receivexlog from becoming a synchronous  
standby in case 'write' is used for synchronous_commit.  
  
Fujii Masao  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
This enables ALTER TABLE to skip table and index rebuilds in some cases.  
  
Noah Misch, with trivial changes by me.  
  

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    

Click here for diff

  
LWLockAcquireOrWait makes it more clear that the lock is acquired if it's  
free.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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).  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Declare this in Makefile to avoid failures in parallel compiles.  
  
Author: Lionel Elie Mamane  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
Matthew Draper, reviewed by Hitoshi Harada  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
Also move the escape_json function from explain.c to json.c where it  
seems to belong.  
  
Andrew Dunstan, Reviewd by Abhijit Menon-Sen.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
reviewed by Robert Haas and Pavel Stehule  
  

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    

Click here for diff

  
Instead of always completing SQL key words in upper case, look at the  
word being completed and match the case.  
  
reviewed by Fujii Masao  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
Marko Kreen  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
This is a small help to the compiler and static analyzers.  
  

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    

Click here for diff

  
This got broken by commit 4c6cedd1b014abf2046886a9a92e10e18f0d658e,  
which caused PL/pgsql error messages to print the function  
signature, not just the name.  
  
Per buildfarm.  
  

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    

Click here for diff

  
Sigh.  
  

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    

Click here for diff

  
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.  
  

  
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    

Click here for diff

  
This makes it unambiguous which function the message is coming from, if you  
have overloaded functions.  
  
Pavel Stehule, reviewed by Abhijit Menon-Sen.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
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  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

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    

Click here for diff

  
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.  
  

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    

Click here for diff

  
  

Various minor comments changes from bgwriter to checkpointer.