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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Backpatch to 9.1 and 9.0.
Submitted by Anton Yuzhaninov, confirmed by Robert Haas
M doc/src/sgml/runtime.sgml
Add documentation link to strftime supported options.
commit : 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
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
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
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
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
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
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
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
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
">" 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
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
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
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
M src/interfaces/ecpg/ecpglib/execute.c
Fix MinGW build, broken by my previous patch to add a setlocale() wrapper on Windows. ecpglib doesn't link with libpgport, but picks and compiles the .c files it needs individually. To cope with that, move the setlocale() wrapper from chklocale.c to a separate setlocale.c file, and include that in ecpglib.
commit : 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can
make building a large tidbitmap into an O(N^2) operation. To fix, make
sure we remove more than the minimum amount of information per call, and
add a fallback path to behave sanely if we're unable to fit the bitmap
within the requested amount of memory.
This has been wrong since the tidbitmap code was written, so back-patch
to all supported branches.
M src/backend/nodes/tidbitmap.c
Fix contrib/sepgsql and contrib/xml2 to always link required libraries.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Back-patch assorted latch-related fixes.
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
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
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
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
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
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
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
Rename "Example" sections to "Examples" in dblink chapter
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
They were wildly outdated.
D doc/README.mb.big5
D doc/README.mb.jp
Mark collation-related information schema columns as not implemented rather than not applicable. They have already been implemented in 9.2.
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
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
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
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
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
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
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
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Update examples for string-related functions.
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
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
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
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
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
M contrib/pg_upgrade/file.c
Reclassify replication-related GUC variables as "master" and "standby".
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
As noted by Christian Ullrich.
M doc/src/sgml/client-auth.sgml
Async dblink functions require a named connection, and therefore should use DBLINK_GET_NAMED_CONN rather than DBLINK_GET_CONN. Problem found by Peter Eisentraut and patch by Fujii Masao.
commit : 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
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
Explain that querying pg_locks does not simultaneously lock both the
normal lock manager and the predicate lock manager.
Per discussion with Kevin Grittner.
M doc/src/sgml/catalogs.sgml
In pg_upgrade docs, clarify that link mode uses "hard" links.
commit : 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
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
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
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
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
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
Per bug #6073 from Hartmut Raschick.
M src/backend/replication/Makefile
Fix symlink for errcodes.h so it works in VPATH builds from tarballs.
commit : 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
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
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
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
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
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
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
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
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
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
Also be more careful about markup: use & not just &.
M doc/src/sgml/backup.sgml
Fix thinko in previous patch for optimizing EXISTS-within-EXISTS.
commit : 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This has always been true, it was just never documented.
M doc/src/sgml/ref/psql-ref.sgml
In pg_upgrade, document that link mode has to have data directories on the same file system, and that authentication should lock out normal users.
commit : 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
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
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
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
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
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
... 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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
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
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
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
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
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
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
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
"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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
... 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
... 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
The row-version chaining in Serializable Snapshot Isolation was still wrong. On further analysis, it turns out that it is not needed to duplicate predicate locks to the new row version at update, the lock on the version that the transaction saw as visible is enough. However, there was a different bug in the code that checks for dangerous structures when a new rw-conflict happens. Fix that bug, and remove all the row-version chaining related code.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
M contrib/pg_upgrade/server.c
Add xreflabels to /contrib manuals so links appear correct. Also update README.links to explain xref properly.
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
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
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
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
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
Add comment about memory reordering to PredicateLockTupleRowVersionLink.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Tabs replaced by spaces.
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
Link some tables into the surrounding text by their id
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
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
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
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
David Fetter
M doc/src/sgml/func.sgml
Fix pull_up_sublinks' failure to handle nested pull-up opportunities.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Fix SSI-related assertion failure.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
... 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 add