PostgreSQL 9.1.0 commit log

Stamp 9.1.0.

commit   : 1f43001424a9da624a89b213d0be606a8212a50a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 8 Sep 2011 17:13:27 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 8 Sep 2011 17:13:27 -0400    

Click here for diff

M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32

Translation updates for 9.1.0

commit   : bd6db68f714d8e4609c0b22425590ab632a14812    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 8 Sep 2011 23:10:40 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 8 Sep 2011 23:10:40 +0300    

Click here for diff

M src/backend/nls.mk
M src/backend/po/de.po
M src/backend/po/es.po
M src/backend/po/fr.po
M src/backend/po/pt_BR.po
D src/backend/po/tr.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/cs.po
M src/bin/initdb/po/es.po
M src/bin/initdb/po/ja.po
A src/bin/initdb/po/pl.po
M src/bin/initdb/po/pt_BR.po
D src/bin/initdb/po/ta.po
M src/bin/initdb/po/tr.po
M src/bin/pg_basebackup/nls.mk
A src/bin/pg_basebackup/po/cs.po
M src/bin/pg_basebackup/po/es.po
M src/bin/pg_basebackup/po/fr.po
M src/bin/pg_basebackup/po/ja.po
A src/bin/pg_basebackup/po/pl.po
A src/bin/pg_basebackup/po/pt_BR.po
M src/bin/pg_config/nls.mk
A src/bin/pg_config/po/cs.po
M src/bin/pg_config/po/ja.po
A src/bin/pg_config/po/pl.po
M src/bin/pg_config/po/pt_BR.po
M src/bin/pg_controldata/nls.mk
A src/bin/pg_controldata/po/cs.po
M src/bin/pg_controldata/po/ja.po
A src/bin/pg_controldata/po/pl.po
M src/bin/pg_controldata/po/pt_BR.po
D src/bin/pg_controldata/po/sv.po
D src/bin/pg_controldata/po/ta.po
M src/bin/pg_controldata/po/tr.po
M src/bin/pg_ctl/nls.mk
A src/bin/pg_ctl/po/cs.po
M src/bin/pg_ctl/po/es.po
D src/bin/pg_ctl/po/it.po
M src/bin/pg_ctl/po/ja.po
D src/bin/pg_ctl/po/ko.po
A src/bin/pg_ctl/po/pl.po
M src/bin/pg_ctl/po/pt_BR.po
D src/bin/pg_ctl/po/sv.po
D src/bin/pg_ctl/po/ta.po
M src/bin/pg_ctl/po/tr.po
D src/bin/pg_ctl/po/zh_CN.po
M src/bin/pg_dump/nls.mk
A src/bin/pg_dump/po/cs.po
M src/bin/pg_dump/po/de.po
M src/bin/pg_dump/po/es.po
M src/bin/pg_dump/po/fr.po
M src/bin/pg_dump/po/ja.po
A src/bin/pg_dump/po/pl.po
M src/bin/pg_dump/po/pt_BR.po
M src/bin/pg_dump/po/tr.po
M src/bin/pg_resetxlog/nls.mk
A src/bin/pg_resetxlog/po/cs.po
M src/bin/pg_resetxlog/po/ja.po
A src/bin/pg_resetxlog/po/pl.po
M src/bin/pg_resetxlog/po/pt_BR.po
M src/bin/psql/nls.mk
M src/bin/psql/po/cs.po
M src/bin/psql/po/es.po
M src/bin/psql/po/fr.po
M src/bin/psql/po/ja.po
A src/bin/psql/po/pl.po
M src/bin/psql/po/pt_BR.po
D src/bin/psql/po/sv.po
M src/bin/psql/po/tr.po
M src/bin/scripts/nls.mk
M src/bin/scripts/po/cs.po
A src/bin/scripts/po/pl.po
M src/bin/scripts/po/pt_BR.po
M src/interfaces/ecpg/ecpglib/nls.mk
A src/interfaces/ecpg/ecpglib/po/cs.po
A src/interfaces/ecpg/ecpglib/po/pl.po
M src/interfaces/ecpg/ecpglib/po/pt_BR.po
M src/interfaces/ecpg/preproc/nls.mk
A src/interfaces/ecpg/preproc/po/cs.po
A src/interfaces/ecpg/preproc/po/pl.po
M src/interfaces/ecpg/preproc/po/pt_BR.po
M src/interfaces/libpq/nls.mk
M src/interfaces/libpq/po/cs.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/fr.po
A src/interfaces/libpq/po/pl.po
M src/interfaces/libpq/po/pt_BR.po
D src/interfaces/libpq/po/ta.po
M src/interfaces/libpq/po/tr.po
M src/pl/plperl/nls.mk
A src/pl/plperl/po/cs.po
M src/pl/plperl/po/es.po
D src/pl/plperl/po/it.po
A src/pl/plperl/po/pl.po
M src/pl/plperl/po/tr.po
M src/pl/plpgsql/src/nls.mk
A src/pl/plpgsql/src/po/cs.po
M src/pl/plpgsql/src/po/es.po
M src/pl/plpgsql/src/po/ja.po
M src/pl/plpgsql/src/po/pl.po
M src/pl/plpgsql/src/po/pt_BR.po
A src/pl/plpgsql/src/po/tr.po
M src/pl/plpython/nls.mk
A src/pl/plpython/po/cs.po
M src/pl/plpython/po/es.po
D src/pl/plpython/po/it.po
A src/pl/plpython/po/pl.po
M src/pl/plpython/po/pt_BR.po
M src/pl/tcl/nls.mk
A src/pl/tcl/po/cs.po
A src/pl/tcl/po/pl.po
M src/pl/tcl/po/pt_BR.po

Add missing format argument to ecpg_log() call

commit   : ba7ef09a3bb49e38fda0b872bf85e46421c251d3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 8 Sep 2011 22:09:08 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 8 Sep 2011 22:09:08 +0300    

Click here for diff

M src/interfaces/ecpg/ecpglib/execute.c

One last round of copy-editing for the 9.1 release notes.

commit   : c7d60312fb661cdb212c63924249d623bd9d87c6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 8 Sep 2011 00:53:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 8 Sep 2011 00:53:11 -0400    

Click here for diff

Also set the documented release date to 2011-09-12.  

M doc/src/sgml/release-9.1.sgml

Fix corner case bug in numeric to_char().

commit   : 5df20a6e4f5eee5eef1b28760ceca604f57d535b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 17:06:19 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 17:06:19 -0400    

Click here for diff

Trailing-zero stripping applied by the FM specifier could strip zeroes  
to the left of the decimal point, for a format with no digit positions  
after the decimal point (such as "FM999.").  
  
Reported and diagnosed by Marti Raudsepp, though I didn't use his patch.  

M src/backend/utils/adt/formatting.c
M src/test/regress/expected/numeric.out
M src/test/regress/sql/numeric.sql

Allow bcc32 and win32 batch files to compile libpq.

commit   : 60765d86c3a91bf2fdf796ee66672120fd599d02    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 15:43:52 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 15:43:52 -0400    

Click here for diff

Backpatch to 9.1.  
  
By Hiroshi Saito  

M src/interfaces/libpq/bcc32.mak
M src/interfaces/libpq/win32.mak

In pg_upgrade, disallow migration of 8.3 clusters using contrib/ltree because its internal format was changed in 8.4.

commit   : 8cdd62068d2b6913902741f2fbc74d51042c3d3e    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 14:42:36 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 14:42:36 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  
  
Report by depesz, diagnosis by Tom.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/version_old_8_3.c
M doc/src/sgml/pgupgrade.sgml

Fix typo in error message.

commit   : 673dfe9690a54889bdb434321552f227806209fa    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 13:29:26 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 13:29:26 -0400    

Click here for diff

Per Euler Taveira de Oliveira.  

M src/backend/commands/collationcmds.c

Fix get_name_for_var_field() to deal with RECORD Params.

commit   : 90398132417232cb56dcda53a4cb66ed2d579681    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 13:01:15 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 7 Sep 2011 13:01:15 -0400    

Click here for diff

With 9.1's use of Params to pass down values from NestLoop join nodes  
to their inner plans, it is possible for a Param to have type RECORD, in  
which case the set of fields comprising the value isn't determinable by  
inspection of the Param alone.  However, just as with a Var of type RECORD,  
we can find out what we need to know if we can locate the expression that  
the Param represents.  We already knew how to do this in get_parameter(),  
but I'd overlooked the need to be able to cope in get_name_for_var_field(),  
which led to EXPLAIN failing with "record type has not been registered".  
  
To fix, refactor the search code in get_parameter() so it can be used by  
both functions.  
  
Per report from Marti Raudsepp.  

M src/backend/utils/adt/ruleutils.c

Revert documentation patch about NEW/OLD and triggers.

commit   : d5d94e16011a4fbb52de13a3d1ca326ad0c4ff36    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 09:24:02 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 7 Sep 2011 09:24:02 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  
  
Patch from Josh Kupershmidt.  

M doc/src/sgml/plpgsql.sgml

Properly document the existance of OLD/NEW trigger pl/pgsql trigger fields.

commit   : e4d59f35366964298b0c9d4847f0a7efd3ddf830    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 22:54:18 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 22:54:18 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  
  
Report from Pavel Stehule, patch from Josh Kupershmidt  

M doc/src/sgml/plpgsql.sgml

Fix spelling mistake in pgpass documentation change.

commit   : 6117526b5bf17dc22812ca8aa958a40c8edfc8a2    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 19:42:48 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 19:42:48 -0400    

Click here for diff

Per Peter.  

M doc/src/sgml/libpq.sgml

Add documentation suggestion about adding a comment to the top of pgpass.

commit   : 2b3e86d4756ac5480058e71caaed9fa58a644d35    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 17:32:16 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 17:32:16 -0400    

Click here for diff

Backpatch to 9.1.  

M doc/src/sgml/libpq.sgml

Fix plpgsql "PERFORM" markup.

commit   : 3430ab5986e5d402f7ada7c672a51f679b60c95c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 15:20:16 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 15:20:16 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  

M doc/src/sgml/plpgsql.sgml

Avoid possibly accessing off the end of memory in SJIS2004 conversion.

commit   : 8b81b99b89de186aeda9baabf4e1b6bd792d54b9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 14:50:28 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 14:50:28 -0400    

Click here for diff

The code in shift_jis_20042euc_jis_2004() would fetch two bytes even when  
only one remained in the string.  Since conversion functions aren't  
supposed to assume null-terminated input, this poses a small risk of  
fetching past the end of memory and incurring SIGSEGV.  No such crash has  
been identified in the field, but we've certainly seen the equivalent  
happen in other code paths, so patch this one all the way back.  
  
Report and patch by Noah Misch.  

M src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c

Avoid possibly accessing off the end of memory in examine_attribute().

commit   : 460bfd07b38f6495314c01499fca49f5f4a68a38    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 14:35:27 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 14:35:27 -0400    

Click here for diff

Since the last couple of columns of pg_type are often NULL,  
sizeof(FormData_pg_type) can be an overestimate of the actual size of the  
tuple data part.  Therefore memcpy'ing that much out of the catalog cache,  
as analyze.c was doing, poses a small risk of copying past the end of  
memory and incurring SIGSEGV.  No such crash has been identified in the  
field, but we've certainly seen the equivalent happen in other code paths,  
so patch this one all the way back.  
  
Per valgrind testing by Noah Misch, though this is not his proposed patch.  
I chose to use SearchSysCacheCopy1 rather than inventing special-purpose  
infrastructure for copying only the minimal part of a pg_type tuple.  

M src/backend/commands/analyze.c

Document PERFORM limitation when using WITH queries.

commit   : 94bf47db8ffc13005d9b14ec3331f6db94a91d46    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 13:41:30 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 13:41:30 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  
  
Report from depstein@alliedtesting.com.  

M doc/src/sgml/plpgsql.sgml

Add an "incompatibility" entry to 9.1 release notes about CREATE EXTENSION.

commit   : a3850a5f7582ebe328d2506873e31aac2b01d51b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 12:36:40 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 12:36:40 -0400    

Click here for diff

We've now seen more than one gripe from somebody who didn't get the memo  
about how to install contrib modules in 9.1.  Try to make it a little more  
prominent that you aren't supposed to call the scripts directly anymore.  

M doc/src/sgml/release-9.1.sgml

Update type-conversion documentation for long-ago changes.

commit   : 95a07c1ebe78444177b15cf77b80fbaa8380bb56    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 12:14:51 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 6 Sep 2011 12:14:51 -0400    

Click here for diff

This example wasn't updated when we changed the behavior of bpcharlen()  
in 8.0, nor when we changed the number of parameters taken by the bpchar()  
cast function in 7.3.  Per report from lsliang.  

M doc/src/sgml/typeconv.sgml

Properly document semphore requirements by accounting for worker processes.

commit   : f85adb65bf2842c258e4c2d2930569e3b702c7d6    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 11:08:34 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 6 Sep 2011 11:08:34 -0400    

Click here for diff

Backpatch to 9.1 and 9.0.  
  
Submitted by Anton Yuzhaninov, confirmed by Robert Haas  

M doc/src/sgml/runtime.sgml

commit   : 0603ba3415f2fa6182248a6b96973224507543d3    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 22:58:13 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 22:58:13 -0400    

Click here for diff

M doc/src/sgml/config.sgml

Adjust translator comment format to xgettext expectations

commit   : 7dc956fee3284170db50c343bad9f52cf767894b    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 5 Sep 2011 18:52:49 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 5 Sep 2011 18:52:49 -0300    

Click here for diff

M src/backend/access/transam/xlog.c
M src/backend/catalog/dependency.c
M src/bin/scripts/common.c

Mark some untranslatable messages with errmsg_internal

commit   : c729082da46c615e663e7c7f996baff1c4c3d560    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 5 Sep 2011 17:47:18 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 5 Sep 2011 17:47:18 -0300    

Click here for diff

M src/backend/access/transam/xlog.c

Add mention that UTC really means UT1.

commit   : 082befb5162920d64ef4c1e905489a625dff2d5a    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 15:38:00 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 15:38:00 -0400    

Click here for diff

Backpatch to 9.1.  

M doc/src/sgml/catalogs.sgml
M doc/src/sgml/func.sgml

Update time zone data files to tzdata release 2011i.

commit   : 33c371b4f5ac3b3975e57beaf7481f736e53c031    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 5 Sep 2011 14:46:31 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 5 Sep 2011 14:46:31 -0400    

Click here for diff

DST law changes in Canada, Egypt, Russia, Samoa, South Sudan.  

M src/timezone/data/africa
M src/timezone/data/antarctica
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/europe
M src/timezone/data/iso3166.tab
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab

Document that contrib/pgtrgm only processes ASCII alphanumeric characters.

commit   : 2c62b5bb636f5f13bd25777ee1f4c8e557accecd    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 13:24:46 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 5 Sep 2011 13:24:46 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  

M doc/src/sgml/pgtrgm.sgml

Guard against using plperl's Makefile without specifying --with-perl.

commit   : eed7dcfceedeb314d17695f014754ac0f3e8f892    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 4 Sep 2011 20:07:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 4 Sep 2011 20:07:38 -0400    

Click here for diff

The $(PERL) macro will be set by configure if it finds perl at all,  
but $(perl_privlibexp) isn't configured unless you said --with-perl.  
This results in confusing error messages if someone cd's into  
src/pl/plperl and tries to build there despite the configure omission,  
as reported by Tomas Vondra in bug #6198.  Add simple checks to  
provide a more useful report, while not disabling other use of the  
makefile such as "make clean".  
  
Back-patch to 9.0, which is as far as the patch applies easily.  

M src/pl/plperl/GNUmakefile

Fix #include problems in 9.1 branch.

commit   : 1ae019f04b95771293f9a649c298aaeb0d3155a2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 4 Sep 2011 19:10:09 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 4 Sep 2011 19:10:09 -0400    

Click here for diff

Remove unnecessary and circular #include of syncrep.h from proc.h.  
Add htup.h to tablecmds.h so it will compile without prerequisites.  

M src/include/commands/tablecmds.h
M src/include/storage/proc.h

Fix typo in pg_srand48 (srand48 in older branches).

commit   : b6cfede8b630db61afa7dd158adde93ba669f429    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 3 Sep 2011 16:17:39 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 3 Sep 2011 16:17:39 -0400    

Click here for diff

">" should be ">>".  This typo results in failure to use all of the bits  
of the provided seed.  
  
This might rise to the level of a security bug if we were relying on  
srand48 for any security-critical purposes, but we are not --- in fact,  
it's not used at all unless the platform lacks srandom(), which is  
improbable.  Even on such a platform the exposure seems minimal.  
  
Reported privately by Andres Freund.  

M src/port/erand48.c

Fix brace indentation of commit 5ad0e899f08136a00f56bf224a6b9729b2f4c69f to fit PostgreSQL style.

commit   : 7c0e1a28ac4596e9ea4d942f213114bd70026d6a    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Fri, 2 Sep 2011 09:45:11 +0200    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Fri, 2 Sep 2011 09:45:11 +0200    

Click here for diff

M src/interfaces/ecpg/ecpglib/execute.c

Remove spurious comma. Spotted by Tom.

commit   : 8027e4d4be11e19784908671bf5cee0c6472fb14    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 19:59:09 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 19:59:09 +0300    

Click here for diff

M src/interfaces/libpq/Makefile

libpq compiles various pgport files like ecpg does, and needs similar Makefile changes for the win32 setlocale() wrapper I put into ecpg, to make it compile on MinGW.

commit   : 4fcceef0de221ba98d3f273b6d69ef0d17e43e74    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 18:58:50 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 18:58:50 +0300    

Click here for diff

M src/interfaces/libpq/Makefile

In ecpglib restore LC_NUMERIC in case of an error.

commit   : 5ad0e899f08136a00f56bf224a6b9729b2f4c69f    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Thu, 1 Sep 2011 15:27:38 +0200    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Thu, 1 Sep 2011 15:27:38 +0200    

Click here for diff

M src/interfaces/ecpg/ecpglib/execute.c

commit   : 6952071450befb74ee0bc3c76c17de816cddfc43    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 14:02:40 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 14:02:40 +0300    

Click here for diff

M configure
M configure.in
M src/interfaces/ecpg/ecpglib/Makefile
M src/port/chklocale.c
A src/port/win32setlocale.c
M src/tools/msvc/Mkvcbuild.pm

setlocale() on Windows doesn't work correctly if the locale name contains dots. I previously worked around this in initdb, mapping the known problematic locale names to aliases that work, but Hiroshi Inoue pointed out that that's not enough because even if you use one of the aliases, like "Chinese_HKG", setlocale(LC_CTYPE, NULL) returns back the long form, ie. "Chinese_Hong Kong S.A.R.". When we try to restore an old locale value by passing that value back to setlocale(), it fails. Note that you are affected by this bug also if you use one of those short-form names manually, so just reverting the hack in initdb won't fix it.

commit   : 83748f3a4e0a6bf3ea3d3da53dc507be038b3d1f    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 11:08:32 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 11:08:32 +0300    

Click here for diff

To work around that, move the locale name mapping from initdb to a wrapper  
around setlocale(), so that the mapping is invoked on every setlocale() call.  
  
Also, add a few checks for failed setlocale() calls in the backend. These  
calls shouldn't fail, and if they do there isn't much we can do about it,  
but at least you'll get a warning.  
  
Backpatch to 9.1, where the initdb hack was introduced. The Windows bug  
affects older versions too if you set locale manually to one of the aliases,  
but given the lack of complaints from the field, I'm hesitent to backpatch.  

M src/backend/utils/adt/pg_locale.c
M src/bin/initdb/initdb.c
M src/include/port.h
M src/port/chklocale.c

Move the line to undefine setlocale() macro on Win32 outside USE_REPL_SNPRINTF ifdef block. It has nothing to do with whether the replacement snprintf function is used. It caused no live bug, because the replacement snprintf function is always used on Win32, but it was nevertheless misplaced.

commit   : 116b67f3add43b750c73e30727a58922080067bf    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 09:13:37 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 1 Sep 2011 09:13:37 +0300    

Click here for diff

M src/include/port.h

Further repair of eqjoinsel ndistinct-clamping logic.

commit   : f759ef139ea3d1b2c74c8b6275ca959d7320f4a6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 1 Sep 2011 00:18:34 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 1 Sep 2011 00:18:34 -0400    

Click here for diff

Examination of examples provided by Mark Kirkwood and others has convinced  
me that actually commit 7f3eba30c9d622d1981b1368f2d79ba0999cdff2 was quite  
a few bricks shy of a load.  The useful part of that patch was clamping  
ndistinct for the inner side of a semi or anti join, and the reason why  
that's needed is that it's the only way that restriction clauses  
eliminating rows from the inner relation can affect the estimated size of  
the join result.  I had not clearly understood why the clamping was  
appropriate, and so mis-extrapolated to conclude that we should clamp  
ndistinct for the outer side too, as well as for both sides of regular  
joins.  These latter actions were all wrong, and are reverted with this  
patch.  In addition, the clamping logic is now made to affect the behavior  
of both paths in eqjoinsel_semi, with or without MCV lists to compare.  
When we have MCVs, we suppose that the most common values are the ones  
that are most likely to survive the decimation resulting from a lower  
restriction clause, so we think of the clamping as eliminating non-MCV  
values, or potentially even the least-common MCVs for the inner relation.  
  
Back-patch to 8.4, same as previous fixes in this area.  

M src/backend/utils/adt/selfuncs.c

Fix pg_upgrade to preserve toast relfrozenxids for old 8.3 servers.

commit   : dbb8d4769cff7387c4419aa53b2dae96b0a601d7    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 31 Aug 2011 21:49:59 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 31 Aug 2011 21:49:59 -0400    

Click here for diff

This fixes a pg_upgrade bug that could lead to query errors when  
clog files are improperly removed.  
  
Backpatch to 8.4, 9.0, 9.1.  

M src/bin/pg_dump/pg_dump.c

Improve eqjoinsel's ndistinct clamping to work for multiple levels of join.

commit   : ca4f70ca779013599ec4c31c54944c2c7a584e92    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 31 Aug 2011 16:04:53 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 31 Aug 2011 16:04:53 -0400    

Click here for diff

This patch fixes an oversight in my commit  
7f3eba30c9d622d1981b1368f2d79ba0999cdff2 of 2008-10-23.  That patch  
accounted for baserel restriction clauses that reduced the number of rows  
coming out of a table (and hence the number of possibly-distinct values of  
a join variable), but not for join restriction clauses that might have been  
applied at a lower level of join.  To account for the latter, look up the  
sizes of the min_lefthand and min_righthand inputs of the current join,  
and clamp with those in the same way as for the base relations.  
  
Noted while investigating a complaint from Ben Chobot, although this in  
itself doesn't seem to explain his report.  
  
Back-patch to 8.4; previous versions used different estimation methods  
for which this heuristic isn't relevant.  

M src/backend/utils/adt/selfuncs.c

The replication status values in pg_stat_replication was changed to lowercase earlier, but documentation was not updated. Update the docs.

commit   : edf4edae5799e5f7b7d9822d2932170341ba5472    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 31 Aug 2011 12:37:37 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 31 Aug 2011 12:37:37 +0300    

Click here for diff

Fujii Masao  

M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml

Fix not-backwards-compatible pg_upgrade test for prepared transactions.

commit   : 333eb32081d261ede946935379b66e6ac192629d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 30 Aug 2011 17:15:00 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 30 Aug 2011 17:15:00 -0400    

Click here for diff

There's no reason for this test to use the undocumented pg_prepared_xact()  
function, when it can use the stable API pg_prepared_xacts instead.  
Fixes breakage against 8.3, as reported by Justin Arnold.  

M contrib/pg_upgrade/check.c

Fix a missed case in code for "moving average" estimate of reltuples.

commit   : 030cdaf7fb90decfd7f959aa0d67d19b5669f458    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 30 Aug 2011 14:49:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 30 Aug 2011 14:49:52 -0400    

Click here for diff

It is possible for VACUUM to scan no pages at all, if the visibility map  
shows that all pages are all-visible.  In this situation VACUUM has no new  
information to report about the relation's tuple density, so it wasn't  
changing pg_class.reltuples ... but it updated pg_class.relpages anyway.  
That's wrong in general, since there is no evidence to justify changing the  
density ratio reltuples/relpages, but it's particularly bad if the previous  
state was relpages=reltuples=0, which means "unknown tuple density".  
We just replaced "unknown" with "zero".  ANALYZE would eventually recover  
from this, but it could take a lot of repetitions of ANALYZE to do so if  
the relation size is much larger than the maximum number of pages ANALYZE  
will scan, because of the moving-average behavior introduced by commit  
b4b6923e03f4d29636a94f6f4cc2f5cf6298b8c8.  
  
The only known situation where we could have relpages=reltuples=0 and yet  
the visibility map asserts everything's visible is immediately following  
a pg_upgrade.  It might be advisable for pg_upgrade to try to preserve the  
relpages/reltuples statistics; but in any case this code is wrong on its  
own terms, so fix it.  Per report from Sergey Koposov.  
  
Back-patch to 8.4, where the visibility map was introduced, same as the  
previous change.  

M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/utils/cache/relcache.c

Fix concat_ws() to not insert a separator after leading NULL argument(s).

commit   : 579577320ef449442f804043a67ce5c13d679679    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 29 Aug 2011 15:20:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 29 Aug 2011 15:20:57 -0400    

Click here for diff

Per bug #6181 from Itagaki Takahiro.  Also do some marginal code cleanup  
and improve error handling.  

M src/backend/utils/adt/varlena.c

Actually, all of parallel restore's limitations should be tested earlier.

commit   : 4fa37702a041a90355f693e10cad0751ef700658    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 28 Aug 2011 22:27:48 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 28 Aug 2011 22:27:48 -0400    

Click here for diff

On closer inspection, whining in restore_toc_entries_parallel is really  
much too late for any user-facing error case.  The right place to do it  
is at the start of RestoreArchive(), before we've done anything interesting  
(suh as trying to DROP all the targets ...)  
  
Back-patch to 8.4, where parallel restore was introduced.  

M src/bin/pg_dump/pg_backup_archiver.c

Be more user-friendly about unsupported cases for parallel pg_restore.

commit   : 76d8bd8b906ddc27e4aee4b92b3f82e896b7e926    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 28 Aug 2011 21:48:58 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 28 Aug 2011 21:48:58 -0400    

Click here for diff

If we are unable to do a parallel restore because the input file is stdin  
or is otherwise unseekable, we should complain and fail immediately, not  
after having done some of the restore.  Complaining once per thread isn't  
so cool either, and the messages should be worded to make it clear this is  
an unsupported case not some weird race-condition bug.  Per complaint from  
Lonni Friedman.  
  
Back-patch to 8.4, where parallel restore was introduced.  

M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c

Don't assume that "E" response to NEGOTIATE_SSL_CODE means pre-7.0 server.

commit   : 5f81cf34e3e45ae4d464618c0b61914a60282aba    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 27 Aug 2011 16:37:02 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 27 Aug 2011 16:37:02 -0400    

Click here for diff

These days, such a response is far more likely to signify a server-side  
problem, such as fork failure.  Reporting "server does not support SSL"  
(in sslmode=require) could be quite misleading.  But the results could  
be even worse in sslmode=prefer: if the problem was transient and the  
next connection attempt succeeds, we'll have silently fallen back to  
protocol version 2.0, possibly disabling features the user needs.  
  
Hence, it seems best to just eliminate the assumption that backing off  
to non-SSL/2.0 protocol is the way to recover from an "E" response, and  
instead treat the server error the same as we would in non-SSL cases.  
  
I tested this change against a pre-7.0 server, and found that there  
was a second logic bug in the "prefer" path: the test to decide whether  
to make a fallback connection attempt assumed that we must have opened  
conn->ssl, which in fact does not happen given an "E" response.  After  
fixing that, the code does indeed connect successfully to pre-7.0,  
as long as you didn't set sslmode=require.  (If you did, you get  
"Unsupported frontend protocol", which isn't completely off base  
given the server certainly doesn't support SSL.)  
  
Since there seems no reason to believe that pre-7.0 servers exist anymore  
in the wild, back-patch to all supported branches.  

M src/interfaces/libpq/fe-connect.c

Ensure we discard unread/unsent data when abandoning a connection attempt.

commit   : ef3455f190d3c12de71c06316109bb5ffbffe462    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 27 Aug 2011 14:16:19 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 27 Aug 2011 14:16:19 -0400    

Click here for diff

There are assorted situations wherein PQconnectPoll() will abandon a  
connection attempt and try again with different parameters (eg, SSL versus  
not SSL).  However, the code forgot to discard any pending data in libpq's  
I/O buffers when doing this.  In at least one case (server returns E  
message during SSL negotiation), there is unread input data which bollixes  
the next connection attempt.  I have not checked to see whether this is  
possible in the other cases where we close the socket and retry, but it  
seems like a matter of good defensive programming to add explicit  
buffer-flushing code to all of them.  
  
This is one of several issues exposed by Daniel Farina's report of  
misbehavior after a server-side fork failure.  
  
This has been wrong since forever, so back-patch to all supported branches.  

M src/interfaces/libpq/fe-connect.c

Spelling improvement

commit   : 814a7f50c6c53883b0b753458c9912b0e6bc2519    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 27 Aug 2011 08:07:58 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 27 Aug 2011 08:07:58 +0300    

Click here for diff

M doc/src/sgml/ref/psql-ref.sgml

Fix potential memory clobber in tsvector_concat().

commit   : 93809ad5eb8f0dbd704b2f713f707d8cf684fd57    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 26 Aug 2011 16:51:39 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 26 Aug 2011 16:51:39 -0400    

Click here for diff

tsvector_concat() allocated its result workspace using the "conservative"  
estimate of the sum of the two input tsvectors' sizes.  Unfortunately that  
wasn't so conservative as all that, because it supposed that the number of  
pad bytes required could not grow.  Which it can, as per test case from  
Jesper Krogh, if there's a mix of lexemes with positions and lexemes  
without them in the input data.  The fix is to assume that we might add  
a not-previously-present pad byte for each and every lexeme in the two  
inputs; which really is conservative, but it doesn't seem worthwhile to  
try to be more precise.  
  
This is an aboriginal bug in tsvector_concat, so back-patch to all  
versions containing it.  

M src/backend/utils/adt/tsvector_op.c

In pg_upgrade, limit schema name filter to include toast tables. Bug introduced recently when trying to filter out temp tables.

commit   : 39a713ea059a8ad3d07e3ea4d2c9b5da1fe3fa25    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Fri, 26 Aug 2011 00:12:34 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Fri, 26 Aug 2011 00:12:34 -0400    

Click here for diff

Backpatch to 9.0 and 9.1.  

M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/version_old_8_3.c

Add expected isolationtester output when prepared xacts are disabled

commit   : 0b298bd7a1782fca621068a5e17681be207f5635    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 25 Aug 2011 17:35:57 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 25 Aug 2011 17:35:57 -0300    

Click here for diff

This was deemed unnecessary initially but in later discussion it was  
agreed otherwise.  
  
Original file from Kevin Grittner, allegedly from Dan Ports.  
I had to clean up whitespace a bit per changes from Heikki.  

A src/test/isolation/expected/prepared-transactions_1.out
M src/test/isolation/isolation_schedule

Fix psql lexer to avoid use of backtracking.

commit   : be93200c76911047dcb94ddb696441ecdef9a3cb    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 25 Aug 2011 14:33:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 25 Aug 2011 14:33:08 -0400    

Click here for diff

Per previous experimentation, backtracking slows down lexing performance  
significantly (by about a third).  It's usually pretty easy to avoid, just  
need to have rules that accept an incomplete construct and do whatever the  
lexer would have done otherwise.  
  
The backtracking was introduced by the patch that added quoted variable  
substitution.  Back-patch to 9.0 where that was added.  

M src/bin/psql/psqlscan.l

Properly quote SQL/MED generic options in pg_dump output.

commit   : de632180ed51b8a6ff275a5f81198521e8b30e12    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 12:37:32 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 12:37:32 -0400    

Click here for diff

Shigeru Hanada  

M src/bin/pg_dump/pg_dump.c

Revert "Tweak postgresql.conf.sample's comments on listen_addresess."

commit   : e1f0820b0d252ace738d7c337eb348eb4dab42d8    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:41:00 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:41:00 -0400    

Click here for diff

This reverts commit 1bde67c0b9adce8b7ed2a2d1fcb2788cf96cea64, which  
should have been done only on the master branch.  

M src/backend/utils/misc/postgresql.conf.sample

Tweak postgresql.conf.sample's comments on listen_addresess.

commit   : 1bde67c0b9adce8b7ed2a2d1fcb2788cf96cea64    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:39:35 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:39:35 -0400    

Click here for diff

This makes it slightly more clear that '*' is not part of the default  
value, in case that wasn't obvious.  
  
As requested by Dougal Sutherland.  

M src/backend/utils/misc/postgresql.conf.sample

Adjust CREATE DOMAIN example for standard_conforming_strings=on.

commit   : eb11a37ed8cd0b38d29c7001435c14fb9316cee6    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:35:38 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 25 Aug 2011 09:35:38 -0400    

Click here for diff

Noted by Hitoshi Harada.  

M doc/src/sgml/ref/create_domain.sgml

Fix pgstatindex() to give consistent results for empty indexes.

commit   : ac45828e99024da2a9febe603d1be91cd87a9a50    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 23:50:15 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 23:50:15 -0400    

Click here for diff

For an empty index, the pgstatindex() function would compute 0.0/0.0 for  
its avg_leaf_density and leaf_fragmentation outputs.  On machines that  
follow the IEEE float arithmetic standard with any care, that results in  
a NaN.  However, per report from Rushabh Lathia, Microsoft couldn't  
manage to get this right, so you'd get a bizarre error on Windows.  
  
Fix by forcing the results to be NaN explicitly, rather than relying on  
the division operator to give that or the snprintf function to print it  
correctly.  I have some doubts that this is really the most useful  
definition, but it seems better to remain backward-compatible with  
those platforms for which the behavior wasn't completely broken.  
  
Back-patch to 8.2, since the code is like that in all current releases.  

M contrib/pgstattuple/pgstatindex.c

Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS.

commit   : 5354abb8f69734ff1c07cee5e29845b74d46e9d6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 15:16:23 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 15:16:23 -0400    

Click here for diff

The previous coding resulted in contrib modules unintentionally overriding  
the use of CONTRIB_TESTDB.  There seems no particularly good reason to  
allow that (after all, the makefile can set CONTRIB_TESTDB if that's really  
what it intends).  
  
In passing, document REGRESS_OPTS where the other pgxs.mk options are  
documented.  
  
Back-patch to 9.1 --- in prior versions, there were no cases of contrib  
modules setting REGRESS_OPTS without including the --dbname switch, so  
while the coding was fragile there was no actual bug.  

M contrib/sepgsql/Makefile
M doc/src/sgml/extend.sgml
M src/makefiles/pgxs.mk

Build src/ before contrib/ in make world

commit   : ed1a4adbe38ed94cc2e3c017a9f5be4b282bccb9    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 24 Aug 2011 21:34:49 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 24 Aug 2011 21:34:49 +0300    

Click here for diff

This fixes failures under parallel make when contrib modules use a  
generated backend header file (such as errcodes.h).  

M GNUmakefile.in

Avoid locale dependency in expected output.

commit   : 867c20c0720bb2fb7441cbb80949b9ae579ee774    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 13:47:01 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 13:47:01 -0400    

Click here for diff

We'll have to settle for just listing the extensions' data types,  
since function arguments seem to sort differently in different locales.  
Per buildfarm results.  

M contrib/earthdistance/expected/earthdistance.out
M contrib/earthdistance/sql/earthdistance.sql

Fix multiple bugs in extension dropping.

commit   : e8513328760ea175001bac52c10219315379b2c1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 13:09:06 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 24 Aug 2011 13:09:06 -0400    

Click here for diff

When we implemented extensions, we made findDependentObjects() treat  
EXTENSION dependency links similarly to INTERNAL links.  However, that  
logic contained an implicit assumption that an object could have at most  
one INTERNAL dependency, so it did not work correctly for objects having  
both INTERNAL and DEPENDENCY links.  This led to failure to drop some  
extension member objects when dropping the extension.  Furthermore, we'd  
never actually exercised the case of recursing to an internally-referenced  
(owning) object from anything other than a NORMAL dependency, and it turns  
out that passing the incoming dependency's flags to the owning object is  
the Wrong Thing.  This led to sometimes dropping a whole extension silently  
when we should have rejected the drop command for lack of CASCADE.  
  
Since we obviously were under-testing extension drop scenarios, add some  
regression test cases.  Unfortunately, such test cases require some  
extensions (duh), so we can't test for problems in the core regression  
tests.  I chose to add them to the earthdistance contrib module, which is  
a good test case because it has a dependency on the cube contrib module.  
  
Back-patch to 9.1.  Arguably these are pre-existing bugs in INTERNAL  
dependency handling, but since it appears that the cases can never arise  
pre-9.1, I'll refrain from back-patching the logic changes further than  
that.  

M contrib/earthdistance/expected/earthdistance.out
M contrib/earthdistance/sql/earthdistance.sql
M src/backend/catalog/dependency.c

Make CREATE EXTENSION check schema creation permissions.

commit   : 7f7fdd2a17ce087f995a0660fadf3e9523d72810    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 23 Aug 2011 21:49:07 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 23 Aug 2011 21:49:07 -0400    

Click here for diff

When creating a new schema for a non-relocatable extension, we neglected  
to check whether the calling user has permission to create schemas.  
That didn't matter in the original coding, since we had already checked  
superuserness, but in the new dispensation where users need not be  
superusers, we should check it.  Use CreateSchemaCommand() rather than  
calling NamespaceCreate() directly, so that we also enforce the rules  
about reserved schema names.  
  
Per complaint from KaiGai Kohei, though this isn't the same as his patch.  

M src/backend/commands/extension.c

Fix overoptimistic assumptions in column width estimation for subqueries.

commit   : 48f545a3aef461a635b975443a99dd268269590a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 23 Aug 2011 17:11:41 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 23 Aug 2011 17:11:41 -0400    

Click here for diff

set_append_rel_pathlist supposed that, while computing per-column width  
estimates for the appendrel, it could ignore child rels for which the  
translated reltargetlist entry wasn't a Var.  This gave rise to completely  
silly estimates in some common cases, such as constant outputs from some or  
all of the arms of a UNION ALL.  Instead, fall back on get_typavgwidth to  
estimate from the value's datatype; which might be a poor estimate but at  
least it's not completely wacko.  
  
That problem was exposed by an Assert in set_subquery_size_estimates, which  
unfortunately was still overoptimistic even with that fix, since we don't  
compute attr_widths estimates for appendrels that are entirely excluded by  
constraints.  So remove the Assert; we'll just fall back on get_typavgwidth  
in such cases.  
  
Also, since set_subquery_size_estimates calls set_baserel_size_estimates  
which calls set_rel_width, there's no need for set_subquery_size_estimates  
to call get_typavgwidth; set_rel_width will handle it for us if we just  
leave the estimate set to zero.  Remove the unnecessary code.  
  
Per report from Erik Rijkers and subsequent investigation.  

M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c

Add recovery.conf to the index in the user manual.

commit   : 26a092657ba4ac52212d43bae9a822a119efbd8a    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 23 Aug 2011 11:55:21 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 23 Aug 2011 11:55:21 +0300    

Click here for diff

Fujii Masao  

M doc/src/sgml/recovery-config.sgml

Fix handling of extension membership when filling in a shell operator.

commit   : 9c471d24126280a5f90ee9d276a9df37480dfcde    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 22 Aug 2011 10:55:47 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 22 Aug 2011 10:55:47 -0400    

Click here for diff

The previous coding would result in deleting and not re-creating the  
extension membership pg_depend rows, since there was no  
CommandCounterIncrement that would allow recordDependencyOnCurrentExtension  
to see that the deletion had happened.  Make it work like the shell type  
case, ie, keep the existing entries (and then throw an error if they're for  
the wrong extension).  
  
Per bug #6172 from Hitoshi Harada.  Investigation and fix by Dimitri  
Fontaine.  

M src/backend/catalog/pg_operator.c

Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist.

commit   : 38c9eb8fee298a9242bb2049c4fdf94407187d0c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 21 Aug 2011 18:16:02 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 21 Aug 2011 18:16:02 -0400    

Click here for diff

Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER  
ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger  
fired for the same update.  Fix by not trying to overload the use of  
estate->es_trig_tuple_slot.  Per report from Yoran Heling.  
  
Back-patch to 9.0, when trigger WHEN conditions were introduced.  

M src/backend/commands/trigger.c
M src/backend/executor/execMain.c
M src/backend/executor/execUtils.c
M src/include/nodes/execnodes.h
M src/test/regress/expected/triggers.out
M src/test/regress/sql/triggers.sql

Fix performance problem when building a lossy tidbitmap.

commit   : 548d1f752be7a11e240f1eadd4f9987a7b9793c5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 20 Aug 2011 14:51:02 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 20 Aug 2011 14:51:02 -0400    

Click here for diff

As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can  
make building a large tidbitmap into an O(N^2) operation.  To fix, make  
sure we remove more than the minimum amount of information per call, and  
add a fallback path to behave sanely if we're unable to fit the bitmap  
within the requested amount of memory.  
  
This has been wrong since the tidbitmap code was written, so back-patch  
to all supported branches.  

M src/backend/nodes/tidbitmap.c

commit   : 1ffcc377f692fb227ebfeb6036aa949099d71979    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 19 Aug 2011 11:57:38 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 19 Aug 2011 11:57:38 -0400    

Click here for diff

contrib/xml2 can get by without libxslt; the relevant features just  
won't work.  But if doesn't have libxml2, or if sepgsql doesn't have  
libselinux, the link succeeds but the module then fails to work at load  
time.  To avoid that, link the require libraries unconditionally, so  
that it will be clear at link-time that there is a problem.  
  
Per discussion with Tom Lane and KaiGai Kohei.  

M contrib/sepgsql/Makefile
M contrib/xml2/Makefile

Allow sepgsql regression tests to be run from a user homedir.

commit   : 1013770dd22193928fab5a3e379dc5ebe5a260be    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 19 Aug 2011 11:51:10 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 19 Aug 2011 11:51:10 -0400    

Click here for diff

KaiGai Kohei, with some changes by me.  

M contrib/sepgsql/sepgsql-regtest.te

Tag 9.1rc1.

commit   : d89b8daf5ee05f9c6fa63695e88d2315a224bf2d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 18 Aug 2011 17:23:13 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 18 Aug 2011 17:23:13 -0400    

Click here for diff

M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32

Explain max_prepared_transactions requirement in isolation tests' README.

commit   : 6a42b29102092d185f9b752f5a4edf4735e42f9b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 18 Aug 2011 11:45:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 18 Aug 2011 11:45:33 -0400    

Click here for diff

Now that we have a test that requires nondefault settings to pass, it seems  
like we'd better mention that detail in the directions about how to run the  
tests.  
  
Also do some very minor copy-editing.  

M src/test/isolation/README

Report libpq errors correctly if session setup or teardown steps fail in isolation regression tests.

commit   : b936d9264c08418909e3ec5d6107bd104d62fdc2    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 16:47:31 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 16:47:31 +0300    

Click here for diff

Alvaro committed these fixes to master branch on Tue Jul 29th, as part of  
Noah Misch's patch. The rest of that patch is not needed on 9.1, but this  
part should be backpatched.  

M src/test/isolation/isolationtester.c

Add an SSI regression test that tests all interesting permutations in the order of begin, prepare, and commit of three concurrent transactions that have conflicts between them.

commit   : b9585e8f983863fc7e1e147f503091a5f82d6ccf    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 13:36:37 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 13:36:37 +0300    

Click here for diff

The test runs for a quite long time, and the expected output file is huge,  
but this test caught some serious bugs during development, so seems  
worthwhile to keep. The test uses prepared transactions, so it fails if the  
server has max_prepared_transactions=0. Because of that, it's marked as  
"ignore" in the schedule file.  
  
Dan Ports  

A src/test/isolation/expected/prepared-transactions.out
M src/test/isolation/isolation_schedule
M src/test/isolation/isolationtester.c
A src/test/isolation/specs/prepared-transactions.spec

Strip whitespace from SQL blocks in the isolation test suite. This is purely cosmetic, it removes a lot of IMHO ugly whitespace from the expected output.

commit   : 89c096c56542cdd7355925f826b3c67dc5265155    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 12:16:10 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 18 Aug 2011 12:16:10 +0300    

Click here for diff

M src/test/isolation/expected/classroom-scheduling.out
M src/test/isolation/expected/multiple-row-versions.out
M src/test/isolation/expected/partial-index.out
M src/test/isolation/expected/project-manager.out
M src/test/isolation/expected/receipt-report.out
M src/test/isolation/expected/referential-integrity.out
M src/test/isolation/expected/ri-trigger.out
M src/test/isolation/expected/simple-write-skew.out
M src/test/isolation/expected/temporal-range-integrity.out
M src/test/isolation/expected/total-cash.out
M src/test/isolation/expected/two-ids.out
M src/test/isolation/specscanner.l

Improve detection of Python 3.2 installations

commit   : 7ce4abf5993dd8819053d0592aa2276d49b3ffb3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 18 Aug 2011 14:43:16 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 18 Aug 2011 14:43:16 +0300    

Click here for diff

Because of ABI tagging, the library version number might no longer be  
exactly the Python version number, so do extra lookups.  This affects  
installations without a shared library, such as ActiveState's  
installer.  
  
Also update the way to detect the location of the 'config' directory,  
which can also be versioned.  
  
Ashesh Vashi  

M config/python.m4
M configure

Change PyInit_plpy to external linkage

commit   : 7b1509d56256fa391d4ae71288be194923a41947    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 18 Aug 2011 12:53:32 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 18 Aug 2011 12:53:32 +0300    

Click here for diff

Module initialization functions in Python 3 must have external  
linkage, because PyMODINIT_FUNC does dllexport on Windows-like  
platforms.  Without this change, the build with Python 3 fails on  
Windows.  

M src/pl/plpython/plpython.c

Update 9.1 release notes to reflect commits through today.

commit   : f85e4057cfe62752eb57d2315d4acda5bb5c1e9e    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 17 Aug 2011 20:18:23 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 17 Aug 2011 20:18:23 -0400    

Click here for diff

Also do another pass of copy-editing.  

M doc/src/sgml/release-9.1.sgml

Fix two issues in plpython's handling of composite results.

commit   : f26474eff49c12c1bfc02f986406e44045108074    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 17 Aug 2011 17:07:25 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 17 Aug 2011 17:07:25 -0400    

Click here for diff

Dropped columns within a composite type were not handled correctly.  
Also, we did not check for whether a composite result type had changed  
since we cached the information about it.  
  
Jan Urbański, per a bug report from Jean-Baptiste Quenot  

M src/pl/plpython/expected/plpython_record.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_record.sql

Properly handle empty arrays returned from plperl functions.

commit   : 22a55b3af687806e6b3a08a131d00541774eaade    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 17 Aug 2011 12:03:26 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 17 Aug 2011 12:03:26 -0400    

Click here for diff

Bug reported by David Wheeler, fix by Alex Hunsaker.  
# Please enter the commit message for your changes. Lines starting  
# with '#' will be ignored, and an empty message aborts the commit.  
# On branch master  
# Changes to be committed:  
#   (use "git reset HEAD <file>..." to unstage)  
#  
#	modified:   src/pl/plperl/plperl.c  
#  
# Untracked files:  
#   (use "git add <file>..." to include in what will be committed)  
#  
#	autom4te.cache/  
#	configure.in~  
#	doc/src/sgml/ref/grant.sgml~  
#	src/backend/port/win32_latch.c~  
#	src/bin/psql/command.c~  
#	src/include/pg_config.h.win32~  
#	src/pl/plpython/plpython.c~  
#	src/tools/msvc/pgbison.bat~  
#	src/tools/msvc/pgbison.pl.bak  
#	src/tools/msvc/pgflex.bat~  
#	src/tools/msvc/pgflex.pl.bak  
#	src/tools/pgindent/README~  
#	src/tools/pgindent/pgindent.pl  
#	src/tools/pgindent/pgindent.pl~  
#	xxxxx  
#	yyyyyy  

M src/pl/plperl/plperl.c

Translation updates

commit   : dfee7d16ad2060e9f73f3002fd979acc085f9391    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 14:02:24 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 14:02:24 +0300    

Click here for diff

M src/backend/po/de.po
M src/backend/po/fr.po
M src/backend/po/ja.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/ja.po
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/es.po
A src/bin/pg_basebackup/po/fr.po
A src/bin/pg_basebackup/po/ja.po
M src/bin/pg_ctl/po/de.po
M src/bin/pg_ctl/po/es.po
M src/bin/pg_ctl/po/fr.po
M src/bin/pg_ctl/po/ja.po
M src/bin/pg_dump/po/fr.po
M src/bin/pg_dump/po/ja.po
M src/bin/psql/po/de.po
M src/bin/psql/po/fr.po
M src/bin/psql/po/ja.po
M src/bin/scripts/po/de.po
M src/interfaces/libpq/po/de.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/fr.po
M src/interfaces/libpq/po/ja.po
M src/interfaces/libpq/po/pt_BR.po
M src/pl/plperl/po/fr.po
M src/pl/plperl/po/ja.po
M src/pl/plperl/po/pt_BR.po
M src/pl/plpgsql/src/nls.mk
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/ja.po
A src/pl/plpgsql/src/po/pl.po
M src/pl/plpython/po/fr.po
M src/pl/plpython/po/ja.po

Adjust wording now that estimated size can increase

commit   : aee1df4de5006300cfb59b531933b1e0142a8735    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Wed, 17 Aug 2011 11:01:06 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Wed, 17 Aug 2011 11:01:06 +0200    

Click here for diff

Per comment form Fujii Masao.  

M doc/src/sgml/ref/pg_basebackup.sgml

If backup-end record is not seen, and we reach end of recovery from a streamed backup, throw an error and refuse to start up. The restore has not finished correctly in that case and the data directory is possibly corrupt. We already errored out in case of archive recovery, but could not during crash recovery because we couldn't distinguish between the case that pg_start_backup() was called and the database then crashed (must not error, data is OK), and the case that we're restoring from a backup and not all the needed WAL was replayed (data can be corrupt).

commit   : 59dd4790e24b2fdffe85b8d3664a8374303cca24    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 17 Aug 2011 11:36:47 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 17 Aug 2011 11:36:47 +0300    

Click here for diff

To distinguish those cases, add a line to backup_label to indicate  
whether the backup was taken with pg_start/stop_backup(), or by streaming  
(ie. pg_basebackup).  
  
This is a different implementation than what I committed to 9.2 a week ago.  
That implementation was not back-patchable because it required re-initdb.  
  
Fujii Masao  

M src/backend/access/transam/xlog.c

Move \r out of translatable strings

commit   : 9dcaf9a0526ff988566a47d21b5a8149e17c9ba2    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 10:52:35 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 10:52:35 +0300    

Click here for diff

The translation tools are very unhappy about seeing \r in translatable  
strings, so move it to a separate fprintf call.  

M src/bin/pg_basebackup/pg_basebackup.c

MacOS -> Mac OS

commit   : 1361a47359669dffb0bfbbbb6fec8be3c5087656    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 10:05:22 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 17 Aug 2011 10:05:22 +0300    

Click here for diff

Josh Kupershmidt  

M doc/src/sgml/dfunc.sgml
M doc/src/sgml/release-old.sgml
M doc/src/sgml/runtime.sgml

Forget about targeting catalog cache invalidations by tuple TID.

commit   : 1713bbca7d305c728785afb2c7603da97f4d6704    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 15:26:30 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 15:26:30 -0400    

Click here for diff

The TID isn't stable enough: we might queue an sinval event before a VACUUM  
FULL, and then process it afterwards, when the target tuple no longer has  
the same TID.  So we must invalidate entries on the basis of hash value  
only.  The old coding can be shown to result in various bizarre,  
hard-to-reproduce errors in the presence of concurrent VACUUM FULLs on  
system catalogs, and could easily result in permanent catalog corruption,  
up to and including complete loss of tables.  
  
This commit is just a minimal fix that removes the unsafe comparison.  
We should remove transmission of the tuple TID from sinval messages  
altogether, and then arrange to suppress the extra message in the common  
case of a heap_update that doesn't change the key hashvalue.  But that's  
going to be much more invasive, and will only produce a probably-marginal  
performance gain, so it doesn't seem like material for a back-patch.  
  
Back-patch to 9.0.  Before that, VACUUM FULL refused to do any tuple moving  
if it found any INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples (and  
CLUSTER would give up altogether), so there was no risk of moving a tuple  
that might be the subject of an unsent sinval message.  

M src/backend/utils/cache/catcache.c

Fix incorrect order of operations during sinval reset processing.

commit   : 84333962eae9e513bb12feb41069e3a3945a7a1a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 14:38:29 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 14:38:29 -0400    

Click here for diff

We have to be sure that we have revalidated each nailed-in-cache relcache  
entry before we try to use it to load data for some other relcache entry.  
The introduction of "mapped relations" in 9.0 broke this, because although  
we updated the state kept in relmapper.c early enough, we failed to  
propagate that information into relcache entries soon enough; in  
particular, we could try to fetch pg_class rows out of pg_class before  
we'd updated its relcache entry's rd_node.relNode value from the map.  
  
This bug accounts for Dave Gould's report of failures after "vacuum full  
pg_class", and I believe that there is risk for other system catalogs  
as well.  
  
The core part of the fix is to copy relmapper data into the relcache  
entries during "phase 1" in RelationCacheInvalidate(), before they'll be  
used in "phase 2".  To try to future-proof the code against other similar  
bugs, I also rearranged the order in which nailed relations are visited  
during phase 2: now it's pg_class first, then pg_class_oid_index, then  
other nailed relations.  This should ensure that RelationClearRelation can  
apply RelationReloadIndexInfo to all nailed indexes without risking use  
of not-yet-revalidated relcache entries.  
  
Back-patch to 9.0 where the relation mapper was introduced.  

M src/backend/utils/cache/relcache.c

Preserve toast value OIDs in toast-swap-by-content for CLUSTER/VACUUM FULL.

commit   : f48e62274f48df5788eef8465198184450ab6ad8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 13:48:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 13:48:11 -0400    

Click here for diff

This works around the problem that a catalog cache entry might contain a  
toast pointer that we try to dereference just as a VACUUM FULL completes  
on that catalog.  We will see the sinval message on the cache entry when  
we acquire lock on the toast table, but by that point we've already told  
tuptoaster.c "here's the pointer to fetch", so it's difficult from a code  
structural standpoint to update the pointer before we use it.  Much less  
painful to ensure that toast pointers are not invalidated in the first  
place.  We have to add a bit of code to deal with the case that a value  
that previously wasn't toasted becomes so; but that should be a  
seldom-exercised corner case, so the inefficiency shouldn't be significant.  
  
Back-patch to 9.0.  In prior versions, we didn't allow CLUSTER on system  
catalogs, and VACUUM FULL didn't result in reassignment of toast OIDs, so  
there was no problem.  

M src/backend/access/heap/tuptoaster.c
M src/backend/commands/cluster.c

Fix race condition in relcache init file invalidation.

commit   : 45476031a54c12bebf2f209ea2b6fb3bfc905193    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 13:12:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 16 Aug 2011 13:12:03 -0400    

Click here for diff

The previous code tried to synchronize by unlinking the init file twice,  
but that doesn't actually work: it leaves a window wherein a third process  
could read the already-stale init file but miss the SI messages that would  
tell it the data is stale.  The result would be bizarre failures in catalog  
accesses, typically "could not read block 0 in file ..." later during  
startup.  
  
Instead, hold RelCacheInitLock across both the unlink and the sending of  
the SI messages.  This is more straightforward, and might even be a bit  
faster since only one unlink call is needed.  
  
This has been wrong since it was put in (in 2002!), so back-patch to all  
supported releases.  

M src/backend/access/transam/twophase.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/relcache.c
M src/include/utils/relcache.h

Adjust total size in pg_basebackup progress report when reality changes

commit   : 0615782b23d3e4a9d9acece919bd77f919928953    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Tue, 16 Aug 2011 16:56:47 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Tue, 16 Aug 2011 16:56:47 +0200    

Click here for diff

When streaming including WAL, the size estimate will always be incorrect,  
since we don't know how much WAL is included. To make sure the output doesn't  
look completely unreasonable, this patch increases the total size whenever we  
go past the estimate, to make sure we never go above 100%.  

M src/bin/pg_basebackup/pg_basebackup.c

Make pg_basebackup progress report translatable

commit   : be78374f160d4a3bb2357d38e3196f8dcd4ffcc1    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 16 Aug 2011 11:24:08 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 16 Aug 2011 11:24:08 +0300    

Click here for diff

Also fix a potential portability bug, because INT64_FORMAT is only  
guaranteed to be available with snprintf, not fprintf.  

M src/bin/pg_basebackup/pg_basebackup.c

Use less cryptic variable names

commit   : adbb764e5040b388c55bf1344cafa3c5fee7c14f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 16 Aug 2011 11:19:50 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 16 Aug 2011 11:19:50 +0300    

Click here for diff

M src/bin/pg_basebackup/pg_basebackup.c

In pg_upgrade, avoid dumping orphaned temporary tables. This makes the pg_upgrade schema matching pattern match pg_dump/pg_dumpall.

commit   : 96a770d5da62c820efcb32e06887f112e9b40d80    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 15 Aug 2011 22:39:37 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 15 Aug 2011 22:39:37 -0400    

Click here for diff

Fix for 9.0, 9.1, and 9.2.  

M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/version_old_8_3.c

Adjust regression tests for error message change

commit   : b0313ddd6e4924763904b052c7a9ba14166876f6    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 15 Aug 2011 17:27:10 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 15 Aug 2011 17:27:10 +0300    

Click here for diff

M src/test/regress/expected/prepared_xacts.out

Add "Reason code" prefix to internal SSI error messages

commit   : 90ffdf83d28900f280a8a1e4ed904ebf7da8cb90    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 15 Aug 2011 15:20:16 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 15 Aug 2011 15:20:16 +0300    

Click here for diff

This makes it clearer that the error message is perhaps not supposed  
to be understood by users, and it also makes it somewhat clearer that  
it was not accidentally omitted from translation.  
  
Idea from Heikki Linnakangas, except that we don't mark "Reason code"  
for translation at this point, because that would make the  
implementation too cumbersome.  

M src/backend/storage/lmgr/predicate.c

Fix unsafe order of operations in foreign-table DDL commands.

commit   : 148f321eb4fe9030378ad21ba1be132084a9ab8f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 14 Aug 2011 15:40:29 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 14 Aug 2011 15:40:29 -0400    

Click here for diff

When updating or deleting a system catalog tuple, it's necessary to acquire  
RowExclusiveLock on the catalog before looking up the tuple; otherwise a  
concurrent VACUUM FULL on the catalog might move the tuple to a different  
TID before we can apply the update.  Coding patterns that find the tuple  
via a table scan aren't at risk here, but when obtaining the tuple from a  
catalog cache, correct ordering is important; and several routines in  
foreigncmds.c got it wrong.  Noted while running the regression tests in  
parallel with VACUUM FULL of assorted system catalogs.  
  
For consistency I moved all the heap_open calls to the starts of their  
functions, including a couple for which there was no actual bug.  
  
Back-patch to 8.4 where foreigncmds.c was added.  

M src/backend/commands/foreigncmds.c

Message style improvements

commit   : 00fc5d22634df1a59c8a265dba3f12814dc343c3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 14 Aug 2011 21:03:08 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 14 Aug 2011 21:03:08 +0300    

Click here for diff

M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c

Fix typo

commit   : 280daac70790cd5fc0129ac620935e4fc4ca7a90    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 14 Aug 2011 10:40:50 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 14 Aug 2011 10:40:50 +0300    

Click here for diff

M doc/src/sgml/ecpg.sgml

Fix incorrect timeout handling during initial authentication transaction.

commit   : 6a3f153d08259a2ea1d509668dea665528246ef0    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 13 Aug 2011 17:52:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 13 Aug 2011 17:52:24 -0400    

Click here for diff

The statement start timestamp was not set before initiating the transaction  
that is used to look up client authentication information in pg_authid.  
In consequence, enable_sig_alarm computed a wrong value (far in the past)  
for statement_fin_time.  That didn't have any immediate effect, because the  
timeout alarm was set without reference to statement_fin_time; but if we  
subsequently blocked on a lock for a short time, CheckStatementTimeout  
would consult the bogus value when we cancelled the lock timeout wait,  
and then conclude we'd timed out, leading to immediate failure of the  
connection attempt.  Thus an innocent "vacuum full pg_authid" would cause  
failures of concurrent connection attempts.  Noted while testing other,  
more serious consequences of vacuum full on system catalogs.  
  
We should set the statement timestamp before StartTransactionCommand(),  
so that the transaction start timestamp is also valid.  I'm not sure if  
there are any non-cosmetic effects of it not being valid, but the xact  
timestamp is at least sent to the statistics machinery.  
  
Back-patch to 9.0.  Before that, the client authentication timeout was done  
outside any transaction and did not depend on this state to be valid.  

M src/backend/utils/init/postinit.c

Add major features list and introductory text for 9.1 release notes.

commit   : fee4a066b1034e70e185e9dfb0eb6a2cd46dfa68    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 11 Aug 2011 16:36:58 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 11 Aug 2011 16:36:58 -0400    

Click here for diff

Backpatch to 9.1, obviously.  

M doc/src/sgml/release-9.1.sgml

Unbreak legacy syntax "COMMENT ON RULE x IS y", with no relation name.

commit   : a60c16db5f36562df571d36fcacbbed33fd40bd4    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 11 Aug 2011 11:23:51 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 11 Aug 2011 11:23:51 -0400    

Click here for diff

check_object_ownership() isn't happy about the null relation pointer.  
We could fix it there, but this seems more future-proof.  

M src/backend/catalog/objectaddress.c

commit   : 989f530d3f793ed1c990d705d0958bfd2a533b85    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 10 Aug 2011 12:20:45 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 10 Aug 2011 12:20:45 -0400    

Click here for diff

Fix a whole bunch of signal handlers that had been hacked to do things that  
might change errno, without adding the necessary save/restore logic for  
errno.  Also make some minor fixes in unix_latch.c, and clean up bizarre  
and unsafe scheme for disowning the process's latch.  While at it, rename  
the PGPROC latch field to procLatch for consistency with 9.2.  
  
Issues noted while reviewing a patch by Peter Geoghegan.  

M src/backend/access/transam/xlog.c
M src/backend/port/unix_latch.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/include/replication/syncrep.h
M src/include/storage/proc.h

Measure WaitLatch's timeout parameter in milliseconds, not microseconds.

commit   : 74d099494c5853a44188316ba117a8909b299d40    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 18:52:35 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 18:52:35 -0400    

Click here for diff

The original definition had the problem that timeouts exceeding about 2100  
seconds couldn't be specified on 32-bit machines.  Milliseconds seem like  
sufficient resolution, and finer grain than that would be fantasy anyway  
on many platforms.  
  
Back-patch to 9.1 so that this aspect of the latch API won't change between  
9.1 and later releases.  
  
Peter Geoghegan  

M src/backend/access/transam/xlog.c
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/replication/syncrep.c
M src/backend/replication/walsender.c

Documentation improvement and minor code cleanups for the latch facility.

commit   : 6760a4d4029121981bf3ec24847ddfbacecc070d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 15:30:51 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 15:30:51 -0400    

Click here for diff

Improve the documentation around weak-memory-ordering risks, and do a pass  
of general editorialization on the comments in the latch code.  Make the  
Windows latch code more like the Unix latch code where feasible; in  
particular provide the same Assert checks in both implementations.  
Fix poorly-placed WaitLatch call in syncrep.c.  
  
This patch resolves, for the moment, concerns around weak-memory-ordering  
bugs in latch-related code: we have documented the restrictions and checked  
that existing calls meet them.  In 9.2 I hope that we will install suitable  
memory barrier instructions in SetLatch/ResetLatch, so that their callers  
don't need to be quite so careful.  

M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/replication/syncrep.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/latch.h

Fix nested PlaceHolderVar expressions that appear only in targetlists.

commit   : 028a0c5a2913f18c954845cc014786912f39fa30    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 00:48:58 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 9 Aug 2011 00:48:58 -0400    

Click here for diff

A PlaceHolderVar's expression might contain another, lower-level  
PlaceHolderVar.  If the outer PlaceHolderVar is used, the inner one  
certainly will be also, and so we have to make sure that both of them get  
into the placeholder_list with correct ph_may_need values during the  
initial pre-scan of the query (before deconstruct_jointree starts).  
We did this correctly for PlaceHolderVars appearing in the query quals,  
but overlooked the issue for those appearing in the top-level targetlist;  
with the result that nested placeholders referenced only in the targetlist  
did not work correctly, as illustrated in bug #6154.  
  
While at it, add some error checking to find_placeholder_info to ensure  
that we don't try to create new placeholders after it's too late to do so;  
they have to all be created before deconstruct_jointree starts.  
  
Back-patch to 8.4 where the PlaceHolderVar mechanism was introduced.  

M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/util/placeholder.c
M src/include/optimizer/placeholder.h
M src/include/optimizer/planmain.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql

Add "Compatibility" section to ALTER EXTENSION reference page

commit   : 8956231576f082bd6e75f6c2f1c2a250b919176f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 22:15:38 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 22:15:38 +0300    

Click here for diff

Almost all other pages have one; this one must have been forgotten.  

M doc/src/sgml/ref/alter_extension.sgml

Remove whitespace from end of lines

commit   : 9089628d968e9d60c10acf010e7e4225c7f12c96    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 16:11:55 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 16:11:55 +0300    

Click here for diff

M doc/src/sgml/auth-delay.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/install-windows.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/ref/drop_foreign_table.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/sepgsql.sgml

commit   : b689df4ca95c6f62a231d817e22649939a8150c4    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 15:51:04 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 15:51:04 +0300    

Click here for diff

For consistency with other man pages.  

M doc/src/sgml/dblink.sgml

Fix a whitespace issue with the man pages

commit   : ad8641d535b46888c2f911a98a9b112771d82af6    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 10:49:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 7 Aug 2011 10:49:45 +0300    

Click here for diff

There is what may actually be a mistake in our markup.  The problem is  
in a situation like  
  
<para>  
 <command>FOO</command> is ...  
  
there is strictly speaking a line break before "FOO".  In the HTML  
output, this does not appear to be a problem, but in the man page  
output, this shows up, so you get double blank lines at odd places.  
  
So far, we have attempted to work around this with an XSL hack, but  
that causes other problems, such as creating run-ins in places like  
  
<acronym>SQL</acronym> <command>COPY</command>  
  
So fix the problem properly by removing the extra whitespace.  I only  
fixed the problems that affect the man page output, not all the  
places.  

M doc/src/sgml/dblink.sgml
M doc/src/sgml/ref/abort.sgml
M doc/src/sgml/ref/alter_aggregate.sgml
M doc/src/sgml/ref/alter_collation.sgml
M doc/src/sgml/ref/alter_conversion.sgml
M doc/src/sgml/ref/alter_database.sgml
M doc/src/sgml/ref/alter_default_privileges.sgml
M doc/src/sgml/ref/alter_domain.sgml
M doc/src/sgml/ref/alter_extension.sgml
M doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_function.sgml
M doc/src/sgml/ref/alter_group.sgml
M doc/src/sgml/ref/alter_index.sgml
M doc/src/sgml/ref/alter_operator.sgml
M doc/src/sgml/ref/alter_role.sgml
M doc/src/sgml/ref/alter_sequence.sgml
M doc/src/sgml/ref/alter_server.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_tablespace.sgml
M doc/src/sgml/ref/alter_trigger.sgml
M doc/src/sgml/ref/alter_type.sgml
M doc/src/sgml/ref/alter_user_mapping.sgml
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/begin.sgml
M doc/src/sgml/ref/close.sgml
M doc/src/sgml/ref/cluster.sgml
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/comment.sgml
M doc/src/sgml/ref/commit.sgml
M doc/src/sgml/ref/commit_prepared.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/create_conversion.sgml
M doc/src/sgml/ref/create_domain.sgml
M doc/src/sgml/ref/create_extension.sgml
M doc/src/sgml/ref/create_foreign_data_wrapper.sgml
M doc/src/sgml/ref/create_foreign_table.sgml
M doc/src/sgml/ref/create_function.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_language.sgml
M doc/src/sgml/ref/create_operator.sgml
M doc/src/sgml/ref/create_role.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/create_schema.sgml
M doc/src/sgml/ref/create_sequence.sgml
M doc/src/sgml/ref/create_server.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/create_tablespace.sgml
M doc/src/sgml/ref/create_trigger.sgml
M doc/src/sgml/ref/create_user_mapping.sgml
M doc/src/sgml/ref/createdb.sgml
M doc/src/sgml/ref/declare.sgml
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/discard.sgml
M doc/src/sgml/ref/do.sgml
M doc/src/sgml/ref/drop_aggregate.sgml
M doc/src/sgml/ref/drop_cast.sgml
M doc/src/sgml/ref/drop_collation.sgml
M doc/src/sgml/ref/drop_conversion.sgml
M doc/src/sgml/ref/drop_domain.sgml
M doc/src/sgml/ref/drop_foreign_data_wrapper.sgml
M doc/src/sgml/ref/drop_foreign_table.sgml
M doc/src/sgml/ref/drop_function.sgml
M doc/src/sgml/ref/drop_index.sgml
M doc/src/sgml/ref/drop_language.sgml
M doc/src/sgml/ref/drop_operator.sgml
M doc/src/sgml/ref/drop_role.sgml
M doc/src/sgml/ref/drop_rule.sgml
M doc/src/sgml/ref/drop_schema.sgml
M doc/src/sgml/ref/drop_sequence.sgml
M doc/src/sgml/ref/drop_server.sgml
M doc/src/sgml/ref/drop_table.sgml
M doc/src/sgml/ref/drop_tablespace.sgml
M doc/src/sgml/ref/drop_trigger.sgml
M doc/src/sgml/ref/drop_type.sgml
M doc/src/sgml/ref/drop_user_mapping.sgml
M doc/src/sgml/ref/drop_view.sgml
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/droplang.sgml
M doc/src/sgml/ref/dropuser.sgml
M doc/src/sgml/ref/ecpg-ref.sgml
M doc/src/sgml/ref/end.sgml
M doc/src/sgml/ref/fetch.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/insert.sgml
M doc/src/sgml/ref/listen.sgml
M doc/src/sgml/ref/lock.sgml
M doc/src/sgml/ref/notify.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
M doc/src/sgml/ref/prepare_transaction.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/reindex.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/reset.sgml
M doc/src/sgml/ref/revoke.sgml
M doc/src/sgml/ref/rollback.sgml
M doc/src/sgml/ref/rollback_prepared.sgml
M doc/src/sgml/ref/rollback_to.sgml
M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/ref/select.sgml
M doc/src/sgml/ref/select_into.sgml
M doc/src/sgml/ref/set.sgml
M doc/src/sgml/ref/show.sgml
M doc/src/sgml/ref/truncate.sgml
M doc/src/sgml/ref/unlisten.sgml
M doc/src/sgml/ref/update.sgml
M doc/src/sgml/ref/vacuum.sgml
M doc/src/sgml/ref/vacuumdb.sgml
M doc/src/sgml/ref/values.sgml
M doc/src/sgml/spi.sgml
M doc/src/sgml/stylesheet-man.xsl

Clean up ill-advised attempt to invent a private set of Node tags.

commit   : af0eca1a80e3e3a6fa0ee00df4a7883e4f228d0b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 6 Aug 2011 14:53:59 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 6 Aug 2011 14:53:59 -0400    

Click here for diff

Somebody thought it'd be cute to invent a set of Node tag numbers that were  
defined independently of, and indeed conflicting with, the main tag-number  
list.  While this accidentally failed to fail so far, it would certainly  
lead to trouble as soon as anyone wanted to, say, apply copyObject to these  
node types.  Clang was already complaining about the use of makeNode on  
these tags, and I think quite rightly so.  Fix by pushing these node  
definitions into the mainstream, including putting replnodes.h where it  
belongs.  

M src/backend/replication/repl_gram.y
M src/backend/replication/walsender.c
M src/include/nodes/nodes.h
R080 src/include/replication/replnodes.h src/include/nodes/replnodes.h
M src/include/replication/basebackup.h

Fix thinko in documentation of local_preload_libraries.

commit   : 34e2ef661b47140594feb4718893b42fc6fc1771    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 5 Aug 2011 21:18:02 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 5 Aug 2011 21:18:02 -0400    

Click here for diff

Somebody added a cross-reference to shared_preload_libraries, but wrote the  
wrong variable name when they did it (and didn't bother to make it a link  
either).  
  
Spotted by Christoph Anton Mitterer.  

M doc/src/sgml/config.sgml

Reduce PG_SYSLOG_LIMIT to 900 bytes.

commit   : 20b6578bdb4fe40eee7a01674eb077ffdb19d874    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 5 Aug 2011 21:02:31 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 5 Aug 2011 21:02:31 -0400    

Click here for diff

The previous limit of 1024 was set on the assumption that all modern syslog  
implementations have line length limits of 2KB or so.  However, this is  
false, as at least Solaris and sysklogd truncate at only 1KB.  900 seems  
to leave enough room for the max likely length of the tacked-on prefixes,  
so let's go with that.  
  
As with the previous change, it doesn't seem wise to back-patch this into  
already-released branches; but it should be OK to sneak it into 9.1.  
  
Noah Misch  

M src/backend/utils/error/elog.c

Fix markup for recent wal_level clarification.

commit   : 95245e887858e5b18772387d0ebeba32862e516c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 4 Aug 2011 15:02:02 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 4 Aug 2011 15:02:02 -0400    

Click here for diff

Backpatch to 9.1 and 9.0.  

M doc/src/sgml/config.sgml

In documentaiton, clarify which commands have reduced WAL volume for wal_level = minimum.

commit   : 857433b80e99e53b2187fd6a58dacaf2181fb8ce    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 4 Aug 2011 12:06:53 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 4 Aug 2011 12:06:53 -0400    

Click here for diff

Backpatch to 9.1 and 9.0.  

M doc/src/sgml/config.sgml

Move CheckRecoveryConflictDeadlock() call to a safer place.

commit   : 1318f1ad775d310fc7ce045603432c0f810dcdbf    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 2 Aug 2011 15:16:37 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 2 Aug 2011 15:16:37 -0400    

Click here for diff

This kluge was inserted in a spot apparently chosen at random: the lock  
manager's state is not yet fully set up for the wait, and in particular  
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock  
will not get cleaned up if the ereport is thrown.  This seems to not cause  
any observable problem in trivial test cases, because LockReleaseAll will  
silently clean up the debris; but I was able to cause failures with tests  
involving subtransactions.  
  
Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.  
Back-patch to all affected branches.  

M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/standby.h

Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.

commit   : 0dd6a09e3d127e728b9f43cfaf19e5351f60a096    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 2 Aug 2011 13:24:00 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 2 Aug 2011 13:24:00 -0400    

Click here for diff

It was initialized in the wrong place and to the wrong value.  With bad  
luck this could result in incorrect query-cancellation failures in hot  
standby sessions, should a HS backend be holding pin on buffer number 1  
while trying to acquire a lock.  

M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/proc.h

Avoid integer overflow when LIMIT + OFFSET >= 2^63.

commit   : bc6616aaedbe4bcd2441334a3bf8f43fe9635bf1    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 2 Aug 2011 10:47:17 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 2 Aug 2011 10:47:17 +0300    

Click here for diff

This fixes bug #6139 reported by Hitoshi Harada.  

M src/backend/executor/nodeLimit.c

Add host name resolution information to pg_hba.conf error messages

commit   : c1b910ed189a04c199fc1fb146262053827b524f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 31 Jul 2011 18:03:43 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 31 Jul 2011 18:03:43 +0300    

Click here for diff

This is to be able to analyze issues with host names in pg_hba.conf.  

M src/backend/libpq/auth.c

Fix pg_update to properly test for the data directory's existence on Win32.

commit   : 4d2d5b8196c774a1ac23cd7e7567e8bbd589b6aa    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 30 Jul 2011 01:50:19 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 30 Jul 2011 01:50:19 -0400    

Click here for diff

Backpatch to 9.1.  

M contrib/pg_upgrade/exec.c

Fix pg_restore's direct-to-database mode for standard_conforming_strings.

commit   : 4798aa5b09d8da9a221da4b91e92f1683174ad1e    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 28 Jul 2011 14:07:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 28 Jul 2011 14:07:04 -0400    

Click here for diff

pg_backup_db.c contained a mini SQL lexer with which it tried to identify  
boundaries between SQL commands, but that code was not designed to cope  
with standard_conforming_strings, and would get the wrong answer if a  
backslash immediately precedes a closing single quote in such a string,  
as per report from Julian Mehnle.  The bug only affects direct-to-database  
restores from archive files made with standard_conforming_strings = on.  
  
Rather than complicating the code some more to try to fix that, let's just  
rip it all out.  The only reason it was needed was to cope with COPY data  
embedded into ordinary archive entries, which was a layout that was used  
only for about the first three weeks of the archive format's existence,  
and never in any production release of pg_dump.  Instead, just rely on the  
archive file layout to tell us whether we're printing COPY data or not.  
  
This bug represents a data corruption hazard in all releases in which  
standard_conforming_strings can be turned on, ie 8.2 and later, so  
back-patch to all supported branches.  

M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_db.h

Minor message style adjustment

commit   : 42221b597eac30f06f1f49375538072985d3b59b    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 27 Jul 2011 23:54:46 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 27 Jul 2011 23:54:46 +0300    

Click here for diff

M src/backend/storage/lmgr/predicate.c

Fix typo.

commit   : 0b624d64a1fc7d8ecd031d4aaac368699fca3dc4    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 27 Jul 2011 11:20:07 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 27 Jul 2011 11:20:07 -0400    

Click here for diff

Noted by Josh Kupershmidt.  

M doc/src/sgml/ref/comment.sgml

Add missing newlines at end of error messages

commit   : 14e109e82e8a7a179ad828ec1ed06ac0a8cd011a    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 26 Jul 2011 23:27:40 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 26 Jul 2011 23:27:40 +0300    

Click here for diff

M src/bin/psql/command.c
M src/bin/psql/common.c

Clarify which relkinds accept column comments.

commit   : d94eb49634fff6abc72bed577269aa21fd9f01e9    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 26 Jul 2011 09:34:55 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 26 Jul 2011 09:34:55 -0400    

Click here for diff

Per discussion with Josh Kupershmidt.  

M doc/src/sgml/ref/comment.sgml

Don't build replacement getpeereid function on mingw.

commit   : 5c70cc890dfadb4579c8e96c4b27cce285e75cfc    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Jul 2011 23:46:52 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Jul 2011 23:46:52 -0400    

Click here for diff

Windows doesn't have Unix sockets, so it's not needed, and moreover causes compile warnings.  

M configure
M configure.in

Improvements to SQL/MED documentation.

commit   : cd28f09577667b4bfe36c4c41c786b0f69949bd1    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Jul 2011 09:37:06 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Jul 2011 09:37:06 -0400    

Click here for diff

Laurenz Albe, somewhat modified by me.  

M doc/src/sgml/ddl.sgml
M doc/src/sgml/fdwhandler.sgml

Fix previous patch so it also works if not USE_SSL (mea culpa).

commit   : 2ae6075b59696f044d15c9f1b60a800407471b62    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 23:29:10 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 23:29:10 -0400    

Click here for diff

On balance, the need to cover this case changes my mind in favor of pushing  
all error-message generation duties into the two fe-secure.c routines.  
So do it that way.  

M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-secure.c

Improve libpq's error reporting for SSL failures.

commit   : f9d466e53036b9bb4e075ebde754b90008cf80b2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 16:29:13 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 16:29:13 -0400    

Click here for diff

In many cases, pqsecure_read/pqsecure_write set up useful error messages,  
which were then overwritten with useless ones by their callers.  Fix this  
by defining the responsibility to set an error message to be entirely that  
of the lower-level function when using SSL.  
  
Back-patch to 8.3; the code is too different in 8.2 to be worth the  
trouble.  

M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-secure.c

Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.

commit   : f9c0547aa205148cc62b692a99fde8c3f62bd058    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 15:17:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Jul 2011 15:17:56 -0400    

Click here for diff

This disables an entirely unnecessary "sanity check" that causes failures  
in nonblocking mode, because OpenSSL complains if we move or compact the  
write buffer.  The only actual requirement is that we not modify pending  
data once we've attempted to send it, which we don't.  Per testing and  
research by Martin Pihlak, though this fix is a lot simpler than his patch.  
  
I put the same change into the backend, although it's less clear whether  
it's necessary there.  We do use nonblock mode in some situations in  
streaming replication, so seems best to keep the same behavior in the  
backend as in libpq.  
  
Back-patch to all supported releases.  

M src/backend/libpq/be-secure.c
M src/interfaces/libpq/fe-secure.c

In pg_upgrade on Windows, check if the directory is writable by actually creating and removing a file because access() doesn't work on that platform.

commit   : 7f4c34739b183b5cf4e9141e3b2e09b99bf7cbad    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sun, 24 Jul 2011 01:43:01 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sun, 24 Jul 2011 01:43:01 -0400    

Click here for diff

Backpatch to 9.1 where this check was added.  

M contrib/pg_upgrade/exec.c

Unbreak Windows builds broken by EDITOR_LINENUMBER_ARG change.

commit   : 552a5c73e08b74968a5f1591c5f09dc8f519a173    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 23 Jul 2011 19:33:04 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 23 Jul 2011 19:33:04 -0400    

Click here for diff

M src/bin/psql/command.c

Change EDITOR_LINENUMBER_SWITCH to an environment variable

commit   : 70a488878f97eeec09356054fc161b9f8e914257    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 24 Jul 2011 00:25:29 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 24 Jul 2011 00:25:29 +0300    

Click here for diff

Also change "switch" to "arg" because "switch" is a bit of a sloppy  
term.  So the environment variable is called  
PSQL_EDITOR_LINENUMBER_ARG.  Set "+" as hardcoded default value on  
Unix (since "vi" is the hardcoded default editor), so many users won't  
have to configure this at all.  Move the documentation around a bit to  
centralize the editor configuration under environment variables,  
rather than repeating bits of it under every backslash command that  
invokes an editor.  

M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/release-9.1.sgml
M src/bin/psql/command.c
M src/bin/psql/settings.h

Rethink behavior of CREATE OR REPLACE during CREATE EXTENSION.

commit   : eb15f26d577a11319b9429fb84f752a0135918db    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Jul 2011 16:59:49 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Jul 2011 16:59:49 -0400    

Click here for diff

The original implementation simply did nothing when replacing an existing  
object during CREATE EXTENSION.  The folly of this was exposed by a report  
from Marc Munro: if the existing object belongs to another extension, we  
are left in an inconsistent state.  We should insist that the object does  
not belong to another extension, and then add it to the current extension  
if not already a member.  

M src/backend/catalog/heap.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_type.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/proclang.c
M src/backend/commands/tsearchcmds.c
M src/include/catalog/dependency.h

Unbreak unlogged tables.

commit   : 16a6a70ea37be76b7c3757503defbbd05d2acdf1    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 22 Jul 2011 16:15:43 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 22 Jul 2011 16:15:43 -0400    

Click here for diff

I broke this in commit 5da79169d3e9f0fab47da03318c44075b3f824c5, which  
was obviously insufficiently well tested.  Add some regression tests  
in the hope of making future slip-ups more likely to be noticed.  

M src/backend/catalog/namespace.c
M src/test/regress/expected/create_table.out
M src/test/regress/sql/create_table.sql

Fix PQsetvalue() to avoid possible crash when adding a new tuple.

commit   : 64207122a241282189451fdcbab3f5e2a6e1e1b1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 21 Jul 2011 12:24:14 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 21 Jul 2011 12:24:14 -0400    

Click here for diff

PQsetvalue unnecessarily duplicated the logic in pqAddTuple, and didn't  
duplicate it exactly either --- pqAddTuple does not care what is in the  
tuple-pointer array positions beyond the last valid entry, whereas the  
code in PQsetvalue assumed such positions would contain NULL.  This led  
to possible crashes if PQsetvalue was applied to a PGresult that had  
previously been enlarged with pqAddTuple, for instance one built from a  
server query.  Fix by relying on pqAddTuple instead of duplicating logic,  
and not assuming anything about the contents of res->tuples[res->ntups].  
  
Back-patch to 8.4, where PQsetvalue was introduced.  
  
Andrew Chernow  

M src/interfaces/libpq/fe-exec.c

In pg_upgrade, fix the -l/log option to work on Windows.

commit   : c3810795e99ee20181884e62d925f5ac910f0b8b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 20 Jul 2011 18:31:07 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 20 Jul 2011 18:31:07 -0400    

Click here for diff

Also, double-quote the log file name in all places, to allow (on all  
platforms) log file names with spaces.  
  
Back patch to 9.0 and 9.1.  

M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/server.c

Improve sepgsql and SECURITY LABEL documentation.

commit   : 1879cf3f173639de8235fb50be42abbbf672646b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Jul 2011 09:22:57 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Jul 2011 09:22:57 -0400    

Click here for diff

KaiGai Kohei, based on feedback from Yeb Havinga, with some  
corrections by me.  

M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/sepgsql.sgml

Minor improvement to pg_seclabel documentation.

commit   : aa47101338aa05cfec1fc00f0df0eb2bd04f149a    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Jul 2011 09:12:42 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Jul 2011 09:12:42 -0400    

Click here for diff

This is a bit more consistent with the way pg_description is  
documented, and also include a useful cross-link.  

M doc/src/sgml/catalogs.sgml

Fix typo

commit   : 2011712a5aced8a359d46b6815fd8656577230cb    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Jul 2011 08:02:34 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Jul 2011 08:02:34 +0300    

Click here for diff

M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.linux.utf8.sql
M src/test/regress/sql/collate.sql

Change debug message from ereport to elog

commit   : e4ce3b777586ddc0f9e351509a1daddb482190b2    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Jul 2011 07:50:10 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Jul 2011 07:50:10 +0300    

Click here for diff

M src/backend/storage/file/reinit.c

Adapted expected result for latest change to ecpglib.

commit   : 826fe721b2eb7d41c733df3fa654fc992b3d80d6    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Mon, 18 Jul 2011 18:56:15 +0200    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Mon, 18 Jul 2011 18:56:15 +0200    

Click here for diff

M src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr

Made ecpglib write double with a precision of 15 digits.

commit   : 40922b69c404ac9e0c9802fe973f5297b8808f0c    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Mon, 18 Jul 2011 16:25:27 +0200    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Mon, 18 Jul 2011 16:25:27 +0200    

Click here for diff

Patch originally by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.  

M src/interfaces/ecpg/ecpglib/execute.c

Remove claim that the project is not represented in the SQL working group

commit   : 548d197ca751895ec6acbaee611c287ce1d6fe47    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 18 Jul 2011 07:30:00 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 18 Jul 2011 07:30:00 +0300    

Click here for diff

We have a few people involved there now.  

M doc/src/sgml/features.sgml

Note that information_schema.sql_languages was removed in SQL:2008

commit   : b17648bc6e1dbb8c717c70129b4774310d6804ab    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 18 Jul 2011 07:26:30 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 18 Jul 2011 07:26:30 +0300    

Click here for diff

M doc/src/sgml/information_schema.sgml

Replace errdetail("%s", ...) with errdetail_internal("%s", ...).

commit   : fbd847a5877444f098cdbf270b967f8010a48838    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 14:21:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 14:21:24 -0400    

Click here for diff

There may be some other places where we should use errdetail_internal,  
but they'll have to be evaluated case-by-case.  This commit just hits  
a bunch of places where invoking gettext is obviously a waste of cycles.  

M contrib/dblink/dblink.c
M src/backend/commands/trigger.c
M src/backend/commands/user.c
M src/backend/libpq/auth.c
M src/backend/nodes/print.c
M src/backend/storage/lmgr/deadlock.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/xml.c
M src/backend/utils/fmgr/dfmgr.c
M src/backend/utils/misc/guc.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c

Use errdetail_internal() for SSI transaction cancellation details.

commit   : 3b41d490bb4225ff0398900f566b1e4c728eff05    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 13:49:44 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 13:49:44 -0400    

Click here for diff

Per discussion, these seem too technical to be worth translating.  
  
Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Add an errdetail_internal() ereport auxiliary routine.

commit   : 657836741410563be35180ba34adcdae6c767ce5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 13:41:48 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Jul 2011 13:41:48 -0400    

Click here for diff

This function supports untranslated detail messages, in the same way that  
errmsg_internal supports untranslated primary messages.  We've needed this  
for some time IMO, but discussion of some cases in the SSI code provided  
the impetus to actually add it.  
  
Kevin Grittner, with minor adjustments by me  

M doc/src/sgml/sources.sgml
M src/backend/utils/error/elog.c
M src/include/utils/elog.h

Fix SSPI login when multiple roundtrips are required

commit   : 885604d112d5b20d94e2d5d8b352d47a6e585ceb    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Sat, 16 Jul 2011 19:58:53 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Sat, 16 Jul 2011 19:58:53 +0200    

Click here for diff

This fixes SSPI login failures showing "The function  
requested is not supported", often showing up when connecting  
to localhost. The reason was not properly updating the SSPI  
handle when multiple roundtrips were required to complete the  
authentication sequence.  
  
Report and analysis by Ahmed Shinwari, patch by Magnus Hagander  

M src/backend/libpq/auth.c

Fix two ancient bugs in GiST code to re-find a parent after page split:

commit   : f844022a0953ab013055fc68bd3ec34f504a6115    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Jul 2011 10:54:56 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Jul 2011 10:54:56 +0300    

Click here for diff

First, when following a right-link, we incorrectly marked the current page  
as the parent of the right sibling. In reality, the parent of the right page  
is the same as the parent of the current page (or some page to the right of  
it, gistFindCorrectParent() will sort that out).  
  
Secondly, when we follow a right-link, we must prepend, not append, the right  
page to our list of pages to visit. That's because we assume that once we  
hit a leaf page in the list, all the rest are leaf pages too, and give up.  
  
To hit these bugs, you need concurrent actions and several unlucky accidents.  
Another backend must split the root page, while you're in process of  
splitting a lower-level page. Furthermore, while you scan the internal nodes  
to re-find the parent, another backend needs to again split some more internal  
pages. Even then, the bugs don't necessarily manifest as user-visible errors  
or index corruption.  
  
While we're at it, make the error reporting a bit better if gistFindPath()  
fails to re-find the parent. It used to be an assertion, but an elog() seems  
more appropriate.  
  
Backpatch to all supported branches.  

M src/backend/access/gist/gist.c

In planner, don't assume that empty parent tables aren't really empty.

commit   : cf82452855b76611b73ab8d4dde75f1758d8bf28    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 14 Jul 2011 17:30:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 14 Jul 2011 17:30:57 -0400    

Click here for diff

There's a heuristic in estimate_rel_size() to clamp the minimum size  
estimate for a table to 10 pages, unless we can see that vacuum or analyze  
has been run (and set relpages to something nonzero, so this will always  
happen for a table that's actually empty).  However, it would be better  
not to do this for inheritance parent tables, which very commonly are  
really empty and can be expected to stay that way.  Per discussion of a  
recent pgsql-performance report from Anish Kejariwal.  Also prevent it  
from happening for indexes (although this is more in the nature of  
documentation, since CREATE INDEX normally initializes relpages to  
something nonzero anyway).  
  
Back-patch to 9.0, because the ability to collect statistics across a  
whole inheritance tree has improved the planner's estimates to the point  
where this relatively small error makes a significant difference.  In the  
referenced report, merge or hash joins were incorrectly estimated as  
cheaper than a nestloop with inner indexscan on the inherited table.  
That was less likely before 9.0 because the lack of inherited stats would  
have resulted in a default (and rather pessimistic) estimate of the cost  
of a merge or hash join.  

M src/backend/optimizer/util/plancat.c

Small update on suggested startup file locations

commit   : a3678ab2147fad8e64ea5198a545fb902e6d65f4    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 14 Jul 2011 19:07:39 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 14 Jul 2011 19:07:39 +0300    

Click here for diff

Debian/Ubuntu don't have a /etc/rc.d/ directory, so add some  
alternative names as suggestions.  

M doc/src/sgml/runtime.sgml

Remove README.mb.big5 and README.mb.jp

commit   : a5e3c182c8ff23c60a629631160e07f9f4710f63    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 14 Jul 2011 18:28:07 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 14 Jul 2011 18:28:07 +0300    

Click here for diff

They were wildly outdated.  

D doc/README.mb.big5
D doc/README.mb.jp

commit   : 699a1c65eda557ff847c8da83c615b03f6f74265    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 13 Jul 2011 01:30:35 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 13 Jul 2011 01:30:35 +0300    

Click here for diff

M doc/src/sgml/information_schema.sgml

Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window.

commit   : b61b28fbe8147b003550548b4976977252ee39b3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Jul 2011 18:24:53 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Jul 2011 18:24:53 -0400    

Click here for diff

Regular aggregate functions in combination with, or within the arguments  
of, window functions are OK per spec; they have the semantics that the  
aggregate output rows are computed and then we run the window functions  
over that row set.  (Thus, this combination is not really useful unless  
there's a GROUP BY so that more than one aggregate output row is possible.)  
The case without GROUP BY could fail, as recently reported by Jeff Davis,  
because sloppy construction of the Agg node's targetlist resulted in extra  
references to possibly-ungrouped Vars appearing outside the aggregate  
function calls themselves.  See the added regression test case for an  
example.  
  
Fixing this requires modifying the API of flatten_tlist and its underlying  
function pull_var_clause.  I chose to make pull_var_clause's API for  
aggregates identical to what it was already doing for placeholders, since  
the useful behaviors turn out to be the same (error, report node as-is, or  
recurse into it).  I also tightened the error checking in this area a bit:  
if it was ever valid to see an uplevel Var, Aggref, or PlaceHolderVar here,  
that was a long time ago, so complain instead of ignoring them.  
  
Backpatch into 9.1.  The failure exists in 8.4 and 9.0 as well, but seeing  
that it only occurs in a basically-useless corner case, it doesn't seem  
worth the risks of changing a function API in a minor release.  There might  
be third-party code using pull_var_clause.  

M src/backend/catalog/heap.c
M src/backend/commands/trigger.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/tlist.c
M src/backend/optimizer/util/var.c
M src/backend/utils/adt/selfuncs.c
M src/include/optimizer/clauses.h
M src/include/optimizer/tlist.h
M src/include/optimizer/var.h
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql

Fix another oversight in logging of changes in postgresql.conf settings.

commit   : 7c884433992cce9f53d87ca3a5d0d629e21af300    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Jul 2011 17:03:06 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Jul 2011 17:03:06 -0400    

Click here for diff

We were using GetConfigOption to collect the old value of each setting,  
overlooking the possibility that it didn't exist yet.  This does happen  
in the case of adding a new entry within a custom variable class, as  
exhibited in bug #6097 from Maxim Boguk.  
  
To fix, add a missing_ok parameter to GetConfigOption, but only in 9.1  
and HEAD --- it seems possible that some third-party code is using that  
function, so changing its API in a minor release would cause problems.  
In 9.0, create a near-duplicate function instead.  

M src/backend/commands/extension.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h

Fix one overflow and one signedness error, caused by the patch to calculate OLDSERXID_MAX_PAGE based on BLCKSZ. MSVC compiler warned about these.

commit   : ec194651b8ba36e9ad5f7c98ac77c4d9639e2351    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 8 Jul 2011 17:28:27 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 8 Jul 2011 17:28:27 +0300    

Click here for diff

M src/backend/storage/lmgr/predicate.c

Add item about Clang support to 9.1 release notes

commit   : ebea4c531c9edac6fd35519b90d83044ae6e448e    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 8 Jul 2011 17:04:49 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 8 Jul 2011 17:04:49 +0300    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Message style improvements

commit   : 0a5b01a716ef72d1711dbfc4dc9617b7f5e867dc    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 8 Jul 2011 07:37:04 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 8 Jul 2011 07:37:04 +0300    

Click here for diff

M doc/src/sgml/func.sgml
M src/backend/commands/alter.c
M src/backend/replication/basebackup.c
M src/backend/replication/walsender.c
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/text.out

Tag 9.1beta3.

commit   : 6c76524620d6cca3d667dc16fe65713a107f18c1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 20:12:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 20:12:33 -0400    

Click here for diff

M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32

commit   : 3e80d0d2e5a0f6a7a971ddcb6e38cc8f0079aed7    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 19:34:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 19:34:24 -0400    

Click here for diff

In the example for decode(), show the bytea result in hex format,  
since that's now the default.  Use an E'' string in the example for  
quote_literal(), so that it works regardless of the  
standard_conforming_strings setting.  On the functions-for-binary-strings  
page, leave the examples as-is for readability, but add a note pointing out  
that they are shown in escape format.  Per comments from Thom Brown.  
  
Also, improve the description for encode() and decode() a tad.  
  
Backpatch to 9.0, where bytea_output was introduced.  

M doc/src/sgml/func.sgml

Update 9.1 release notes to reflect commits through today.

commit   : 4eb4b4013d27eaa8bcbd089ce7a20f4bcb2556f3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 17:55:14 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 17:55:14 -0400    

Click here for diff

M doc/src/sgml/release-9.1.sgml

There's a small window wherein a transaction is committed but not yet on the finished list, and we shouldn't flag it as a potential conflict if so. We can also skip adding a doomed transaction to the list of possible conflicts because we know it won't commit.

commit   : 9b47c67ccde6ec91219ad4aba515a48c136f9568    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 8 Jul 2011 00:36:30 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 8 Jul 2011 00:36:30 +0300    

Click here for diff

Dan Ports and Kevin Grittner.  

M src/backend/storage/lmgr/predicate.c

SSI has a race condition, where the order of commit sequence numbers of transactions might not match the order the work done in those transactions become visible to others. The logic in SSI, however, assumed that it does. Fix that by having two sequence numbers for each serializable transaction, one taken before a transaction becomes visible to others, and one after it. This is easier than trying to make the the transition totally atomic, which would require holding ProcArrayLock and SerializableXactHashLock at the same time. By using prepareSeqNo instead of commitSeqNo in a few places where commit sequence numbers are compared, we can make those comparisons err on the safe side when we don't know for sure which committed first.

commit   : fdf8f751e7933c7992cdabc4b8f37d25268f192e    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 7 Jul 2011 22:35:09 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 7 Jul 2011 22:35:09 +0300    

Click here for diff

Per analysis by Kevin Grittner and Dan Ports, but this approach to fix it  
is different from the original patch.  

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Fix use of unportable %m format

commit   : 469345e1e3ae32c8c3c694f9a47cc6edccc5a274    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 7 Jul 2011 21:21:57 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 7 Jul 2011 21:21:57 +0300    

Click here for diff

M contrib/pg_upgrade/file.c

commit   : db43ec43cc4ea68a45ee3364488285edbd790893    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 15:10:32 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 15:10:32 -0400    

Click here for diff

Per discussion, this structure seems more understandable than what was  
there before.  Make config.sgml and postgresql.conf.sample agree.  
  
In passing do a bit of editorial work on the variable descriptions.  

M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/utils/guc_tables.h

Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.

commit   : a392b5247870da806e511ae2aadb0464509f7afe    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 7 Jul 2011 15:05:21 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 7 Jul 2011 15:05:21 -0400    

Click here for diff

The value when BLCKSZ = 8192 is unchanged, but with larger-than-normal  
block sizes we might need to crank things back a bit, as we'll have  
more entries per page than normal in that case.  
  
Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Finish disabling reduced-lock-levels-for-DDL feature.

commit   : ec1339ea5cb591da53ad7584ffc29e120f6bf74f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 13:14:46 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Jul 2011 13:14:46 -0400    

Click here for diff

Previous patch only covered the ALTER TABLE changes, not changes in other  
commands; and it neglected to revert the documentation changes.  

M doc/src/sgml/mvcc.sgml
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/rewrite/rewriteDefine.c

Fix a bug with SSI and prepared transactions:

commit   : 046d52f7d319419d338fa605f9d6e00b21c5c5ff    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 7 Jul 2011 18:04:37 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 7 Jul 2011 18:04:37 +0300    

Click here for diff

If there's a dangerous structure T0 ---> T1 ---> T2, and T2 commits first,  
we need to abort something. If T2 commits before both conflicts appear,  
then it should be caught by OnConflict_CheckForSerializationFailure. If  
both conflicts appear before T2 commits, it should be caught by  
PreCommit_CheckForSerializationFailure. But that is actually run when  
T2 *prepares*. Fix that in OnConflict_CheckForSerializationFailure, by  
treating a prepared T2 as if it committed already.  
  
This is mostly a problem for prepared transactions, which are in prepared  
state for some time, but also for regular transactions because they also go  
through the prepared state in the SSI code for a short moment when they're  
committed.  
  
Kevin Grittner and Dan Ports  

M src/backend/storage/lmgr/predicate.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/expected/prepared_xacts_1.out
M src/test/regress/sql/prepared_xacts.sql

Remove assumptions that not-equals operators cannot be in any opclass.

commit   : cb1cc305bc349338f75a549c36041b4c91cf779f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 6 Jul 2011 14:53:16 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 6 Jul 2011 14:53:16 -0400    

Click here for diff

get_op_btree_interpretation assumed this in order to save some duplication  
of code, but it's not true in general anymore because we added <> support  
to btree_gist.  (We still assume it for btree opclasses, though.)  
  
Also, essentially the same logic was baked into predtest.c.  Get rid of  
that duplication by generalizing get_op_btree_interpretation so that it  
can be used by predtest.c.  
  
Per bug report from Denis de Bernardy and investigation by Jeff Davis,  
though I didn't use Jeff's patch exactly as-is.  
  
Back-patch to 9.1; we do not support this usage before that.  

M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_expr.c
M src/backend/utils/cache/lsyscache.c
M src/include/utils/lsyscache.h

Make the file_fdw validator check that a filename option has been provided.

commit   : f8bd267d35503109255c99eae96c86ba8ba1b56f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 18:46:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 18:46:03 -0400    

Click here for diff

This was already a runtime failure condition, but it's better to check  
at validation time if possible.  Lightly modified version of a patch  
by Shigeru Hanada.  

M contrib/file_fdw/file_fdw.c
M contrib/file_fdw/input/file_fdw.source
M contrib/file_fdw/output/file_fdw.source

Call FDW validator functions even when the options list is empty.

commit   : c639d240c00f8d2b6684c03597b30d179d4ab31c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 18:21:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 18:21:12 -0400    

Click here for diff

This is useful since a validator might want to require certain options  
to be provided.  The passed array is an empty text array in this case.  
  
Per suggestion by Laurenz Albe, though this is not quite his patch.  

M src/backend/commands/foreigncmds.c

Message style improvements of errmsg_internal() calls

commit   : 457333d5c2f95e9448a2366dab55aab74514295c    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 22:56:55 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 22:56:55 +0300    

Click here for diff

M src/backend/libpq/auth.c
M src/backend/libpq/be-secure.c
M src/backend/port/pipe.c
M src/backend/port/win32/signal.c
M src/backend/port/win32/socket.c
M src/backend/port/win32/timer.c
M src/backend/postmaster/postmaster.c

Restructure foreign data wrapper chapter so it has more than one section.

commit   : 10323f3a592922bce75bc5c38589f0f3427ef232    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 15:54:00 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 15:54:00 -0400    

Click here for diff

As noted by Laurenz Albe, our SGML tools deal rather oddly with chapters  
having just one <sect1>.  Perhaps the tooling could be fixed, but really  
the design of this chapter's introduction is pretty bogus anyhow.  Split  
it into a true introduction and a <sect1> about the FDW functions, so  
that it reads better and dodges the lack-of-a-chapter-TOC problem.  

M doc/src/sgml/fdwhandler.sgml

Postgres -> PostgreSQL in error message

commit   : c2fe8e70b270ffc8641380e6a16f5824164ce23e    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 22:32:12 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 22:32:12 +0300    

Click here for diff

M contrib/pg_upgrade/controldata.c

Improve documentation about foreign data wrapper validator functions.

commit   : 8b6c89ad13921c7f24e205425f91f6ffda06235a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 15:38:18 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 15:38:18 -0400    

Click here for diff

Modified version of a patch by Shigeru Hanada.  

M doc/src/sgml/fdwhandler.sgml

Fix psql's counting of script file line numbers during COPY.

commit   : 2683a6340de9bda16b436b6d641ea63607ef1009    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 12:04:40 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 5 Jul 2011 12:04:40 -0400    

Click here for diff

handleCopyIn incremented pset.lineno for each line of COPY data read from  
a file.  This is correct when reading from the current script file (i.e.,  
we are doing COPY FROM STDIN followed by in-line data), but it's wrong if  
the data is coming from some other file.  Per bug #6083 from Steve Haslam.  
Back-patch to all supported versions.  

M src/bin/psql/copy.c

Fix typo in sslmode documentation

commit   : eb9ca35fbd4fe3b5c6d3dbe006863bd1199c2db2    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Tue, 5 Jul 2011 09:45:19 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Tue, 5 Jul 2011 09:45:19 +0200    

Click here for diff

Per bug #6089, noted by Sidney Cadot  

M doc/src/sgml/libpq.sgml

Message style tweaks

commit   : 06f04b6dc41354d1eada7b68bab339c908fc97eb    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 00:01:35 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 00:01:35 +0300    

Click here for diff

M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/win32/crashdump.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/misc/guc.c
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/text.out
M src/test/regress/sql/foreign_data.sql

Small documentation tweaks

commit   : 413ed2556f7ea21aa7c9d6fe28225455f0e5eac3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 00:00:14 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 5 Jul 2011 00:00:14 +0300    

Click here for diff

M doc/src/sgml/config.sgml

Clarify that you need ActiveState perl 5.8 *or later* to build on Windows.

commit   : c33acb4f0ae0371a6ee8772d965d13a373cdd7cc    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 4 Jul 2011 22:30:27 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 4 Jul 2011 22:30:27 +0300    

Click here for diff

M doc/src/sgml/install-windows.sgml

Back-patch Fix bat file quoting of %ENV from commit 19b7fac8.

commit   : ffc50e134a7e67bc48bf512a4bb681d46cc1fe31    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 4 Jul 2011 10:44:07 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 4 Jul 2011 10:44:07 -0400    

Click here for diff

M src/tools/msvc/install.bat
M src/tools/msvc/pgbison.bat
M src/tools/msvc/pgflex.bat

Alter test results to comply with new ALTER TABLE behaviour.

commit   : 677f146307a95f862c0c7b51819c79a00af61f95    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Jul 2011 11:11:03 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Jul 2011 11:11:03 +0100    

Click here for diff

M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Reset ALTER TABLE lock levels to AccessExclusiveLock in all cases. Locks on inheritance parent remain at lower level, as they were before. Remove entry from 9.1 release notes.

commit   : 1f7056099728035b55efcd8f889c7b705a68b6de    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Jul 2011 09:30:50 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Jul 2011 09:30:50 +0100    

Click here for diff

M doc/src/sgml/release-9.1.sgml
M src/backend/commands/tablecmds.c

Fix omissions in documentation of the pg_roles view.

commit   : 3569e02c98d2802e6fc4912a3ba67dc25e76b6cc    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 22:12:20 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 22:12:20 -0400    

Click here for diff

Somehow, column rolconfig got removed from the documentation of the  
pg_roles view in the 9.0 cycle, although the column is actually still  
there.  In 9.1, we'd also forgotten to document the rolreplication column.  
Spotted by Sakamoto Masahiko.  

M doc/src/sgml/catalogs.sgml

Put comments on the installable procedural languages.

commit   : 80d772233760f48119e46d454eae08f58ff1a7f1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 19:03:51 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 19:03:51 -0400    

Click here for diff

Per suggestion from Josh Kupershmidt.  

M src/pl/plperl/plperl–1.0.sql
M src/pl/plperl/plperlu–1.0.sql
M src/pl/plpgsql/src/plpgsql–1.0.sql
M src/pl/plpython/plpython2u–1.0.sql
M src/pl/plpython/plpython3u–1.0.sql
M src/pl/plpython/plpythonu–1.0.sql
M src/pl/tcl/pltcl–1.0.sql
M src/pl/tcl/pltclu–1.0.sql

Fix bugs in relpersistence handling during table creation.

commit   : 2b9bb6979df9a742243647b6a368125f5ddf496e    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Jul 2011 17:34:47 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Jul 2011 17:34:47 -0400    

Click here for diff

Unlike the relistemp field which it replaced, relpersistence must be  
set correctly quite early during the table creation process, as we  
rely on it quite early on for a number of purposes, including security  
checks.  Normally, this is set based on whether the user enters CREATE  
TABLE, CREATE UNLOGGED TABLE, or CREATE TEMPORARY TABLE, but a  
relation may also be made implicitly temporary by creating it in  
pg_temp.  This patch fixes the handling of that case, and also  
disables creation of unlogged tables in temporary tablespace (such  
table indeed skip WAL-logging, but we reject an explicit  
specification) and creation of relations in the temporary schemas of  
other sessions (which is not very sensible, and didn't work right  
anyway).  
  
Report by Amit Khandekar.  

M src/backend/catalog/namespace.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/parser/parse_utilcmd.c
M src/include/catalog/namespace.h
M src/test/regress/expected/create_view.out

Make distprep and *clean build targets recurse into all subdirectories.

commit   : ffd3f13fab9579c1460d7100a16809a3159e6504    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 13:55:02 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 3 Jul 2011 13:55:02 -0400    

Click here for diff

Certain subdirectories do not get built if corresponding options are not  
selected at configure time.  However, "make distprep" should visit such  
directories anyway, so that constructing derived files to be included in  
the tarball happens without requiring all configure options to be given  
in the tarball build script.  Likewise, it's better if cleanup actions  
unconditionally visit all directories (for example, this ensures proper  
cleanup if someone has done a manual make in such a subdirectory).  
  
To handle this, set up a convention that subdirectories that are  
conditionally included in SUBDIRS should be added to ALWAYS_SUBDIRS  
instead when they are excluded.  
  
Back-patch to 9.1, so that plpython's spiexceptions.h will get provided  
in 9.1 tarballs.  There don't appear to be any instances where distprep  
actions got missed in previous releases, and anyway this fix requires  
gmake 3.80 so we don't want to apply it before 9.1.  

M contrib/Makefile
M src/Makefile.global.in
M src/bin/Makefile
M src/pl/Makefile
M src/pl/plpython/Makefile

Unify spelling of "canceled", "canceling", "cancellation"

commit   : 6b23ba1093d298a41463a24f091c6f86be406449    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 29 Jun 2011 09:26:14 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 29 Jun 2011 09:26:14 +0300    

Click here for diff

We had previously (af26857a2775e7ceb0916155e931008c2116632f)  
established the U.S. spellings as standard.  

M doc/src/sgml/high-availability.sgml
M doc/src/sgml/indexam.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/ref/set_transaction.sgml
M doc/src/sgml/release-7.4.sgml
M doc/src/sgml/release-8.0.sgml
M doc/src/sgml/release-8.1.sgml
M doc/src/sgml/release-8.2.sgml
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.1.sgml
M src/backend/access/transam/xlog.c
M src/backend/commands/vacuum.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/lmgr/README-SSI
M src/backend/storage/lmgr/deadlock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/backend/utils/cache/relcache.c
M src/bin/psql/common.c
M src/bin/scripts/common.c
M src/port/path.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql

Add some strings that were not marked for translation

commit   : 678a6d03441fc5acb18fdd43afdd2dd4145c0593    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 27 Jun 2011 15:46:21 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 27 Jun 2011 15:46:21 +0300    

Click here for diff

M src/bin/pg_ctl/pg_ctl.c

In pg_upgrade 9.0 and 9.1, document suggestion of using a non-default port number to avoid unintended client connections.

commit   : 158d071b28529509b0a77317a24ef55fb84480d9    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Fri, 1 Jul 2011 23:09:13 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Fri, 1 Jul 2011 23:09:13 -0400    

Click here for diff

M doc/src/sgml/pgupgrade.sgml

Restore correct btree preprocessing of "indexedcol IS NULL" conditions.

commit   : 3b80219e96f2d2b696ed8dc395d468b38d8ef592    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 29 Jun 2011 19:46:58 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 29 Jun 2011 19:46:58 -0400    

Click here for diff

Such a condition is unsatisfiable in combination with any other type of  
btree-indexable condition (since we assume btree operators are always  
strict).  8.3 and 8.4 had an explicit test for this, which I removed in  
commit 29c4ad98293e3c5cb3fcdd413a3f4904efff8762, mistakenly thinking that  
the case would be subsumed by the more general handling of IS (NOT) NULL  
added in that patch.  Put it back, and improve the comments about it, and  
add a regression test case.  
  
Per bug #6079 from Renat Nasyrov, and analysis by Dean Rasheed.  

M src/backend/access/nbtree/nbtutils.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql

Move the PredicateLockRelation() call from nodeSeqscan.c to heapam.c. It's more consistent that way, since all the other PredicateLock* calls are made in various heapam.c and index AM functions. The call in nodeSeqscan.c was unnecessarily aggressive anyway, there's no need to try to lock the relation every time a tuple is fetched, it's enough to do it once.

commit   : f01e3d3a414f909762ab840719aeb8ae291aab5a    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 29 Jun 2011 21:43:53 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 29 Jun 2011 21:43:53 +0300    

Click here for diff

This has the user-visible effect that if a seq scan is initialized in the  
executor, but never executed, we now acquire the predicate lock on the heap  
relation anyway. We could avoid that by taking the lock on the first  
heap_getnext() call instead, but it doesn't seem worth the trouble given  
that it feels more natural to do it in heap_beginscan().  
  
Also, remove the retail PredicateLockTuple() calls from heap_getnext(). In  
a seqscan, started with heap_begin(), we're holding a whole-relation  
predicate lock on the heap so there's no need to lock the tuples  
individually.  
  
Kevin Grittner and me  

M src/backend/access/heap/heapam.c
M src/backend/executor/nodeSeqscan.c
M src/include/access/relscan.h

Grab predicate locks on matching tuples in a lossy bitmap heap scan. Non-lossy case was already handled correctly.

commit   : 1aa447a1e1273e51f1bb34e085c021941db86212    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 29 Jun 2011 21:40:27 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 29 Jun 2011 21:40:27 +0300    

Click here for diff

Kevin Grittner  

M src/backend/executor/nodeBitmapHeapscan.c

Protect pg_stat_reset_shared() against NULL input

commit   : 3ec6e00ece5fc7483f8890306005f97a2c640861    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Wed, 29 Jun 2011 19:35:11 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Wed, 29 Jun 2011 19:35:11 +0200    

Click here for diff

Per bug #6082, reported by Steve Haslam  

M src/backend/utils/adt/pgstatfuncs.c

Reduce impact of btree page reuse on Hot Standby by fixing off-by-1 error. WAL records of type XLOG_BTREE_REUSE_PAGE were generated using a latestRemovedXid one higher than actually needed because xid used was page opaque->btpo.xact rather than an actually removed xid. Noticed on an otherwise quiet system by Noah Misch.

commit   : ca7e04b0b9943d5c33d2e993ff685d45b5bddbbd    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 27 Jun 2011 22:15:07 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 27 Jun 2011 22:15:07 +0100    

Click here for diff

Noah Misch and Simon Riggs  

M src/backend/access/nbtree/nbtpage.c

Mention that SSPI authentication can use GSSAPI on non-Windows systems.

commit   : 379352602ce1f247d1bed41b62baad4e1ee6d767    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 27 Jun 2011 10:38:45 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 27 Jun 2011 10:38:45 -0400    

Click here for diff

As noted by Christian Ullrich.  

M doc/src/sgml/client-auth.sgml

commit   : e4fb58f894b75829f9475aac6991002c785de4c0    
  
author   : Joe Conway <mail@joeconway.com>    
date     : Sat, 25 Jun 2011 15:40:49 -0700    
  
committer: Joe Conway <mail@joeconway.com>    
date     : Sat, 25 Jun 2011 15:40:49 -0700    

Click here for diff

M contrib/dblink/dblink.c

Documentation improvements for pg_locks with respect to SSI.

commit   : ea41b8c822df5a2e4862c76d72937df9b62f1a99    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 24 Jun 2011 16:06:57 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 24 Jun 2011 16:06:57 -0400    

Click here for diff

Explain that querying pg_locks does not simultaneously lock both the  
normal lock manager and the predicate lock manager.  
  
Per discussion with Kevin Grittner.  

M doc/src/sgml/catalogs.sgml

commit   : 50016867a30632cfeaa79cf03b5d183383ea220a    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 23 Jun 2011 19:57:45 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 23 Jun 2011 19:57:45 -0400    

Click here for diff

Backpatch to 9.1 and 9.0.  

M doc/src/sgml/pgupgrade.sgml

Undo overly enthusiastic de-const-ification.

commit   : 1c20ba4f41faccbd11c90c4220ef6ae11a574ba5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 23:03:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 23:03:11 -0400    

Click here for diff

s/const//g wasn't exactly what I was suggesting here ... parameter  
declarations of the form "const structtype *param" are good and useful,  
so put those occurrences back.  Likewise, avoid casting away the const  
in a "const void *" parameter.  

M src/backend/storage/lmgr/predicate.c

In pg_upgrade, check that the binary and data directories are the same major version.

commit   : d9db32401c1477fb63fb47a376fc0d08605dcc9b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 20:48:35 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 20:48:35 -0400    

Click here for diff

Backpatch to 9.1.  
  
Dan McGee  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h

Adjust pg_upgrade check for pg_upgrade_support to happen after the binary directory has been validated.

commit   : c6635bd7ba4618b7d8507c77d2226f889e3d37d9    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 17:47:24 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 17:47:24 -0400    

Click here for diff

Backpatch to 9.1.  
  
Dan McGee  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h

Fix pg_upgrade status message capitalization mistake.

commit   : 3ccd16c5a92d9aea32a883f91e8993d61adcb14d    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 14:49:04 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 22 Jun 2011 14:49:04 -0400    

Click here for diff

Backpatch to 9.1 and 9.0.  
  
Dan McGee  

M contrib/pg_upgrade/check.c

Add missing -I switch for VPATH builds.

commit   : 979d6c9cad8c59580c1c96eb04ce0f4914006a46    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 13:20:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 13:20:03 -0400    

Click here for diff

Per bug #6073 from Hartmut Raschick.  

M src/backend/replication/Makefile

commit   : 25db27808814f474e2080eef8bac068317b7caf6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 13:08:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 22 Jun 2011 13:08:08 -0400    

Click here for diff

backend/Makefile was treating errcodes.h as a header always generated  
during build, but actually it's a header provided in tarballs.  Hence,  
must use the absolute-symlink recipe, not the relative-symlink one.  
Per bug #6072 from Hartmut Raschick.  

M src/backend/Makefile

Remove pointless const qualifiers from function arguments in the SSI code. As Tom Lane pointed out, "const Relation foo" doesn't guarantee that you can't modify the data the "foo" pointer points to. It just means that you can't change the pointer to point to something else within the function, which is not very useful.

commit   : fbaa7a23e4d225f3422f5ede9897d49cb7ca3ff5    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 22 Jun 2011 12:18:39 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 22 Jun 2011 12:18:39 +0300    

Click here for diff

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h

Performance tuning advice for SSI.

commit   : 66370f5158f2bca02202376204bfccdfdafd2bd4    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 21 Jun 2011 21:54:36 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 21 Jun 2011 21:54:36 -0400    

Click here for diff

Kevin Grittner, with additional wordsmithing by me.  

M doc/src/sgml/mvcc.sgml

Minor editing for README-SSI.

commit   : 0272fd1c008a616fd6f0c361645a335f86c5fe29    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 21 Jun 2011 18:00:09 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 21 Jun 2011 18:00:09 -0400    

Click here for diff

Fix some grammatical issues, try to clarify a couple of proofs, make the  
terminology more consistent.  

M src/backend/storage/lmgr/README-SSI

Message style and spelling improvements

commit   : a0b5146b25cd5924c5e5107c06b8777eec9f0a2f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 22 Jun 2011 00:33:20 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 22 Jun 2011 00:33:20 +0300    

Click here for diff

M src/backend/access/gist/gist.c
M src/backend/access/gist/gistvacuum.c
M src/backend/commands/extension.c
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/replication/syncrep.c
M src/backend/utils/misc/guc.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/rowtypes.out

Apply upstream fix for blowfish signed-character bug (CVE-2011-2483).

commit   : 567049a76493c7c60eddd1c65c8aa946c6811ed3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 21 Jun 2011 14:41:05 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 21 Jun 2011 14:41:05 -0400    

Click here for diff

A password containing a character with the high bit set was misprocessed  
on machines where char is signed (which is most).  This could cause the  
preceding one to three characters to fail to affect the hashed result,  
thus weakening the password.  The result was also unportable, and failed  
to match some other blowfish implementations such as OpenBSD's.  
  
Since the fix changes the output for such passwords, upstream chose  
to provide a compatibility hack: password salts beginning with $2x$  
(instead of the usual $2a$ for blowfish) are intentionally processed  
"wrong" to give the same hash as before.  Stored password hashes can  
thus be modified if necessary to still match, though it'd be better  
to change any affected passwords.  
  
In passing, sync a couple other upstream changes that marginally improve  
performance and/or tighten error checking.  
  
Back-patch to all supported branches.  Since this issue is already  
public, no reason not to commit the fix ASAP.  

M contrib/pgcrypto/crypt-blowfish.c
M contrib/pgcrypto/px-crypt.c

Adjust the alternative expected output file for prepared_xacts test case, used when max_prepared_transactions=0, for the recent changes in the test case.

commit   : 35dd6d48eccbfcd2cb5b4e571e760e1c1f1534fc    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 17:07:10 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 17:07:10 +0300    

Click here for diff

M src/test/regress/expected/prepared_xacts_1.out

Fix bug in PreCommit_CheckForSerializationFailure. A transaction that has already been marked as PREPARED cannot be killed. Kill the current transaction instead.

commit   : 390c52131b7a42d7b5528d0435d7f6279bdf0ed0    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 14:32:11 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 14:32:11 +0300    

Click here for diff

One of the prepared_xacts regression tests actually hits this bug. I  
removed the anomaly from the duplicate-gids test so that it fails in the  
intended way, and added a new test to check serialization failures with  
a prepared transaction.  
  
Dan Ports  

M src/backend/storage/lmgr/predicate.c
M src/test/regress/expected/prepared_xacts.out
M src/test/regress/sql/prepared_xacts.sql

Fix bug introduced by recent SSI patch to merge ROLLED_BACK and MARKED_FOR_DEATH flags into one. We still need the ROLLED_BACK flag to mark transactions that are in the process of being rolled back. To be precise, ROLLED_BACK now means that a transaction has already been discounted from the count of transactions with the oldest xmin, but not yet removed from the list of active transactions.

commit   : 0d905db20b3201bec3ea69951014b473f92223c7    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 14:12:40 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 21 Jun 2011 14:12:40 +0300    

Click here for diff

Dan Ports  

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Fix missed use of "cp -i" in an example, per Fujii Masao.

commit   : 9d6e6fededbedb018caf9871cc448dc173b20ea6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 20 Jun 2011 16:27:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 20 Jun 2011 16:27:36 -0400    

Click here for diff

Also be more careful about markup: use &amp; not just &.  

M doc/src/sgml/backup.sgml

Fix thinko in previous patch for optimizing EXISTS-within-EXISTS.

commit   : 6c560bef763f562a38fc629e54d0e20673efb9c1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 20 Jun 2011 14:33:20 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 20 Jun 2011 14:33:20 -0400    

Click here for diff

When recursing after an optimization in pull_up_sublinks_qual_recurse, the  
available_rels value passed down must include only the relations that are  
in the righthand side of the new SEMI or ANTI join; it's incorrect to pull  
up a sub-select that refers to other relations, as seen in the added test  
case.  Per report from BangarRaju Vadapalli.  
  
While at it, rethink the idea of recursing below a NOT EXISTS.  That is  
essentially the same situation as pulling up ANY/EXISTS sub-selects that  
are in the ON clause of an outer join, and it has the same disadvantage:  
we'd force the two joins to be evaluated according to the syntactic nesting  
order, because the lower join will most likely not be able to commute with  
the ANTI join.  That could result in having to form a rather large join  
product, whereas the handling of a correlated subselect is not quite that  
dumb.  So until we can handle those cases better, #ifdef NOT_USED that  
case.  (I think it's okay to pull up in the EXISTS/ANY cases, because SEMI  
joins aren't so inflexible about ordering.)  
  
Back-patch to 8.4, same as for previous patch in this area.  Fortunately  
that patch hadn't made it into any shipped releases yet.  

M src/backend/optimizer/prep/prepjointree.c
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql

Produce HISTORY file consistently as ASCII

commit   : 7ec70f46c676f2f40615cad818ecc2a975698321    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 19 Jun 2011 23:27:56 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 19 Jun 2011 23:27:56 +0300    

Click here for diff

The release notes may contain non-ASCII characters (for contributor  
names), which lynx converts to the encoding determined by the current  
locale.  The get output that is deterministic and easily readable by  
everyone, we make lynx produce LATIN1 and then convert that to ASCII  
with transliteration for the non-ASCII characters.  

M doc/src/sgml/Makefile

Fix thinko in previous patch to always update pg_class.reltuples/relpages.

commit   : 68306da4880401ed9fd3b341e67a5e4cd4b8706f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 19 Jun 2011 14:00:55 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 19 Jun 2011 14:00:55 -0400    

Click here for diff

I mis-simplified the test where ANALYZE decided if it could get away  
without doing anything: under the new regime, that's never allowed.  Per  
bug #6068 from Jeff Janes.  Back-patch to 8.4, just like previous patch.  

M src/backend/commands/analyze.c

Capitalization fixes

commit   : 365c72f205201eb6699325cb5e7a8c19430aad29    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 19 Jun 2011 00:37:30 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 19 Jun 2011 00:37:30 +0300    

Click here for diff

M doc/src/sgml/config.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/spi.sgml
M doc/src/sgml/storage.sgml
M src/backend/bootstrap/bootparse.y
M src/backend/port/ipc_test.c
M src/backend/port/win32/signal.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/ipc/sinvaladt.c
M src/backend/storage/lmgr/proc.c
M src/backend/storage/smgr/smgrtype.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/init/postinit.c
M src/interfaces/ecpg/ecpglib/execute.c
M src/test/examples/testlibpq2.c
M src/test/regress/pg_regress.c

Don't use "cp -i" in the example WAL archive_command.

commit   : c1c4f93056ceba4dcbb7779e5215e190587bea90    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 17 Jun 2011 19:13:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 17 Jun 2011 19:13:08 -0400    

Click here for diff

This is a dangerous example to provide because on machines with GNU cp,  
it will silently do the wrong thing and risk archive corruption.  Worse,  
during the 9.0 cycle somebody "improved" the discussion by removing the  
warning that used to be there about that, and instead leaving the  
impression that the command would work as desired on most Unixen.  
It doesn't.  Try to rectify the damage by providing an example that is safe  
most everywhere, and then noting that you can try cp -i if you want but  
you'd better test that.  
  
In back-patching this to all supported branches, I also added an example  
command for Windows, which wasn't provided before 9.0.  

M doc/src/sgml/backup.sgml

Obtain table locks as soon as practical during pg_dump.

commit   : a95cfd085df5f146d67390344b588629e0efa8f1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 17 Jun 2011 18:19:09 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 17 Jun 2011 18:19:09 -0400    

Click here for diff

For some reason, when we (I) added table lock acquisition to pg_dump,  
we didn't think about making it happen as soon as possible after the  
start of the transaction.  What with subsequent additions, there was  
actually quite a lot going on before we got around to that; which sort  
of defeats the purpose.  Rearrange the order of calls in dumpSchema()  
to close the risk window as much as we easily can.  Back-patch to all  
supported branches.  

M src/bin/pg_dump/common.c

Add overflow checks to int4 and int8 versions of generate_series().

commit   : 925079063fc429b94c52c5f9174c20157bc39e66    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 14:28:45 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 14:28:45 -0400    

Click here for diff

The previous code went into an infinite loop after overflow.  In fact,  
an overflow is not really an error; it just means that the current  
value is the last one we need to return.  So, just arrange to stop  
immediately when overflow is detected.  
  
Back-patch all the way.  

M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c

Fix crash in CREATE UNLOGGED TABLE.

commit   : ae31b59512746a2cc397b70b8a05106e7a7f8ed3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 13:34:39 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 13:34:39 -0400    

Click here for diff

The code that created the init fork neglected to make sure that the  
relation was open at the smgr level before attempting to invoke smgr.  
This didn't happen every time; only when the relcache entry was rebuilt  
along the way.  
  
Per report from Garick Hamlin.  

M src/backend/catalog/heap.c

Fix typo.

commit   : a3903f1bf8e3ecd0589725ed1efbc9208d03f336    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 00:54:08 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 17 Jun 2011 00:54:08 -0400    

Click here for diff

Per Josh Kupershmidt and Tom Lane.  

M doc/src/sgml/ref/psql-ref.sgml

Update README-SSI. Add a section to describe the "dangerous structure" that SSI is based on, as well as the optimizations about relative commit times and read-only transactions. Plus a bunch of other misc fixes and improvements.

commit   : 6b339a1ade6bca6dc5230e910e0819f98ce76ff0    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 16 Jun 2011 21:12:56 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 16 Jun 2011 21:12:56 +0300    

Click here for diff

Dan Ports  

M src/backend/storage/lmgr/README-SSI

Fix typo

commit   : bd8137ee117601f93fcd9870e019b3069387a8a2    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 16 Jun 2011 12:10:57 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 16 Jun 2011 12:10:57 -0400    

Click here for diff

M src/backend/catalog/heap.c

Remove another no-longer-needed inclusion of predicate.h.

commit   : f90b185a8a125d3a7689dad1aa196a1171a07869    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 16 Jun 2011 11:43:30 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 16 Jun 2011 11:43:30 -0400    

Click here for diff

M src/backend/executor/nodeBitmapHeapscan.c

pgindent run of recent SSI changes. Also, remove an unnecessary #include.

commit   : 9131bc772b0232454d7b625f11c7a9310a717f90    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 16 Jun 2011 16:16:34 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 16 Jun 2011 16:16:34 +0300    

Click here for diff

Kevin Grittner  

M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/transam/twophase_rmgr.c
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
M src/include/storage/predicate_internals.h

Respect Hot Standby controls while recycling btree index pages. Btree pages were recycled after VACUUM deletes all records on a page and then a subsequent VACUUM occurs after the RecentXmin horizon is reached. Using RecentXmin meant that we did not respond correctly to the user controls provide to avoid Hot Standby conflicts and so spurious conflicts could be generated in some workload combinations. We now reuse pages only when we reach RecentGlobalXmin, which can be much later in the presence of long running queries and is also controlled by vacuum_defer_cleanup_age and hot_standby_feedback.

commit   : 9340e643e4cbc11a7a5aaea0297236e9a8c07600    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Thu, 16 Jun 2011 10:17:59 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Thu, 16 Jun 2011 10:17:59 +0100    

Click here for diff

Noah Misch and Simon Riggs  

M src/backend/access/nbtree/nbtpage.c

Use single quotes in preference to double quotes for protecting pathnames.

commit   : a969a2f03041cd33bc9f9f75f0b6a1c0f5b921e2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 21:45:23 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 21:45:23 -0400    

Click here for diff

Per recommendation from Peter.  Neither choice is bulletproof, but this  
is the existing style and it does help prevent unexpected environment  
variable substitution.  

M src/Makefile.global.in
M src/Makefile.shlib
M src/backend/Makefile
M src/interfaces/ecpg/test/Makefile
M src/makefiles/Makefile.aix
M src/test/isolation/Makefile

Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.

commit   : d988d92bf0603cdf07a57f57f53a28caf5e951f5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 19:05:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 19:05:11 -0400    

Click here for diff

The initial commit of the ALTER TABLE ADD FOREIGN KEY NOT VALID feature  
failed to support labeling such constraints as deferrable.  The best fix  
for this seems to be to fold NOT VALID into ConstraintAttributeSpec.  
That's a bit more general than the documented syntax, but it allows  
better-targeted syntax error messages.  
  
In addition, do some mostly-but-not-entirely-cosmetic code review for  
the whole NOT VALID patch.  

M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/alter_table.sgml
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/utils/adt/ruleutils.c
M src/include/nodes/parsenodes.h
M src/interfaces/ecpg/preproc/ecpg.addons

Fix failure to account for memory used by tuplestore_putvalues().

commit   : 3cfecae3a34853c631eeb75671c6b82638e8e0aa    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 14:05:22 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 14:05:22 -0400    

Click here for diff

This oversight could result in a tuplestore using much more than the  
intended amount of memory.  It would only happen in a code path that loaded  
a tuplestore via tuplestore_putvalues(), and many of those won't emit huge  
amounts of data; but cases such as holdable cursors and plpgsql's RETURN  
NEXT command could have the problem.  The fix ensures that the tuplestore  
will switch to write-to-disk mode when it overruns work_mem.  
  
The potential overrun was finite, because we would still count the space  
used by the tuple pointer array, so the tuplestore code would eventually  
flip into write-to-disk mode anyway.  When storing wide tuples we would  
go far past the expected work_mem usage before that happened; but this  
may account for the lack of prior reports.  
  
Back-patch to 8.4, where tuplestore_putvalues was introduced.  
  
Per bug #6061 from Yann Delorme.  

M src/backend/utils/sort/tuplestore.c

Fix oversights in pg_basebackup's -z (compression) option.

commit   : dc014e0446f5bfb52129fc6781a98b236d8166c6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 13:15:05 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 15 Jun 2011 13:15:05 -0400    

Click here for diff

The short-form -z switch didn't work, for lack of telling getopt_long  
about it; and even if specified long-form, it failed to do anything,  
because the various tests elsewhere in the file would take  
Z_DEFAULT_COMPRESSION (which is -1) as meaning "don't compress".  
  
Per bug #6060 from Shigehiro Honda, though I editorialized on his patch  
a bit.  

M src/bin/pg_basebackup/pg_basebackup.c

The rolled-back flag on serializable xacts was pointless and redundant with the marked-for-death flag. It was only set for a fleeting moment while a transaction was being cleaned up at rollback. All the places that checked for the rolled-back flag should also check the marked-for-death flag, as both flags mean that the transaction will roll back. I also renamed the marked-for-death into "doomed", which is a lot shorter name.

commit   : 2b44a2d62d12406da59fa6b23a0854d1d5068b17    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 15 Jun 2011 13:35:28 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 15 Jun 2011 13:35:28 +0300    

Click here for diff

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Make non-MVCC snapshots exempt from predicate locking. Scans with non-MVCC snapshots, like in REINDEX, are basically non-transactional operations. The DDL operation itself might participate in SSI, but there's separate functions for that.

commit   : ff4e078773b48260a36587b54537ca54d929898f    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 15 Jun 2011 11:43:05 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 15 Jun 2011 11:43:05 +0300    

Click here for diff

Kevin Grittner and Dan Ports, with some changes by me.  

M src/backend/access/heap/heapam.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/executor/nodeSeqscan.c
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h

Allow psql \d tab completion to complete all relation kinds

commit   : 80721b518292501058bb57a05fb6e2131997d0ec    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:45:00 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:45:00 +0300    

Click here for diff

This matches what \d actually accepts.  

M src/bin/psql/tab-complete.c

Document that psql's \d also works with composite types

commit   : b48f888b644fb667dd87dc9c45d18890397d14a8    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:44:01 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:44:01 +0300    

Click here for diff

This has always been true, it was just never documented.  

M doc/src/sgml/ref/psql-ref.sgml

commit   : 6e66d2e424d82978e452ace850ad80af78475043    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 14 Jun 2011 16:47:16 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 14 Jun 2011 16:47:16 -0400    

Click here for diff

Per suggestsion from #postgresql irc channel.  
  
Backpatch to 9.1.  

M doc/src/sgml/pgupgrade.sgml

Fix assorted issues with build and install paths containing spaces.

commit   : f28c54c32d2f3527c94ca25a32feb236f125f2c2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 14 Jun 2011 12:00:37 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 14 Jun 2011 12:00:37 -0400    

Click here for diff

Apparently there is no buildfarm critter exercising this case after all,  
because it fails in several places.  With this patch, build, install,  
check-world, and installcheck-world pass for me on OS X.  

M src/Makefile.global.in
M src/Makefile.shlib
M src/interfaces/ecpg/test/Makefile
M src/test/isolation/Makefile

Remove unused variable

commit   : 64bbf3641c65bfff8e83c4147c0e4caac09dae58    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:00:43 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 23:00:43 +0300    

Click here for diff

The variable became obsolete in commit  
68739ba856c52e6721d6cffec21f1bf0327a9a7b, but only gcc 4.6 shows the  
warning.  

M src/backend/parser/parse_utilcmd.c

In pg_upgrade, check there are no prepared transactions.

commit   : 5561fe21846a3d9d0e97879fd95c79d3575886b0    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 14 Jun 2011 14:41:33 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 14 Jun 2011 14:41:33 -0400    

Click here for diff

Backpatch to 9.1.  

M contrib/pg_upgrade/check.c

Fix grammatical mistake introduced by previous commit

commit   : 808aa18b3cc87d81fb5640db0635a8d3db2bad52    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 14 Jun 2011 13:48:23 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 14 Jun 2011 13:48:23 -0400    

Click here for diff

Per note from Tom  

M doc/src/sgml/ddl.sgml

Mention DROP TABLE as well as ALTER TABLE NO INHERIT

commit   : d60ce59963cab7fa142464c90a3e9d2ab5496640    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 14 Jun 2011 11:20:52 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 14 Jun 2011 11:20:52 -0400    

Click here for diff

... when talking about how good they are in replacement of bulk DELETE  
in partitioned setups.  
  
The original wording was a bit confusing.  
  
Per an observation from David Wheeler.  

M doc/src/sgml/ddl.sgml

Improve accuracy of ON_ERROR_STOP documentation.

commit   : 6fdd8975034249f7c1a97bfb4991e6bde250c6ea    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 14 Jun 2011 11:05:54 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 14 Jun 2011 11:05:54 -0400    

Click here for diff

Per a gripe from Tom Lane.  

M doc/src/sgml/ref/psql-ref.sgml

Oops, forgot to change the order of entries in 2PC callback arrays when I renumbered the resource managers. This should fix the buildfarm..

commit   : 6099dfa71c883599440ec8c9930ee7e2f4403825    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 14 Jun 2011 15:16:36 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 14 Jun 2011 15:16:36 +0300    

Click here for diff

M src/backend/access/transam/twophase_rmgr.c

Renumber 2PC resource managers so that compared to 9.0, predicate lock rmgr is added to the end, and existing resource managers keep their old ids. We're not going to guarantee on-disk compatibility for 2PC state files over major releases, but it seems better to avoid changing the ids them anyway. It will help anyone who might want to write external tools to inspect the state files to work with files from different versions, if nothing else. Per complaint from Tom Lane.

commit   : 8c8006d7761d94c3830b3eb39c343fc9103e885f    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 14 Jun 2011 12:32:45 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 14 Jun 2011 12:32:45 +0300    

Click here for diff

M src/include/access/twophase_rmgr.h

Move parse2.pl to parse.pl

commit   : 95f62dc8b888cc2fe6da5e8acbcb7e5d4d65d932    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 07:34:00 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 14 Jun 2011 07:34:00 +0300    

Click here for diff

We have a SCM, so we don't need to keep old versions of files around.  

M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/ecpg/preproc/README.parser
M src/interfaces/ecpg/preproc/ecpg.trailer
M src/interfaces/ecpg/preproc/parse.pl
D src/interfaces/ecpg/preproc/parse2.pl

Document that bits to the right of the CIDR mask "should" be zero, not "must".

commit   : 8d49524a6abbbfc1c5958d8222638b8b070600f9    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 13 Jun 2011 20:57:21 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 13 Jun 2011 20:57:21 -0400    

Click here for diff

M doc/src/sgml/client-auth.sgml

Fix aboriginal copy-paste mistake in error message

commit   : 26b10ca6b85cd130ebd5aa86fe24626e00d6ce87    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 13 Jun 2011 17:50:30 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 13 Jun 2011 17:50:30 -0400    

Click here for diff

Spotted by Jaime Casanova  

M src/backend/catalog/pg_shdepend.c

Expand warnings on locks acquired by CREATE INDEX CONCURRENTLY

commit   : 9adda3e125642f41f256d1ed6adfe810b508e046    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 13 Jun 2011 17:12:26 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 13 Jun 2011 17:12:26 -0400    

Click here for diff

The previous wording wasn't explicit enough, which could misled readers  
into thinking that the locks acquired are more restricted in nature than  
they really are.  The resulting optimism can be damaging to morale when  
confronted with reality, as has been observed in the field.  
  
Greg Smith  

M doc/src/sgml/ref/create_index.sgml

Remove parentheses from mention of current_schemas function.

commit   : 20c73f3a327d2289871e7701e8325e5e3ebe518c    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 13:02:54 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 13:02:54 -0400    

Click here for diff

This is more consistent with what we do elsewhere, and hopefully avoids  
creating the perception that current_schemas takes no arguments.  
  
As suggested by Brendan Jurd  

M doc/src/sgml/config.sgml

Clarify that NATURAL without matching columns is like CROSS JOIN.

commit   : 26e7eec5f07c5dfb4b57f374bf01185edd88cf73    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:59:04 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:59:04 -0400    

Click here for diff

As suggested by Grzegorz Szpetkowski.  

M doc/src/sgml/queries.sgml

Add doc cross-reference to search_path discussion of current_schemas().

commit   : f2328b0713b175b0d49651fb7ec807e7174e92aa    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:37:49 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:37:49 -0400    

Click here for diff

Brendan Jurd  

M doc/src/sgml/config.sgml

Document GUC context for synchronous_standby_names/hot_standby_feedback.

commit   : 3390fceb69bd818101bcd0f20769ac28ccec725b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:23:42 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 12:23:42 -0400    

Click here for diff

Fujii Masao  

M doc/src/sgml/config.sgml

In ALTER EXTENSION docs, document left_type/right_type.

commit   : a886c94e5e780839f86468fd7883f0cfd3fabca5    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 10:23:14 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 10:23:14 -0400    

Click here for diff

Noted by Daniele Varrazzo.  

M doc/src/sgml/ref/alter_extension.sgml

Markup fix.

commit   : 5267e5ea5e4a4df36b7208df18b098f845c75fd8    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 10:14:02 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 10:14:02 -0400    

Click here for diff

Fujii Masao  

M doc/src/sgml/ddl.sgml

More foreign table documentation improvements.

commit   : 16d64a8773c6c381c55d678855f29953184693f7    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 08:28:41 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 13 Jun 2011 08:28:41 -0400    

Click here for diff

Shigeru Hanada, with some additional wordsmithing by me  

M doc/src/sgml/ddl.sgml
M doc/src/sgml/fdwhandler.sgml

Remove now-unnecessary casts.

commit   : 5de9c165f01b14caec447d5ca4c10a8967080ee8    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sun, 12 Jun 2011 22:49:33 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sun, 12 Jun 2011 22:49:33 +0300    

Click here for diff

Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Corrections to ALTER FOREIGN TABLE documentation.

commit   : 25271323d434e3bdba2ad302d207f1d8f3fb234b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 12 Jun 2011 00:18:43 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 12 Jun 2011 00:18:43 -0400    

Click here for diff

Shigeru Hanada, with a minor grammar correction.  

M doc/src/sgml/ref/alter_foreign_table.sgml

Tab completion improvements for COMMENT.

commit   : e461cffbe699d9e9313518644f9d9dd33c0fe7d3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sat, 11 Jun 2011 23:52:44 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sat, 11 Jun 2011 23:52:44 -0400    

Click here for diff

These pertain to object types introduced in PostgreSQL 9.1, so back-patch.  
  
Josh Kupershmidt, with some kibitzing by me.  

M src/bin/psql/tab-complete.c

Add C comment mentioning pg_stat_activity.procpid should have been called 'pid'.

commit   : a4bebdd92624e018108c2610fc3f2c1584b6c687    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 11 Jun 2011 10:00:28 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 11 Jun 2011 10:00:28 -0400    

Click here for diff

M src/backend/utils/adt/pgstatfuncs.c

Work around gcc 4.6.0 bug that breaks WAL replay.

commit   : c2ba0121c73b7461331104a46d140156e847572a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 10 Jun 2011 17:03:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 10 Jun 2011 17:03:03 -0400    

Click here for diff

ReadRecord's habit of using both direct references to tmpRecPtr and  
references to *RecPtr (which is pointing at tmpRecPtr) triggers an  
optimization bug in gcc 4.6.0, which apparently has forgotten about  
aliasing rules.  Avoid the compiler bug, and make the code more readable  
to boot, by getting rid of the direct references.  Improve the comments  
while at it.  
  
Back-patch to all supported versions, in case they get built with 4.6.0.  
  
Tom Lane, with some cosmetic suggestions from Alex Hunsaker  

M src/backend/access/transam/xlog.c
M src/include/access/xlog_internal.h

Fix locking while setting flags in MySerializableXact.

commit   : cb2d158c5808c72cbd12cbffe0b7f5dbe830760b    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 10 Jun 2011 23:15:05 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 10 Jun 2011 23:15:05 +0300    

Click here for diff

Even if a flag is modified only by the backend owning the transaction, it's  
not safe to modify it without a lock. Another backend might be setting or  
clearing a different flag in the flags field concurrently, and that  
operation might be lost because setting or clearing a bit in a word is not  
atomic.  
  
Make did-write flag a simple backend-private boolean variable, because it  
was only set or tested in the owning backend (except when committing a  
prepared transaction, but it's not worthwhile to optimize for the case of a  
read-only prepared transaction). This also eliminates the need to add  
locking where that flag is set.  
  
Also, set the did-write flag when doing DDL operations like DROP TABLE or  
TRUNCATE -- that was missed earlier.  

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Add comment about pg_ctl stop

commit   : d69149ed71cc4f073f222f11f702a20a6d279e0c    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 15:27:38 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 15:27:38 -0400    

Click here for diff

M src/tools/pgindent/README

Use "transient" files for blind writes, take 2

commit   : fba105b1099f4f5fa7283bb17cba6fed2baa8d0c    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 13:43:02 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 13:43:02 -0400    

Click here for diff

"Blind writes" are a mechanism to push buffers down to disk when  
evicting them; since they may belong to different databases than the one  
a backend is connected to, the backend does not necessarily have a  
relation to link them to, and thus no way to blow them away.  We were  
keeping those files open indefinitely, which would cause a problem if  
the underlying table was deleted, because the operating system would not  
be able to reclaim the disk space used by those files.  
  
To fix, have bufmgr mark such files as transient to smgr; the lower  
layer is allowed to close the file descriptor when the current  
transaction ends.  We must be careful to have any other access of the  
file to remove the transient markings, to prevent unnecessary expensive  
system calls when evicting buffers belonging to our own database (which  
files we're likely to require again soon.)  
  
This commit fixes a bug in the previous one, which neglected to cleanly  
handle the LRU ring that fd.c uses to manage open files, and caused an  
unacceptable failure just before beta2 and was thus reverted.  

M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/file/fd.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/fd.h
M src/include/storage/smgr.h

Use a constant sprintf format to silence compiler warning

commit   : 3d114b63b253605eb60055c910aa2e55c98d5ed2    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 13:37:06 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 10 Jun 2011 13:37:06 -0400    

Click here for diff

M src/backend/storage/file/fd.c

Small comment fixes and enhancements.

commit   : c79c570bd8fbd6f074b8c186dfb08a9f4e3907e0    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 10 Jun 2011 17:22:00 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 10 Jun 2011 17:22:00 +0300    

Click here for diff

M src/backend/storage/lmgr/README-SSI
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Mention "pg_ctl stop" in pgindent README instructions.

commit   : bb8f0c4b4863d697264cc6f295f50627b15a6608    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 20:51:10 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 20:51:10 -0400    

Click here for diff

M src/tools/pgindent/README

Tag 9.1beta2.

commit   : 829ae4bf830e14bda649a153f7d179681e2ad094    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 9 Jun 2011 19:40:42 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 9 Jun 2011 19:40:42 -0400    

Click here for diff

M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32

Ecpg doc cleanups, as reported by Marc Cousin.

commit   : 43958a028037edca1ed786147dc7bacf62d4f85b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 18:47:37 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 18:47:37 -0400    

Click here for diff

M doc/src/sgml/ecpg.sgml

Update 9.1 release notes to reflect commits through today.

commit   : e9c9a920680595b7726148852e19deeb1f7b98a5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 9 Jun 2011 18:44:05 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 9 Jun 2011 18:44:05 -0400    

Click here for diff

Also do some desultory copy-editing on the notes.  

M doc/src/sgml/extend.sgml
M doc/src/sgml/release-9.1.sgml

Revert "Use "transient" files for blind writes"

commit   : 9261557eb1e19cf691f6f2cd9bd4d55fd8603a48    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 9 Jun 2011 16:41:44 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 9 Jun 2011 16:41:44 -0400    

Click here for diff

This reverts commit 54d9e8c6c19cbefa8fb42ed3442a0a5327590ed3, which  
caused a failure on the buildfarm.  Not a good thing to have just before  
a beta release.  

M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/file/fd.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/fd.h
M src/include/storage/smgr.h

Use "transient" files for blind writes

commit   : 54d9e8c6c19cbefa8fb42ed3442a0a5327590ed3    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 9 Jun 2011 13:41:12 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 9 Jun 2011 13:41:12 -0400    

Click here for diff

"Blind writes" are a mechanism to push buffers down to disk when  
evicting them; since they may belong to different databases than the one  
a backend is connected to, the backend does not necessarily have a  
relation to link them to, and thus no way to blow them away.  We were  
keeping those files open indefinitely, which would cause a problem if  
the underlying table was deleted, because the operating system would not  
be able to reclaim the disk space used by those files.  
  
To fix, have bufmgr mark such files as transient to smgr; the lower  
layer is allowed to close the file descriptor when the current  
transaction ends.  We must be careful to have any other access of the  
file to remove the transient markings, to prevent unnecessary expensive  
system calls when evicting buffers belonging to our own database (which  
files we're likely to require again soon.)  

M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/file/fd.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/fd.h
M src/include/storage/smgr.h

Translation updates for 9.1beta2

commit   : 74b1d29dd186c4ea51ba1eff06aebd1faeb5dfcd    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 9 Jun 2011 23:01:31 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 9 Jun 2011 23:01:31 +0300    

Click here for diff

M src/backend/nls.mk
M src/backend/po/de.po
M src/backend/po/es.po
M src/backend/po/fr.po
M src/backend/po/ja.po
M src/backend/po/pt_BR.po
A src/backend/po/zh_CN.po
A src/backend/po/zh_TW.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/cs.po
M src/bin/initdb/po/de.po
M src/bin/initdb/po/es.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/it.po
M src/bin/initdb/po/ja.po
A src/bin/initdb/po/ko.po
M src/bin/initdb/po/pt_BR.po
A src/bin/initdb/po/ro.po
M src/bin/initdb/po/ru.po
M src/bin/initdb/po/sv.po
M src/bin/initdb/po/tr.po
M src/bin/initdb/po/zh_CN.po
A src/bin/initdb/po/zh_TW.po
M src/bin/pg_basebackup/nls.mk
A src/bin/pg_basebackup/po/de.po
A src/bin/pg_basebackup/po/es.po
M src/bin/pg_config/nls.mk
M src/bin/pg_config/po/es.po
M src/bin/pg_config/po/fr.po
M src/bin/pg_config/po/ja.po
M src/bin/pg_config/po/ko.po
M src/bin/pg_config/po/pt_BR.po
M src/bin/pg_config/po/ro.po
M src/bin/pg_config/po/ru.po
M src/bin/pg_config/po/sv.po
M src/bin/pg_config/po/ta.po
M src/bin/pg_config/po/tr.po
M src/bin/pg_config/po/zh_CN.po
A src/bin/pg_config/po/zh_TW.po
M src/bin/pg_controldata/nls.mk
M src/bin/pg_controldata/po/es.po
M src/bin/pg_controldata/po/fr.po
M src/bin/pg_controldata/po/ja.po
M src/bin/pg_controldata/po/ko.po
M src/bin/pg_controldata/po/pt_BR.po
A src/bin/pg_controldata/po/ro.po
A src/bin/pg_controldata/po/ru.po
M src/bin/pg_controldata/po/tr.po
M src/bin/pg_controldata/po/zh_CN.po
A src/bin/pg_controldata/po/zh_TW.po
M src/bin/pg_ctl/nls.mk
M src/bin/pg_ctl/po/de.po
M src/bin/pg_ctl/po/fr.po
M src/bin/pg_ctl/po/ja.po
M src/bin/pg_ctl/po/ru.po
M src/bin/pg_ctl/po/tr.po
M src/bin/pg_ctl/po/zh_CN.po
A src/bin/pg_ctl/po/zh_TW.po
M src/bin/pg_dump/nls.mk
M src/bin/pg_dump/po/de.po
M src/bin/pg_dump/po/es.po
M src/bin/pg_dump/po/fr.po
M src/bin/pg_dump/po/it.po
M src/bin/pg_dump/po/ja.po
A src/bin/pg_dump/po/ko.po
M src/bin/pg_dump/po/pt_BR.po
M src/bin/pg_dump/po/tr.po
M src/bin/pg_dump/po/zh_CN.po
A src/bin/pg_dump/po/zh_TW.po
M src/bin/pg_resetxlog/nls.mk
M src/bin/pg_resetxlog/po/es.po
M src/bin/pg_resetxlog/po/fr.po
M src/bin/pg_resetxlog/po/ja.po
M src/bin/pg_resetxlog/po/ko.po
M src/bin/pg_resetxlog/po/pt_BR.po
M src/bin/pg_resetxlog/po/ro.po
M src/bin/pg_resetxlog/po/ru.po
M src/bin/pg_resetxlog/po/tr.po
M src/bin/pg_resetxlog/po/zh_CN.po
A src/bin/pg_resetxlog/po/zh_TW.po
M src/bin/psql/nls.mk
M src/bin/psql/po/de.po
M src/bin/psql/po/es.po
M src/bin/psql/po/fr.po
M src/bin/psql/po/ja.po
M src/bin/psql/po/pt_BR.po
A src/bin/psql/po/zh_CN.po
A src/bin/psql/po/zh_TW.po
M src/bin/scripts/nls.mk
M src/bin/scripts/po/cs.po
M src/bin/scripts/po/fr.po
M src/bin/scripts/po/ja.po
M src/bin/scripts/po/ko.po
M src/bin/scripts/po/ro.po
M src/bin/scripts/po/tr.po
M src/bin/scripts/po/zh_CN.po
A src/bin/scripts/po/zh_TW.po
M src/interfaces/ecpg/ecpglib/po/fr.po
M src/interfaces/ecpg/ecpglib/po/ja.po
M src/interfaces/ecpg/ecpglib/po/tr.po
M src/interfaces/ecpg/ecpglib/po/zh_CN.po
M src/interfaces/ecpg/preproc/nls.mk
M src/interfaces/ecpg/preproc/po/es.po
M src/interfaces/ecpg/preproc/po/ja.po
A src/interfaces/ecpg/preproc/po/ko.po
M src/interfaces/ecpg/preproc/po/pt_BR.po
M src/interfaces/ecpg/preproc/po/tr.po
M src/interfaces/ecpg/preproc/po/zh_CN.po
A src/interfaces/ecpg/preproc/po/zh_TW.po
M src/interfaces/libpq/nls.mk
M src/interfaces/libpq/po/cs.po
M src/interfaces/libpq/po/de.po
M src/interfaces/libpq/po/es.po
M src/interfaces/libpq/po/fr.po
M src/interfaces/libpq/po/ja.po
M src/interfaces/libpq/po/ko.po
M src/interfaces/libpq/po/pt_BR.po
M src/interfaces/libpq/po/ru.po
M src/interfaces/libpq/po/sv.po
M src/interfaces/libpq/po/tr.po
M src/interfaces/libpq/po/zh_CN.po
A src/interfaces/libpq/po/zh_TW.po
M src/pl/plperl/nls.mk
M src/pl/plperl/po/de.po
M src/pl/plperl/po/es.po
M src/pl/plperl/po/fr.po
M src/pl/plperl/po/ja.po
M src/pl/plperl/po/pt_BR.po
A src/pl/plperl/po/ro.po
M src/pl/plperl/po/tr.po
A src/pl/plperl/po/zh_CN.po
A src/pl/plperl/po/zh_TW.po
M src/pl/plpgsql/src/nls.mk
M src/pl/plpgsql/src/po/de.po
M src/pl/plpgsql/src/po/es.po
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/ja.po
A src/pl/plpgsql/src/po/ko.po
A src/pl/plpgsql/src/po/pt_BR.po
M src/pl/plpgsql/src/po/ro.po
A src/pl/plpgsql/src/po/zh_CN.po
A src/pl/plpgsql/src/po/zh_TW.po
M src/pl/plpython/nls.mk
M src/pl/plpython/po/de.po
M src/pl/plpython/po/es.po
M src/pl/plpython/po/fr.po
M src/pl/plpython/po/ja.po
M src/pl/plpython/po/pt_BR.po
A src/pl/plpython/po/ro.po
M src/pl/plpython/po/tr.po
A src/pl/plpython/po/zh_CN.po
A src/pl/plpython/po/zh_TW.po
M src/pl/tcl/nls.mk
M src/pl/tcl/po/fr.po
M src/pl/tcl/po/ja.po
A src/pl/tcl/po/ro.po
A src/pl/tcl/po/zh_CN.po
A src/pl/tcl/po/zh_TW.po

Fix the truncation logic of the OldSerXid SLRU mechanism. We can't pass SimpleLruTruncate() a page number that's "in the future", because it will issue a warning and refuse to truncate anything. Instead, we leave behind the latest segment. If the slru is not needed before XID wrap-around, the segment will appear as new again, and not be cleaned up until it gets old enough again. That's a bit unpleasant, but better than not cleaning up anything.

commit   : e1c26ab853dc4b816d2eb4c99b948fb099c0e243    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 9 Jun 2011 20:30:59 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 9 Jun 2011 20:30:59 +0300    

Click here for diff

Also, fix broken calculation to check and warn if the span of the OldSerXid  
SLRU is getting too large to fit in the 64k SLRU pages that we have  
available. It was not XID wraparound aware.  
  
Kevin Grittner and me.  

M src/backend/storage/lmgr/predicate.c

Pgindent run before 9.1 beta2.

commit   : 6560407c7db2c7e32926a46f5fb52175ac10d9e5    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 14:32:50 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 14:32:50 -0400    

Click here for diff

M contrib/btree_gist/btree_utils_var.h
M contrib/pg_standby/pg_standby.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/util.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistutil.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/catalog/toasting.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/indexcmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/variable.c
M src/backend/executor/nodeHashjoin.c
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/backend/main/main.c
M src/backend/optimizer/geqo/geqo_main.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/sysv_sema.c
M src/backend/port/win32/crashdump.c
M src/backend/port/win32/socket.c
M src/backend/port/win32_latch.c
M src/backend/postmaster/postmaster.c
M src/backend/regex/regc_pg_locale.c
M src/backend/replication/syncrep.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/tsearch/ts_locale.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/init/postinit.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_dump.c
M src/bin/psql/describe.c
M src/bin/scripts/createdb.c
M src/bin/scripts/dropdb.c
M src/include/fmgr.h
M src/include/nodes/parsenodes.h
M src/include/optimizer/clauses.h
M src/include/utils/hsearch.h
M src/include/utils/selfuncs.h
M src/interfaces/ecpg/ecpglib/sqlda.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-connect.c
M src/pl/plperl/plperl.c
M src/pl/plperl/plperl.h
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c
M src/port/getopt.c
M src/port/getpeereid.c
M src/port/inet_net_ntop.c
M src/port/noblock.c
M src/test/regress/pg_regress.c
M src/timezone/pgtz.c

Update typedef list for upcoming pgindent run.

commit   : adf43b2b36ca3d7f988933990051c74a4bd0d6f8    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 14:01:49 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 9 Jun 2011 14:01:49 -0400    

Click here for diff

M src/tools/pgindent/typedefs.list

Use the correct eventlog severity for error

commit   : 3db963d760f93ac4b695b0c4a1e22231d30cb370    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:21:38 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:21:38 +0200    

Click here for diff

M src/bin/pg_ctl/pg_ctl.c

Support silent mode for service registrations on win32

commit   : 7e6ec04d964b03e836c3c19b5601e889b6634f05    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:18:45 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:18:45 +0200    

Click here for diff

Using -s when registering a service will now suppress  
the application eventlog entries stating that the service  
is starting and started.  
  
MauMau  

M doc/src/sgml/ref/pg_ctl-ref.sgml
M src/bin/pg_ctl/pg_ctl.c

Add gitignore for mingw/cygwin build outputs

commit   : 1710752a50a37c965c964e362635d9ba3a333dcf    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:11:47 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 9 Jun 2011 18:11:47 +0200    

Click here for diff

Noted by Radosław Smogura  

M .gitignore
M src/backend/.gitignore

Mark the SLRU page as dirty when setting an entry in pg_serial. In the passing, fix an incorrect comment.

commit   : 5234161ac10350e009874e4872935a6133d8f0fc    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 9 Jun 2011 12:10:14 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 9 Jun 2011 12:10:14 +0300    

Click here for diff

M src/backend/storage/lmgr/predicate.c

Fix documentation of information_schema.element_types

commit   : 7d43ae6713223164be017be6e866868d1d7a8430    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 9 Jun 2011 07:24:14 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 9 Jun 2011 07:24:14 +0300    

Click here for diff

The documentation of the columns collection_type_identifier and  
dtd_identifier was wrong.  This effectively reverts commits  
8e1ccad51901e83916dae297cd9afa450957a36c and  
57352df66d3a0885899d39c04c067e63c7c0ba30 and updates the name  
array_type_identifier (the name in SQL:1999) to  
collection_type_identifier.  
  
closes bug #5926  

M doc/src/sgml/information_schema.sgml

Make citext's equality and hashing functions collation-insensitive.

commit   : 3ebc061c18fcf9447977d232280793e27baf71ff    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 8 Jun 2011 15:24:27 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 8 Jun 2011 15:24:27 -0400    

Click here for diff

This is an ugly hack to get around the fact that significant parts of the  
core backend assume they don't need to worry about passing collation to  
equality and hashing functions.  That's true for the core string datatypes,  
but citext should ideally have equality behavior that depends on the  
specified collation's LC_CTYPE.  However, there's no chance of fixing the  
core before 9.2, so we'll have to live with this compromise arrangement for  
now.  Per bug #6053 from Regina Obe.  
  
The code changes in this commit should be reverted in full once the core  
code is up to speed, but be careful about reverting the docs changes:  
I fixed a number of obsolete statements while at it.  

M contrib/citext/citext.c
M doc/src/sgml/citext.sgml

Reorder pg_ctl promote after pg_ctl status

commit   : 1bcdd66315fa1239793134e8284afc272f5975c3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 8 Jun 2011 20:51:25 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 8 Jun 2011 20:51:25 +0300    

Click here for diff

Since start/stop/restart/reload/status is a kind of standard command  
set, it seems odd to insert the special-purpose "promote" in between  
the closely related "restart" and "reload".  So put it after "status"  
in code and documentation.  
  
Put the documentation of the -U option in some sensible place.  
  
Rewrite the synopsis sentence in help and documentation to make it  
less of a growing mouthful.  

M doc/src/sgml/ref/pg_ctl-ref.sgml
M src/bin/pg_ctl/pg_ctl.c

Allow domains over arrays to match ANYARRAY parameters again.

commit   : b7e8feb33e5d948c66720643fe32cfb06980c3d1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 8 Jun 2011 12:52:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 8 Jun 2011 12:52:12 -0400    

Click here for diff

This use-case was broken in commit 529cb267a6843a6a8190c86b75d091771d99d6a9  
of 2010-10-21, in which I commented "For the moment, we just forbid such  
matching.  We might later wish to insert an automatic downcast to the  
underlying array type, but such a change should also change matching of  
domains to ANYELEMENT for consistency".  We still lack consensus about what  
to do with ANYELEMENT; but not matching ANYARRAY is a clear loss of  
functionality compared to prior releases, so let's go ahead and make that  
happen.  Per complaint from Regina Obe and extensive subsequent discussion.  

M src/backend/parser/parse_coerce.c
M src/test/regress/expected/domain.out
M src/test/regress/sql/domain.sql

Make DDL operations play nicely with Serializable Snapshot Isolation.

commit   : 8f9622bbb3c02b06176760c3ca2d33c5b5f629a7    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 8 Jun 2011 13:47:21 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 8 Jun 2011 13:47:21 +0300    

Click here for diff

Truncating or dropping a table is treated like deletion of all tuples, and  
check for conflicts accordingly. If a table is clustered or rewritten by  
ALTER TABLE, all predicate locks on the heap are promoted to relation-level  
locks, because the tuple or page ids of any existing tuples will change and  
won't be valid after rewriting the table. Arguably ALTER TABLE should be  
treated like a mass-UPDATE of every row, but if you e.g change the datatype  
of a column, you could also argue that it's just a change to the physical  
layout, not a logical change. Reindexing promotes all locks on the index to  
relation-level lock on the heap.  
  
Kevin Grittner, with a lot of cosmetic changes by me.  

M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/commands/cluster.c
M src/backend/commands/tablecmds.c
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
M src/include/storage/predicate_internals.h

Complain politely about access temp/unlogged tables during recovery.

commit   : 16925c1e1fa236e4d7d6c8b571890e7c777f75d7    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 7 Jun 2011 22:12:44 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 7 Jun 2011 22:12:44 -0400    

Click here for diff

This has never been supported, but we previously let md.c issue the  
complaint for us at whatever point we tried to examine the backing file.  
Now we print a nicer error message.  
  
Per bug #6041, reported by Emanuel, and extensive discussion with Tom  
Lane over where to put the check.  

M src/backend/optimizer/util/plancat.c

Revert psql bits to display NOT VALID for FKs

commit   : 135a507991c8ea9eca201cc084294a689ca24ba9    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 7 Jun 2011 21:39:43 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 7 Jun 2011 21:39:43 -0400    

Click here for diff

These are superseded by pg_get_constraintdef's ability to display the  
same when appropriate, which is a better place to do it anyway.  

M src/bin/psql/describe.c

Make ascii-art in comments pgindent-safe, and some other formatting changes.

commit   : a31ff707a27b3ed4a1c082c131194995efbbce4b    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 7 Jun 2011 09:54:24 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 7 Jun 2011 09:54:24 +0300    

Click here for diff

Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Fix rewriter to cope (more or less) with CTEs in the query being rewritten.

commit   : fc1286d3cb92adad2eae69924bead12cfeea5cc6    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 7 Jun 2011 00:08:31 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 7 Jun 2011 00:08:31 -0400    

Click here for diff

Since the original implementation of CTEs only allowed them in SELECT  
queries, the rule rewriter did not expect to find any CTEs in statements  
being rewritten by ON INSERT/UPDATE/DELETE rules.  We had dealt with this  
to some extent but the code was still several bricks shy of a load, as  
illustrated in bug #6051 from Jehan-Guillaume de Rorthais.  
  
In particular, we have to be able to copy CTEs from the original query's  
cteList into that of a rule action, in case the rule action references the  
CTE (which it pretty much always will).  This also implies we were doing  
things in the wrong order in RewriteQuery: we have to recursively rewrite  
the CTE queries before expanding the main query, so that we have the  
rewritten queries available to copy.  
  
There are unpleasant limitations yet to resolve here, but at least we now  
throw understandable FEATURE_NOT_SUPPORTED errors for them instead of just  
failing with bizarre implementation-dependent errors.  In particular, we  
can't handle propagating the same CTE into multiple post-rewrite queries  
(because then the CTE would be evaluated multiple times), and we can't cope  
with conflicts between CTE names in the original query and in the rule  
actions.  

M src/backend/rewrite/rewriteHandler.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql

Reset reindex-in-progress state before reverifying an exclusion constraint.

commit   : dccfb72892acabd25568539ec882cc44c57c25bd    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 5 Jun 2011 22:30:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 5 Jun 2011 22:30:04 -0400    

Click here for diff

This avoids an Assert failure when we try to use ordinary index fetches  
while checking for exclusion conflicts.  Per report from Noah Misch.  
  
No need for back-patch because the Assert wasn't there before 9.1.  

M src/backend/catalog/index.c
M src/test/regress/input/constraints.source
M src/test/regress/output/constraints.source

Allow building with perl 5.14.

commit   : ccd69b888641441b2332dc928ada1390dd0c318a    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 4 Jun 2011 19:32:10 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 4 Jun 2011 19:32:10 -0400    

Click here for diff

Patch from Alex Hunsaker.  

M src/pl/plperl/plperl.c
M src/pl/plperl/plperl.h

Fix documentation reference to "above" example

commit   : 36a1ba9d5e25d74fb50dfaccefe86f406f337a74    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 23:12:27 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 23:12:27 +0300    

Click here for diff

found by Thom Brown  

M doc/src/sgml/plpython.sgml

More ECPG documentation fixes

commit   : 4dd4bd4d8e1314b0c242e468d084400bf0734202    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 22:29:26 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 22:29:26 +0300    

Click here for diff

Marc Cousin  

M doc/src/sgml/ecpg.sgml

ECPG documentation fix

commit   : b51d05b511f7c88b8d7ae3c0d3539db9405bac80    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 22:11:20 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 4 Jun 2011 22:11:20 +0300    

Click here for diff

Marc Cousin, Satoshi Nagayasu  

M doc/src/sgml/ecpg.sgml

Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list.

commit   : a9143774958e861dc1e2c198ad4c0a4a6d0b9800    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 4 Jun 2011 15:48:17 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 4 Jun 2011 15:48:17 -0400    

Click here for diff

We were trying to make that strictly an internal implementation detail,  
but it turns out that it's exposed anyway when dumping a view defined  
like  
	CREATE VIEW test_view AS VALUES (1), (2), (3) ORDER BY 1;  
This comes out as  
	CREATE VIEW ... ORDER BY "*VALUES*".column1;  
which fails to parse when reloading the dump.  
  
Hacking ruleutils.c to suppress the column qualification looks like it'd  
be a risky business, so instead promote the RTE alias to full-fledged  
usability.  
  
Per bug #6049 from Dylan Adams.  Back-patch to all supported branches.  

M src/backend/parser/analyze.c

Fix pg_get_constraintdef to cope with NOT VALID constraints

commit   : 048417511aef8d5fb2d541b17b73afc730935cd5    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 2 Jun 2011 12:39:53 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Thu, 2 Jun 2011 12:39:53 -0400    

Click here for diff

This case was missed when NOT VALID constraints were first introduced in  
commit 722bf7017bbe796decc79c1fde03e7a83dae9ada by Simon Riggs on  
2011-02-08.  Among other things, it causes pg_dump to omit the NOT VALID  
flag when dumping such constraints, which may cause them to fail to  
load afterwards, if they contained values failing the constraint.  
  
Per report from Thom Brown.  

M src/backend/utils/adt/ruleutils.c

Fix failure to check whether a rowtype's component types are sortable.

commit   : ea8e42f3a0848f506d8a1b9c74967248005291cd    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 3 Jun 2011 15:38:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 3 Jun 2011 15:38:12 -0400    

Click here for diff

The existence of a btree opclass accepting composite types caused us to  
assume that every composite type is sortable.  This isn't true of course;  
we need to check if the column types are all sortable.  There was logic  
for this for the case of array comparison (ie, check that the element  
type is sortable), but we missed the point for rowtypes.  Per Teodor's  
report of an ANALYZE failure for an unsortable composite type.  
  
Rather than just add some more ad-hoc logic for this, I moved knowledge of  
the issue into typcache.c.  The typcache will now only report out array_eq,  
record_cmp, and friends as usable operators if the array or composite type  
will work with those functions.  
  
Unfortunately we don't have enough info to do this for anonymous RECORD  
types; in that case, just assume it will work, and take the runtime failure  
as before if it doesn't.  
  
This patch might be a candidate for back-patching at some point, but  
given the lack of complaints from the field, I'd rather just test it in  
HEAD for now.  
  
Note: most of the places touched in this patch will need further work  
when we get around to supporting hashing of record types.  

M src/backend/optimizer/plan/subselect.c
M src/backend/parser/parse_oper.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/typcache.c
M src/include/catalog/pg_operator.h
M src/include/utils/typcache.h
M src/test/regress/expected/rowtypes.out
M src/test/regress/sql/rowtypes.sql

Truncate id to <=44 characters

commit   : 3ece3913d056245d78450793fc5ad18e229a3948    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 3 Jun 2011 22:23:50 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 3 Jun 2011 22:23:50 +0300    

Click here for diff

This is the original DocBook SGML limit, but apparently most  
installations have changed it or ignore it, which is why few people  
have run into this problem.  
  
pointed out by Brendan Jurd  

M doc/src/sgml/information_schema.sgml

SSI comment fixes and enhancements. Notably, document that the conflict-out flag actually means that the transaction has a conflict out to a transaction that committed before the flagged transaction.

commit   : c8630919e08c2e91435807caecb4b44c7722bf9e    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 3 Jun 2011 12:45:42 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 3 Jun 2011 12:45:42 +0300    

Click here for diff

Kevin Grittner  

M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate_internals.h

Need to list getpeereid.c in .gitignore, too ...

commit   : 52caa355ee6fd34670b6387e14c821d9128e5c88    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 22:24:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 22:24:08 -0400    

Click here for diff

M src/interfaces/libpq/.gitignore

Use proper SGML doc entities rather than angle-brackets.

commit   : a20bc9c8666ad81ff3fe26cfab2efd42d6df7f34    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 2 Jun 2011 19:32:41 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 2 Jun 2011 19:32:41 -0400    

Click here for diff

Marco Nenciarini  

M doc/src/sgml/array.sgml
M doc/src/sgml/ecpg.sgml

Handle domains when checking for recursive inclusion of composite types.

commit   : aff97b1f4e3630069a370be663b847c777b58319    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 18:37:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 18:37:57 -0400    

Click here for diff

We need this now because we allow domains over arrays, and we'll probably  
allow domains over composites pretty soon, which makes the problem even  
more obvious.  
  
Although domains over arrays also exist in previous versions, this does not  
need to be back-patched, because the coding used in older versions  
successfully "looked through" domains over arrays.  The problem is exposed  
by not treating a domain as having a typelem.  
  
Problem identified by Noah Misch, though I did not use his patch, since  
it would require additional work to handle domains over composites that  
way.  This approach is more future-proof.  

M src/backend/catalog/heap.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Looks like we can't declare getpeereid on Windows anyway.

commit   : 680ea6a6df345218f655eaad2c25f98900487438    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 17:27:30 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 17:27:30 -0400    

Click here for diff

... for lack of the uid_t and gid_t typedefs.  Per buildfarm.  

M src/include/port.h

libpq needs its own copy of src/port/getpeereid.

commit   : 2021c5a53a9dd7bb181b67475c960ae730f3a4fc    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 17:21:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 17:21:56 -0400    

Click here for diff

... on some platforms, anyway.  Per buildfarm.  

M src/interfaces/libpq/Makefile

Sort COMMENT synopsis and add more examples

commit   : c82d415acc39bc30962e692229c04ee23dae27b7    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 3 Jun 2011 00:17:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 3 Jun 2011 00:17:45 +0300    

Click here for diff

Josh Kupershmidt  

M doc/src/sgml/ref/comment.sgml

Clean up after erroneous SELECT FOR UPDATE/SHARE on a sequence.

commit   : ea6eda64a6425923463d358e2915980e81280483    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 15:30:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 15:30:56 -0400    

Click here for diff

My previous commit disallowed this operation, but did nothing about  
cleaning up the damage if one had already been done.  With the operation  
disallowed, it's okay to just forcibly clear xmax in a sequence's tuple,  
since any value seen there could not represent a live transaction's lock.  
So, any sequence-specific operation will repair the problem automatically,  
whether or not the user has already seen "could not access status of  
transaction" failures.  

M src/backend/commands/sequence.c

Fix vim-induced typo.

commit   : 5295fa8c0bb396bf2866205e093bc04d7a3394fe    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 2 Jun 2011 15:08:47 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 2 Jun 2011 15:08:47 -0400    

Click here for diff

M src/backend/commands/tablecmds.c

Disallow SELECT FOR UPDATE/SHARE on sequences.

commit   : 21538377ee6a0ee91f756726bd8b3de6d19fd20a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 14:46:15 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 14:46:15 -0400    

Click here for diff

We can't allow this because such an operation stores its transaction XID  
into the sequence tuple's xmax.  Because VACUUM doesn't process sequences  
(and we don't want it to start doing so), such an xmax value won't get  
frozen, meaning it will eventually refer to nonexistent pg_clog storage,  
and even wrap around completely.  Since the row lock is ignored by nextval  
and setval, the usefulness of the operation is highly debatable anyway.  
Per reports of trouble with pgpool 3.0, which had ill-advisedly started  
using such commands as a form of locking.  
  
In HEAD, also disallow SELECT FOR UPDATE/SHARE on toast tables.  Although  
this does work safely given the current implementation, there seems no  
good reason to allow it.  I refrained from changing that behavior in  
back branches, however.  

M src/backend/executor/execMain.c

Typo fix.

commit   : dd2ddfb1cd40393731637101c713a3446cf92144    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 13:36:48 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 13:36:48 -0400    

Click here for diff

M src/port/getpeereid.c

Avoid creating init fork for unlogged indexes when it already exists.

commit   : b8be5431a2baa2ea4a5140f1a49c3360deb4d64e    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 2 Jun 2011 13:28:52 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 2 Jun 2011 13:28:52 -0400    

Click here for diff

Report by Greg Sabino Mullane, diagnosis and preliminary patch by  
Andres Freund, corrections by me.  

M src/backend/catalog/index.c

Implement getpeereid() as a src/port compatibility function.

commit   : 3980f7fc6ecb75952ebe76c3d30ec6731728098d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 13:05:01 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 2 Jun 2011 13:05:01 -0400    

Click here for diff

This unifies a bunch of ugly #ifdef's in one place.  Per discussion,  
we only need this where HAVE_UNIX_SOCKETS, so no need to cover Windows.  
  
Marko Kreen, some adjustment by Tom Lane  

M configure
M configure.in
M src/backend/libpq/auth.c
M src/include/port.h
M src/interfaces/libpq/fe-connect.c
A src/port/getpeereid.c

Allow hash joins to be interrupted while searching hash table for match.

commit   : 0c99d41ec887051fb0cc6e35e358ecc936a13584    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 1 Jun 2011 17:01:59 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 1 Jun 2011 17:01:59 -0400    

Click here for diff

Per experimentation with a recent example, in which unreasonable amounts  
of time could elapse before the backend would respond to a query-cancel.  
  
This might be something to back-patch, but the patch doesn't apply cleanly  
because this code was rewritten for 9.1.  Given the lack of field  
complaints I won't bother for now.  
  
Cédric Villemain  

M src/backend/executor/nodeHashjoin.c

Some copy editing of the release notes

commit   : 596b0c213f2f7ffa72d0d5b68e1da91c366dc72b    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 1 Jun 2011 22:22:18 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 1 Jun 2011 22:22:18 +0300    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Further improvements in pg_ctl's new wait-for-postmaster-start logic.

commit   : 3c485ca8e6580409284ac50623286b0fb8cd4a57    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 1 Jun 2011 13:09:07 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 1 Jun 2011 13:09:07 -0400    

Click here for diff

Add a postmaster_is_alive() test to the wait loop, so that we stop waiting  
if the postmaster dies without removing its pidfile.  Unfortunately this  
only helps after the postmaster has created its pidfile, since until then  
we don't know which PID to check.  But if it never does create the pidfile,  
we can give up in a relatively short time, so this is a useful addition  
in practice.  Per suggestion from Fujii Masao, though this doesn't look  
very much like his patch.  
  
In addition, improve pg_ctl's ability to cope with pre-existing pidfiles.  
Such a file might or might not represent a live postmaster that is going to  
block our postmaster from starting, but the previous code pre-judged the  
situation and gave up waiting immediately.  Now, we will wait for up to 5  
seconds to see if our postmaster overwrites such a file.  This issue  
interacts with Fujii's patch because we would make the wrong conclusion  
if we did the postmaster_is_alive() test with a pre-existing PID.  
  
All of this could be improved if we rewrote start_postmaster() so that it  
could report the child postmaster's PID, so that we'd know a-priori the  
correct PID to test with postmaster_is_alive().  That looks like a bit too  
much change for so late in the 9.1 development cycle, unfortunately.  

M src/bin/pg_ctl/pg_ctl.c

Protect GIST logic that assumes penalty values can't be negative.

commit   : 6923d699bc3c46ca2c5d8c12fe1c5c39ecfee11d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 31 May 2011 17:53:45 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 31 May 2011 17:53:45 -0400    

Click here for diff

Apparently sane-looking penalty code might return small negative values,  
for example because of roundoff error.  This will confuse places like  
gistchoose().  Prevent problems by clamping negative penalty values to  
zero.  (Just to be really sure, I also made it force NaNs to zero.)  
Back-patch to all supported branches.  
  
Alexander Korotkov  

M doc/src/sgml/gist.sgml
M src/backend/access/gist/gistutil.c

Recode non-ASCII characters in source to UTF-8

commit   : ba4cacf0756f71e175d25bac78834715a353e64e    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 31 May 2011 23:10:05 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 31 May 2011 23:10:05 +0300    

Click here for diff

For consistency, have all non-ASCII characters from contributors'  
names in the source be in UTF-8.  But remove some other more  
gratuitous uses of non-ASCII characters.  

M contrib/README
M contrib/spi/timetravel.c
M src/backend/port/dynloader/darwin.c
M src/backend/storage/lmgr/README-SSI
M src/backend/storage/lmgr/predicate.c

Use entities to encode non-ASCII characters in SGML documentation

commit   : 85ffed431ae6fff0d5fbafd9a48b330542f2f4d9    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 31 May 2011 22:32:31 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 31 May 2011 22:32:31 +0300    

Click here for diff

This has already been the case for the most part; just some cases had  
slipped through.  

M doc/src/sgml/isn.sgml
M doc/src/sgml/release-7.4.sgml
M doc/src/sgml/release-8.4.sgml

Replace use of credential control messages with getsockopt(LOCAL_PEERCRED).

commit   : be4585b1c27ac5dbdd0d61740d18f7ad9a00e268    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 31 May 2011 16:10:46 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 31 May 2011 16:10:46 -0400    

Click here for diff

It turns out the reason we hadn't found out about the portability issues  
with our credential-control-message code is that almost no modern platforms  
use that code at all; the ones that used to need it now offer getpeereid(),  
which we choose first.  The last holdout was NetBSD, and they added  
getpeereid() as of 5.0.  So far as I can tell, the only live platform on  
which that code was being exercised was Debian/kFreeBSD, ie, FreeBSD kernel  
with Linux userland --- since glibc doesn't provide getpeereid(), we fell  
back to the control message code.  However, the FreeBSD kernel provides a  
LOCAL_PEERCRED socket parameter that's functionally equivalent to Linux's  
SO_PEERCRED.  That is both much simpler to use than control messages, and  
superior because it doesn't require receiving a message from the other end  
at just the right time.  
  
Therefore, add code to use LOCAL_PEERCRED when necessary, and rip out all  
the credential-control-message code in the backend.  (libpq still has such  
code so that it can still talk to pre-9.1 servers ... but eventually we can  
get rid of it there too.)  Clean up related autoconf probes, too.  
  
This means that libpq's requirepeer parameter now works on exactly the same  
platforms where the backend supports peer authentication, so adjust the  
documentation accordingly.  

M configure
M configure.in
M doc/src/sgml/client-auth.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/protocol.sgml
M src/backend/libpq/auth.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-connect.c

Fix portability bugs in use of credentials control messages for peer auth.

commit   : 13c00ae8c73ee9635c11059925814b351dc3593c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 30 May 2011 19:16:05 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 30 May 2011 19:16:05 -0400    

Click here for diff

Even though our existing code for handling credentials control messages has  
been basically unchanged since 2001, it was fundamentally wrong: it did not  
ensure proper alignment of the supplied buffer, and it was calculating  
buffer sizes and message sizes incorrectly.  This led to failures on  
platforms where alignment padding is relevant, for instance FreeBSD on  
64-bit platforms, as seen in a recent Debian bug report passed on by  
Martin Pitt (http://bugs.debian.org//cgi-bin/bugreport.cgi?bug=612888).  
  
Rewrite to do the message-whacking using the macros specified in RFC 2292,  
following a suggestion from Theo de Raadt in that thread.  Tested by me  
on Debian/kFreeBSD-amd64; since OpenBSD and NetBSD document the identical  
CMSG API, it should work there too.  
  
Back-patch to all supported branches.  

M src/backend/libpq/auth.c
M src/interfaces/libpq/fe-auth.c

Fix VACUUM so that it always updates pg_class.reltuples/relpages.

commit   : b4b6923e03f4d29636a94f6f4cc2f5cf6298b8c8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 30 May 2011 17:05:26 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 30 May 2011 17:05:26 -0400    

Click here for diff

When we added the ability for vacuum to skip heap pages by consulting the  
visibility map, we made it just not update the reltuples/relpages  
statistics if it skipped any pages.  But this could leave us with extremely  
out-of-date stats for a table that contains any unchanging areas,  
especially for TOAST tables which never get processed by ANALYZE.  In  
particular this could result in autovacuum making poor decisions about when  
to process the table, as in recent report from Florian Helmberger.  And in  
general it's a bad idea to not update the stats at all.  Instead, use the  
previous values of reltuples/relpages as an estimate of the tuple density  
in unvisited pages.  This approach results in a "moving average" estimate  
of reltuples, which should converge to the correct value over multiple  
VACUUM and ANALYZE cycles even when individual measurements aren't very  
good.  
  
This new method for updating reltuples is used by both VACUUM and ANALYZE,  
with the result that we no longer need the grotty interconnections that  
caused ANALYZE to not update the stats depending on what had happened  
in the parent VACUUM command.  
  
Also, fix the logic for skipping all-visible pages during VACUUM so that it  
looks ahead rather than behind to decide what to do, as per a suggestion  
from Greg Stark.  This eliminates useless scanning of all-visible pages at  
the start of the relation or just after a not-all-visible page.  In  
particular, the first few pages of the relation will not be invariably  
included in the scanned pages, which seems to help in not overweighting  
them in the reltuples estimate.  
  
Back-patch to 8.4, where the visibility map was introduced.  

M src/backend/commands/analyze.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/postmaster/pgstat.c
M src/include/commands/vacuum.h
M src/include/pgstat.h

Suppress foreign data wrappers and foreign servers in partial dumps

commit   : 3001b76308e9189ff471c54b1823621e03dc1359    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 30 May 2011 23:34:34 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 30 May 2011 23:34:34 +0300    

Click here for diff

This is consistent with the behavior of other global objects such as  
languages and extensions.  
  
Omitting foreign servers also omits the respective user mappings.  

M src/bin/pg_dump/pg_dump.c

Don't recommend upgrading to latest available Windows SDK

commit   : 2367da886d4ab903c7bf5037b363ca10489cdf85    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:46:14 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:46:14 +0200    

Click here for diff

We only support up to version 7.0, so don't recommend  
upgrading past it. The rest of the documentation around this  
was already updated, but one spot was missed.  

M doc/src/sgml/install-windows.sgml

Refuse "local" lines in pg_hba.conf on platforms that don't support it

commit   : 5830f69665053f78cfd31e39f40bb23ad91748a8    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:11:13 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:11:13 +0200    

Click here for diff

This makes the behavior compatible with that of hostssl, which  
also throws an error when there is no SSL support included.  

M src/backend/libpq/hba.c

Don't include local line on platforms without support

commit   : 764bde0f1641cc3aafa2c221c56bd3a8129d9e3b    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:09:51 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Mon, 30 May 2011 20:09:51 +0200    

Click here for diff

Since we now include a sample line for replication on local  
connections in pg_hba.conf, don't include it where local  
connections aren't available (such as on win32).  
  
Also make sure we use authmethodlocal and not authmethod on  
the sample line.  

M src/backend/libpq/pg_hba.conf.sample

commit   : 3103f9a77d005f9d8b8ef492298bbbbf6c4b843f    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 30 May 2011 20:42:16 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 30 May 2011 20:42:16 +0300    

Click here for diff

Kevin Grittner & Dan Ports, with some comment editorialization by me.  

M src/backend/access/heap/heapam.c
M src/backend/access/index/indexam.c
M src/backend/storage/lmgr/README-SSI
M src/backend/storage/lmgr/predicate.c
M src/include/storage/predicate.h
M src/test/isolation/expected/multiple-row-versions.out
M src/test/isolation/specs/multiple-row-versions.spec

Make message more consistent

commit   : 5177dfefc532ea481bf70d1bb8a493f835a9c57c    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 30 May 2011 12:40:28 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 30 May 2011 12:40:28 -0400    

Click here for diff

M src/bin/pg_basebackup/pg_basebackup.c

Remove usage of &PL_sv_undef in hashes and arrays

commit   : 7de38741c0438cdece0e22699de8ffd5797735fb    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 30 May 2011 12:15:13 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 30 May 2011 12:15:13 -0400    

Click here for diff

According to perlguts, &PL_sv_undef is not the right thing to use in  
those cases because it doesn't behave the same way as an undef value via  
Perl code.  Seems the intuitive way to deal with undef values is subtly  
enough broken that it's hard to notice when misused.  
  
The broken uses got inadvertently introduced in commit  
87bb2ade2ce646083f39d5ab3e3307490211ad04 by Alexey Klyukin, Alex  
Hunsaker and myself on 2011-02-17; no backpatch is necessary.  
  
Per testing report from Greg Mullane.  
  
Author: Alex Hunsaker  

M src/pl/plperl/plperl.c

Add pg_basebackup -z option for compression with default level

commit   : 6fa79755bd393cdfadb6197164cbe01498474be3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 30 May 2011 01:02:02 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 30 May 2011 01:02:02 +0300    

Click here for diff

M doc/src/sgml/ref/pg_basebackup.sgml
M src/bin/pg_basebackup/pg_basebackup.c

Correct description of log_connections and log_disconnections

commit   : cb0defe5230f3773feb334a01b990c9eaaca301b    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 21:59:10 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 21:59:10 +0300    

Click here for diff

The previous claim when these parameters could be changed was  
incorrect.  
  
Fujii Masao  

M doc/src/sgml/config.sgml

Allow pg_basebackup compressed tar output to stdout

commit   : d68714b29c42d10437b56372d6b0a1dda1e7d7f5    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 01:17:37 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 01:17:37 +0300    

Click here for diff

M doc/src/sgml/ref/pg_basebackup.sgml
M src/bin/pg_basebackup/pg_basebackup.c

Avoid compiler warning when building without zlib

commit   : 1b6dabc452b9357e39b63a94c109e2293f13a555    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 01:03:38 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 29 May 2011 01:03:38 +0300    

Click here for diff

M src/bin/pg_dump/compress_io.c

Fix null-dereference crash in parse_xml_decl().

commit   : 5e1365a9650678a531106120e40676a9417971f1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 28 May 2011 12:36:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 28 May 2011 12:36:04 -0400    

Click here for diff

parse_xml_decl's header comment says you can pass NULL for any unwanted  
output parameter, but it failed to honor this contract for the "standalone"  
flag.  The only currently-affected caller is xml_recv, so the net effect is  
that sending a binary XML value containing a standalone parameter in its  
xml declaration would crash the backend.  Per bug #6044 from Christopher  
Dillard.  
  
In passing, remove useless initializations of parse_xml_decl's output  
parameters in xml_parse.  
  
Back-patch to 8.3, where this code was introduced.  

M src/backend/utils/adt/xml.c

Remove unused variable

commit   : 4c60a77508ee4f4d895629905265d79feaab108c    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 27 May 2011 21:49:22 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 27 May 2011 21:49:22 -0400    

Click here for diff

Cédric Villemain  

M src/backend/commands/tablecmds.c

Remove literal tabs from message strings

commit   : 4d7d6386d701ebf36a4de4c2a8c32826a999e437    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 28 May 2011 01:01:42 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 28 May 2011 01:01:42 +0300    

Click here for diff

M contrib/pg_standby/pg_standby.c

Drop "meaning" column from error code table

commit   : 420dcaaeb1a3be51b6417da59ce69d7954369211    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 28 May 2011 00:25:33 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 28 May 2011 00:25:33 +0300    

Click here for diff

This is currently the same as the condition name, so it doesn't add  
any value, only clutter.  

M doc/src/sgml/errcodes.sgml
M doc/src/sgml/generate-errcodes-table.pl

Improve corner cases in pg_ctl's new wait-for-postmaster-startup code.

commit   : 0bae3bc9be4a025df089f0a0c2f547fa538a97bc    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 27 May 2011 14:13:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 27 May 2011 14:13:38 -0400    

Click here for diff

With "-w -t 0", we should report "still starting up", not "ok".  If we  
fall out of the loop without ever being able to call PQping (because we  
were never able to construct a connection string), report "no response",  
not "ok".  This gets rid of corner cases in which we'd claim the server  
had started even though it had not.  
  
Also, if the postmaster.pid file is not there at any point after we've  
waited 5 seconds, assume the postmaster has failed and report that, rather  
than almost-certainly-fruitlessly continuing to wait.  The pidfile should  
appear almost instantly even when there is extensive startup work to do,  
so 5 seconds is already a very conservative figure.  This part is per a  
gripe from MauMau --- there might be better ways to do it, but nothing  
simple enough to get done for 9.1.  

M src/bin/pg_ctl/pg_ctl.c

Preserve caller's memory context in ProcessCompletedNotifies().

commit   : 90857b48e1f69dbca52f498bd444190d36dbd73f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 27 May 2011 12:10:32 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 27 May 2011 12:10:32 -0400    

Click here for diff

This is necessary to avoid long-term memory leakage, because the main loop  
in PostgresMain expects to be executing in MessageContext, and hence is a  
bit sloppy about freeing stuff that is only needed for the duration of  
processing the current client message.  The known case of an actual leak  
is when encoding conversion has to be done on the incoming command string,  
but there might be others.  Per report from Per-Olov Esgard.  
  
Back-patch to 9.0, where the bug was introduced by the LISTEN/NOTIFY  
rewrite.  

M src/backend/commands/async.c

Check the return code of pthread_create(). Otherwise we go into an infinite loop if it fails, which is what what happened on my HP-UX box. (I think the reason it failed on that box is a misconfiguration on my behalf, but that's no reason to hang.)

commit   : 336db7e3474508b46a0e6bdb013a8bee5aac9adf    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 27 May 2011 11:51:23 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 27 May 2011 11:51:23 +0300    

Click here for diff

M src/test/thread/thread_test.c

Make decompilation of optimized CASE constructs more robust.

commit   : 3987e9e62046bd800d8d08566ed49fee1ae6cb86    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 26 May 2011 19:25:19 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 26 May 2011 19:25:19 -0400    

Click here for diff

We had some hacks in ruleutils.c to cope with various odd transformations  
that the optimizer could do on a CASE foo WHEN "CaseTestExpr = RHS" clause.  
However, the fundamental impossibility of covering all cases was exposed  
by Heikki, who pointed out that the "=" operator could get replaced by an  
inlined SQL function, which could contain nearly anything at all.  So give  
up on the hacks and just print the expression as-is if we fail to recognize  
it as "CaseTestExpr = RHS".  (We must cover that case so that decompiled  
rules print correctly; but we are not under any obligation to make EXPLAIN  
output be 100% valid SQL in all cases, and already could not do so in some  
other cases.)  This approach requires that we have some printable  
representation of the CaseTestExpr node type; I used "CASE_TEST_EXPR".  
  
Back-patch to all supported branches, since the problem case fails in all.  

M src/backend/utils/adt/ruleutils.c

Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if possible.

commit   : 44404f394517f89a0bebb1aaace6e64ad79d2817    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 26 May 2011 17:29:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 26 May 2011 17:29:33 -0400    

Click here for diff

This is reported to be necessary on some versions of that OS.  In service  
of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject switches that result in  
compiler warnings, since on yet other versions of that OS, the switch does  
nothing except provoke a warning.  
  
Report and patch by Ibrar Ahmed, further tweaking by me.  

M config/c-compiler.m4
M configure
M configure.in

Suppress extensions in partial dumps.

commit   : 7b158d1baed859971c1aa792bff6a7e1f721cf91    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 25 May 2011 16:26:45 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 25 May 2011 16:26:45 -0400    

Click here for diff

We initially had pg_dump emit CREATE EXTENSION commands unconditionally.  
However, pg_dump has long been in the habit of not dumping procedural  
language definitions when a --schema or --table switch is given.  It seems  
appropriate to handle extensions the same way, since like PLs they are SQL  
objects that are not in any particular schema.  Per complaint from Adrian  
Schreyer.  

M src/bin/pg_dump/pg_dump.c

Put options in some sensible order

commit   : 3439e40f9afa5e8702c8e3e7d0b09a0cb4b07e73    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 25 May 2011 21:53:26 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 25 May 2011 21:53:26 +0300    

Click here for diff

For the --help output and reference pages of pg_dump, pg_dumpall,  
pg_restore, put the options in some consistent, mostly alphabetical,  
and consistent order, rather than newest option last or something like  
that.  

M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_dumpall.sgml
M doc/src/sgml/ref/pg_restore.sgml
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c

Convert builddoc.bat into a perl script that actually works.

commit   : 8c3604ae7fa1602e00b639447e894f9d59f9d297    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 25 May 2011 00:21:07 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 25 May 2011 00:21:07 -0400    

Click here for diff

The old .bat file wasn't working for reasons that are unclear, and  
which it did not seem worth the trouble to ascertain.  
The new perl script has been tested and is known to work.  
Soon it will be tested regularly on the buildfarm.  
The .bat file is kept as a simple wrapper for the perl script.  

M src/tools/msvc/builddoc.bat
A src/tools/msvc/builddoc.pl

Add C comment about why we don't spell out "month" in interval values.

commit   : 0711a8b2b340ee0b0a7fd7ea2ac0fa6aee4708ae    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 24 May 2011 23:24:44 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 24 May 2011 23:24:44 -0400    

Click here for diff

M src/backend/utils/adt/datetime.c

Grammar cleanup for src/test/isolation/README

commit   : 446d5d32aedcca378578c8fe1c2eed34df92a238    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 18:52:15 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 18:52:15 -0400    

Click here for diff

Josh Kupershmidt  

M src/test/isolation/README

Cleanup for pull-up-isReset patch.

commit   : b23aeb6519651146cf35b2b91d24596f37b40794    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 17:56:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 17:56:52 -0400    

Click here for diff

Clear isReset before, not after, calling the context-specific alloc method,  
so as to preserve the option to do a tail call in MemoryContextAlloc  
(and also so this code isn't assuming that a failed alloc call won't have  
changed the context's state before failing).  Fix missed direct invocation  
of reset method.  Reformat a comment.  

M src/backend/utils/mmgr/aset.c
M src/backend/utils/mmgr/mcxt.c

In pg_upgrade, do case-insensitive checks of locale, encoding, and ctype because these are often inconsistently capitalized.

commit   : 11c08c3fd79f1fd5a83f9156fc1c43c7be3453ce    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 24 May 2011 15:59:00 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 24 May 2011 15:59:00 -0400    

Click here for diff

M contrib/pg_upgrade/check.c

Adjust configure's probe for libselinux so it rejects too-old versions.

commit   : 8ff1f6a78c4fb48337f671f1586839cef5d4b940    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 15:49:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 15:49:56 -0400    

Click here for diff

We need at least version 2.0.93, so probe for a function that was added  
in that version.  
  
Kaigai Kohei  

M configure
M configure.in

Add a "local" replication sample entry

commit   : f50655900a865d65d17bb79f57f1d8c48b1cb266    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 24 May 2011 21:28:30 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 24 May 2011 21:28:30 +0300    

Click here for diff

Also adjust alignment a bit to distinguish commented out from comment.  

M src/backend/libpq/pg_hba.conf.sample

Message improvements

commit   : c8d45152fa04c77370fc16faf0727c0f52739f0a    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 24 May 2011 21:25:28 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 24 May 2011 21:25:28 +0300    

Click here for diff

M src/bin/pg_basebackup/pg_basebackup.c

Avoid uninitialized bits in the result of QTN2QT().

commit   : cc24fb418d8da7ed93f9cd936f7da8fc7e0381bf    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 14:20:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 24 May 2011 14:20:08 -0400    

Click here for diff

Found with additional valgrind testing.  
  
Noah Misch  

M src/backend/utils/adt/tsquery_util.c

Make plpgsql complain about conflicting IN and OUT parameter names.

commit   : 59a4a571d396ec00a7e363dca8b2f5eb2d8307ad    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 23 May 2011 16:34:27 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 23 May 2011 16:34:27 -0400    

Click here for diff

The core CREATE FUNCTION code only enforces that IN parameter names are  
non-duplicate, and that OUT parameter names are separately non-duplicate.  
This is because some function languages might not have any confusion  
between the two.  But in plpgsql, such names are all in the same namespace,  
so we'd better disallow it.  
  
Per a recent complaint from Dan S.  Not back-patching since this is a small  
issue and the change could cause unexpected failures if we started to  
enforce it in a minor release.  

M src/pl/plpgsql/src/pl_comp.c

Fix integer overflow in text_format function, reported by Dean Rasheed.

commit   : 34be83b7e142a718c7a831c9df9763aa83fe4cd5    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 23 May 2011 22:18:19 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 23 May 2011 22:18:19 +0300    

Click here for diff

In the passing, clarify the comment on why text_format_nv wrapper is needed.  

M src/backend/utils/adt/varlena.c

Improve hash_array() logic for combining hash values.

commit   : 7149b128dc12ece64c182962dc4f882ea7559d0c    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 23 May 2011 15:17:18 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 23 May 2011 15:17:18 -0400    

Click here for diff

The new logic is less vulnerable to transpositions.  
  
This invalidates the contents of hash indexes built with the old  
functions; hence, bump catversion.  
  
Dean Rasheed  

M src/backend/utils/adt/arrayfuncs.c
M src/include/catalog/catversion.h

Message style improvements

commit   : c58b945e23e63a0baca67b216a5225b34de84cce    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 23 May 2011 20:38:20 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 23 May 2011 20:38:20 +0300    

Click here for diff

M src/bin/pg_dump/pg_dumpall.c

Install defenses against overflow in BuildTupleHashTable().

commit   : 299d1716525c659f0e02840e31fbe4dea3cc796c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 23 May 2011 12:52:46 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 23 May 2011 12:52:46 -0400    

Click here for diff

The planner can sometimes compute very large values for numGroups, and in  
cases where we have no alternative to building a hashtable, such a value  
will get fed directly to BuildTupleHashTable as its nbuckets parameter.  
There were two ways in which that could go bad.  First, BuildTupleHashTable  
declared the parameter as "int" but most callers were passing "long"s,  
so on 64-bit machines undetected overflow could occur leading to a bogus  
negative value.  The obvious fix for that is to change the parameter to  
"long", which is what I've done in HEAD.  In the back branches that seems a  
bit risky, though, since third-party code might be calling this function.  
So for them, just put in a kluge to treat negative inputs as INT_MAX.  
Second, hash_create can go nuts with extremely large requested table sizes  
(notably, my_log2 becomes an infinite loop for inputs larger than  
LONG_MAX/2).  What seems most appropriate to avoid that is to bound the  
initial table size request to work_mem.  
  
This fixes bug #6035 reported by Daniel Schreiber.  Although the reported  
case only occurs back to 8.4 since it involves WITH RECURSIVE, I think  
it's a good idea to install the defenses in all supported branches.  

M src/backend/executor/execGrouping.c
M src/backend/executor/nodeSubplan.c
M src/include/executor/executor.h

Remove spurious underscore in name of isolation tester on MSVC.

commit   : a9b6519606a4a95ae8052f8414841d02bcfe4582    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 22 May 2011 21:51:18 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 22 May 2011 21:51:18 -0400    

Click here for diff

M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/vcregress.pl

Use the right pgsql for isolation tests.

commit   : b08ddf8c761cd596c4664dde1125f38a8757756f    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 22 May 2011 17:58:26 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 22 May 2011 17:58:26 -0400    

Click here for diff

M src/test/isolation/Makefile

Put lists in sensible order

commit   : 60497722ac6d69d8ff82fe328b0a128e73433bec    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 22:21:37 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 22:21:37 +0300    

Click here for diff

M doc/src/sgml/information_schema.sgml

Make plpgsql provide the typmods for its variables to the main parser.

commit   : 219dfae4e1b0ca7cbc0b2f0f7740e01657964c07    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 22 May 2011 15:13:35 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 22 May 2011 15:13:35 -0400    

Click here for diff

Historically we didn't do this, even though we had the information, because  
plpgsql passed its Params via SPI APIs that only include type OIDs not  
typmods.  Now that plpgsql uses parser callbacks to create Params, it's  
easy to insert the right typmod.  This should generally result in lower  
surprise factors, because a plpgsql variable that is declared with a typmod  
will now work more like a table column with the same typmod.  In particular  
it's the "right" way to fix bug #6020, in which plpgsql's attempt to return  
an anonymous record type is defeated by stricter record-type matching  
checks that were added in 9.0.  However, it's not impossible that this  
could result in subtle behavioral changes that could break somebody's  
existing plpgsql code, so I'm afraid to back-patch this change into  
released branches.  In those branches we'll have to lobotomize the  
record-type checks instead.  

M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/plpgsql.h

Message style improvements

commit   : fae625e7b9824ec64f770904108089ff4fbcf093    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 20:04:07 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 20:04:07 +0300    

Click here for diff

M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_restore.c

Put documentation of backslash commands back in alphabetical order

commit   : 7920d033d8b580f00ede0628ee0b1c3a3f3c6b43    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 15:13:17 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 15:13:17 +0300    

Click here for diff

M doc/src/sgml/ref/psql-ref.sgml

Clarify the documentation of the --with-ossp-uuid option

commit   : 51ad1784ccf9c2a72238a50a314771e34721f1d3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 14:29:36 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 14:29:36 +0300    

Click here for diff

M configure
M configure.in
M doc/src/sgml/installation.sgml

Message improvement

commit   : 8932e2810034c43daa07c6da914a4c5ba46f6bd6    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 00:36:14 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 22 May 2011 00:36:14 +0300    

Click here for diff

M src/bin/psql/command.c

Pull up isReset flag from AllocSetContext to MemoryContext struct. This avoids the overhead of one function call when calling MemoryContextReset(), and it seems like the isReset optimization would be applicable to any new memory context we might invent in the future anyway.

commit   : 30e98a7e6e4869a7d6b3748ac9770bb8d69a8b26    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 14:47:19 -0400    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 14:47:19 -0400    

Click here for diff

This buys back the overhead I just added in previous patch to always call  
MemoryContextReset() in ExecScan, even when there's no quals or projections.  

M src/backend/utils/mmgr/aset.c
M src/backend/utils/mmgr/mcxt.c
M src/include/nodes/memnodes.h

Reset per-tuple memory context between every row in a scan node, even when there's no quals or projections. Currently this only matters for foreign scans, as none of the other scan nodes litter the per-tuple memory context when there's no quals or projections.

commit   : 0319da638f337cae66a4649581dc1f33d5079e1a    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 14:30:11 -0400    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 14:30:11 -0400    

Click here for diff

M src/backend/executor/execScan.c

In binary-upgrade mode, dump dropped attributes of composite types.

commit   : 27c7875d95cf629e3f344ba91d1f8a1a936ed043    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 08:18:00 -0400    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 21 May 2011 08:18:00 -0400    

Click here for diff

Noah Misch  

M src/bin/pg_dump/pg_dump.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Message style improvements

commit   : bcf63a51e3dbf7cdb70af03ed13e6984dee41ec0    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 21 May 2011 00:50:35 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 21 May 2011 00:50:35 +0300    

Click here for diff

M src/backend/utils/adt/arrayfuncs.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpython.c
M src/test/regress/expected/arrays.out

Rename pg_dump --no-security-label to --no-security-labels

commit   : c8e0c321194c985a13e7c7e4d3110ac032517350    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 23:20:11 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 23:20:11 +0300    

Click here for diff

Other similar options also use the plural form.  

M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_dumpall.sgml
M doc/src/sgml/ref/pg_restore.sgml
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c

Fix untranslatable assembly of libpq connection failure message

commit   : fcd4575905608a6dd0868bd6ab99f3e06a743152    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 22:56:53 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 22:56:53 +0300    

Click here for diff

Even though this only affects the insertion of a parenthesized word,  
it's unwise to assume that parentheses can pass through untranslated.  
And in any case, the new version is clearer in the code and for  
translators.  

M src/interfaces/libpq/fe-connect.c

Update config.guess and config.sub

commit   : 8d8954938094744ef4cab9d6f45f8e9e8abeb58f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 22:14:56 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 22:14:56 +0300    

Click here for diff

M config/config.guess
M config/config.sub

Consistent spacing for lengthy error messages

commit   : bb46d42859f62d5fbe8a8b55690643cba65e106c    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 21:36:57 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 21:36:57 +0300    

Click here for diff

Also, we removed the display of the current value of  
max_connections/MaxBackends from some messages earlier, because it was  
confusing, so do that in the remaining one as well.  

M src/backend/port/sysv_sema.c
M src/backend/port/sysv_shmem.c

Add example for replication in pg_hba.conf

commit   : a937b07121d8ab51ba6fb44618254ec13cdcdfa0    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 19 May 2011 14:03:15 -0400    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 19 May 2011 14:03:15 -0400    

Click here for diff

Selena Deckelmann  

M src/backend/libpq/pg_hba.conf.sample
M src/bin/initdb/initdb.c

Fix race condition in CheckTargetForConflictsIn.

commit   : 74aaa2136d13d613ffcea3171781d2e0c65a2e10    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 19 May 2011 12:11:05 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 19 May 2011 12:11:05 -0400    

Click here for diff

Dan Ports  

M src/backend/storage/lmgr/predicate.c

Fix declaration of $_TD in "strict" trigger functions

commit   : 6b449d9051651d3accfdce73e21cfd5e3d0e09a3    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Wed, 18 May 2011 23:56:18 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Wed, 18 May 2011 23:56:18 -0400    

Click here for diff

This was broken in commit ef19dc6d39dd2490ff61489da55d95d6941140bf by  
the Bunce/Hunsaker/Dunstan team, which moved the declaration from  
plperl_create_sub to plperl_call_perl_trigger_func.  This doesn't  
actually work because the validator code would not find the variable  
declared; and even if you manage to get past the validator, it still  
doesn't work because get_sv("_TD", GV_ADD) doesn't have the expected  
effect.  The only reason this got beyond testing is that it only fails  
in strict mode.  
  
We need to declare it as a global just like %_SHARED; it is simpler than  
trying to actually do what the patch initially intended, and is said to  
have the same performance benefit.  
  
As a more serious issue, fix $_TD not being properly local()ized,  
meaning nested trigger functions would clobber $_TD.  
  
Alex Hunsaker, per test report from Greg Mullane  

M src/pl/plperl/expected/plperl_trigger.out
M src/pl/plperl/plc_perlboot.pl
M src/pl/plperl/plperl.c
M src/pl/plperl/sql/plperl_trigger.sql

Replace strdup() with pstrdup(), to avoid leaking memory.

commit   : ea896da394cbb0fb32a4b41065ea04b81c4b03f6    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 18 May 2011 22:30:24 -0400    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 18 May 2011 22:30:24 -0400    

Click here for diff

It's been like this since the seg module was introduced, so backpatch to  
8.2 which is the oldest supported version.  

M contrib/seg/seg.c

In pg_upgrade, clean up handling of invalid directory specification by checking the stat() errno value more strictly.

commit   : 1f35944607f1ede7dbb1dc3283d955b96f04ea5e    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 22:22:40 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 22:22:40 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c

Improve pg_upgrade error reporting if the bin or data directories do not exist or are not directories.

commit   : 772a5f1e5b343d07e907ef7f36fa36d190d55912    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 18:36:52 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 18:36:52 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c

Remove obsolete comment

commit   : 4a6a5c86db7362993a13b32bb0c02c956d94ff13    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 01:19:57 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 01:19:57 +0300    

Click here for diff

M doc/src/sgml/errcodes.sgml

Spell checking and markup refinement

commit   : c13dc6402b6e99af9a8b7794e44d62deecafc745    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 01:14:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 01:14:45 +0300    

Click here for diff

M doc/src/sgml/backup.sgml
M doc/src/sgml/btree-gist.sgml
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/ecpg.sgml
M doc/src/sgml/extend.sgml
M doc/src/sgml/file-fdw.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/mvcc.sgml
M doc/src/sgml/perform.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/plperl.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/plpython.sgml
M doc/src/sgml/queries.sgml
M doc/src/sgml/ref/alter_opfamily.sgml
M doc/src/sgml/ref/cluster.sgml
M doc/src/sgml/ref/create_opclass.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/ref/ecpg-ref.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/runtime.sgml
M doc/src/sgml/sepgsql.sgml
M doc/src/sgml/xml2.sgml
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistxlog.c
M src/backend/catalog/sql_features.txt
M src/backend/commands/indexcmds.c
M src/test/regress/expected/opr_sanity.out
M src/test/regress/sql/opr_sanity.sql

/contrib/foo -> contrib/foo

commit   : 0ee391b77a8aef3835a39ecc4856a9ab79936f56    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 00:30:31 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 19 May 2011 00:30:31 +0300    

Click here for diff

Since contrib is a relative directory specification, a leading slash  
is inappropriate.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M doc/src/sgml/release-9.1.sgml

Improve pg_upgrade X_OK comment.

commit   : 92ff91501846bd0343eea726d9ca83464cda07af    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 12:25:34 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 12:25:34 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c

Fix pg_upgrade build problem on Windows when using X_OK access permission check on the current directory.

commit   : 6fbf4e0e7c0839c33ed2d63f3c64abdc049f6d1b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 12:13:37 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 18 May 2011 12:13:37 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c

Fix pg_dump's handling of extension-member casts and languages.

commit   : b3bc63efbc258874b06586aa7548fce37f3581e1    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 16 May 2011 16:41:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 16 May 2011 16:41:52 -0400    

Click here for diff

pg_dump has some heuristic rules for whether to dump casts and procedural  
languages, since it's not all that easy to distinguish built-in ones from  
user-defined ones.  However, we should not apply those rules to objects  
that belong to an extension, but just use the perfectly well-defined rules  
for what to do with extension member objects.  Otherwise we might  
mistakenly lose extension member objects during a binary upgrade (which is  
the only time that we'd want to dump extension members).  

M src/bin/pg_dump/pg_dump.c

Update pg_upgrade directory check error message.

commit   : e728701fb496ace7fa21fcce5c0ef7fc4c0ec78c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 12:32:36 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 12:32:36 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c

Remove redundant privilege doc sentences.

commit   : 8a849cdee4dff3406a405e83e9504ebc52bbcfaa    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 11:22:25 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 11:22:25 -0400    

Click here for diff

M doc/src/sgml/ddl.sgml

Add pg_upgrade check to make sure the user has full access permission in the current directory; if not, throw an error.

commit   : bda27e502fe9a3e9c54f065e4bc1315c3f2a57d7    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 11:01:29 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 11:01:29 -0400    

Click here for diff

M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c

Allow pg_upgrade to honor libpq environment variables. Add 'local' checks for PGHOST and PGHOSTADDR.

commit   : 6c19bd96bc5139fabace94c5a0a5624fd9d8e986    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 10:46:52 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 16 May 2011 10:46:52 -0400    

Click here for diff

M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/util.c
M doc/src/sgml/pgupgrade.sgml

Quote isolationtester command name so Windows will not think dot is the command.

commit   : 78b66cff72d6f337a685355f7ccede1c518681b5    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 23:42:12 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 23:42:12 -0400    

Click here for diff

M src/test/isolation/isolation_main.c

Add required psqldir setting for isolation checks.

commit   : df15d11cb596fa69d7ffb27cf0b7b070c03ab381    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 23:12:36 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 23:12:36 -0400    

Click here for diff

M src/tools/msvc/vcregress.pl

Fix bad macro call noticed by MSVC compiler.

commit   : ec645ef346d2de2fb889f6b8a8d2fc70a4ea4971    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 18:45:26 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 18:45:26 -0400    

Click here for diff

M src/test/regress/pg_regress.c

Add missing check function lookup.

commit   : 20bacc9560b29b33b6cad4e53c6a77e6c8a71c5d    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 18:03:19 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 18:03:19 -0400    

Click here for diff

M src/tools/msvc/vcregress.pl

Build and run isolation test programs under MSVC.

commit   : 840826e36cd40e63a3af05d9b41dc65250bc7a7a    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 17:55:05 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 15 May 2011 17:55:05 -0400    

Click here for diff

M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/pgbison.bat
M src/tools/msvc/pgflex.bat
M src/tools/msvc/vcregress.pl

More cleanup of FOREIGN TABLE permissions handling.

commit   : 9bb6d9795253bb521f81c626fea49a704a369ca9    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 13 May 2011 15:47:31 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 13 May 2011 15:47:31 -0400    

Click here for diff

This commit fixes psql, pg_dump, and the information schema to be  
consistent with the backend changes which I made as part of commit  
be90032e0d1cf473bdd99aee94218218f59f29f1, and also includes a  
related documentation tweak.  
  
Shigeru Hanada, with slight adjustment.  

M doc/src/sgml/ref/grant.sgml
M src/backend/catalog/information_schema.sql
M src/bin/pg_dump/pg_dump.c
M src/bin/psql/tab-complete.c
M src/include/catalog/catversion.h

Kill stray "not".

commit   : c5ab8425be07f6a866ce84dc03f87d6924421e72    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 12 May 2011 17:10:30 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 12 May 2011 17:10:30 -0400    

Click here for diff

M src/backend/commands/cluster.c

Fix write-past-buffer-end in ldapServiceLookup().

commit   : 8d0df2048f8c0663b41440eeaf73e8859c922e28    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 12 May 2011 11:56:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 12 May 2011 11:56:38 -0400    

Click here for diff

The code to assemble ldap_get_values_len's output into a single string  
wrote the terminating null one byte past where it should.  Fix that,  
and make some other cosmetic adjustments to make the code a trifle more  
readable and more in line with usual Postgres coding style.  
  
Also, free the "result" string when done with it, to avoid a permanent  
memory leak.  
  
Bug report and patch by Albe Laurenz, cosmetic adjustments by me.  

M src/interfaces/libpq/fe-connect.c

Fix assorted typos

commit   : c6eb5740b3c352fb10bf61bb4465332ae6b28ab1    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 1 Feb 2011 19:07:42 -0500    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 1 Feb 2011 19:07:42 -0500    

Click here for diff

M contrib/pg_standby/pg_standby.c
M src/backend/access/transam/clog.c

Split PGC_S_DEFAULT into two values, for true boot_val vs computed default.

commit   : e05b866447899211a0c2df31bf0671faac4fc3e5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 11 May 2011 19:57:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 11 May 2011 19:57:38 -0400    

Click here for diff

Failure to distinguish these cases is the real cause behind the recent  
reports of Windows builds crashing on 'infinity'::timestamp, which was  
directly due to failure to establish a value of timezone_abbreviations  
in postmaster child processes.  The postmaster had the desired value,  
but write_one_nondefault_variable() didn't transmit it to backends.  
  
To fix that, invent a new value PGC_S_DYNAMIC_DEFAULT, and be sure to use  
that or PGC_S_ENV_VAR (as appropriate) for "default" settings that are  
computed during initialization.  (We need both because there's at least  
one variable that could receive a value from either source.)  
  
This commit also fixes ProcessConfigFile's failure to restore the correct  
default value for certain GUC variables if they are set in postgresql.conf  
and then removed/commented out of the file.  We have to recompute and  
reinstall the value for any GUC variable that could have received a value  
from PGC_S_DYNAMIC_DEFAULT or PGC_S_ENV_VAR sources, and there were a  
number of oversights.  (That whole thing is a crock that needs to be  
redesigned, but not today.)  
  
However, I intentionally didn't make it work "exactly right" for the cases  
of timezone and log_timezone.  The exactly right behavior would involve  
running select_default_timezone, which we'd have to do independently in  
each postgres process, causing the whole database to become entirely  
unresponsive for as much as several seconds.  That didn't seem like a good  
idea, especially since the variable's removal from postgresql.conf might be  
just an accidental edit.  Instead the behavior is to adopt the previously  
active setting as if it were default.  
  
Note that this patch creates an ABI break for extensions that use any of  
the PGC_S_XXX constants; they'll need to be recompiled.  

M src/backend/utils/init/postinit.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
M src/timezone/pgtz.c

Clean up parsing of CREATE TRIGGER's argument list.

commit   : 6fc6686b48bc569b05ce711d18cf964498b217f2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 11 May 2011 14:43:01 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 11 May 2011 14:43:01 -0400    

Click here for diff

Use ColLabel in place of ColId, so that reserved words are accepted as if  
they were not reserved.  Also, remove BCONST and XCONST, which were never  
documented as allowed.  Allowing those exposes to users an implementation  
detail, namely the format in which the lexer outputs such constants, that  
seems unwise to expose.  
  
No documentation change needed, since this just makes the code act more  
like you'd expect from reading the CREATE TRIGGER man page.  
  
Per complaint from Szymon Guz and subsequent discussion.  

M src/backend/parser/gram.y

Shut down WAL receiver if it's still running at end of recovery. We used to just check that it's not running and PANIC if it was, but that can rightfully happen if recovery stops at recovery target.

commit   : a0c8514149de92d48a8cf0f1a1458486851980a4    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 11 May 2011 12:46:08 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 11 May 2011 12:46:08 +0300    

Click here for diff

M src/backend/access/transam/xlog.c

Be more explicit about the meaning of the change in standard_conforming_strings.

commit   : ea964a451e51a32b71d004d261874adb1e135066    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 23:44:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 23:44:33 -0400    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Mention "backslash" escape processing change in 9.1 release notes.

commit   : 64cc297dc9875a6feb3a310038707b6119b775ca    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 20:56:44 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 20:56:44 -0400    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Prevent datebsearch() from crashing on base == NULL && nel == 0.

commit   : 2e82d0b396473b595a30f68b37b8dfd41c37dff8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 20:36:22 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 20:36:22 -0400    

Click here for diff

Normally nel == 0 works okay because the initial value of "last" will be  
less than "base"; but if "base" is zero then the calculation wraps around  
and we have a very large (unsigned) value for "last", so that the loop can  
be entered and we get a SIGSEGV on a bogus pointer.  
  
This is certainly the proximate cause of the recent reports of Windows  
builds crashing on 'infinity'::timestamp --- evidently, they're either not  
setting an active timezonetktbl, or setting an empty one.  It's not yet  
clear to me why it's only happening on Windows and not happening on any  
buildfarm member.  But even if that's due to some bug elsewhere, it seems  
wise for this function to not choke on the powerup values of  
timezonetktbl/sztimezonetktbl.  
  
I also changed the copy of this code in ecpglib, although I am not sure  
whether it's exposed to a similar hazard.  
  
Per report and stack trace from Richard Broersma.  

M src/backend/utils/adt/datetime.c
M src/interfaces/ecpg/pgtypeslib/dt_common.c

For create/dropdb, only connect once to the server since we now have a shared description table for pg_database comments.

commit   : 7ff7711919287a93f348023d77f9611633c9627c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 19:44:15 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 19:44:15 -0400    

Click here for diff

Also update comments about database name selection.  

M src/bin/scripts/createdb.c
M src/bin/scripts/dropdb.c

Add some punctuation

commit   : 87631ac98df2e32cac22ddee7b9c37813ff3b161    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 22:37:50 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 22:37:50 +0300    

Click here for diff

M doc/src/sgml/ref/pg_basebackup.sgml

Put options in more alphabetical order

commit   : df6d033197614190e112dd2c1d0cfece6c43d9e3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 22:37:22 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 22:37:22 +0300    

Click here for diff

M doc/src/sgml/ref/createdb.sgml

Put options help in alphabetical order

commit   : 94a8fde403d229ccd9c667722ab3af72278f994d    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:48:07 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:48:07 +0300    

Click here for diff

M contrib/pgbench/pgbench.c

Format pg_upgrade --version in line with conventions

commit   : 00fad9f6fef8ed166b183ad45a9bd863d965d81c    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:40:29 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:40:29 +0300    

Click here for diff

M contrib/pg_upgrade/option.c

Add bug report line to pg_upgrade --help output

commit   : 4c78846cb3a0f7017ad96d4513f79b1401fba12b    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:37:55 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:37:55 +0300    

Click here for diff

M contrib/pg_upgrade/option.c

Put pg_test_fsync --help and --version output in line with conventions

commit   : 3a8dcd9a1f9bbe36478995b22de40967c0610149    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:34:26 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 10 May 2011 21:34:26 +0300    

Click here for diff

Foremost, it should go to stdout.  

M contrib/pg_test_fsync/pg_test_fsync.c

Adjust documentation with respect to "unknown" timezone setting.

commit   : 1453cd8f82139a3e751c617dc6635f7b1c7abe14    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 13:48:40 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 13:48:40 -0400    

Click here for diff

The recent cleanup of GUC assign hooks got rid of the kludge of using  
"unknown" as a magic value for timezone and log_timezone.  But I forgot  
to update the documentation to match, as noted by Martin Pitt.  

M doc/src/sgml/config.sgml
M src/backend/utils/misc/postgresql.conf.sample

Be more wary in initdb's creation of platform-dependent collations.

commit   : 853c1750f91feaa6a72b29ae683c955ab6f4df70    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 12:08:47 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 10 May 2011 12:08:47 -0400    

Click here for diff

Discard any collation aliases that match the built-in pg_collation entries  
(ie, "default", "C", "POSIX").  Such aliases would be refused by a CREATE  
COLLATION command, but since initdb is injecting them via a simple INSERT,  
it has to make the corresponding check for itself.  Per Martin Pitt's  
report of funny behavior in a machine that had a bogus "C.UTF-8" locale.  
  
Also, use E'' syntax for the output of escape_quotes, as per its header  
comment.  

M src/bin/initdb/initdb.c

In pg_upgrade, remove suggestion of setting pg_hba.conf to 'trust', now that we report the libpq connection failure string. Per suggestion from Robert Haas.

commit   : 5059cf6ebf36bc9731b8394a1d2c9dba6cb50a3c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 10:42:43 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 10 May 2011 10:42:43 -0400    

Click here for diff

M contrib/pg_upgrade/server.c

Documentation cleanup for the possible values of the datatype 'boolean'.

commit   : a9cc9df021f43a8ecda0924236d22a004baa7d13    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 23:25:16 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 23:25:16 -0400    

Click here for diff

M doc/src/sgml/datatype.sgml

Update documentation to state there is three-value logic, not three-value boolean logic.

commit   : 832c095d686e89f6390e0ff3e91b4c8015c2c3f7    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 21:04:18 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 21:04:18 -0400    

Click here for diff

Backpatch to 9.0.X since we just got another bug report about this  
today.  

M doc/src/sgml/func.sgml

Remove "make check" target in src/test/isolation/Makefile.

commit   : 7886cc73ad12fb9b5a729b6c8152f11a309f5d65    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 9 May 2011 11:00:30 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 9 May 2011 11:00:30 -0400    

Click here for diff

This doesn't work as expected because the isolationtester program requires  
libpq to already be installed.  While it works when you've already installed  
libpq, having to already have done "make install" defeats most of the point  
of a check with a temp installation.  And there are weird corner cases if  
the dynamic linker picks up an old libpq.so from system library directories.  
Remove the target (or more precisely, make it print a helpful message) so  
people don't expect the case to work.  

M src/test/isolation/Makefile

In pg_upgrade, add status message about superuser check.

commit   : 78318d63d7613ca9fe2206c717c7ccb400038db6    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 08:55:36 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 9 May 2011 08:55:36 -0400    

Click here for diff

M contrib/pg_upgrade/check.c

Add C comment about the fact that the autovacuum limit can go backwards by 3, but that is it OK.

commit   : 76e5b4c85d5d4830888044fc885b1da0d781aed0    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sun, 8 May 2011 23:59:31 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sun, 8 May 2011 23:59:31 -0400    

Click here for diff

M src/backend/postmaster/autovacuum.c

Fix some portability issues in isolation regression test driver.

commit   : eff223ffd74eed268f35d693462969f7f75632d2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 8 May 2011 19:44:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 8 May 2011 19:44:12 -0400    

Click here for diff

Remove random system #includes in favor of using postgres_fe.h.  (The  
alternative to that is letting this module grow its own configuration  
testing ability...)  
  
Also fix the "make clean" target to actually clean things up.  
  
Per local testing.  

M src/test/isolation/Makefile
M src/test/isolation/isolation_main.c
M src/test/isolation/isolationtester.c
M src/test/isolation/specparse.y

Add C comment why client encoding can be set in pg_upgrade.

commit   : e6a740284291d1ebaca42b2954eb20e09daac9b9    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 22:30:35 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 22:30:35 -0400    

Click here for diff

M contrib/pg_upgrade/server.c

commit   : e567c9ff3409203a3ab50a2ff87cdab73bef6313    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 22:29:20 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 22:29:20 -0400    

Click here for diff

M doc/src/sgml/README.links
M doc/src/sgml/adminpack.sgml
M doc/src/sgml/auth-delay.sgml
M doc/src/sgml/auto-explain.sgml
M doc/src/sgml/btree-gin.sgml
M doc/src/sgml/btree-gist.sgml
M doc/src/sgml/chkpass.sgml
M doc/src/sgml/citext.sgml
M doc/src/sgml/contrib-spi.sgml
M doc/src/sgml/cube.sgml
M doc/src/sgml/dblink.sgml
M doc/src/sgml/dict-int.sgml
M doc/src/sgml/dict-xsyn.sgml
M doc/src/sgml/dummy-seclabel.sgml
M doc/src/sgml/earthdistance.sgml
M doc/src/sgml/file-fdw.sgml
M doc/src/sgml/fuzzystrmatch.sgml
M doc/src/sgml/hstore.sgml
M doc/src/sgml/intagg.sgml
M doc/src/sgml/intarray.sgml
M doc/src/sgml/isn.sgml
M doc/src/sgml/lo.sgml
M doc/src/sgml/ltree.sgml
M doc/src/sgml/oid2name.sgml
M doc/src/sgml/pageinspect.sgml
M doc/src/sgml/passwordcheck.sgml
M doc/src/sgml/pgarchivecleanup.sgml
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/pgbuffercache.sgml
M doc/src/sgml/pgcrypto.sgml
M doc/src/sgml/pgfreespacemap.sgml
M doc/src/sgml/pgrowlocks.sgml
M doc/src/sgml/pgstandby.sgml
M doc/src/sgml/pgstatstatements.sgml
M doc/src/sgml/pgstattuple.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/pgtrgm.sgml
M doc/src/sgml/pgupgrade.sgml
M doc/src/sgml/seg.sgml
M doc/src/sgml/sepgsql.sgml
M doc/src/sgml/sslinfo.sgml
M doc/src/sgml/tablefunc.sgml
M doc/src/sgml/test-parser.sgml
M doc/src/sgml/tsearch2.sgml
M doc/src/sgml/unaccent.sgml
M doc/src/sgml/uuid-ossp.sgml
M doc/src/sgml/vacuumlo.sgml
M doc/src/sgml/xml2.sgml

Add missing documention connecting word.

commit   : 5293de580734bb16c57de51142354d76347a3336    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 14:31:00 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 14:31:00 -0400    

Click here for diff

M doc/src/sgml/backup.sgml

In pg_upgrade, report non-super-user username in error message.

commit   : 1609ca5adb5c8b55076435094532dfbb2a2aea43    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 12:17:21 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 12:17:21 -0400    

Click here for diff

M contrib/pg_upgrade/check.c

Check that the pg_upgrade user specified is a super-user.

commit   : 81301b85781245676f874ae3908015f05d3aaaa2    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 08:55:13 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 7 May 2011 08:55:13 -0400    

Click here for diff

Also report the error message when the post-pg_ctl connection fails.  
  
Per private bug report from EnterpriseDB.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/server.c

commit   : 71932ecc2b6ca0d748176a7e8b11d3575bf4caf3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 6 May 2011 21:53:55 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 6 May 2011 21:53:55 -0400    

Click here for diff

Dan Ports, per head-scratching from Simon Riggs and myself.  

M src/backend/storage/lmgr/predicate.c

Adjust pg_upgrade FATAL error messages to have consistent newlines.

commit   : 5c5f83507cb697e436f8f9d20d62787c1a66d19c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Fri, 6 May 2011 21:47:12 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Fri, 6 May 2011 21:47:12 -0400    

Click here for diff

Also adjust some error message capitalization for consistency.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c

Fix typos in SECURITY LABEL documentation.

commit   : 3ef5b2df9738fd0795c1ffcaada93c3c5df7cd49    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 6 May 2011 21:18:18 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 6 May 2011 21:18:18 -0400    

Click here for diff

KaiGai Kohei  

M doc/src/sgml/ref/security_label.sgml

Improve compiler string shown in version()

commit   : 8dd2ede3f82505c3fd041c1953524305df0732d1    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 6 May 2011 22:14:53 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 6 May 2011 22:14:53 +0300    

Click here for diff

With some compilers such as Clang and ICC emulating GCC, using a  
version string of the form "GCC $version" can be quite misleading.  
Also, a great while ago, the version output from gcc --version started  
including the string "gcc", so it is redundant to repeat that.  In  
order to support ancient GCC versions, we now prefix the result with  
"GCC " only if the version output does not start with a letter.  

M configure
M configure.in

Move RegisterPredicateLockingXid() call to a safer place.

commit   : d2088ae949993ad8e3aabc3b6a9cd77aa5cac957    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 6 May 2011 12:57:28 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 6 May 2011 12:57:28 -0400    

Click here for diff

The SSI patch inserted a call of RegisterPredicateLockingXid into  
GetNewTransactionId, which was a bad idea on a couple of grounds.  First,  
it's not necessary to hold XidGenLock while manipulating that shared  
memory, and doing so is bad because XidGenLock is a high-contention lock  
that should be held for as short a time as possible.  (Not to mention that  
it adds an entirely unnecessary deadlock hazard, since we must take  
SerializableXactHashLock as well.)  Second, the specific place where it was  
put was between extending CLOG and advancing nextXid, which could result in  
unpleasant behavior in case of a failure there.  Pull the call out to  
AssignTransactionId, which is much safer and arguably better from a  
modularity standpoint too.  
  
There is more work to do to clean up the failure-before-advancing-nextXid  
issue, but that is a separate change that will need to be back-patched.  
So for the moment I just want to make GetNewTransactionId look the same as  
it did in prior versions.  

M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c

Remove precedence labeling of keywords TRUE, FALSE, UNKNOWN, and ZONE.

commit   : 12b7164578e73abb065a835c588c1e0c44670ed3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 5 May 2011 20:38:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 5 May 2011 20:38:52 -0400    

Click here for diff

These were labeled with precedences just to avoid attaching explicit  
precedences to the productions in which they were the last terminal symbol.  
Since a terminal symbol precedence marking can affect many other things  
too, it seems like better practice to attach precedence labels to the  
productions, and not mark the terminal symbols.  
  
Ideally we'd also remove the precedence attached to NULL_P, but it turns  
out that we are actually depending on that having a precedence higher than  
POSTFIXOP, else we get a shift/reduce conflict for postfix operators in  
b_expr.  (Which more or less proves my point about these markings having a  
high risk of unexpected consequences.)  For the moment, move NULL_P into  
the set of keywords grouped with IDENT, so that at least it will act  
similarly to non-keywords; and document the interaction.  

M src/backend/parser/gram.y

Unbreak the regression tests from my previous commit

commit   : 27525b183189487c674f24620e608298ac0c8e29    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 5 May 2011 23:00:31 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 5 May 2011 23:00:31 +0200    

Click here for diff

M src/test/regress/expected/foreign_data.out

Improve pg_archivecleanup and pg_standby --help output

commit   : b24181b26fc90758370e475088be4ef2497d3cc3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 5 May 2011 23:11:51 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 5 May 2011 23:11:51 +0300    

Click here for diff

For consistency with other tools, put the options before further usage  
information.  
  
In pg_standby, remove the supposedly deprecated -l option from the  
given example invocation.  

M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c

Improve formatting of pg_upgrade --help output

commit   : d6d823c8b0e6878cf532120c0c019c7704b27be3    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 5 May 2011 22:56:06 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 5 May 2011 22:56:06 +0300    

Click here for diff

M contrib/pg_upgrade/option.c

Clarify error message when attempting to create index on foreign table

commit   : d76a149c955a6525c8d42425c57e32d74d2c2eed    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Thu, 5 May 2011 21:47:42 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Thu, 5 May 2011 21:47:42 +0200    

Click here for diff

Instead of just saying "is not a table", specifically state that  
indexes aren't supported on *foreign* tables.  

M src/backend/commands/indexcmds.c

Improve style of generate_history.pl Perl script.

commit   : fb3ad7895ece674fc5298df754253f70cda6a02e    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 5 May 2011 12:48:48 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 5 May 2011 12:48:48 -0400    

Click here for diff

M doc/src/sgml/generate_history.pl

Include unary plus in the Operator Precedence table.

commit   : 671322751add80f3368cd9ef17134fb9f73cf747    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 4 May 2011 15:02:34 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 4 May 2011 15:02:34 -0400    

Click here for diff

Per gripe from Grzegorz Szpetkowski.  
  
Also, change the subsection heading from "Lexical Precedence" (which is  
a contradiction in terms) to "Operator Precedence".  

M doc/src/sgml/syntax.sgml

Remove redundant port number check

commit   : 7f1f1bfdbb199a003b9bef5dc946eb2c1c38e4c2    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 21:02:02 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 21:02:02 +0300    

Click here for diff

pg_basebackup doesn't need to police the format of port numbers.  
libpq already does that.  

M src/bin/pg_basebackup/pg_basebackup.c

Message style cleanup

commit   : bff074b1ab0dfed7a7822dcc8942f877efa3b914    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:56:52 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:56:52 +0300    

Click here for diff

M src/bin/pg_basebackup/pg_basebackup.c

Fix alignment of --help output

commit   : ce2fc20071a6ae68e63bd675b147818669cd83b4    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:29:40 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:29:40 +0300    

Click here for diff

Tabs replaced by spaces.  

M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c

commit   : a3b681f0bc46de6ae89c7e17c1704329ffc3ba76    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:24:07 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 4 May 2011 20:24:07 +0300    

Click here for diff

M doc/src/sgml/earthdistance.sgml
M doc/src/sgml/hstore.sgml
M doc/src/sgml/intarray.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/ltree.sgml
M doc/src/sgml/monitoring.sgml
M doc/src/sgml/pgtrgm.sgml
M doc/src/sgml/runtime.sgml
M doc/src/sgml/textsearch.sgml

Update obsolete mention of Sequoia, now known as Tungsten

commit   : 04be7ac271c4b6db6ba518225f58f936b3b4435c    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 3 May 2011 11:35:17 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 3 May 2011 11:35:17 -0300    

Click here for diff

Per http://joomla.aws.continuent.com/community/lab-projects/sequoia  
  
Greg Smith  

M doc/src/sgml/high-availability.sgml

Improve description of read/write traffic scalability

commit   : 561485709673f4bc05240e891dd9056bdedbbcbc    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 3 May 2011 11:34:27 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 3 May 2011 11:34:27 -0300    

Click here for diff

Greg Smith, after a suggestion of James Bruce  

M doc/src/sgml/high-availability.sgml

Add ID attribute to some sect2's missing it

commit   : 155743ad3108cd586d56e864d1209b82f9a716f0    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 2 May 2011 19:13:49 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 2 May 2011 19:13:49 -0300    

Click here for diff

David Fetter  

M doc/src/sgml/func.sgml

commit   : dcc685debb02c507b88aa8052f9e6334a7c3f830    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 2 May 2011 15:56:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 2 May 2011 15:56:36 -0400    

Click here for diff

After finding an EXISTS or ANY sub-select that can be converted to a  
semi-join or anti-join, we should recurse into the body of the sub-select.  
This allows cases such as EXISTS-within-EXISTS to be optimized properly.  
The original coding would leave the lower sub-select as a SubLink, which  
is no better and often worse than what we can do with a join.  Per example  
from Wayne Conrad.  
  
Back-patch to 8.4.  There is a related issue in older versions' handling  
of pull_up_IN_clauses, but they're lame enough anyway about the whole area  
that it seems not worth the extra work to try to fix.  

M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c

Update some ALTER USER cross-references to ALTER ROLE

commit   : 52897e54db1000f2fa45b31e02eb252dd0573516    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 2 May 2011 13:40:24 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 2 May 2011 13:40:24 -0300    

Click here for diff

Greg Smith  

M doc/src/sgml/client-auth.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/libpq.sgml

Small cleanup of spacing in verbatim DocBook elements

commit   : 4b08bf8ce7a7515f669ce0a1ce1946c6492b65ed    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 19:19:48 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 19:19:48 +0300    

Click here for diff

M doc/src/sgml/recovery-config.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/tablefunc.sgml

Improve aset.c's space management in contexts with small maxBlockSize.

commit   : 6755558b92748287e961fed518c14be375630464    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 2 May 2011 12:08:08 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 2 May 2011 12:08:08 -0400    

Click here for diff

The previous coding would allow requests up to half of maxBlockSize to be  
treated as "chunks", but when that actually did happen, we'd waste nearly  
half of the space in the malloc block containing the chunk, if no smaller  
requests came along to fill it.  Avoid this scenario by limiting the  
maximum size of a chunk to 1/8th maxBlockSize, so that we can waste no more  
than 1/8th of the allocated space.  This will not change the behavior at  
all for the default context size parameters (with large maxBlockSize),  
but it will change the behavior when using ALLOCSET_SMALL_MAXSIZE.  
  
In particular, there's no longer a need for spell.c to be overly concerned  
about the request size parameters it uses, so remove a rather unhelpful  
comment about that.  
  
Merlin Moncure, per an idea of Tom Lane's  

M src/backend/tsearch/spell.c
M src/backend/utils/mmgr/aset.c

Catch errors in for loop in makefile

commit   : 5c436a79e0f4e11f80c5878a0309ce60f79e17b1    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 00:43:06 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 00:43:06 +0300    

Click here for diff

Add "|| exit" so that the rule aborts when a command fails.  

M src/pl/plpython/Makefile

Rewrite installation makefile rules without for loops

commit   : b106195b1731ce5d68e8bb5c421f09a4aae9e96a    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 00:37:07 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 2 May 2011 00:37:07 +0300    

Click here for diff

install-sh can install multiple files at once, so for loops are not  
necessary.  This was already changed for the rest of the code some  
time ago, but pgxs.mk was apparently forgotten, and the obsolete  
coding style has now been copied to the PLs as well.  
  
This also fixes the problem that the for loops in question did not  
catch errors.  

M src/makefiles/pgxs.mk
M src/pl/plperl/GNUmakefile
M src/pl/plpgsql/src/Makefile
M src/pl/plpython/Makefile
M src/pl/tcl/Makefile

Make CLUSTER lock the old table's toast table before copying data.

commit   : 83b7584944b3a9df064cccac06822093f1a83793    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 1 May 2011 17:57:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 1 May 2011 17:57:33 -0400    

Click here for diff

We must lock out autovacuuming of the old toast table before computing the  
OldestXmin horizon we will use.  Otherwise, autovacuum could start on the  
toast table later, compute a later OldestXmin horizon, and remove as DEAD  
toast tuples that we still need (because we think their parent tuples are  
only RECENTLY_DEAD).  Per further thought about bug #5998.  

M src/backend/commands/cluster.c

Lowercase status labels in pg_stat_replication view.

commit   : 5a71b641309ea982593edf1f28d408c21885897b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Fri, 29 Apr 2011 22:20:14 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Fri, 29 Apr 2011 22:20:14 -0400    

Click here for diff

M src/backend/replication/walsender.c

Remove special case for xmin == xmax in HeapTupleSatisfiesVacuum().

commit   : 44e4bbf75d56e643b6afefd5cdcffccb68cce414    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 29 Apr 2011 16:29:42 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 29 Apr 2011 16:29:42 -0400    

Click here for diff

VACUUM was willing to remove a committed-dead tuple immediately if it was  
deleted by the same transaction that inserted it.  The idea is that such a  
tuple could never have been visible to any other transaction, so we don't  
need to keep it around to satisfy MVCC snapshots.  However, there was  
already an exception for tuples that are part of an update chain, and this  
exception created a problem: we might remove TOAST tuples (which are never  
part of an update chain) while their parent tuple stayed around (if it was  
part of an update chain).  This didn't pose a problem for most things,  
since the parent tuple is indeed dead: no snapshot will ever consider it  
visible.  But MVCC-safe CLUSTER had a problem, since it will try to copy  
RECENTLY_DEAD tuples to the new table.  It then has to copy their TOAST  
data too, and would fail if VACUUM had already removed the toast tuples.  
  
Easiest fix is to get rid of the special case for xmin == xmax.  This may  
delay reclaiming dead space for a little bit in some cases, but it's by far  
the most reliable way to fix the issue.  
  
Per bug #5998 from Mark Reid.  Back-patch to 8.3, which is the oldest  
version with MVCC-safe CLUSTER.  

M src/backend/utils/time/tqual.c

Rewrite pg_size_pretty() to avoid compiler bug.

commit   : fd2e2d09aa1d5ba198e09e6d936ff1bba7f62895    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 29 Apr 2011 01:44:50 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 29 Apr 2011 01:44:50 -0400    

Click here for diff

Convert it to use successive shifts right instead of increasing a divisor.  
This is probably a tad more efficient than the original coding, and it's  
nicer-looking than the previous patch because we don't need a special case  
to avoid overflow in the last branch.  But the real reason to do it is to  
avoid a Solaris compiler bug, as per results from buildfarm member moa.  

M src/backend/utils/adt/dbsize.c

Use non-literal format for possibly non-standard strftime formats.

commit   : c49e4ae1f886e74efb4bc94c09b993098232d5f9    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 19:58:49 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 19:58:49 -0400    

Click here for diff

Per recent -hackers discussion. The formats in question are %G and %V,  
and cause warnings on MinGW at least. We assume the ecpg application  
knows what it's doing if it passes these formats to the library.  

M src/interfaces/ecpg/pgtypeslib/timestamp.c

Add some casts to try to silence most of the remaining format warnings on MinGW-W64.

commit   : ab0ba6e73ae9b3c9956126bdcd3c410238a27244    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 15:05:58 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 15:05:58 -0400    

Click here for diff

M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c

Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions.

commit   : c02d5b7c27d740830379244db4b9ef111bbf0fc8    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 10:56:14 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 28 Apr 2011 10:56:14 -0400    

Click here for diff

The style is set to "printf" for backwards compatibility everywhere except  
on Windows, where it is set to "gnu_printf", which eliminates hundreds of  
false error messages from modern versions of gcc arising from  %m and %ll{d,u}  
formats.  

M src/backend/utils/adt/format_type.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/psql/common.h
M src/bin/psql/large_obj.c
M src/include/c.h
M src/include/lib/stringinfo.h
M src/include/pg_config_manual.h
M src/include/port.h
M src/include/utils/elog.h
M src/interfaces/ecpg/preproc/extern.h
M src/interfaces/libpq/libpq-int.h
M src/interfaces/libpq/pqexpbuffer.h
M src/pl/plpython/plpython.c
M src/test/regress/pg_regress.c

The arguments to pg_ctl kill are not optional - remove brackets in the docs.

commit   : 39850c7fdb82bd7c64dbb759c5754e29fc0af5f2    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 28 Apr 2011 12:51:02 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 28 Apr 2011 12:51:02 +0300    

Click here for diff

Fujii Masao  

M doc/src/sgml/ref/pg_ctl-ref.sgml

Tag 9.1beta1.

commit   : 993c5e59047dd568d4831f7ec5c6199acd21f17f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 17:17:22 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 17:17:22 -0400    

Click here for diff

M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32

Make a quick copy-editing pass over the 9.1 release notes.

commit   : bb1051eb2d5eef060b64788cbec8459c46427fca    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 16:51:46 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 16:51:46 -0400    

Click here for diff

Also remove the material about this being an alpha release.  
  
The notes still need a lot of work, but they're more or less presentable  
as a beta version now.  

M doc/src/sgml/config.sgml
M doc/src/sgml/release-9.1.sgml

Fix binary upgrade of altered typed tables

commit   : b2ef8929ae1c1b65f4b9582409463a9a2f009706    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 27 Apr 2011 22:08:22 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 27 Apr 2011 22:08:22 +0300    

Click here for diff

Instead of dumping them as CREATE TABLE ... OF, dump them as normal  
tables with the usual special processing for dropped columns, and then  
attach them to the type afterward, using ALTER TABLE ... OF.  This is  
analogous to the existing handling of inherited tables.  

M src/bin/pg_dump/pg_dump.c

Revert "Force use of "%I64d" format for 64 bit ints on MinGW."

commit   : 6693fec0e8dec81a9b149494cbdb90e454b6119e    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 14:55:18 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 14:55:18 -0400    

Click here for diff

This reverts commit 52d01c2f52c462d29ae0fdfa44c3cae129148a6d.  
  
the UINT64_FORMAT bit broke the b uildfarm, so I'm reverting the whole thing pending further investigation.  

M src/include/port/win32.h

timeline is not needed in BaseBackup()

commit   : 6693eb72c014e5e8bc2f7f3221ebd5507fdbe8ec    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Wed, 27 Apr 2011 20:39:20 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Wed, 27 Apr 2011 20:39:20 +0200    

Click here for diff

This code was accidentally part of the patch, it's only  
needed for the code that's for 9.2. Not needing the timeline  
also removes the need to call IDENTIFY_SYSTEM.  
  
Noted by Peter E.  

M src/bin/pg_basebackup/pg_basebackup.c

Add comments about the need to avoid uninitialized bits in datatype values.

commit   : 4f6c75b541385eb2d48f7ef62c1c323ec2642134    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 14:05:58 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 14:05:58 -0400    

Click here for diff

There was already one recommendation in the documentation about writing  
C functions to ensure padding bytes are zeroes, but make it stronger.  
  
Also fix an example that was still using direct assignment to a varlena  
length word, which no longer works since the varvarlena changes.  

M doc/src/sgml/xfunc.sgml

Fix array- and path-creating functions to ensure padding bytes are zeroes.

commit   : 18c0b4eccdc86ffb7eccc2c6facfe382537ab877    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 13:58:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 27 Apr 2011 13:58:36 -0400    

Click here for diff

Per recent discussion, it's important for all computed datums (not only the  
results of input functions) to not contain any ill-defined (uninitialized)  
bits.  Failing to ensure that can result in equal() reporting that  
semantically indistinguishable Consts are not equal, which in turn leads to  
bizarre and undesirable planner behavior, such as in a recent example from  
David Johnston.  We might eventually try to fix this in a general manner by  
allowing datatypes to define identity-testing functions, but for now the  
path of least resistance is to expect datatypes to force all unused bits  
into consistent states.  
  
Per some testing by Noah Misch, array and path functions seem to be the  
only ones presenting risks at the moment, so I looked through all the  
functions in adt/array*.c and geo_ops.c and fixed them as necessary.  In  
the array functions, the easiest/safest fix is to allocate result arrays  
with palloc0 instead of palloc.  Possibly in future someone will want to  
look into whether we can just zero the padding bytes, but that looks too  
complex for a back-patchable fix.  In the path functions, we already had a  
precedent in path_in for just zeroing the one known pad field, so duplicate  
that code as needed.  
  
Back-patch to all supported branches.  

M src/backend/utils/adt/array_userfuncs.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/geo_ops.c

Revert "Remove hard coded formats for INT64 and use configured settings instead."

commit   : 348c10efe08f01872daeeb62f32c8e362fcbba69    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 11:28:14 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 11:28:14 -0400    

Click here for diff

This reverts commit 9b1508af8971c1627cda5bb65f5e9eddb9a1a55e.  
  
As requested by Tom.  

M src/backend/postmaster/postmaster.c
M src/interfaces/ecpg/ecpglib/execute.c

Remove hard coded formats for INT64 and use configured settings instead.

commit   : 9b1508af8971c1627cda5bb65f5e9eddb9a1a55e    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 11:07:52 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 11:07:52 -0400    

Click here for diff

M src/backend/postmaster/postmaster.c
M src/interfaces/ecpg/ecpglib/execute.c

Force use of "%I64d" format for 64 bit ints on MinGW.

commit   : 52d01c2f52c462d29ae0fdfa44c3cae129148a6d    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 10:09:23 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 10:09:23 -0400    

Click here for diff

Both this and "%lld" work, but the compiler's format checking doesn't  
like "%lld", so we get all sorts of spurious warnings.  

M src/include/port/win32.h

Use an explicit format string to keep the compiler happy.

commit   : c43d0791ac5fb765a088d41564cd44747aef42d8    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 10:02:21 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 27 Apr 2011 10:02:21 -0400    

Click here for diff

M src/backend/port/win32/security.c

Doc wording improvement for NUMERIC limit paragraph.

commit   : dedcc48c567e443912d761a3616298678a4ec825    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 27 Apr 2011 00:06:37 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 27 Apr 2011 00:06:37 -0400    

Click here for diff

M doc/src/sgml/datatype.sgml

Reword documentation for NUMERIC with no specified precision.

commit   : 8ce83b5bdc532e716c39b6a04f1edda7e5e66cc7    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 23:43:15 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 23:43:15 -0400    

Click here for diff

M doc/src/sgml/datatype.sgml

Rephrase some not-supported error messages in pg_hba.conf processing.

commit   : 71e7083532d8f6ad0cf345c3cc534b0307e816a8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 26 Apr 2011 15:56:28 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 26 Apr 2011 15:56:28 -0400    

Click here for diff

In a couple of places we said "not supported on this platform" for cases  
that aren't really platform-specific, but could depend on configuration  
options such as --with-openssl.  Use "not supported by this build" instead,  
as that doesn't convey the impression that you can't fix it without moving  
to another OS; that's also more consistent with the wording used for an  
identical error case in guc.c.  
  
No back-patch, as the clarity gain is small enough to not be worth  
burdening translators with back-branch changes.  

M src/backend/libpq/hba.c

Complain if pg_hba.conf contains "hostssl" but SSL is disabled.

commit   : c464a0657b0cdaa7fa645d53621be10963cb7741    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 26 Apr 2011 15:40:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 26 Apr 2011 15:40:11 -0400    

Click here for diff

Most commenters agreed that this is more friendly than silently failing  
to match the line during actual connection attempts.  Also, this will  
prevent corner cases that might arise when trying to handle such a line  
when the SSL code isn't turned on.  An example is that specifying  
clientcert=1 in such a line would formerly result in a completely  
misleading complaint that root.crt wasn't present, as seen in a recent  
report from Marc-Andre Laverdiere.  While we could have instead fixed  
that specific behavior, it seems likely that we'd have a continuing stream  
of such bizarre behaviors if we keep on allowing hostssl lines when SSL is  
disabled.  
  
Back-patch to 8.4, where clientcert was introduced.  Earlier versions don't  
have this specific issue, and the code is enough different to make this  
patch not applicable without more work than it seems worth.  

M src/backend/libpq/hba.c

Clarify that a non-specified precision NUMERIC has a very high range.

commit   : 0cdbef6cec753a1606c2ce2955e3ff1005ed5ebf    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 11:54:57 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 11:54:57 -0400    

Click here for diff

M doc/src/sgml/datatype.sgml

Now that pg_upgrade uses -w in pg_ctl, remove loop that retried testing the connection; also restructure the libpq connection code.

commit   : 6c4d2bd9141034bd27977794f52003fd6f7d01f0    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 10:15:18 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 26 Apr 2011 10:15:18 -0400    

Click here for diff

This patch also removes the unused variable postmasterPID and fixes a  
libpq structure leak that was in the testing loop.  

M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c

In pg_upgrade, avoid one start/stop of the postmaster; use the -w (wait) flag for pg_ctl start/stop; remove the unused "quiet" flag in the functions for starting/stopping the postmaster.

commit   : 44091442db7e0d9fd7f0495f09d725fc92d940b5    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 25 Apr 2011 20:17:48 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 25 Apr 2011 20:17:48 -0400    

Click here for diff

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c

Remove incorrect HINT for use of ALTER FOREIGN TABLE on the wrong relkind.

commit   : 6dab96abaa8bd6775658d26517e288f4d5f6448f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 25 Apr 2011 20:13:53 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 25 Apr 2011 20:13:53 -0400    

Click here for diff

Per discussion, removing the hint seems better than correcting it because  
the adjacent analogous cases in RenameRelation don't have any hints, and  
nobody seems to have missed 'em.  
  
Shigeru Hanada  

M src/backend/commands/tablecmds.c

Refactor broken CREATE TABLE IF NOT EXISTS support.

commit   : 68ef051f5cf16f82a5368067a40ffba3c340b0d3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 16:55:11 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 16:55:11 -0400    

Click here for diff

Per bug #5988, reported by Marko Tiikkaja, and further analyzed by Tom  
Lane, the previous coding was broken in several respects: even if the  
target table already existed, a subsequent CREATE TABLE IF NOT EXISTS  
might try to add additional constraints or sequences-for-serial  
specified in the new CREATE TABLE statement.  
  
In passing, this also fixes a minor information leak: it's no longer  
possible to figure out whether a schema to which you don't have CREATE  
access contains a sequence named like "x_y_seq" by attempting to create a  
table in that schema called "x" with a serial column called "y".  
  
Some more refactoring of this code in the future might be warranted,  
but that will need to wait for a later major release.  

M src/backend/bootstrap/bootparse.y
M src/backend/catalog/heap.c
M src/backend/catalog/namespace.c
M src/backend/catalog/toasting.c
M src/backend/commands/cluster.c
M src/backend/commands/tablecmds.c
M src/backend/executor/execMain.c
M src/backend/parser/parse_utilcmd.c
M src/backend/tcop/utility.c
M src/include/catalog/heap.h
M src/include/catalog/namespace.h

Remove partial and undocumented GRANT .. FOREIGN TABLE support.

commit   : be90032e0d1cf473bdd99aee94218218f59f29f1    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 16:34:57 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 16:34:57 -0400    

Click here for diff

Instead, foreign tables are treated just like views: permissions can  
be granted using GRANT privilege ON [TABLE] foreign_table_name TO role,  
and revoked similarly.  GRANT/REVOKE .. FOREIGN TABLE is no longer  
supported, just as we don't support GRANT/REVOKE .. VIEW.  The set of  
accepted permissions for foreign tables is now identical to the set for  
regular tables, and views.  
  
Per report from Thom Brown, and subsequent discussion.  

M doc/src/sgml/ref/grant.sgml
M src/backend/catalog/aclchk.c
M src/backend/parser/gram.y
M src/backend/utils/adt/acl.c
M src/include/nodes/parsenodes.h
M src/include/utils/acl.h

Fix pg_size_pretty() to avoid overflow for inputs close to INT64_MAX.

commit   : af0f20092c8662bf7610fab07b8a1e354abba67f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 25 Apr 2011 16:22:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 25 Apr 2011 16:22:12 -0400    

Click here for diff

The expression that tried to round the value to the nearest TB could  
overflow, leading to bogus output as reported in bug #5993 from Nicola  
Cossu.  This isn't likely to ever happen in the intended usage of the  
function (if it could, we'd be needing to use a wider datatype instead);  
but it's not hard to give the expected output, so let's do so.  

M src/backend/utils/adt/dbsize.c

Support "make check" in contrib

commit   : f8ebe3bcc5debfcf2bf588aee138944688b682c0    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 25 Apr 2011 22:21:37 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 25 Apr 2011 22:21:37 +0300    

Click here for diff

Added a new option --extra-install to pg_regress to arrange installing  
the respective contrib directory into the temporary installation.  
This is currently not yet supported for Windows MSVC builds.  
  
Updated the .gitignore files for contrib modules to ignore the  
leftovers of a temp-install check run.  
  
Changed the exit status of "make check" in a pgxs build (which still  
does nothing) to 0 from 1.  
  
Added "make check" in contrib to top-level "make check-world".  

M GNUmakefile.in
M contrib/btree_gin/.gitignore
M contrib/btree_gist/.gitignore
M contrib/citext/.gitignore
M contrib/cube/.gitignore
M contrib/dblink/.gitignore
M contrib/dict_int/.gitignore
M contrib/dict_xsyn/.gitignore
M contrib/earthdistance/.gitignore
M contrib/earthdistance/Makefile
M contrib/file_fdw/.gitignore
M contrib/hstore/.gitignore
M contrib/intarray/.gitignore
M contrib/ltree/.gitignore
M contrib/pg_trgm/.gitignore
M contrib/pgcrypto/.gitignore
M contrib/seg/.gitignore
M contrib/tablefunc/.gitignore
M contrib/test_parser/.gitignore
M contrib/tsearch2/.gitignore
M contrib/unaccent/.gitignore
M contrib/xml2/.gitignore
M src/makefiles/pgxs.mk
M src/test/regress/pg_regress.c

Use terse mode to avoid variable order dependency output in foreign data regression check.

commit   : 625744ac43360ca3f4a6d3eccecb6f4c999a1a63    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 14:43:26 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 14:43:26 -0400    

Click here for diff

Per Tom Lane's suggestion about my gripe about occasional errors noticed on the buildfarm.  

M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql

Assorted minor changes to silence Windows compiler warnings.

commit   : 860be17ec3c19a1aeba0bbe7ecaf30be409ea446    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:56:53 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:56:53 -0400    

Click here for diff

Mostly to do with macro redefinitions or object signedness.  

M src/backend/main/main.c
M src/backend/port/win32/socket.c
M src/backend/utils/adt/pg_locale.c
M src/bin/initdb/initdb.c
M src/bin/pg_ctl/pg_ctl.c
M src/include/port/win32.h
M src/pl/plperl/plperl.c
M src/port/noblock.c
M src/test/regress/pg_regress.c
M src/timezone/pgtz.c

Prevent perl header overriding our *snprintf macros, and give it a usable PERL_UNUSED_DECL value.

commit   : 77622887449f0fd0eb08b28fe4fa5992c357d45a    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:46:59 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:46:59 -0400    

Click here for diff

This quiets compiler warnings about redefined macros and unused Perl__unused variables. The  
redefinition of snprintf and vsnprintf is something we want to avoid anyway, if we've  
gone to the bother of setting up the macros to point to our implementation.  

M src/pl/plperl/plperl.h

Give getopt() a prototype and modern style arg specs.

commit   : 7e0f8f836da9a992c8cbd99c5c06ea40247d6a33    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:38:10 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 12:38:10 -0400    

Click here for diff

Welcome to the 1990s.  

M src/port/getopt.c

Add postmaster/postgres undocumented -b option for binary upgrades. This option turns off autovacuum, prevents non-super-user connections, and enables oid setting hooks in the backend. The code continues to use the old autoavacuum disable settings for servers with earlier catalog versions.

commit   : 76dd09bbec893c02376e3440a6a86a3b994d804c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 25 Apr 2011 12:00:21 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 25 Apr 2011 12:00:21 -0400    

Click here for diff

This includes a catalog version bump to identify servers that support  
the -b option.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_type.c
M src/backend/catalog/toasting.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/postinit.c
M src/include/catalog/catversion.h
M src/include/miscadmin.h

Add fast paths for cases when no serializable transactions are running.

commit   : 02e6a115cc6149551527a45545fd1ef8d37e6aa0    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:52:01 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:52:01 -0400    

Click here for diff

Dan Ports  

M src/backend/storage/lmgr/predicate.c

Regression tests for TOAST.

commit   : 97e83468513399039878e4a630d577c8b7f5b2db    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:46:53 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:46:53 -0400    

Click here for diff

Kevin Grittner, per discussion of bug #5989  

M src/test/regress/expected/delete.out
M src/test/regress/expected/insert.out
M src/test/regress/expected/update.out
M src/test/regress/sql/delete.sql
M src/test/regress/sql/insert.sql
M src/test/regress/sql/update.sql

commit   : b429519d8d1b6ac16e36dacba58ef77f77a621ca    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:41:56 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 25 Apr 2011 09:41:56 -0400    

Click here for diff

Bug #5899, reported by Marko Tiikkaja.  
  
Heikki Linnakangas, reviewed by Kevin Grittner and Dan Ports.  

M src/backend/access/heap/heapam.c

Adjust yywrap macro for non-reentrant scanners for MSVC.

commit   : 08a0c2dabc3b9d59d72d7a79ed867b8e37d275a7    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 09:10:59 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 25 Apr 2011 09:10:59 -0400    

Click here for diff

The MSVC compiler complains if a macro is called with less arguments  
than its definition provides for. flex generates a macro with one  
argument for yywrap, but only supplies the argument for reentrant  
scanners, so we remove the useless argument in the non-reentrant  
case to silence the warning.  

M src/tools/msvc/pgflex.bat

In libecpg do not set an sqlda field that is 'reserved for future use' unless we know what should be stored in there.

commit   : 5948a6eeaa682aeb1a8f389ae2136915b2a0e990    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Mon, 25 Apr 2011 13:43:22 +0200    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Mon, 25 Apr 2011 13:43:22 +0200    

Click here for diff

M src/interfaces/ecpg/ecpglib/sqlda.c

Normalize whitespace in the arguments of <indexterm>

commit   : 9412606265c2774712e3f805798896734b32c7fd    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 25 Apr 2011 01:12:16 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 25 Apr 2011 01:12:16 +0300    

Click here for diff

Strip leading and trailing whitespace and replace interior whitespace  
by a single space.  This avoids problems with the index generator  
producing duplicate index entries for terms that differ only in  
whitespace.  
  
Commit dca30da3433c40b5f92f1704c496cda052decef9 actually fixed all the  
indexterm elements that would cause this problem at the moment, but in  
case it sneaks in again, we're set.  

M doc/src/sgml/stylesheet.dsl

Improve cost estimation for aggregates and window functions.

commit   : e6a30a8c3c81a7a2949f852379d34a19dfc26a0d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Apr 2011 16:55:20 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 24 Apr 2011 16:55:20 -0400    

Click here for diff

The previous coding failed to account properly for the costs of evaluating  
the input expressions of aggregates and window functions, as seen in a  
recent gripe from Claudio Freire.  (I said at the time that it wasn't  
counting these costs at all; but on closer inspection, it was effectively  
charging these costs once per output tuple.  That is completely wrong for  
aggregates, and not exactly right for window functions either.)  
  
There was also a hard-wired assumption that aggregates and window functions  
had procost 1.0, which is now fixed to respect the actual cataloged costs.  
  
The costing of WindowAgg is still pretty bogus, since it doesn't try to  
estimate the effects of spilling data to disk, but that seems like a  
separate issue.  

M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/pathnode.c
M src/include/nodes/relation.h
M src/include/optimizer/clauses.h
M src/include/optimizer/cost.h
M src/include/optimizer/planmain.h

In pg_upgrade, only compile copy_file() on non-Win32 systems.

commit   : f6322b31918c5c57eeea80c26a088af44d573095    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sat, 23 Apr 2011 20:27:57 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sat, 23 Apr 2011 20:27:57 -0400    

Click here for diff

Per report from Andrew Dunstan.  

M contrib/pg_upgrade/file.c

Improve findoidjoins to cover more cases.

commit   : 795c382e8caf27f9db2fb09d12384b8183280fee    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 19:33:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 19:33:04 -0400    

Click here for diff

Teach the program and script to deal with OID-array referencing columns,  
which we now have several of.  Also, modify the recommended usage process  
to specify that the program should be run against the regression database  
rather than template1.  This lets it find numerous joins that cannot be  
found in template1 because the relevant catalogs are entirely empty.  
  
Together these changes add seventeen formerly-missed cases to the oidjoins  
regression test.  

M src/test/regress/expected/oidjoins.out
M src/test/regress/sql/oidjoins.sql
M src/tools/findoidjoins/README
M src/tools/findoidjoins/findoidjoins.c
M src/tools/findoidjoins/make_oidjoins_check

Silence a few compiler warnings from gcc on MinGW.

commit   : d98711dfef6ade6a26aa0f4c0a775087ed13e060    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 23 Apr 2011 18:10:23 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sat, 23 Apr 2011 18:10:23 -0400    

Click here for diff

Most of these cast DWORD to int or unsigned int for printf type handling.  
This is safe even on 64 bit architectures because a DWORD is always 32 bits.  
  
In one case a variable is initialised to keep the compiler happy.  

M src/backend/port/win32/crashdump.c
M src/backend/port/win32_latch.c

Update oidjoins regression test for 9.1 catalog schema additions.

commit   : 970d8a39736fd67e3ebf406ed8129eed0767d15d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 14:49:54 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 14:49:54 -0400    

Click here for diff

M src/test/regress/expected/oidjoins.out
M src/test/regress/sql/oidjoins.sql
M src/tools/findoidjoins/README
M src/tools/findoidjoins/make_oidjoins_check

Hash indexes had better pass the index collation to support functions, too.

commit   : a0b75a41a907e1582acdb8aa6ebb9cacca39d7d8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 14:13:09 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 14:13:09 -0400    

Click here for diff

Per experimentation with contrib/citext, whose hash function assumes that  
it'll be passed a collation.  

M src/backend/access/hash/hashutil.c

Adjust comments about collate.linux.utf8 regression test.

commit   : 1abd146dddc1dc5efff5ccac065c460108acbaa9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 12:51:47 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 12:51:47 -0400    

Click here for diff

This test should now work in any database with UTF8 encoding, regardless  
of the database's default locale.  The former restriction was really  
"doesn't work if default locale is C", and that was because of not handling  
mbstowcs/wcstombs correctly.  

M doc/src/sgml/regress.sgml
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

Fix char2wchar/wchar2char to support collations properly.

commit   : 2ab0796d7a3a7116a79b65531fd33f1548514b52    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 12:35:41 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 23 Apr 2011 12:35:41 -0400    

Click here for diff

These functions should take a pg_locale_t, not a collation OID, and should  
call mbstowcs_l/wcstombs_l where available.  Where those functions are not  
available, temporarily select the correct locale with uselocale().  
  
This change removes the bogus assumption that all locales selectable in  
a given database have the same wide-character conversion method; in  
particular, the collate.linux.utf8 regression test now passes with  
LC_CTYPE=C, so long as the database encoding is UTF8.  
  
I decided to move the char2wchar/wchar2char functions out of mbutils.c and  
into pg_locale.c, because they work on wchar_t not pg_wchar_t and thus  
don't really belong with the mbutils.c functions.  Keeping them where they  
were would have required importing pg_locale_t into pg_wchar.h somehow,  
which did not seem like a good plan.  

M configure
M configure.in
M src/backend/tsearch/ts_locale.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/mb/mbutils.c
M src/include/mb/pg_wchar.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
M src/include/port/win32.h
M src/include/utils/pg_locale.h

Fix contrib/btree_gist to handle collations properly.

commit   : bb850306307d3d6ebb611c4039ae127236eb1699    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 20:19:58 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 20:19:58 -0400    

Click here for diff

Make use of the collation attached to the index column, instead of  
hard-wiring DEFAULT_COLLATION_OID.  (Note: in theory this could require  
reindexing btree_gist indexes on textual columns, but I rather doubt anyone  
has one with a non-default declared collation as yet.)  

M contrib/btree_gist/btree_bit.c
M contrib/btree_gist/btree_bytea.c
M contrib/btree_gist/btree_numeric.c
M contrib/btree_gist/btree_text.c
M contrib/btree_gist/btree_utils_num.c
M contrib/btree_gist/btree_utils_var.c
M contrib/btree_gist/btree_utils_var.h

Make GIN and GIST pass the index collation to all their support functions.

commit   : ae20bf1740c53494e15fadfd8c2c6444032a3441    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 20:13:12 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 20:13:12 -0400    

Click here for diff

Experimentation with contrib/btree_gist shows that the majority of the GIST  
support functions potentially need collation information.  Safest policy  
seems to be to pass it to all of them, instead of making assumptions about  
which ones could possibly need it.  

M src/backend/access/gin/ginget.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistsplit.c
M src/backend/access/gist/gistutil.c
M src/include/access/gin_private.h
M src/include/access/gist_private.h

De-kludge contrib/btree_gin for collations.

commit   : 474ff212e5c2e89a9955cc2355cb96b2fe40398e    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 18:22:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 18:22:38 -0400    

Click here for diff

Using DEFAULT_COLLATION_OID in the comparePartial functions was not only  
a lame hack, but outright wrong, because the compare functions for  
collation-aware types were already responding to the declared index  
collation.  So comparePartial would have the wrong expectation about  
the index's sort order, possibly leading to missing matches for prefix  
searches.  

M contrib/btree_gin/btree_gin.c

Small update to emacs example configuration

commit   : 78e7e20afe768d9c5f6b4fbf30a2d7100d46bb2f    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 23 Apr 2011 00:44:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 23 Apr 2011 00:44:45 +0300    

Click here for diff

Since both tarballs and git now result in a "postgresql" directory  
rather than a "pgsql" directory, adjust the example configuration to  
look for the former.  

M src/tools/editors/emacs.samples

Add fill-column setting to emacs example configurations

commit   : 415f5e12592d135919549a5eb21893fda0417ebf    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 23 Apr 2011 00:39:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 23 Apr 2011 00:39:45 +0300    

Click here for diff

This matches the maximum line length that pgindent uses.  

M src/tools/editors/emacs.samples

Make a code-cleanup pass over the collations patch.

commit   : 9e9b9ac7d1860fbb98eb4db17a94ff25524b6447    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 17:43:18 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 22 Apr 2011 17:43:18 -0400    

Click here for diff

This patch is almost entirely cosmetic --- mostly cleaning up a lot of  
neglected comments, and fixing code layout problems in places where the  
patch made lines too long and then pgindent did weird things with that.  
I did find a bug-of-omission in equalTupleDescs().  

M doc/src/sgml/catalogs.sgml
M doc/src/sgml/indices.sgml
M doc/src/sgml/ref/create_collation.sgml
M doc/src/sgml/ref/create_domain.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/regress.sgml
M src/backend/access/common/tupdesc.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/pg_type.c
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/executor/nodeMergejoin.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/subselect.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/syscache.c

Improve doc wording for SQL syntax of LIMIT/OFFSET.

commit   : 0cfdc1c657b7c2aa1e4524f495e84005f750ec02    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 21 Apr 2011 22:25:35 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 21 Apr 2011 22:25:35 -0400    

Click here for diff

M doc/src/sgml/ref/select.sgml

Avoid possible divide-by-zero in gincostestimate.

commit   : 92647fc4b9cd7406afb2ee240a20082ba6097177    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 21 Apr 2011 19:28:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 21 Apr 2011 19:28:36 -0400    

Click here for diff

Per report from Jeff Janes.  

M src/backend/utils/adt/selfuncs.c

Allow ALTER TYPE .. ADD ATTRIBUTE .. CASCADE to recurse to descendants.

commit   : a0e8df527ec24e8dba98f295c0e2ab6ccf3e5d2c    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:49:37 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:49:37 -0400    

Click here for diff

Without this, adding an attribute to a typed table with an inheritance  
child fails, which is surprising.  
  
Noah Misch, with minor changes by me.  

M doc/src/sgml/ref/alter_type.sgml
M src/backend/commands/tablecmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Fix use of incorrect constant RemoveRoleFromObjectACL.

commit   : 8ede427938e9676d0e497406c213f098303a93f3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:23:58 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:23:58 -0400    

Click here for diff

This could cause failures when DROP OWNED BY attempt to remove default  
privileges on sequences.  Back-patching to 9.0.  
  
Shigeru Hanada  

M src/backend/catalog/aclchk.c

Typo fix.

commit   : 0babcdf6cfdfb2a828056afc3172ec524f090fd5    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:05:16 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 22:05:16 -0400    

Click here for diff

M src/backend/commands/tablecmds.c

Allow ALTER TABLE name {OF type | NOT OF}.

commit   : 68739ba856c52e6721d6cffec21f1bf0327a9a7b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 21:35:15 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 20 Apr 2011 21:35:15 -0400    

Click here for diff

This syntax allows a standalone table to be made into a typed table,  
or a typed table to be made standalone.  This is possibly a mildly  
useful feature in its own right, but the real motivation for this  
change is that we need it to make pg_upgrade work with typed tables.  
This doesn't actually fix that problem, but it's necessary  
infrastructure.  
  
Noah Misch  

M doc/src/sgml/ref/alter_table.sgml
M src/backend/commands/tablecmds.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/include/commands/tablecmds.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Fix bugs in indexing of in-doubt HOT-updated tuples.

commit   : 520bcd9c9bb4d06627054e1c567bac1feb2da879    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 20:34:11 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 20:34:11 -0400    

Click here for diff

If we find a DELETE_IN_PROGRESS HOT-updated tuple, it is impossible to know  
whether to index it or not except by waiting to see if the deleting  
transaction commits.  If it doesn't, the tuple might again be LIVE, meaning  
we have to index it.  So wait and recheck in that case.  
  
Also, we must not rely on ii_BrokenHotChain to decide that it's possible to  
omit tuples from the index.  That could result in omitting tuples that we  
need, particularly in view of yesterday's fixes to not necessarily set  
indcheckxmin (but it's broken even without that, as per my analysis today).  
Since this is just an extremely marginal performance optimization, dropping  
the test shouldn't hurt.  
  
These cases are only expected to happen in system catalogs (they're  
possible there due to early release of RowExclusiveLock in most  
catalog-update code paths).  Since reindexing of a system catalog isn't a  
particularly performance-critical operation anyway, there's no real need to  
be concerned about possible performance degradation from these changes.  
  
The worst aspects of this bug were introduced in 9.0 --- 8.x will always  
wait out a DELETE_IN_PROGRESS tuple.  But I think dropping index entries  
on the strength of ii_BrokenHotChain is dangerous even without that, so  
back-patch removal of that optimization to 8.3 and 8.4.  

M src/backend/catalog/index.c

Set indcheckxmin true when REINDEX fixes an invalid or not-ready index.

commit   : 9ad7e15507ffa14f51d80d6ae3ed942ea191826d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 19:01:20 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 19:01:20 -0400    

Click here for diff

Per comment from Greg Stark, it's less clear that HOT chains don't conflict  
with the index than it would be for a valid index.  So, let's preserve the  
former behavior that indcheckxmin does get set when there are  
potentially-broken HOT chains in this case.  This change does not cause any  
pg_index update that wouldn't have happened anyway, so we're not  
re-introducing the previous bug with pg_index updates, and surely the case  
is not significant from a performance standpoint; so let's be as  
conservative as possible.  

M src/backend/catalog/index.c

Make plan_cluster_use_sort cope with no IndexOptInfo for the target index.

commit   : 5b8e442953da0bf4950b86c7cb4a6117842aedf7    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 17:43:34 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 20 Apr 2011 17:43:34 -0400    

Click here for diff

The original coding assumed that such a case represents caller error, but  
actually get_relation_info will omit generating an IndexOptInfo for any  
index it thinks is unsafe to use.  Therefore, handle this case by returning  
"true" to indicate that a seqscan-and-sort is the preferred way to  
implement the CLUSTER operation.  New bug in 9.1, no backpatch needed.  
Per bug #5985 from Daniel Grace.  

M src/backend/optimizer/plan/planner.c

Fix PL/Python traceback for error in separate file

commit   : 395fcac29906d22615ba68bd1dfa31daf691979e    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 20 Apr 2011 23:19:04 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 20 Apr 2011 23:19:04 +0300    

Click here for diff

It assumed that the lineno from the traceback always refers to the  
PL/Python function.  If you created a PL/Python function that imports  
some code, runs it, and that code raises an exception, PLy_traceback  
would get utterly confused.  
  
Now we look at the file name reported with the traceback and only  
print the source line if it came from the PL/Python function.  
  
Jan Urbański  

M src/pl/plpython/plpython.c

Pg_upgrade C comment addition.

commit   : 0262251c337ca066d1b1698684784254849b5676    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 20 Apr 2011 05:44:45 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 20 Apr 2011 05:44:45 -0400    

Click here for diff

Document why we do the missing new database check during the check  
phase.  

M contrib/pg_upgrade/check.c

Quotes in strings injected into bki file need to escaped. In particular, "People's Republic of China" locale on Windows was causing initdb to fail.

commit   : 2b919118c2511c7741c21f325d2ca4f270aa3aba    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 20 Apr 2011 09:49:44 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 20 Apr 2011 09:49:44 +0300    

Click here for diff

This fixes bug #5818 reported by yulei. On master, this makes the mapping  
of "People's Republic of China" to just "China" obsolete. In 9.0 and 8.4,  
just fix the escaping. Earlier versions didn't have locale names in bki  
file.  

M src/bin/initdb/initdb.c

Throw error for mismatched pg_upgrade clusters

commit   : 7228d02989afd3858ce6eb4de845c56f4c0188a6    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 19 Apr 2011 21:00:29 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 19 Apr 2011 21:00:29 -0400    

Click here for diff

If someone removes the 'postgres' database from the old cluster and the  
new cluster has a 'postgres' database, the number of databases will not  
match.  We actually could upgrade such a setup, but it would violate the  
1-to-1 mapping of database counts, so we throw an error instead.  
  
Previously they got an error during the upgrade, and not at the check  
stage; PG 9.0.4 does the same.  

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/relfilenode.c

Add C comment

commit   : 034194470647b3de206fb42464d49a438853fa5e    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 19 Apr 2011 19:14:39 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 19 Apr 2011 19:14:39 -0400    

Click here for diff

Add C comment about why we throw an error if the pg_upgrade old/new  
database counts don't match.  

M contrib/pg_upgrade/relfilenode.c

Avoid changing an index's indcheckxmin horizon during REINDEX.

commit   : 8c19977e9c515cc29af449a7ab6c25e496f539f3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 18:50:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 18:50:56 -0400    

Click here for diff

There can never be a need to push the indcheckxmin horizon forward, since  
any HOT chains that are actually broken with respect to the index must  
pre-date its original creation.  So we can just avoid changing pg_index  
altogether during a REINDEX operation.  
  
This offers a cleaner solution than my previous patch for the problem  
found a few days ago that we mustn't try to update pg_index while we are  
reindexing it.  System catalog indexes will always be created with  
indcheckxmin = false during initdb, and with this modified code we should  
never try to change their pg_index entries.  This avoids special-casing  
system catalogs as the former patch did, and should provide a performance  
benefit for many cases where REINDEX formerly caused an index to be  
considered unusable for a short time.  
  
Back-patch to 8.3 to cover all versions containing HOT.  Note that this  
patch changes the API for index_build(), but I believe it is unlikely that  
any add-on code is calling that directly.  

M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/commands/cluster.c
M src/backend/commands/indexcmds.c
M src/include/catalog/index.h

Revert "Prevent incorrect updates of pg_index while reindexing pg_index itself."

commit   : c096d19b74a637443109e528000342e896b150f3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 16:55:34 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 16:55:34 -0400    

Click here for diff

This reverts commit 4b6106ccfea21e86943f881edcf3cfc03661a415 of 2011-04-15.  
There's a better way to do it, which will follow shortly.  

M src/backend/catalog/index.c

Refix the unaccent regression test on MSVC properly

commit   : 385942f46ce526000d231c51c76360a807c2f809    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:52:52 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:52:52 +0300    

Click here for diff

... for some value of "properly".  Instead of overriding REGRESS_OPTS,  
set the variables ENCODING and NO_LOCALE, which is more expressive and  
allows overriding by the user.  Fix vcregress.pl to handle that.  

M contrib/unaccent/Makefile
M src/tools/msvc/vcregress.pl

Treat config.pl as optional in vcregress.pl

commit   : 2e8d9544752a7d68cb46f028a4f16ab0eb76c26e    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:01:15 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:01:15 +0300    

Click here for diff

This is how build.pl treats it and how it's documented.  

M src/tools/msvc/vcregress.pl

Fix typo

commit   : 908eb1f98bd9f81613cf4c14d6ab5877815c7b50    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:00:35 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 22:00:35 +0300    

Click here for diff

M src/tools/msvc/config_default.pl

Add gitignore entries for Windows MSVC builds

commit   : 63e9c5b71b3b8afa772a5f4e5ee7179f77f87050    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 20:04:41 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 20:04:41 +0300    

Click here for diff

M .gitignore
M src/interfaces/ecpg/compatlib/.gitignore
M src/interfaces/ecpg/ecpglib/.gitignore
M src/interfaces/ecpg/pgtypeslib/.gitignore
M src/interfaces/libpq/.gitignore

Avoid unused variable warnings for certain configurations

commit   : 001cbb145f3250b0d69d6be3d5fa0236e1a261dc    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 20:01:51 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 19 Apr 2011 20:01:51 +0300    

Click here for diff

M contrib/pg_test_fsync/pg_test_fsync.c

Refrain from canonicalizing a client_encoding setting of "UNICODE".

commit   : 390cf3209b718382c0ec9793b714422189e9b68b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 12:17:13 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 19 Apr 2011 12:17:13 -0400    

Click here for diff

While "UTF8" is the correct name for this encoding, existing JDBC drivers  
expect that if they send "UNICODE" it will read back the same way; they  
fail with an opaque "Protocol error" complaint if not.  This will be fixed  
in the 9.1 drivers, but until older drivers are no longer in use in the  
wild, we'd better leave "UNICODE" alone.  Continue to canonicalize all  
other inputs.  Per report from Steve Singer and subsequent discussion.  

M src/backend/commands/variable.c

Silence compiler warning about casting HANDLE to long on WIN64.

commit   : ca5a75fbaed63f41c6e52e5d4b35470080356bdf    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Tue, 19 Apr 2011 11:21:00 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Tue, 19 Apr 2011 11:21:00 -0400    

Click here for diff

M src/test/regress/pg_regress.c

Silence compiler warning about unused variable on Windows.

commit   : a7cb69a5a345fe9ba481a035559d77abd07791d9    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 19 Apr 2011 14:54:48 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Tue, 19 Apr 2011 14:54:48 +0300    

Click here for diff

M src/interfaces/libpq/fe-connect.c

Fix handling of collations in multi-row VALUES constructs.

commit   : 918854cc08868d569aad3bdf2529fc61c66ecde5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 18 Apr 2011 15:31:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 18 Apr 2011 15:31:52 -0400    

Click here for diff

Per spec we ought to apply select_common_collation() across the expressions  
in each column of the VALUES table.  The original coding was just taking  
the first row and assuming it was representative.  
  
This patch adds a field to struct RangeTblEntry to carry the resolved  
collations, so initdb is forced for changes in stored rule representation.  

M src/backend/catalog/dependency.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_relation.c
M src/include/catalog/catversion.h
M src/include/nodes/parsenodes.h
M src/include/parser/parse_relation.h
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.sql

Only allow typed tables to hang off composite types, not e.g. tables.

commit   : 04db0fdbfa9382730bb65f94bca2cd8063a3456a    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 18 Apr 2011 10:13:34 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 18 Apr 2011 10:13:34 -0400    

Click here for diff

This also ensures that we take a relation lock on the composite type when  
creating a typed table, which is necessary to prevent the composite type  
and the typed table from getting out of step in the face of concurrent  
DDL.  
  
Noah Misch, with some changes.  

M src/backend/parser/parse_utilcmd.c
M src/test/regress/expected/typed_table.out
M src/test/regress/sql/typed_table.sql

Attempt to remedy buildfarm breakage caused by commit f536d4194.

commit   : b7b86924c6da46c774e1ab5d524a6bc4f72627ab    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 18 Apr 2011 09:27:30 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Mon, 18 Apr 2011 09:27:30 -0400    

Click here for diff

M contrib/unaccent/Makefile

recoveryStopsHere() must check the resource manager ID.

commit   : aea1f24c2c25f01540435ded6ba611016392ef06    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 18 Apr 2011 08:27:19 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 18 Apr 2011 08:27:19 -0400    

Click here for diff

Before commit c016ce728139be95bb0dc7c4e5640507334c2339, this wasn't  
needed, but now that multiple resource manager IDs can percolate down  
through here, we have to make sure we know which one we've got.  
Otherwise, we can confuse (for example) an XLOG_XACT_COMMIT record  
with an XLOG_CHECKPOINT_SHUTDOWN record.  
  
Review by Jaime Casanova  

M src/backend/access/transam/xlog.c

Fix assorted infelicities in collation handling in psql's describe.c.

commit   : c29abc8b6f5334ac2f7046a33b233776ead12395    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 18:09:22 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 18:09:22 -0400    

Click here for diff

In \d, be more careful to print collation only if it's not the default for  
the column's data type.  Avoid assuming that the name "default" is magic.  
  
Fix \d on a composite type so that it will print per-column collations.  
It's no longer the case that a composite type cannot have modifiers.  
(In consequence, the expected outputs for composite-type regression tests  
change.)  
  
Fix \dD so that it will print collation for a domain, again only if it's  
not the same as the base type's collation.  

M src/bin/psql/describe.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/collate.linux.utf8.out

Document COLLATE option in CREATE TYPE reference page.

commit   : 2d4617126f6d708c5777b378d9ef282fb2c08930    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 17:05:51 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 17:05:51 -0400    

Click here for diff

Curiously, it was already documented in ALTER TYPE ADD ATTRIBUTE, but  
not here.  

M doc/src/sgml/ref/create_type.sgml

Fix pg_dump to handle collations applied to columns of composite types.

commit   : acfa1f45ed3ee2144581954c77769056bd149f5c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 16:55:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 16:55:04 -0400    

Click here for diff

CREATE TYPE and ALTER TYPE ADD ATTRIBUTE handle this, so I suppose it's  
an intended feature, but pg_dump didn't know about it.  

M src/bin/pg_dump/pg_dump.c

Add check for matching column collations in ALTER TABLE ... INHERIT.

commit   : 49a642ab1802ea4cd80f9c184e7699219688197f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 16:22:13 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 16:22:13 -0400    

Click here for diff

The other DDL operations that create an inheritance relationship were  
checking for collation match already, but this one got missed.  
  
Also fix comments that failed to mention collation checks.  

M src/backend/commands/tablecmds.c

Support a COLLATE clause in plpgsql variable declarations.

commit   : c94732585647437291ec3f4a9902eeffc65a6945    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 14:54:19 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 14:54:19 -0400    

Click here for diff

This allows the usual rules for assigning a collation to a local variable  
to be overridden.  Per discussion, it seems appropriate to support this  
rather than forcing all local variables to have the argument-derived  
collation.  

M doc/src/sgml/plpgsql.sgml
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

foreach() and list_delete() don't mix.

commit   : 88dc6fa7a164c306d8a1295769edb818d8520a3f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 13:36:38 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 17 Apr 2011 13:36:38 -0400    

Click here for diff

Fix crash when releasing duplicate entries in the encoding conversion cache  
list, caused by releasing the current entry of the list being chased by  
foreach().  We have a standard idiom for handling such cases, but this  
loop wasn't using it.  
  
This got broken in my recent rewrite of GUC assign hooks.  Not sure how  
I missed this when testing the modified code, but I did.  Per report from  
Peter.  

M src/backend/utils/mb/mbutils.c

Add an Assert that indexam.c isn't used on an index awaiting reindexing.

commit   : d2f60a3ab055fb61c8e1056a7c5652f1dec85e00    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 19:29:10 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 19:29:10 -0400    

Click here for diff

This might have caught the recent embarrassment over trying to modify  
pg_index while its indexes were being rebuilt.  
  
Noah Misch  

M src/backend/access/index/indexam.c

Simplify reindex_relation's API.

commit   : 2d3320d3d256eed7ea3deb8383348f2021e6a247    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 17:26:41 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 17:26:41 -0400    

Click here for diff

For what seem entirely historical reasons, a bitmask "flags" argument was  
recently added to reindex_relation without subsuming its existing boolean  
argument into that bitmask.  This seems a bit bizarre, so fold them  
together.  

M src/backend/catalog/index.c
M src/backend/commands/cluster.c
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/include/catalog/index.h

Clean up collation processing in prepunion.c.

commit   : 121f49a00e432ee9cfad7270d99504350cd1015f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 16:39:50 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 16 Apr 2011 16:39:50 -0400    

Click here for diff

This area was a few bricks shy of a load, and badly under-commented too.  
We have to ensure that the generated targetlist entries for a set-operation  
node expose the correct collation for each entry, since higher-level  
processing expects the tlist to reflect the true ordering of the plan's  
output.  
  
This hackery wouldn't be necessary if SortGroupClause carried collation  
info ... but making it do so would inject more pain in the parser than  
would be saved here.  Still, we might want to rethink that sometime.  

M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/tlist.c
M src/include/optimizer/tlist.h

Set client encoding explicitly in plpython_unicode test

commit   : 5809a6458450a59f8c4a7a25beaefc81cff563d1    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 16 Apr 2011 21:52:10 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sat, 16 Apr 2011 21:52:10 +0300    

Click here for diff

This will (hopefully) eliminate the need for the  
plpython_unicode_0.out expected file.  

M src/pl/plpython/expected/README
M src/pl/plpython/expected/plpython_unicode.out
D src/pl/plpython/expected/plpython_unicode_0.out
M src/pl/plpython/expected/plpython_unicode_3.out
M src/pl/plpython/sql/plpython_unicode.sql

Prevent incorrect updates of pg_index while reindexing pg_index itself.

commit   : 4b6106ccfea21e86943f881edcf3cfc03661a415    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 20:18:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 20:18:57 -0400    

Click here for diff

The places that attempt to change pg_index.indcheckxmin during a reindexing  
operation cannot be executed safely if pg_index itself is the subject of  
the operation.  This is the explanation for a couple of recent reports of  
VACUUM FULL failing with  
	ERROR:  duplicate key value violates unique constraint "pg_index_indexrelid_index"  
	DETAIL:  Key (indexrelid)=(2678) already exists.  
  
However, there isn't any real need to update indcheckxmin in such a  
situation, if we assume that pg_index can never contain a truly broken HOT  
chain.  This assumption holds if new indexes are never created on it during  
concurrent operations, which is something we don't consider safe for any  
system catalog, not just pg_index.  Accordingly, modify the code to not  
manipulate indcheckxmin when reindexing any system catalog.  
  
Back-patch to 8.3, where HOT was introduced.  The known failure scenarios  
involve 9.0-style VACUUM FULL, so there might not be any real risk before  
9.0, but let's not assume that.  

M src/backend/catalog/index.c

Suppress unused-function warning on non-WIN32 builds.

commit   : ff5565f0a4aa3c584792d220a3e566369a77f479    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 19:27:48 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 19:27:48 -0400    

Click here for diff

M src/bin/initdb/initdb.c

Guard against incoming rowcount estimate of NaN in cost_mergejoin().

commit   : 72826fb362c4aada6d2431df0b706df448806c02    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 17:45:41 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 15 Apr 2011 17:45:41 -0400    

Click here for diff

Although rowcount estimates really ought not be NaN, a bug elsewhere  
could perhaps result in that, and that would cause Assert failure in  
cost_mergejoin, which I believe to be the explanation for bug #5977 from  
Anton Kuznetsov.  Seems like a good idea to expend a couple more cycles  
to prevent that, even though the real bug is elsewhere.  Not back-patching,  
though, because we don't encourage running production systems with  
Asserts on.  

M src/backend/optimizer/path/costsize.c

setlocale() on Windows doesn't work correctly if the locale name contains apostrophes or dots. There isn't much hope of Microsoft fixing it any time soon, it's been like that for ages, so we better work around it. So, map a few common Windows locale names known to cause problems to aliases that work.

commit   : d5a7bf8c11c8b66c822bbb1a6c90e1a14425bd6e    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 20:48:10 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 20:48:10 +0300    

Click here for diff

M src/bin/initdb/initdb.c

On Windows, if the encoding implied by locale is not allowed as a server-encoding, fall back to UTF-8. It happens at least with the Chinese locale, which implies BIG5. This is safe, because on Windows all locales are compatible with UTF-8.

commit   : 1f943dc8fe1377d93253fad9f01e4b0aa8599bbd    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 20:44:13 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 20:44:13 +0300    

Click here for diff

M src/bin/initdb/initdb.c

Note that Bison on GnuWin32 has trouble with paths with spaces

commit   : 3affae58b795fb238bed17c35cadcefabdc1f0ee    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Fri, 15 Apr 2011 15:27:02 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Fri, 15 Apr 2011 15:27:02 +0200    

Click here for diff

Peter Eisentraut  

M doc/src/sgml/install-windows.sgml

Specify which versions of the Platform SDK are supported

commit   : 9e1526eddd34bf78327a9e7be3db47a60b59b688    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Fri, 15 Apr 2011 15:00:42 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Fri, 15 Apr 2011 15:00:42 +0200    

Click here for diff

Anything including Visual Studio 2010 compilers is not yet  
supported for building on Windows.  

M doc/src/sgml/install-windows.sgml

Reduce the initial size of local lock hash to 16 entries.

commit   : 4c37c1e3b2a7ba7b5519e5e366720e7444878a78    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 14:57:51 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 15 Apr 2011 14:57:51 +0300    

Click here for diff

The hash table is seq scanned at transaction end, to release all locks,  
and making the hash table larger than necessary makes that slower. With  
very simple queries, that overhead can amount to a few percent of the total  
CPU time used.  
  
At the moment, backend startup needs 6 locks, and a simple query with one  
table and index needs 3 locks. 16 is enough for even quite complicated  
transactions, and it will grow automatically if it fills up.  

M src/backend/storage/lmgr/lock.c

Rename pg_regress option --multibyte to --encoding

commit   : f536d4194293f900577c728bfa4e62075a4c7da0    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 15 Apr 2011 08:42:05 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Fri, 15 Apr 2011 08:42:05 +0300    

Click here for diff

Also refactor things a little bit so that the same methods for setting  
test locale and encoding can be used everywhere.  

M contrib/unaccent/Makefile
M doc/src/sgml/regress.sgml
M src/Makefile.global.in
M src/interfaces/ecpg/test/Makefile
M src/test/regress/GNUmakefile
M src/test/regress/pg_regress.c
M src/tools/msvc/vcregress.pl

Update release notes for releases 9.0.4, 8.4.8, 8.3.15, and 8.2.21.

commit   : 98eded936c1e81e6af5a4228ba3eb7b6352d6c91    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 14 Apr 2011 15:51:37 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 14 Apr 2011 15:51:37 -0400    

Click here for diff

M doc/src/sgml/release-8.2.sgml
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml

Advise Debian/Ubuntu users to use openjade1.3.

commit   : 07e58cbe19d78027eec8fd3e414220903b125c97    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 14 Apr 2011 11:35:41 -0700    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 14 Apr 2011 11:35:41 -0700    

Click here for diff

The latest openjade packages for Ubuntu 10.10 seg fault when building  
our documentation.  
  
Josh Berkus  

M doc/src/sgml/docguide.sgml

Remove obsolete comment.

commit   : 0c80b57d0775eb2015b7672fd8b20c63846d2a0d    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 19:20:39 -0700    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 19:20:39 -0700    

Click here for diff

The lock level for adding a parent table is now ShareUpdateExclusiveLock;  
see commit fbcf4b92aa64d4577bcf25925b055316b978744a.  This comment didn't  
get updated to match, but it doesn't seem important to mention this detail  
here, so rather than updating it now, just take it out.  

M src/backend/commands/tablecmds.c

Fix toast table creation.

commit   : 39a68e5c6ca7b41b889e773ca58535324af69630    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 18:07:14 -0700    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 18:07:14 -0700    

Click here for diff

Instead of using slightly-too-clever heuristics to decide when we must  
create a TOAST table, just check whether one is needed every time the  
table is altered.  Checking whether a toast table is needed is cheap  
enough that we needn't worry about doing it on every ALTER TABLE command,  
and the previous coding is apparently prone to accidental breakage:  
commit 04e17bae50a73af524731fa11210d5c3f7d8e1f9 broken ALTER TABLE ..  
SET STORAGE, which moved some actions from AT_PASS_COL_ATTRS to  
AT_PASS_MISC, and commit 6c5723998594dffa5d47c3cf8c96ccf89c033aae broke  
ALTER TABLE .. ADD COLUMN by changing the way that adding columns  
recurses into child tables.  
  
Noah Misch, with one comment change by me  

M src/backend/catalog/toasting.c
M src/backend/commands/tablecmds.c
M src/test/regress/expected/alter_table.out
M src/test/regress/input/misc.source
M src/test/regress/output/misc.source
M src/test/regress/sql/alter_table.sql

Ensure mark_dummy_rel doesn't create dangling pointers in RelOptInfos.

commit   : eca75a12a27d28b972fc269c1c8813cd8eb15441    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 18:56:40 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 18:56:40 -0400    

Click here for diff

When we are doing GEQO join planning, the current memory context is a  
short-lived context that will be reset at the end of geqo_eval().  However,  
the RelOptInfos for base relations are set up before that and then re-used  
across many GEQO cycles.  Hence, any code that modifies a baserel during  
join planning has to be careful not to put pointers to the short-lived  
context into the baserel struct.  mark_dummy_rel got this wrong, leading to  
easy-to-reproduce-once-you-know-how crashes in 8.4, as reported off-list by  
Leo Carson of SDSC.  Some improvements made in 9.0 make it difficult to  
demonstrate the crash in 9.0 or HEAD; but there's no doubt that there's  
still a risk factor here, so patch all branches that have the function.  
(Note: 8.3 has a similar function, but it's only applied to joinrels and  
thus is not a hazard.)  

M src/backend/optimizer/path/joinrels.c

Update time zone data files to tzdata release 2011f.

commit   : 170aeb54074ae2e21b22b79d1dd5c665700f7025    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 18:03:23 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 18:03:23 -0400    

Click here for diff

DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, Turkey.  
Historical corrections for South Australia, Alaska, Hawaii.  

M src/timezone/data/africa
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/etcetera
M src/timezone/data/europe
M src/timezone/data/leapseconds
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab

Avoid incorrectly granting replication to roles created with NOSUPERUSER.

commit   : 0a49c95c734d58385e9c5e335088da1cd54e2344    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 12:26:51 -0700    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 13 Apr 2011 12:26:51 -0700    

Click here for diff

Andres Freund  

M src/backend/commands/user.c

On HP/UX, the structs used by ioctl(SIOCGLIFCONF) are named differently than on other platforms, and only IPv6 addresses are returned. Because of those two issues, fall back to ioctl(SIOCGIFCONF) on HP/UX, so that it at least compiles and finds IPv4 addresses. This function is currently only used for interpreting samehost/samenet in pg_hba.conf, which isn't that critical.

commit   : 40e64017f3a4f1f7547dcbc62c2dcf80511ff842    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 22:20:31 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 22:20:31 +0300    

Click here for diff

M src/backend/libpq/ip.c

Revert the patch to check if we've reached end-of-backup also when doing crash recovery, and throw an error if not. hubert depesz lubaczewski pointed out that that situation also happens in the crash recovery following a system crash that happens during an online backup.

commit   : 54685b1c2b356b4b9c0938f6b8dcc52e173c0400    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 21:33:59 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 21:33:59 +0300    

Click here for diff

We might want to do something smarter in 9.1, like put the check back for  
backups taken with pg_basebackup, but that's for another patch.  

M src/backend/access/transam/xlog.c

On IA64 architecture, we check the depth of the register stack in addition to the regular stack. The code to do that is platform and compiler specific, add support for the HP-UX native compiler.

commit   : b5bb040da63806f7386b3434c38e1fa98860ea88    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 11:43:22 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 13 Apr 2011 11:43:22 +0300    

Click here for diff

M src/backend/tcop/postgres.c

Add some useful cross-references to the CREATE EXTENSION reference page.

commit   : dd95a1d3dd52cb9848d54ab9962156f666c4ca39    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 02:56:33 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 13 Apr 2011 02:56:33 -0400    

Click here for diff

Per a suggestion from Josh Kupershmidt, though I modified his patch  
quite a lot.  

M doc/src/sgml/ref/create_extension.sgml

Pass collations to functions in FunctionCallInfoData, not FmgrInfo.

commit   : d64713df7e5996ab3ab337b5e0901cf2c53773f9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 19:19:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 19:19:24 -0400    

Click here for diff

Since collation is effectively an argument, not a property of the function,  
FmgrInfo is really the wrong place for it; and this becomes critical in  
cases where a cached FmgrInfo is used for varying purposes that might need  
different collation settings.  Fix by passing it in FunctionCallInfoData  
instead.  In particular this allows a clean fix for bug #5970 (record_cmp  
not working).  This requires touching a bit more code than the original  
method, but nobody ever thought that collations would not be an invasive  
patch...  

M contrib/btree_gin/btree_gin.c
M contrib/btree_gist/btree_text.c
M src/backend/access/common/reloptions.c
M src/backend/access/common/scankey.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistscan.c
M src/backend/access/hash/hashutil.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/commands/analyze.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/executor/execGrouping.c
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/optimizer/path/indxpath.c
M src/backend/tcop/fastpath.c
M src/backend/tsearch/wparser.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/like.c
M src/backend/utils/adt/oid.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/rowtypes.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/fmgr/README
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/sort/tuplesort.c
M src/include/access/gin_private.h
M src/include/access/skey.h
M src/include/access/valid.h
M src/include/fmgr.h
M src/include/nodes/execnodes.h
M src/include/utils/selfuncs.h
M src/include/utils/tuplesort.h
M src/pl/plpgsql/src/pl_comp.c

Suppress compiler warnings about "value computed is not used".

commit   : 88543ecfec9c754b5f14b898bccbc68d941748b3    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 02:05:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 02:05:24 -0400    

Click here for diff

The recent patch to remove gcc 4.6 warnings created some new ones, at  
least on my rather old gcc version.  Try to make everybody happy by  
casting to "void" when we just want to discard the result.  

M src/interfaces/ecpg/ecpglib/descriptor.c

Be more wary of missing statistics in eqjoinsel_semi().

commit   : 3f5d2fe3029b181fe773a02f1d4b34624c357634    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 01:59:34 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 12 Apr 2011 01:59:34 -0400    

Click here for diff

In particular, if we don't have real ndistinct estimates for both sides,  
fall back to assuming that half of the left-hand rows have join partners.  
This is what was done in 8.2 and 8.3 (cf nulltestsel() in those versions).  
It's pretty stupid but it won't lead us to think that an antijoin produces  
no rows out, as seen in recent example from Uwe Schroeder.  

M src/backend/utils/adt/selfuncs.c

Fix RI_Initial_Check to use a COLLATE clause when needed in its query.

commit   : 921b993677e165607029a52e7f866bbd112345a5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 11 Apr 2011 21:32:53 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 11 Apr 2011 21:32:53 -0400    

Click here for diff

If the referencing and referenced columns have different collations,  
the parser will be unable to resolve which collation to use unless it's  
helped out in this way.  The effects are sometimes masked, if we end up  
using a non-collation-sensitive plan; but if we do use a mergejoin  
we'll see a failure, as recently noted by Robert Haas.  
  
The SQL spec states that the referenced column's collation should be used  
to resolve RI checks, so that's what we do.  Note however that we currently  
don't append a COLLATE clause when writing a query that examines only the  
referencing column.  If we ever support collations that have varying  
notions of equality, that will have to be changed.  For the moment, though,  
it's preferable to leave it off so that we can use a normal index on the  
referencing column.  

M src/backend/parser/parse_relation.c
M src/backend/utils/adt/ri_triggers.c
M src/include/parser/parse_relation.h
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.sql

Clean up most -Wunused-but-set-variable warnings from gcc 4.6

commit   : 5caa3479c2efd31fca1b271db687e5e57c7de2d4    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 11 Apr 2011 22:28:45 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 11 Apr 2011 22:28:45 +0300    

Click here for diff

This warning is new in gcc 4.6 and part of -Wall.  This patch cleans  
up most of the noise, but there are some still warnings that are  
trickier to remove.  

M contrib/isn/isn.c
M contrib/pageinspect/fsmfuncs.c
M contrib/pgcrypto/pgp-s2k.c
M contrib/pgcrypto/px-hmac.c
M contrib/pgcrypto/px.c
M contrib/seg/seg.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/toasting.c
M src/backend/commands/explain.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/vacuum.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeRecursiveunion.c
M src/backend/foreign/foreign.c
M src/backend/libpq/auth.c
M src/backend/optimizer/geqo/geqo_main.c
M src/backend/parser/parse_utilcmd.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/smgr/md.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/selfuncs.c
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/psql/psqlscan.l
M src/interfaces/ecpg/ecpglib/descriptor.c
M src/interfaces/libpq/fe-auth.c
M src/pl/plpgsql/src/pl_exec.c

Teach pattern_fixed_prefix() about collations.

commit   : 3c381a55b0fa1c4ca328211e39df8e1a715129cb    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 11 Apr 2011 12:28:28 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 11 Apr 2011 12:28:28 -0400    

Click here for diff

This is necessary, not optional, now that ILIKE and regexes are collation  
aware --- else we might derive a wrong comparison constant for index  
optimized pattern matches.  

M src/backend/optimizer/path/indxpath.c
M src/backend/utils/adt/selfuncs.c
M src/include/utils/selfuncs.h

TransferPredicateLocksToNewTarget should initialize a new lock entry's commitSeqNo to that of the old one being transferred, or take the minimum commitSeqNo if it is merging two lock entries.

commit   : dad1f4638235e5ff5696b948b88ba24cd99b415e    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 11 Apr 2011 13:46:37 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 11 Apr 2011 13:46:37 +0300    

Click here for diff

Also, CreatePredicateLock should initialize commitSeqNo for to  
InvalidSerCommitSeqNo instead of to 0. (I don't think using 0 would  
actually affect anything, but we should be consistent.)  
  
I also added a couple of assertions I used to track this down: a  
lock's commitSeqNo should never be zero, and it should be  
InvalidSerCommitSeqNo if and only if the lock is not held by  
OldCommittedSxact.  
  
Dan Ports, to fix leak of predicate locks reported by YAMAMOTO Takashi.  

M src/backend/storage/lmgr/predicate.c

Fix the size of predicate lock manager's shared memory hash tables at creation.

commit   : 7c797e7194d969f974abf579cacf30ffdccdbb95    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 11 Apr 2011 13:43:31 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Mon, 11 Apr 2011 13:43:31 +0300    

Click here for diff

This way they don't compete with the regular lock manager for the slack shared  
memory, making the behavior more predictable.  

M src/backend/storage/lmgr/predicate.c
M src/backend/utils/hash/dynahash.c
M src/include/utils/hsearch.h

Add some more mapping macros for Microsoft wide-character API.

commit   : f510fc1d904d3266fd433b49664a7685f4fc89ef    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 19:37:24 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 19:37:24 -0400    

Click here for diff

Per buildfarm.  

M src/include/port/win32.h

Insert dummy "break"s to silence compiler complaints.

commit   : 7aa3f1d08292d43b983075e190eee964c389e347    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 18:44:07 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 18:44:07 -0400    

Click here for diff

Apparently some compilers dislike a case label with nothing after it.  
Per buildfarm.  

M src/backend/regex/regc_pg_locale.c

Remove CRLF line endings in new cube results file.

commit   : c1d82a936f6783f4b084810ff22ca01706f8054e    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 18:26:53 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 18:26:53 -0400    

Click here for diff

M contrib/cube/expected/cube_3.out

Teach regular expression operators to honor collations.

commit   : 1e16a8107db9a50435b39e09c6f9c52c45e63e1a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 18:02:17 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 10 Apr 2011 18:02:17 -0400    

Click here for diff

This involves getting the character classification and case-folding  
functions in the regex library to use the collations infrastructure.  
Most of this work had been done already in connection with the upper/lower  
and LIKE logic, so it was a simple matter of transposition.  
  
While at it, split out these functions into a separate source file  
regc_pg_locale.c, so that they can be correctly labeled with the Postgres  
project's license rather than the Scriptics license.  These functions are  
100% Postgres-written code whereas what remains in regc_locale.c is still  
mostly not ours, so lumping them both under the same copyright notice was  
getting more and more misleading.  

M doc/src/sgml/charset.sgml
M src/backend/libpq/hba.c
M src/backend/regex/Makefile
M src/backend/regex/regc_locale.c
A src/backend/regex/regc_pg_locale.c
M src/backend/regex/regcomp.c
M src/backend/regex/regexec.c
M src/backend/tsearch/spell.c
M src/backend/utils/adt/regexp.c
M src/include/regex/regex.h
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

Adjust regression tests on cube and ECPG for MinGW 64 bit compiler.

commit   : 210f95f1cd59c6fdfe0f84b922c19d8498ac377d    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 16:57:42 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 16:57:42 -0400    

Click here for diff

Backport to 9.0, we're not supporting this compiler on earlier releases.  

A contrib/cube/expected/cube_3.out
M src/interfaces/ecpg/test/resultmap

Don't make "replication" magical as a user name, only as a database name, in pg_hba.conf.

commit   : ed557a373c406bbb2a1843544ebbd856ca4cac47    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 14:51:26 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Sun, 10 Apr 2011 14:51:26 -0400    

Click here for diff

Per gripe from Josh Berkus.  

M src/backend/libpq/hba.c

pgindent run before PG 9.1 beta 1.

commit   : bf50caf105a901c4f83ac1df3cdaf910c26694a4    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Sun, 10 Apr 2011 11:42:00 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Sun, 10 Apr 2011 11:42:00 -0400    

Click here for diff

M contrib/adminpack/adminpack.c
M contrib/auth_delay/auth_delay.c
M contrib/btree_gist/btree_cash.c
M contrib/btree_gist/btree_date.c
M contrib/btree_gist/btree_float4.c
M contrib/btree_gist/btree_float8.c
M contrib/btree_gist/btree_int2.c
M contrib/btree_gist/btree_int4.c
M contrib/btree_gist/btree_int8.c
M contrib/btree_gist/btree_interval.c
M contrib/btree_gist/btree_oid.c
M contrib/btree_gist/btree_time.c
M contrib/btree_gist/btree_ts.c
M contrib/btree_gist/btree_utils_num.c
M contrib/btree_gist/btree_utils_num.h
M contrib/btree_gist/btree_utils_var.c
M contrib/dummy_seclabel/dummy_seclabel.c
M contrib/file_fdw/file_fdw.c
M contrib/fuzzystrmatch/levenshtein.c
M contrib/hstore/hstore_gin.c
M contrib/hstore/hstore_op.c
M contrib/intarray/_int_bool.c
M contrib/intarray/_int_gin.c
M contrib/intarray/_int_tool.c
M contrib/isn/ISBN.h
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_test_fsync/pg_test_fsync.c
M contrib/pg_trgm/trgm.h
M contrib/pg_trgm/trgm_gin.c
M contrib/pg_trgm/trgm_gist.c
M contrib/pg_trgm/trgm_op.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/function.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/tablespace.c
M contrib/pg_upgrade/util.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pg_upgrade_support/pg_upgrade_support.c
M contrib/pgbench/pgbench.c
M contrib/seg/seg.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql.h
M contrib/spi/moddatetime.c
M contrib/xml2/xpath.c
M contrib/xml2/xslt_proc.c
M src/backend/access/common/heaptuple.c
M src/backend/access/common/indextuple.c
M src/backend/access/gin/ginarrayproc.c
M src/backend/access/gin/ginbulk.c
M src/backend/access/gin/gindatapage.c
M src/backend/access/gin/ginentrypage.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/gininsert.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gin/ginvacuum.c
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistproc.c
M src/backend/access/gist/gistscan.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hash.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/catalog.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_type.c
M src/backend/catalog/storage.c
M src/backend/catalog/toasting.c
M src/backend/commands/alter.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/collationcmds.c
M src/backend/commands/comment.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/copy.c
M src/backend/commands/dbcommands.c
M src/backend/commands/explain.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/variable.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeLimit.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeNestloop.c
M src/backend/executor/nodeRecursiveunion.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/executor/spi.c
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/backend/libpq/pqcomm.c
M src/backend/main/main.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/params.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepqual.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/predtest.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_collate.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_param.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/dynloader/freebsd.c
M src/backend/port/dynloader/netbsd.c
M src/backend/port/dynloader/openbsd.c
M src/backend/port/pipe.c
M src/backend/port/sysv_shmem.c
M src/backend/port/unix_latch.c
M src/backend/port/win32/crashdump.c
M src/backend/port/win32/timer.c
M src/backend/port/win32_latch.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
M src/backend/regex/regcomp.c
M src/backend/replication/basebackup.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/freelist.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/file/fd.c
M src/backend/storage/file/reinit.c
M src/backend/storage/ipc/pmsignal.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/large_object/inv_api.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/backend/tsearch/spell.c
M src/backend/tsearch/ts_locale.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/cash.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/like.c
M src/backend/utils/adt/nabstime.c
M src/backend/utils/adt/network.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/numutils.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/tsginidx.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/varbit.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/error/elog.c
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/mb/mbutils.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/rbtree.c
M src/backend/utils/misc/tzparser.c
M src/backend/utils/mmgr/aset.c
M src/backend/utils/mmgr/portalmem.c
M src/backend/utils/resowner/resowner.c
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/time/snapmgr.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/compress_io.h
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dumpall.c
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/tab-complete.c
M src/bin/scripts/droplang.c
M src/include/access/gin.h
M src/include/access/gin_private.h
M src/include/access/gist.h
M src/include/access/gist_private.h
M src/include/access/hio.h
M src/include/access/htup.h
M src/include/access/itup.h
M src/include/access/relscan.h
M src/include/access/tupdesc.h
M src/include/access/xact.h
M src/include/access/xlog.h
M src/include/access/xlogdefs.h
M src/include/catalog/catalog.h
M src/include/catalog/dependency.h
M src/include/catalog/namespace.h
M src/include/catalog/objectaccess.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_authid.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_collation.h
M src/include/catalog/pg_collation_fn.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_enum.h
M src/include/catalog/pg_extension.h
M src/include/catalog/pg_index.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_seclabel.h
M src/include/catalog/pg_type.h
M src/include/catalog/storage.h
M src/include/commands/alter.h
M src/include/commands/collationcmds.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/explain.h
M src/include/commands/extension.h
M src/include/commands/proclang.h
M src/include/commands/seclabel.h
M src/include/commands/trigger.h
M src/include/commands/typecmds.h
M src/include/commands/vacuum.h
M src/include/executor/executor.h
M src/include/executor/functions.h
M src/include/executor/hashjoin.h
M src/include/executor/nodeHash.h
M src/include/fmgr.h
M src/include/foreign/fdwapi.h
M src/include/foreign/foreign.h
M src/include/libpq/auth.h
M src/include/libpq/libpq-be.h
M src/include/libpq/libpq.h
M src/include/nodes/execnodes.h
M src/include/nodes/makefuncs.h
M src/include/nodes/params.h
M src/include/nodes/parsenodes.h
M src/include/nodes/pg_list.h
M src/include/nodes/plannodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/paths.h
M src/include/optimizer/placeholder.h
M src/include/optimizer/subselect.h
M src/include/parser/parse_collate.h
M src/include/parser/parse_func.h
M src/include/parser/parse_type.h
M src/include/parser/parser.h
M src/include/pgstat.h
M src/include/port/win32.h
M src/include/replication/replnodes.h
M src/include/replication/syncrep.h
M src/include/replication/walprotocol.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/rewrite/rewriteSupport.h
M src/include/storage/backendid.h
M src/include/storage/buf_internals.h
M src/include/storage/latch.h
M src/include/storage/pmsignal.h
M src/include/storage/predicate_internals.h
M src/include/storage/proc.h
M src/include/storage/procarray.h
M src/include/storage/relfilenode.h
M src/include/tsearch/dicts/spell.h
M src/include/utils/acl.h
M src/include/utils/builtins.h
M src/include/utils/bytea.h
M src/include/utils/datetime.h
M src/include/utils/elog.h
M src/include/utils/guc.h
M src/include/utils/lsyscache.h
M src/include/utils/numeric.h
M src/include/utils/portal.h
M src/include/utils/rbtree.h
M src/include/utils/rel.h
M src/include/utils/tuplesort.h
M src/include/utils/typcache.h
M src/include/utils/varbit.h
M src/include/utils/xml.h
M src/interfaces/ecpg/compatlib/informix.c
M src/interfaces/ecpg/ecpglib/connect.c
M src/interfaces/ecpg/ecpglib/memory.c
M src/interfaces/ecpg/ecpglib/prepare.c
M src/interfaces/ecpg/preproc/ecpg.c
M src/interfaces/ecpg/preproc/extern.h
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-protocol2.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/fe-secure.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/pl/plperl/plperl.c
M src/pl/plperl/plperl.h
M src/pl/plperl/plperl_helpers.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/plpgsql.h
M src/pl/plpython/plpython.c
M src/pl/tcl/pltcl.c
M src/port/chklocale.c
M src/port/crypt.c
M src/port/dirmod.c
M src/port/exec.c
M src/port/getaddrinfo.c
M src/port/inet_net_ntop.c
M src/port/path.c
M src/port/pgmkdirp.c
M src/port/snprintf.c
M src/port/unsetenv.c
M src/test/isolation/isolation_main.c
M src/test/isolation/isolationtester.c
M src/test/isolation/isolationtester.h
M src/test/regress/pg_regress.c

commit   : 9a8b73147c07e02e10e0d0a34aa99d72e3336fb2    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 29 Mar 2011 17:54:27 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 29 Mar 2011 17:54:27 -0400    

Click here for diff

The original version was unreadable, and not mechanically checkable  
either.  

M src/backend/commands/tablecmds.c

Add collation support on Windows (MSVC build)

commit   : 11745364d074f3a7ee54c98fad55cfb5c5149326    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 10 Apr 2011 00:14:20 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Sun, 10 Apr 2011 00:14:20 +0300    

Click here for diff

There is not yet support in initdb to populate the pg_collation  
catalog, but if that is done manually, the rest should work.  

M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/varlena.c
M src/bin/initdb/initdb.c
M src/include/pg_config.h.win32
M src/include/port/win32.h

Fix ILIKE to honor collation when working in single-byte encodings.

commit   : 00f11f419caa873b44d70071d4ade0b8c75e7f36    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 17:12:39 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 17:12:39 -0400    

Click here for diff

The original collation patch only fixed the multi-byte code path.  
This change also ensures that ILIKE's idea of the case-folding rules  
is exactly the same as str_tolower's.  

M src/backend/utils/adt/like.c
M src/backend/utils/adt/like_match.c

Remove collate.linux.utf8.sql's assumptions about ".utf8" in locale names.

commit   : f89e4dfa755b9c9be9c19f7c65cff50d47b4f33a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 16:24:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 16:24:36 -0400    

Click here for diff

Tweak the test so that it does not depend on the platform using ".utf8" as  
the extension signifying that a locale uses UTF8 encoding.  For the most  
part this just requires using the abbreviated collation names "en_US" etc,  
though I had to work a bit harder on the collation creation tests.  
  
This opens the door to using the test on platforms that spell locales  
differently, for example ".utf-8" or ".UTF-8".  Also, the test is now  
somewhat useful with server encodings other than UTF8; though depending on  
which encoding is selected, different subsets of it will fail for lack of  
character set support.  

M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

Adjust collation determination rules as per discussion.

commit   : a19002d4e5da028ff7280554b281e402c609898b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 14:40:09 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 14:40:09 -0400    

Click here for diff

Remove crude hack that tried to propagate collation through a  
function-returning-record, ie, from the function's arguments to individual  
fields selected from its result record.  That is just plain inconsistent,  
because the function result is composite and cannot have a collation;  
and there's no hope of making this kind of action-at-a-distance work  
consistently.  Adjust regression test cases that expected this to happen.  
  
Meanwhile, the behavior of casting to a domain with a declared collation  
stays the same as it was, since that seemed to be the consensus.  

M src/backend/parser/parse_collate.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_target.c
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.linux.utf8.sql
M src/test/regress/sql/collate.sql

Don't show unusable collations in psql's \dO command.

commit   : 7c76906b7e24d9ea94a2b0e33396ebcac600437d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 14:08:41 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 9 Apr 2011 14:08:41 -0400    

Click here for diff

"Unusable" collations are those not matching the current database's  
encoding.  The former behavior inconsistently showed such collations  
some of the time, depending on the details of the pattern argument.  

M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c

Latest consolidated typedef list from buildfarm.

commit   : fe1438da8aa8a45f2cee816eb54841f97d3b2f22    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Fri, 8 Apr 2011 23:11:37 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Fri, 8 Apr 2011 23:11:37 -0400    

Click here for diff

M src/tools/pgindent/typedefs.list

Clean up minor collation issues in indxpath.c.

commit   : 69f1d5fe1456229aeea3096c372eb24cedc7d597    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 19:19:17 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 19:19:17 -0400    

Click here for diff

Get rid of bogus collation test in match_special_index_operator (even for  
ILIKE, the pattern match operator's collation doesn't matter here, and even  
if it did the test was testing the wrong thing).  
Fix broken looping logic in expand_indexqual_rowcompare.  
Add collation check in match_clause_to_ordering_op.  
Make naming and argument ordering more consistent; improve comments.  

M src/backend/optimizer/path/indxpath.c

Fix make_greater_string to not have an undocumented collation assumption.

commit   : 466dac8656c11317b91c1a4bfd5cfca4508cba94    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 17:39:59 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 17:39:59 -0400    

Click here for diff

The previous coding worked only if ltproc->fn_collation was always either  
DEFAULT_COLLATION_OID or a C-compatible locale.  While that's true at the  
moment, it wasn't documented (and in fact wasn't true when this code was  
committed...).  But it only takes a couple more lines to make its internal  
caching behavior locale-aware, so let's do that.  

M src/backend/utils/adt/selfuncs.c

Truncate the predicate lock SLRU to empty, instead of almost empty.

commit   : cdcdfca40199bbdb30c78d105e4db267b631289c    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 16:51:45 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 16:51:45 -0400    

Click here for diff

Otherwise, the SLRU machinery can get confused and think that the SLRU  
has wrapped around.  Along the way, regardless of whether we're  
truncating all of the SLRU or just some of it, flush pages after  
truncating, rather than before.  
  
Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Tweak collation setup for GIN index comparison functions.

commit   : 1766a5b63a950a667ed39c25256156bf366eb43c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 16:48:25 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 16:48:25 -0400    

Click here for diff

Honor index column's collation spec if there is one, don't go to the  
expense of calling get_typcollation when we can reasonably assume that  
all GIN storage types will use default collation, and be sure to set  
a collation for the comparePartialFn too.  

M src/backend/access/gin/ginutil.c

Avoid an unnecessary syscache lookup in parse_coerce.c.

commit   : c5ff3ff49229e8fb7da0e46b463bfc9b12219078    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 16:11:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 16:11:04 -0400    

Click here for diff

All the other fields of the constant are being extracted from the syscache  
entry we already have, so handle collation similarly.  (There don't seem  
to be any other uses for the new function at the moment.)  

M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_type.c
M src/include/parser/parse_type.h

Make psql use pg_table_size instead of pg_relation_size on 9.0+ servers.

commit   : cba9cd419270a9b7f442877e21685ac0de5730b3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:52:49 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:52:49 -0400    

Click here for diff

Per discussion, pg_table_size() is a more helpful number than  
pg_relation_size().  
  
Bernd Helmle, reviewed by Susanne Ebrecht and me.  

M src/bin/psql/describe.c

Fix bug in propagating ALTER TABLE actions to typed tables.

commit   : 0bd155cbf2543cdead70b6e6390e9260035e1468    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:44:50 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:44:50 -0400    

Click here for diff

We need to propagate such actions to all typed table children of a  
given type, not just the first one.  
  
Noah Misch  

M src/backend/commands/tablecmds.c

Modify initdb to complain only when no usable system locales are found.

commit   : d4c810d570e71b021c93e3ee3ea4ab18af4a053d    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 15:38:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 15:38:57 -0400    

Click here for diff

Per discussion, the original behavior seems too noisy.  But if things  
are so broken that none of the locales reported by "locale -a" are usable,  
that's probably worth warning about.  

M src/bin/initdb/initdb.c

Partially roll back overenthusiastic SSI optimization.

commit   : fbc0d07796bcae8b2ee4b09ed236877338c95130    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:29:02 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 15:29:02 -0400    

Click here for diff

When a regular lock is held, SSI can use that in lieu of a predicate lock  
to detect rw conflicts; but if the regular lock is being taken by a  
subtransaction, we can't assume that it'll commit, so releasing the  
parent transaction's lock in that case is a no-no.  
  
Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Have pg_upgrade properly preserve relfrozenxid in toast tables.

commit   : 9c38bce29cb6d3ef49b932086d31f635981b07e9    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Fri, 8 Apr 2011 11:46:34 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Fri, 8 Apr 2011 11:46:34 -0400    

Click here for diff

This fixes a pg_upgrade bug that could lead to query errors when clog  
files are improperly removed.  

M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h

Avoid extra whitespace in the arguments of <indexterm>.

commit   : dca30da3433c40b5f92f1704c496cda052decef9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 11:36:05 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 11:36:05 -0400    

Click here for diff

As noted by Thom Brown, this confuses the DocBook index processor; it  
fails to merge entries that differ only in whitespace, and sorts them  
unexpectedly as well.  Seems like a toolchain bug, but I'm not going to  
hold my breath waiting for a fix.  
  
Note: easiest way to find these is to look for double spaces in HTML.index.  

M doc/src/sgml/installation.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/manage-ag.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/plpython.sgml
M doc/src/sgml/pltcl.sgml
M doc/src/sgml/queries.sgml
M doc/src/sgml/runtime.sgml
M doc/src/sgml/spi.sgml
M doc/src/sgml/syntax.sgml
M doc/src/sgml/trigger.sgml
M doc/src/sgml/xtypes.sgml

Add an example of WITH (UPDATE RETURNING) INSERT to the INSERT ref page.

commit   : 8ad58279fa75636b776e4c648e1ffc7079a2c7d9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 10:54:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 8 Apr 2011 10:54:03 -0400    

Click here for diff

Per a discussion with Gavin Flower.  This barely scratches the surface  
of potential WITH (something RETURNING) use cases, of course, but it's  
one of the simplest compelling examples I can think of.  

M doc/src/sgml/ref/insert.sgml

Fix some sloppiness in new PL/python get_source_line() function.

commit   : b6bc481d5540a3ad0d39db1e9881e6bd52e54213    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 00:30:54 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 8 Apr 2011 00:30:54 -0400    

Click here for diff

Jan Urbański  

M src/pl/plpython/plpython.c

Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds.

commit   : a53112338c2f5b74383ce075fbec098cd06a3ad7    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 7 Apr 2011 22:17:06 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Thu, 7 Apr 2011 22:17:06 -0400    

Click here for diff

Some versions of xcopy, notably on Windows 7 don't like it. Backpatch  
to 8.3, where we first used xcopy.  

M src/tools/msvc/Install.pm

Tweaks for SSI out-of-shared memory behavior.

commit   : 56c7140ca813ba4c7ecb122a1d2b1268e705d092    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 7 Apr 2011 16:43:39 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 7 Apr 2011 16:43:39 -0400    

Click here for diff

If we call hash_search() with HASH_ENTER, it will bail out rather than  
return NULL, so it's redundant to check for NULL again in the caller.  
Thus, in cases where we believe it's impossible for the hash table to run  
out of slots anyway, we can simplify the code slightly.  
  
On the flip side, in cases where it's theoretically possible to run out of  
space, we don't want to rely on dynahash.c to throw an error; instead,  
we pass HASH_ENTER_NULL and throw the error ourselves if a NULL comes  
back, so that we can provide a more descriptive error message.  
  
Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Modernize dlopen interface code for FreeBSD and OpenBSD.

commit   : 73d9a908140e709b4cb12a8d2257a11baaec974f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 15:14:39 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 15:14:39 -0400    

Click here for diff

Remove the hard-wired assumption that __mips__ (and only __mips__) lacks  
dlopen in FreeBSD and OpenBSD.  This assumption is outdated at least for  
OpenBSD, as per report from an anonymous 9.1 tester.  We can perfectly well  
use HAVE_DLOPEN instead to decide which code to use.  
  
Some other cosmetic adjustments to make freebsd.c, netbsd.c, and openbsd.c  
exactly alike.  

M src/backend/port/dynloader/freebsd.c
M src/backend/port/dynloader/netbsd.c
M src/backend/port/dynloader/openbsd.c

Allow pg_upgrade with PGCLIENTENCODING set

commit   : 1eb2231fc46bbfa85b47c19d88f72162b323aa51    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 7 Apr 2011 19:22:34 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Thu, 7 Apr 2011 19:22:34 +0300    

Click here for diff

This used to work, but since PGCLIENTENCODING is now a connection  
option variable, pg_upgrade would prevent it.  

M contrib/pg_upgrade/server.c

Fix SortTocFromFile() to cope with lines that are too long for its buffer.

commit   : 1471a147f09f737511945ac59ca3162469d1a0c0    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 11:40:23 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 11:40:23 -0400    

Click here for diff

The original coding supposed that a dump TOC file could never contain lines  
longer than 1K.  The folly of that was exposed by a recent report from  
Per-Olov Esgard.  We only really need to see the first dozen or two bytes  
of each line, since we're just trying to read off the numeric ID at the  
start of the line; so there's no need for a particularly huge buffer.  
What there is a need for is logic to not process continuation bufferloads.  
  
Back-patch to all supported branches, since it's always been like this.  

M src/bin/pg_dump/pg_backup_archiver.c

Preserve pg_largeobject_metadata.relfrozenxid in pg_upgrade.

commit   : 82a4f370735130418738f8cf0fb9155b1cff5e2b    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 7 Apr 2011 09:57:09 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 7 Apr 2011 09:57:09 -0400    

Click here for diff

This is needed only in 9.1 because only 9.0 had this and no one is  
upgrading from a 9.0 beta to 9.0 anymore.  We basically don't backpatch  
9.0 beta fixes at this point.  

M src/bin/pg_dump/pg_dump.c

Simplify structure of query used to gather database object information in pg_upgrade.

commit   : e69d32158c18069840130f62c5597ca1ef656175    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Thu, 7 Apr 2011 06:22:40 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Thu, 7 Apr 2011 06:22:40 -0400    

Click here for diff

M contrib/pg_upgrade/info.c

Fix collations when we call transformWhereClause from outside the parser.

commit   : d8d429890d6aa0246e28faa187a55cb0c65efd6e    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 02:34:57 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 02:34:57 -0400    

Click here for diff

Previous patches took care of assorted places that call transformExpr from  
outside the main parser, but I overlooked the fact that some places use  
transformWhereClause as a shortcut for transformExpr + coerce_to_boolean.  
In particular this broke collation-sensitive index WHERE clauses, as per  
report from Thom Brown.  Trigger WHEN and rule WHERE clauses too.  
  
I'm not forcing initdb for this fix, but any affected indexes, triggers,  
or rules will need to be dropped and recreated.  

M src/backend/commands/trigger.c
M src/backend/parser/parse_utilcmd.c

Revise the API for GUC variable assign hooks.

commit   : 2594cf0e8c04406ffff19b1651c5a406d376657c    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 00:11:01 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 7 Apr 2011 00:11:01 -0400    

Click here for diff

The previous functions of assign hooks are now split between check hooks  
and assign hooks, where the former can fail but the latter shouldn't.  
Aside from being conceptually clearer, this approach exposes the  
"canonicalized" form of the variable value to guc.c without having to do  
an actual assignment.  And that lets us fix the problem recently noted by  
Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus  
log messages about "parameter "wal_buffers" cannot be changed without  
restarting the server".  There may be some speed advantage too, because  
this design lets hook functions avoid re-parsing variable values when  
restoring a previous state after a rollback (they can store a pre-parsed  
representation of the value instead).  This patch also resolves a  
longstanding annoyance about custom error messages from variable assign  
hooks: they should modify, not appear separately from, guc.c's own message  
about "invalid parameter value".  

M contrib/auth_delay/auth_delay.c
M contrib/auto_explain/auto_explain.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/sepgsql/hooks.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/namespace.c
M src/backend/commands/tablespace.c
M src/backend/commands/variable.c
M src/backend/nls.mk
M src/backend/replication/syncrep.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/error/elog.c
M src/backend/utils/mb/mbutils.c
M src/backend/utils/misc/README
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/tzparser.c
M src/include/commands/variable.h
M src/include/mb/pg_wchar.h
M src/include/replication/syncrep.h
M src/include/tcop/tcopprot.h
M src/include/tsearch/ts_cache.h
M src/include/utils/datetime.h
M src/include/utils/elog.h
M src/include/utils/guc.h
M src/include/utils/guc_tables.h
M src/include/utils/pg_locale.h
M src/include/utils/tzparser.h
M src/pl/plperl/plperl.c
M src/pl/plpgsql/src/pl_handler.c
M src/test/regress/expected/guc.out
M src/timezone/pgtz.c

Update regression test files for PL/Python traceback patch

commit   : 5d0e462366f4521e37744fdb42fed3c6819a3374    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 23:19:00 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 23:19:00 +0300    

Click here for diff

M src/pl/plpython/expected/plpython_unicode_3.out

Replace the confusing exit_nicely() by an atexit/on_exit hook

commit   : c75163842cf93fd7b6311df2c5545bf09447b870    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 23:00:44 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 23:00:44 +0300    

Click here for diff

M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/util.c

Add traceback information to PL/Python errors

commit   : 2bd78eb8d51cc9ee03ba0287b23ff4c266dcd9b9    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 22:36:06 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 22:36:06 +0300    

Click here for diff

This mimics the traceback information the Python interpreter prints  
with exceptions.  
  
Jan Urbański  

M src/pl/plpython/expected/plpython_do.out
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/pl/plpython/expected/plpython_subtransaction.out
M src/pl/plpython/expected/plpython_subtransaction_0.out
M src/pl/plpython/expected/plpython_subtransaction_5.out
M src/pl/plpython/expected/plpython_test.out
M src/pl/plpython/expected/plpython_types.out
M src/pl/plpython/expected/plpython_types_3.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_error.sql

Update key words table for 9.1

commit   : bf6848bc8c82e82f857d48185554bc3e6dcf1013    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 00:16:13 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Wed, 6 Apr 2011 00:16:13 +0300    

Click here for diff

M doc/src/sgml/keywords.sgml

Repair some flakiness in CheckTargetForConflictsIn.

commit   : 632f0faa7c975e8984ce0f1d6b631478e41a96c2    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 15:16:59 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 15:16:59 -0400    

Click here for diff

When we release and reacquire SerializableXactHashLock, we must recheck  
whether an R/W conflict still needs to be flagged, because it could have  
changed under us in the meantime.  And when we release the partition  
lock, we must re-walk the list of predicate locks from the beginning,  
because our pointer could get invalidated under us.  
  
Bug report #5952 by Yamamoto Takashi.  Patch by Kevin Grittner.  

M src/backend/storage/lmgr/predicate.c

Change "Id" to "id" in some SGML tags

commit   : 38d15f16511cb9f75ed2b1e1f73117c1bc581538    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 5 Apr 2011 15:06:06 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Tue, 5 Apr 2011 15:06:06 -0300    

Click here for diff

Gabriele Bartolini  

M doc/src/sgml/config.sgml
M doc/src/sgml/recovery-config.sgml
M doc/src/sgml/typeconv.sgml

Typo fixes.

commit   : ad275473a5ea75f4aa010791884004f75f3c7a65    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 12:40:17 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 12:40:17 -0400    

Click here for diff

Erik Rijkers  

M doc/src/sgml/high-availability.sgml

Add casts from int4 and int8 to numeric.

commit   : f5e524d92be609c709825be8995bf77f10880c3b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 09:35:43 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Tue, 5 Apr 2011 09:35:43 -0400    

Click here for diff

Joey Adams, per gripe from Ramanujam.  Review by myself and Tom Lane.  

M doc/src/sgml/datatype.sgml
M src/backend/utils/adt/cash.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_cast.h
M src/include/catalog/pg_proc.h
M src/include/utils/cash.h
M src/test/regress/expected/money.out
M src/test/regress/sql/money.sql

Avoid assuming there will be only 3 states for synchronous_commit. Also avoid hardcoding the current default state by giving it the name "on" and replace with a meaningful name that reflects its behaviour. Coding only, no change in behaviour.

commit   : 88f32b7ca29982f286b61a9d0dd29be4b8a01c25    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 23:23:13 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 23:23:13 +0100    

Click here for diff

M src/backend/access/transam/xact.c
M src/backend/postmaster/autovacuum.c
M src/backend/utils/misc/guc.c
M src/include/access/xact.h
M src/include/replication/syncrep.h

commit   : 479ee1b962ca2d479310af762c21d7c2056fdeca    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 22:38:43 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 22:38:43 +0100    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Update comments and credit doc proofreaders

commit   : 35d2a660fea51f8acae6aa0895875757fa09cb26    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 22:36:09 +0100    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Mon, 4 Apr 2011 22:36:09 +0100    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Update MSVC toolchain to match SGML entity uppercasing

commit   : 34a991619bddf2bfb441cf2d4396b67198326bcd    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 16:42:42 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 16:42:42 -0400    

Click here for diff

Per Robert Haas  

M src/tools/msvc/Solution.pm

Merge synchronous_replication setting into synchronous_commit.

commit   : 240067b3b0ff989d2b28f4f917f7958f2ec76b05    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 16:13:01 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 16:13:01 -0400    

Click here for diff

This means one less thing to configure when setting up synchronous  
replication, and also avoids some ambiguity around what the behavior  
should be when the settings of these variables conflict.  
  
Fujii Masao, with additional hacking by me.  

M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/release-9.1.sgml
M src/backend/access/transam/xact.c
M src/backend/postmaster/autovacuum.c
M src/backend/replication/syncrep.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/access/xact.h
M src/include/replication/syncrep.h

Uppercase <!ENTITY> and <!DOCTYPE> tags in SGML source

commit   : fc3459d70c5d842fe6519522649c8a47454f25bb    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 16:07:53 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 16:07:53 -0400    

Click here for diff

This improves compatibility with external toolchains, such as those used  
by some documentation translation tools.  
  
Gabriele Bartolini  

M doc/src/sgml/Makefile
M doc/src/sgml/filelist.sgml
M doc/src/sgml/postgres.sgml
M doc/src/sgml/ref/allfiles.sgml
M doc/src/sgml/standalone-install.sgml

Add missing check on invocation of trusted procedures.

commit   : 595a441ae999fb155a381fa4bcceadf40f041a33    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 13:25:42 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 13:25:42 -0400    

Click here for diff

KaiGai Kohei  

M contrib/sepgsql/expected/label.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/sepgsql-regtest.te
M contrib/sepgsql/sql/label.sql

Include pid in pg_lock_status() results even for SIREAD locks.

commit   : a0e50e698beb89a8ec203303581e464a5f69fc41    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 13:20:18 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 4 Apr 2011 13:20:18 -0400    

Click here for diff

Dan Ports  

M src/backend/utils/adt/lockfuncs.c

Duplicate expansion of "direction" from FETCH's synopsis into MOVE

commit   : 8c250f3741f4f897362de32a03f56726cf3f9774    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 12:03:41 -0400    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Mon, 4 Apr 2011 12:03:41 -0400    

Click here for diff

M doc/src/sgml/ref/fetch.sgml
M doc/src/sgml/ref/move.sgml

Rearrange "add column" logic to merge columns at exec time.

commit   : 6c5723998594dffa5d47c3cf8c96ccf89c033aae    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 21:52:47 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 21:52:47 -0400    

Click here for diff

The previous coding set attinhcount too high in some cases, resulting in  
an undumpable, undroppable column.  Per bug #5856, reported by Naoya  
Anzai.  See also commit 31b6fc06d83c6de3644c8f2921eb7de0eb92fac3, which  
fixes a similar bug in ALTER TABLE .. ADD CONSTRAINT.  
  
Patch by Noah Misch.  

M src/backend/commands/tablecmds.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

Improve documentation on the range of the numeric data type.

commit   : cabf5d84b6d1a92ab97492d7e3d650548a9992cd    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:56:22 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:56:22 -0400    

Click here for diff

Gianni Ciolli, reviewed by Noah Misch  

M doc/src/sgml/datatype.sgml

Remove mention of using "man" from the tutorial.

commit   : 1981fb73136433579cae9a34fb3a12f1fcc519fc    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:49:05 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:49:05 -0400    

Click here for diff

This isn't applicable on Windows, and the internal link to the  
psql documentation should be more than sufficient.  
  
Susanne Ebrecht  

M doc/src/sgml/start.sgml

Avoid possible hang during smart shutdown.

commit   : 38b27792eae99f5b4db2411f5c57ef70f850df5f    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:42:00 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 3 Apr 2011 19:42:00 -0400    

Click here for diff

If a smart shutdown occurs just as a child is starting up, and the  
child subsequently becomes a walsender, there is a race condition:  
the postmaster might count the exstant backends, determine that there  
is one normal backend, and wait for it to die off.  Had the walsender  
transition already occurred before the postmaster counted, it would  
have proceeded with the shutdown.  
  
To fix this, have each child that transforms into a walsender kick  
the postmaster just after doing so, so that the state machine is  
certain to advance.  
  
Fujii Masao  

M src/backend/postmaster/postmaster.c
M src/backend/replication/walsender.c
M src/include/storage/pmsignal.h

Fix typo in PQconnectStartParams().

commit   : d518d6a168797c2e3b9cf03a3b5cfa335be735bb    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 2 Apr 2011 18:05:42 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 2 Apr 2011 18:05:42 -0400    

Click here for diff

This would lead to leaking the PGconn structure after an error detected by  
conninfo_array_parse(), as well as failing to return a useful error message  
in such cases.  Backpatch to 9.0 where the error was introduced.  
  
Joseph Adams  

M src/interfaces/libpq/fe-connect.c

Escape greater than and less than characters in docs.

commit   : d420ba2a2d4ea4831f89a3fd7ce86b05eff932ff    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 2 Apr 2011 17:06:43 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Sat, 2 Apr 2011 17:06:43 +0300    

Click here for diff

Susanne Ebrecht and me  

M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/sepgsql.sgml

Avoid palloc before CurrentMemoryContext is set up on win32

commit   : 5735efee15540765315aa8c1a230575e756037f7    
  
author   : Magnus Hagander <magnus@hagander.net>    
date     : Fri, 1 Apr 2011 19:58:36 +0200    
  
committer: Magnus Hagander <magnus@hagander.net>    
date     : Fri, 1 Apr 2011 19:58:36 +0200    

Click here for diff

Instead, write the unconverted output - it will be in the wrong  
encoding, but at least we don't crash.  
  
Rushabh Lathia  

M src/backend/utils/error/elog.c

Tab completion for COMMENT ON FOREIGN DATA WRAPPER / SERVER.

commit   : e49ad77ff958b380ea6fa08c72e2dce97ac56c6b    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 13:15:49 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 13:15:49 -0400    

Click here for diff

M src/bin/psql/tab-complete.c

pg_dump support for comments on FOREIGN DATA WRAPPER and SERVER objects.

commit   : dd095b623ec4b41e8c5728f9c576375985554fd3    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 11:40:37 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 11:40:37 -0400    

Click here for diff

Shigeru Hanada, with some corrections.  

M src/bin/pg_dump/pg_dump.c

Support comments on FOREIGN DATA WRAPPER and SERVER objects.

commit   : 50533a6dc515cc3182f52838275c9d2a1f587604    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 11:28:28 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 11:28:28 -0400    

Click here for diff

This mostly involves making it work with the objectaddress.c framework,  
which does most of the heavy lifting.  In that vein, change  
GetForeignDataWrapperOidByName to get_foreign_data_wrapper_oid and  
GetForeignServerOidByName to get_foreign_server_oid, to match the  
pattern we use for other object types.  
  
Robert Haas and Shigeru Hanada  

M doc/src/sgml/ref/comment.sgml
M src/backend/catalog/aclchk.c
M src/backend/catalog/objectaddress.c
M src/backend/commands/foreigncmds.c
M src/backend/foreign/foreign.c
M src/backend/parser/gram.y
M src/backend/utils/adt/acl.c
M src/include/foreign/foreign.h
M src/include/utils/acl.h
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql

Fix compiler warning.

commit   : 7fcc75dd26ff0fee0b02f1b8b4215c298ca974ca    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 10:35:52 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 1 Apr 2011 10:35:52 -0400    

Click here for diff

M src/backend/replication/walsender.c

Fix two missing spaces in error messages.

commit   : 9d56886112d8307dcd28ce49048a770c5d26acf9    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 1 Apr 2011 14:41:39 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Fri, 1 Apr 2011 14:41:39 +0300    

Click here for diff

Josh Kupershmidt  

M src/backend/port/sysv_shmem.c

Fix a tiny race condition in predicate locking. Need to hold the lock while examining the head of predicate locks list. Also, fix the comment of RemoveTargetIfNoLongerUsed, it was neglected when we changed the way update chains are handled.

commit   : 60b142b9a6f413a92665766a1f265b361f68c20b    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 18:43:23 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 18:43:23 +0300    

Click here for diff

Kevin Grittner  

M src/backend/storage/lmgr/predicate.c

Increase SHMEM_INDEX_SIZE from 32 to 64. We're currently at 40 entries in ShmemIndex, so 64 leaves some headroom.

commit   : c8ae318cbeceadac172aa6b9cfa43734b0836e5e    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 13:37:01 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 13:37:01 +0300    

Click here for diff

Kevin Grittner  

M src/include/storage/shmem.h

Don't leak the temporary PLyProcedure struct we create for inline plpython blocks.

commit   : ec7626504f0fc8cca46d0f2a460e4b76177f79b3    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 12:37:11 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 12:37:11 +0300    

Click here for diff

Investigation by Jan Urbański, though I didn't use his patch.  

M src/pl/plpython/plpython.c

Reword the phrase on zero replication_timeout in the docs.

commit   : 647f8b3dbaa68662f54aa762e9467874282c563d    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 10:19:29 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 10:19:29 +0300    

Click here for diff

M doc/src/sgml/config.sgml

Improve error message when WAL ends before reaching end of online backup.

commit   : 1f0bab8494f7734e26b76fe34599c7763c8753a1    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 10:09:49 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Thu, 31 Mar 2011 10:09:49 +0300    

Click here for diff

M src/backend/access/transam/xlog.c

Mention pg_upgrade sets autovacuum_freeze_max_age to maximum.

commit   : da3418cea9bd10e9ea3489b42f6278772942e745    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 30 Mar 2011 17:45:54 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 30 Mar 2011 17:45:54 -0400    

Click here for diff

M contrib/pg_upgrade/server.c

Expand comment on how pg_upgrade is turning off autovacuum.

commit   : d609b08ead450d78d4a567c48111aca6857ec59c    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Wed, 30 Mar 2011 17:36:24 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Wed, 30 Mar 2011 17:36:24 -0400    

Click here for diff

M contrib/pg_upgrade/server.c

Attempt to unbreak windows builds broken by commit 754baa2.

commit   : 382fb6a08f524327b5e3084b3652fba2e12f1ba2    
  
author   : Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 30 Mar 2011 16:43:31 -0400    
  
committer: Andrew Dunstan <andrew@dunslane.net>    
date     : Wed, 30 Mar 2011 16:43:31 -0400    

Click here for diff

M src/backend/libpq/pqcomm.c

Check that we've reached end-of-backup also when we're not performing archive recovery.

commit   : acf47401321ce55f06026a2f5d5512b404da3e55    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 10:36:58 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 10:36:58 +0300    

Click here for diff

It's possible to restore an online backup without recovery.conf, by simply  
copying all the necessary WAL files to pg_xlog. "pg_basebackup -x" does that  
too. That's the use case where this cross-check is useful.  
  
Backpatch to 9.0. We used to do this in earlier versins, but in 9.0 the code  
was inadvertently changed so that the check is only performed after archive  
recovery.  
  
Fujii Masao.  

M src/backend/access/transam/xlog.c

Automatically terminate replication connections that are idle for more than replication_timeout (a new GUC) milliseconds. The TCP timeout is often too long, you want the master to notice a dead connection much sooner. People complained about that in 9.0 too, but with synchronous replication it's even more important to notice dead connections promptly.

commit   : 754baa21f723255272c24dc5f9ab456858e361e3    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 10:10:32 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 10:10:32 +0300    

Click here for diff

Fujii Masao and Heikki Linnakangas  

M doc/src/sgml/config.sgml
M src/backend/libpq/pqcomm.c
M src/backend/port/unix_latch.c
M src/backend/port/win32/socket.c
M src/backend/port/win32_latch.c
M src/backend/replication/walsender.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/libpq/libpq.h
M src/include/replication/walsender.h
M src/include/storage/latch.h

Adjust error message, now that we expect other message types than connection close at this point. Fix PQsetnonblocking() comment.

commit   : bc03c5937d103952ef4f40a3fa4514c154538d25    
  
author   : Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 08:54:28 +0300    
  
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>    
date     : Wed, 30 Mar 2011 08:54:28 +0300    

Click here for diff

Fujii Masao  

M src/backend/replication/walsender.c
M src/interfaces/libpq/fe-exec.c

Update SQL features list

commit   : f564e65cda32fd14f6f7cdd85d116c421af731f2    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 29 Mar 2011 23:23:50 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 29 Mar 2011 23:23:50 +0300    

Click here for diff

Feature F692 "Extended collation support" is now also supported.  This  
refers to allowing the COLLATE clause anywhere in a column or domain  
definition instead of just directly after the type.  
  
Also correct the name of the feature in accordance with the latest SQL  
standard.  

M src/backend/catalog/sql_features.txt

In pg_upgrade, add C comment about how autovacuum is disabled.

commit   : d67b0bf471ba4e88aa3ed50871924efc91d7a27e    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Tue, 29 Mar 2011 11:11:12 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Tue, 29 Mar 2011 11:11:12 -0400    

Click here for diff

M contrib/pg_upgrade/server.c

Add maintainer-check target

commit   : 6c0dfc035670240cddf0092a4aa22e5815b6583d    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 28 Mar 2011 22:53:55 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 28 Mar 2011 22:53:55 +0300    

Click here for diff

This can do various source code checks that are not appropriate for  
either the build or the regression tests.  Currently: duplicate_oids,  
SGML syntax and tabs check, NLS syntax check.  

M GNUmakefile.in
M doc/Makefile
M doc/src/Makefile
M doc/src/sgml/Makefile
M src/Makefile.global.in
M src/include/Makefile

Make duplicate_oids return nonzero exit status if duplicates were found

commit   : aa6fdd186cf2c29e04d3cc8ca19783fb904a5a33    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 28 Mar 2011 22:52:23 +0300    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Mon, 28 Mar 2011 22:52:23 +0300    

Click here for diff

Automatic detection of errors is easier that way.  

M src/include/catalog/duplicate_oids

Prevent a rowtype from being included in itself.

commit   : eb51af71f241e8cb199790dee9ad246bb36b3287    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 28 Mar 2011 15:44:54 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 28 Mar 2011 15:44:54 -0400    

Click here for diff

Eventually we might be able to allow that, but it's not clear how many  
places need to be fixed to prevent infinite recursion when there's a direct  
or indirect inclusion of a rowtype in itself.  One such place is  
CheckAttributeType(), which will recurse to stack overflow in cases such as  
those exhibited in bug #5950 from Alex Perepelica.  If we were sure it was  
the only such place, we could easily modify the code added by this patch to  
stop the recursion without a complaint ... but it probably isn't the only  
such place.  Hence, throw error until such time as someone is excited  
enough about this type of usage to put work into making it safe.  
  
Back-patch as far as 8.3.  8.2 doesn't have the recursive call in  
CheckAttributeType in the first place, so I see no need to add code there  
in the absence of clear evidence of a problem elsewhere.  

M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/include/catalog/heap.h
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql

commit   : 5c22c0eda14594b5962aed7165a012067b33ab7d    
  
author   : Bruce Momjian <bruce@momjian.us>    
date     : Mon, 28 Mar 2011 14:50:08 -0400    
  
committer: Bruce Momjian <bruce@momjian.us>    
date     : Mon, 28 Mar 2011 14:50:08 -0400    

Click here for diff

We already had links to the GUC variables that control it.  

M doc/src/sgml/release-9.1.sgml

commit   : 7c7fd882a5275bf40cd5ac72c6118916f7802aa4    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Mon, 28 Mar 2011 09:42:09 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Mon, 28 Mar 2011 09:42:09 -0400    

Click here for diff

Unlike <xref>, this actually works.  

M doc/src/sgml/release-9.1.sgml

Add missing #include

commit   : e5948e3504c72fb2b8b32af26bfbb016e7c71bf6    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Sat, 26 Mar 2011 00:09:17 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Sat, 26 Mar 2011 00:09:17 -0300    

Click here for diff

M contrib/sepgsql/sepgsql.h

commit   : a720c28f0af3185f7d40788a78867a36bff36bc7    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 28 Mar 2011 09:34:56 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Mon, 28 Mar 2011 09:34:56 -0400    

Click here for diff

M doc/src/sgml/release-9.1.sgml

Typo fix in SSI docs.

commit   : 20a1159fccd2c4580e5e1c9782cb98f95c40648a    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 27 Mar 2011 21:35:15 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 27 Mar 2011 21:35:15 -0400    

Click here for diff

Kevin Grittner  

M doc/src/sgml/mvcc.sgml

Correct "characters" to "bytes" in createdb docs.

commit   : de32982242416ca0c78f8e8de4e4cd44af170bda    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sun, 27 Mar 2011 21:28:15 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sun, 27 Mar 2011 21:28:15 -0400    

Click here for diff

Susanne Ebrecht  

M doc/src/sgml/start.sgml

fix up a couple non-prototypes of the form foo() to be foo(void) -- found using -Wstrict-prototypes

commit   : 7b66e2c086b1a24d8adad52842725db8c0499e02    
  
author   : Greg Stark <stark@mit.edu>    
date     : Sun, 27 Mar 2011 21:31:41 +0100    
  
committer: Greg Stark <stark@mit.edu>    
date     : Sun, 27 Mar 2011 21:31:41 +0100    

Click here for diff

M src/bin/pg_basebackup/pg_basebackup.c
M src/interfaces/ecpg/include/ecpglib.h

Fix check_exclusion_constraint() to insert correct collations in ScanKeys.

commit   : d0dd5c73527d4adc11211bd6ad43e3be121842f9    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 27 Mar 2011 13:29:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 27 Mar 2011 13:29:52 -0400    

Click here for diff

M src/backend/executor/execUtils.c

Fix plpgsql to release SPI plans when a function or DO block is freed.

commit   : 87f2ad1326bff5cd37dde6fbf024137a2243efea    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 27 Mar 2011 12:51:04 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sun, 27 Mar 2011 12:51:04 -0400    

Click here for diff

This fixes the gripe I made a few months ago about DO blocks getting  
slower with repeated use.  At least, it fixes it for the case where  
the DO block isn't aborted by an error.  We could try running  
plpgsql_free_function_memory() even during error exit, but that seems  
a bit scary since it makes a lot of presumptions about the data  
structures being in good shape.  It's probably reasonable to assume  
that repeated failures of DO blocks isn't a performance-critical case.  

M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpgsql/src/plpgsql.h

Remove disclaimer stating that fsync=off slows down sync rep.

commit   : de592e2669380d5f95766d2bbe583558772fb6ce    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sat, 26 Mar 2011 21:18:53 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sat, 26 Mar 2011 21:18:53 -0400    

Click here for diff

The underlying problem that caused this phenomenon was fixed by commit  
92f4786fa9b730fd12cbfe973eb96addc6e98924.  

M doc/src/sgml/high-availability.sgml

Update release notes for latest commits.

commit   : ab1ef8e4448d276d65ecd02bebc03c03854c7200    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Sat, 26 Mar 2011 21:11:15 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Sat, 26 Mar 2011 21:11:15 -0400    

Click here for diff

In addition, correct the entry for pg_object_description, and some other  
minor cleanup.  

M doc/src/sgml/release-9.1.sgml

Clean up cruft around collation initialization for tupdescs and scankeys.

commit   : 7208fae18f1fdb242b4fcced77a3b836e15ac3ec    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 18:28:40 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 18:28:40 -0400    

Click here for diff

I found actual bugs in GiST and plpgsql; the rest of this is cosmetic  
but meant to decrease the odds of future bugs of omission.  

M src/backend/access/common/scankey.c
M src/backend/access/common/tupdesc.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gist/gistscan.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/sort/tuplesort.c
M src/include/access/skey.h
M src/pl/plpgsql/src/pl_comp.c

More collations cleanup, from trawling for missed collation assignments.

commit   : 0c9d9e8dd655fff7bcfc401e82838b8c20c16939    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 16:35:25 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 16:35:25 -0400    

Click here for diff

Mostly cosmetic, though I did find that generateClonedIndexStmt failed  
to clone the index's collations.  

M src/backend/bootstrap/bootparse.y
M src/backend/nodes/nodeFuncs.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_utilcmd.c
M src/include/nodes/parsenodes.h
M src/include/nodes/plannodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/relation.h

Clean up a few failures to set collation fields in expression nodes.

commit   : b23c9fa9293c54a3829093d207be37a7b42cb630    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 14:25:48 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Sat, 26 Mar 2011 14:25:48 -0400    

Click here for diff

I'm not sure these have any non-cosmetic implications, but I'm not sure  
they don't, either.  In particular, ensure the CaseTestExpr generated  
by transformAssignmentIndirection to represent the base target column  
carries the correct collation, because parse_collate.c won't fix that.  
Tweak lsyscache.c API so that we can get the appropriate collation  
without an extra syscache lookup.  

M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/predtest.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_target.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/lsyscache.c
M src/include/utils/lsyscache.h

commit   : 92f4786fa9b730fd12cbfe973eb96addc6e98924    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Sat, 26 Mar 2011 10:09:37 +0000    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Sat, 26 Mar 2011 10:09:37 +0000    

Click here for diff

M src/backend/replication/syncrep.c

Pass collation to makeConst() instead of looking it up internally.

commit   : bfa4440ca5d948c4d4f0ab5bb82d433200c35288    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 20:10:42 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 20:10:42 -0400    

Click here for diff

In nearly all cases, the caller already knows the correct collation, and  
in a number of places, the value the caller has handy is more correct than  
the default for the type would be.  (In particular, this patch makes it  
significantly less likely that eval_const_expressions will result in  
changing the exposed collation of an expression.)  So an internal lookup  
is both expensive and wrong.  

M src/backend/commands/tablecmds.c
M src/backend/executor/execQual.c
M src/backend/executor/functions.c
M src/backend/nodes/makefuncs.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteManip.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/cache/lsyscache.c
M src/include/nodes/makefuncs.h

Fix failure to propagate collation in negate_clause().

commit   : c8e993503d0f1a0cb8f187a136fb64cead9ba591    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 18:44:47 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 18:44:47 -0400    

Click here for diff

Turns out it was this, and not so much plpgsql, that was at fault in Stefan  
Huehner's collation-error-in-a-trigger bug report of a couple weeks ago.  

M src/backend/optimizer/prep/prepqual.c

Document collation handling in SQL and plpgsql functions.

commit   : 9b19c12e1d930a237817dd432100388990ec082a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 18:21:25 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 18:21:25 -0400    

Click here for diff

This is pretty minimal but covers the bare facts.  

M doc/src/sgml/charset.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/xfunc.sgml

Fix collation handling in plpgsql functions.

commit   : a4425e3200f2c2578bdf94bb6234169115746c9f    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 15:06:36 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Fri, 25 Mar 2011 15:06:36 -0400    

Click here for diff

Make plpgsql treat the input collation as a polymorphism variable, so  
that we cache separate plans for each input collation that's used in a  
particular session, as per recent discussion.  Propagate the input  
collation to all collatable input parameters.  
  
I chose to also propagate the input collation to all declared variables of  
collatable types, which is a bit more debatable but seems to be necessary  
for non-astonishing behavior.  (Copying a parameter into a separate local  
variable shouldn't result in a change of behavior, for example.)  There is  
enough infrastructure here to support declaring a collation for each local  
variable to override that default, but I thought we should wait to see what  
the field demand is before adding such a feature.  
  
In passing, remove exec_get_rec_fieldtype(), which wasn't used anywhere.  
  
Documentation patch to follow.  

M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

Remove alpha release notes.

commit   : f6f0916dbdf9f2dc6bcdc550d8b3843739cdc304    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 25 Mar 2011 11:52:11 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 25 Mar 2011 11:52:11 -0400    

Click here for diff

Temporarily move some of the alpha release note disclaimers into the regular  
release notes, for the sake of alpha5.  

M doc/src/sgml/release-9.1.sgml

Make walreceiver send a reply after receiving data but before flushing it.

commit   : 30f6136f28a6bf9eedcbf41038d5b021169bc0b9    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Fri, 25 Mar 2011 11:23:39 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Fri, 25 Mar 2011 11:23:39 -0400    

Click here for diff

It originally worked this way, but was changed by commit  
a8a8a3e0965201df88bdfdff08f50e5c06c552b7, since which time it's been impossible  
for walreceiver to ever send a reply with write_location and flush_location  
set to different values.  

M src/backend/replication/walreceiver.c

Fix broken markup, and remove tabs

commit   : 01dd34d55ad53117c2d756da7f65b6fa07a303aa    
  
author   : Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 25 Mar 2011 12:20:14 -0300    
  
committer: Alvaro Herrera <alvherre@alvh.no-ip.org>    
date     : Fri, 25 Mar 2011 12:20:14 -0300    

Click here for diff

M doc/src/sgml/ref/ecpg-ref.sgml

Documented some ecpg command line options that were missing:

commit   : 71ac48fd9cebd3d2a873635a04df64096c981f73    
  
author   : Michael Meskes <meskes@postgresql.org>    
date     : Thu, 24 Mar 2011 22:18:11 +0100    
  
committer: Michael Meskes <meskes@postgresql.org>    
date     : Thu, 24 Mar 2011 22:18:11 +0100    

Click here for diff

-r no_indicator  
-r prepare  
-r questionsmarks  

M doc/src/sgml/ref/ecpg-ref.sgml

Fix handling of collation in SQL-language functions.

commit   : 27dc7e240bfd230ee1315cc00577a6ed72aff94a    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 24 Mar 2011 20:30:14 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 24 Mar 2011 20:30:14 -0400    

Click here for diff

Ensure that parameter symbols receive collation from the function's  
resolved input collation, and fix inlining to behave properly.  
  
BTW, this commit lays about 90% of the infrastructure needed to support  
use of argument names in SQL functions.  Parsing of parameters is now  
done via the parser-hook infrastructure ... we'd just need to supply  
a column-ref hook ...  

M src/backend/catalog/pg_proc.c
M src/backend/executor/functions.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_param.c
M src/include/executor/functions.h
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/sql/collate.linux.utf8.sql

Add post-creation hook for extensions, consistent with other object types.

commit   : a432e2783bb69fb68461ed2bcc460e2876fcc68d    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 24 Mar 2011 18:44:49 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 24 Mar 2011 18:44:49 -0400    

Click here for diff

KaiGai Kohei  

M src/backend/commands/extension.c

Edits to 9.1 release notes.

commit   : 7b630e7b8e4faec13af2ce934b8bb33d9a1c8e06    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Thu, 24 Mar 2011 16:57:12 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Thu, 24 Mar 2011 16:57:12 -0400    

Click here for diff

Add some new items and some additional details to existing items, mostly  
by cribbing from the 9.1alpha notes.  Some additional clarifications and  
corrections elsewhere, and a few typo fixes.  

M doc/src/sgml/release-9.1.sgml

Clean up handling of COLLATE clauses in index column definitions.

commit   : 3bba9ce945a702ab116fcedb9c0b970ecd69c9dd    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 24 Mar 2011 15:29:52 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Thu, 24 Mar 2011 15:29:52 -0400    

Click here for diff

Ensure that COLLATE at the top level of an index expression is treated the  
same as a grammatically separate COLLATE.  Fix bogus reverse-parsing logic  
in pg_get_indexdef.  

M src/backend/commands/indexcmds.c
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.linux.utf8.sql
M src/test/regress/sql/collate.sql

Improve user-defined-aggregates documentation.

commit   : 472671e133da77f280e87cb47c6544c75572df6b    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 23 Mar 2011 16:56:55 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 23 Mar 2011 16:56:55 -0400    

Click here for diff

On closer inspection, that two-element initcond value seems to have been  
a little white lie to avoid explaining the full behavior of float8_accum.  
But if people are going to expect the examples to be exactly correct,  
I suppose we'd better explain.  Per comment from Thom Brown.  

M doc/src/sgml/xaggr.sgml

Minor changes to recovery pause behaviour. Change location LOG message so it works each time we pause, not just for final pause. Ensure that we pause only if we are in Hot Standby and can connect to allow us to run resume function. This change supercedes the code to override parameter recoveryPauseAtTarget to false if not attempting to enter Hot Standby, which is now removed.

commit   : b5f2f2a712e56fe1edf7d5665c07ee97be464c0b    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Wed, 23 Mar 2011 19:35:53 +0000    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Wed, 23 Mar 2011 19:35:53 +0000    

Click here for diff

M src/backend/access/transam/xlog.c

Fix ancient typo in user-defined-aggregates documentation.

commit   : ba7d020d9d6edba872173f8640ca240e00ae7070    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 23 Mar 2011 12:33:14 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Wed, 23 Mar 2011 12:33:14 -0400    

Click here for diff

The description of the initcond value for the built-in avg(float8)  
aggregate has been wrong since it was written.  Noted by Disc Magnet.  

M doc/src/sgml/xaggr.sgml

Remove synchronous_replication/max_wal_senders cross-check.

commit   : 19584ec659678841ea3036336f960acbdae962a0    
  
author   : Robert Haas <rhaas@postgresql.org>    
date     : Wed, 23 Mar 2011 11:44:27 -0400    
  
committer: Robert Haas <rhaas@postgresql.org>    
date     : Wed, 23 Mar 2011 11:44:27 -0400    

Click here for diff

This is no longer necessary, and might result in a situation where the  
configuration file is reloaded (and everything seems OK) but a subsequent  
restart of the database fails.  
  
Per an observation from Fujii Masao.  

M src/backend/postmaster/postmaster.c

Prevent intermittent hang in recovery from bgwriter interaction. Startup process waited for cleanup lock but when hot_standby = off the pid was not registered, so that the bgwriter would not wake the waiting process as intended.

commit   : b98ac467f5d35970edade4ad65c767fc89059026    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Wed, 23 Mar 2011 13:30:05 +0000    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Wed, 23 Mar 2011 13:30:05 +0000    

Click here for diff

M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/standby.c

Cosmetic capitalization fix

commit   : 856a23018c976794655d6f53b72fb692178fbb27    
  
author   : Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 22 Mar 2011 17:44:38 +0200    
  
committer: Peter Eisentraut <peter_e@gmx.net>    
date     : Tue, 22 Mar 2011 17:44:38 +0200    

Click here for diff

M doc/src/sgml/plpython.sgml

Make FKs valid at creation when added as column constraints.

commit   : ec497a5ad6a0849efa3fb2fd05988bd8e0c0865d    
  
author   : Simon Riggs <simon@2ndQuadrant.com>    
date     : Tue, 22 Mar 2011 23:10:35 +0000    
  
committer: Simon Riggs <simon@2ndQuadrant.com>    
date     : Tue, 22 Mar 2011 23:10:35 +0000    

Click here for diff

Bug report from Alvaro Herrera  

M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/include/nodes/parsenodes.h

Make initdb ignore locales for client-only encodings.

commit   : 5d1d679dbf780694673529bd864ca1e258ae50d5    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 17:20:50 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 17:20:50 -0400    

Click here for diff

While putting such entries into pg_collation is harmless (since backends  
will ignore entries that don't match the database encoding), it's also  
useless.  

M src/bin/initdb/initdb.c

Improve reporting of run-time-detected indeterminate-collation errors.

commit   : 6e197cb2e537880f36828a6c55d0f6df5bf7daa8    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 16:55:32 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 16:55:32 -0400    

Click here for diff

pg_newlocale_from_collation does not have enough context to give an error  
message that's even a little bit useful, so move the responsibility for  
complaining up to its callers.  Also, reword ERRCODE_INDETERMINATE_COLLATION  
error messages in a less jargony, more message-style-guide-compliant  
fashion.  

M src/backend/commands/collationcmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/view.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/collate.linux.utf8.out
M src/test/regress/expected/collate.out

Throw error for indeterminate collation of an ORDER/GROUP/DISTINCT target.

commit   : 37d6d07dda28a5dffcad6ff195ab2c83aaebcc9e    
  
author   : Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 15:58:03 -0400    
  
committer: Tom Lane <tgl@sss.pgh.pa.us>    
date     : Tue, 22 Mar 2011 15:58:03 -0400