Stamp 9.1.2.
commit : cfd8cf37d20be715e4bb9e382844c79556516824
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:47:20 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:47:20 -0500
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
M src/interfaces/libpq/libpq.rc.in
M src/port/win32ver.rc
Clarify documentation about SQL:2008 variant of LIMIT/OFFSET syntax.
commit : 92b9e439e7f0bc54e291e12f5216fb09a72f5b04
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:39:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 16:39:02 -0500
The point that you need parentheses for non-constant expressions apparently
needs to be brought out a bit more clearly, per bug #6315.
M doc/src/sgml/ref/select.sgml
Translation updates
commit : a03c47c29ef4b7ebac82c201ecd33281ad4f4611
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Dec 2011 23:03:05 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 1 Dec 2011 23:03:05 +0200
M src/backend/po/de.po
M src/backend/po/pl.po
M src/backend/po/pt_BR.po
M src/bin/initdb/po/pl.po
M src/bin/initdb/po/ro.po
M src/bin/pg_basebackup/po/pl.po
M src/bin/pg_config/po/pl.po
M src/bin/pg_controldata/po/pl.po
M src/bin/pg_ctl/po/pl.po
M src/bin/pg_dump/po/de.po
M src/bin/pg_dump/po/pl.po
M src/bin/pg_dump/po/pt_BR.po
M src/bin/pg_resetxlog/po/pl.po
M src/bin/psql/po/de.po
M src/bin/psql/po/pl.po
M src/bin/psql/po/pt_BR.po
M src/bin/scripts/po/pl.po
M src/interfaces/ecpg/ecpglib/po/pl.po
M src/interfaces/ecpg/preproc/po/pl.po
M src/interfaces/libpq/po/pl.po
M src/pl/plperl/po/de.po
M src/pl/plperl/po/pl.po
M src/pl/plperl/po/pt_BR.po
M src/pl/plperl/po/ro.po
M src/pl/plpgsql/src/po/pl.po
M src/pl/plpgsql/src/po/ro.po
M src/pl/plpython/po/pl.po
M src/pl/plpython/po/ro.po
M src/pl/tcl/po/pl.po
Fix getTypeIOParam to support type record[].
commit : ac3dcca22e967ac4a899c4534b4b1c8e807ff71e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 12:44:22 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 1 Dec 2011 12:44:22 -0500
Since record[] uses array_in, it needs to have its element type passed
as typioparam. In HEAD and 9.1, this fix essentially reverts commit
9bc933b2125a5358722490acbc50889887bf7680, which was a hack that is no
longer needed since domains don't set their typelem anymore. Before
that, adjust the logic so that only domains are excluded from being
treated like arrays, rather than assuming that only base types should
be included. Add a regression test to demonstrate the need for this.
Per report from Maxim Boguk.
Back-patch to 8.4, where type record[] was added.
M src/backend/utils/cache/lsyscache.c
M src/test/regress/expected/polymorphism.out
M src/test/regress/sql/polymorphism.sql
Update information about configuring SysV IPC parameters on NetBSD.
commit : 0f90fb90c337afd2cb9a41af51660367a1e85743
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 20:55:04 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 20:55:04 -0500
Per Emmanuel Kasper, sysctl works fine as of NetBSD 5.0.
M doc/src/sgml/runtime.sgml
Draft release notes for 9.1.2, 9.0.6, 8.4.10, 8.3.17, 8.2.23.
commit : 2cbe4f4c9e38297adddfc22e18377f37aa138f24
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 19:34:52 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 19:34:52 -0500
M doc/src/sgml/release-8.2.sgml
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
Update time zone data files to tzdata release 2011n.
commit : 6f04dbee4b53173a863b72c2a18b78bdc5919eff
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 11:48:05 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 11:48:05 -0500
DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, Samoa.
Historical corrections for Alaska and British East Africa.
M src/timezone/data/africa
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/backward
M src/timezone/data/europe
M src/timezone/data/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab
Tweak previous patch to ensure edata->filename always gets initialized.
commit : b2b1220dee279e9981bf8bf0e1e01e65bffe373c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 00:37:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 30 Nov 2011 00:37:14 -0500
On a platform that isn't supplying __FILE__, previous coding would either
crash or give a stale result for the filename string. Not sure how likely
that is, but the original code catered for it, so let's keep doing so.
M src/backend/utils/error/elog.c
Strip file names reported in error messages in vpath builds
commit : 81a50686b884632d2e8b18ecb4c70ea2f39178d6
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 22:04:59 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 22:04:59 +0200
In vpath builds, the __FILE__ macro that is used in verbose error
reports contains the full absolute file name, which makes the error
messages excessively verbose. So keep only the base name, thus
matching the behavior of non-vpath builds.
M src/backend/utils/error/elog.c
Prevent autovacuum transactions from running in serializable mode.
commit : 2767158978796f4ce5cf39d28f29d32b66ee142e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 22:39:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 29 Nov 2011 22:39:16 -0500
Force the transaction isolation level to READ COMMITTED in autovacuum
worker and launcher processes. There is no benefit to using a higher
isolation level, and doing so could result in delaying foreground
transactions (or maybe even causing unnecessary serialization failures?).
Noted by Dan Ports.
Also, make sure we disable zero_damaged_pages and statement_timeout in
the autovac launcher, not only workers. Now that the launcher can run
transactions, these settings could affect its behavior, and it seems
like the same arguments apply to the launcher as the workers.
M src/backend/postmaster/autovacuum.c
pg_dump: Add gettext plural support to error message
commit : 10ff8f98a0df59d0ad5d162cd88a0c687c3a5920
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 19:49:02 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 29 Nov 2011 19:49:02 +0200
M src/bin/pg_dump/pg_dump.c
Disallow deletion of CurrentExtensionObject while running extension script.
commit : ec3e183ec51bb2d4032be6d5402ddc7b4c8acb71
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 19:12:17 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 19:12:17 -0500
While the deletion in itself wouldn't break things, any further creation
of objects in the script would result in dangling pg_depend entries being
added by recordDependencyOnCurrentExtension(). An example from Phil
Sorber convinced me that this is just barely likely enough to be worth
expending a couple lines of code to defend against. The resulting error
message might be confusing, but it's better than leaving corrupted catalog
contents for the user to deal with.
M src/backend/commands/extension.c
Remove erroneous claim about use of pg_locks.objid for advisory locks.
commit : 8ab9df0db196b6e1afa75838394eb27e9955e80e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 13:52:04 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 13:52:04 -0500
The correct information appears in the text, so just remove the statement
in the table, where it did not fit nicely anyway. (Curiously, the correct
info has been there much longer than the erroneous table entry.)
Resolves problem noted by Daniele Varrazzo.
In HEAD and 9.1, also do a bit of wordsmithing on other text on the page.
M doc/src/sgml/catalogs.sgml
Fix some bogosities in pg_dump's foreign-table support.
commit : 5c19c057dcdaef08b89e751f7e335cc1f6a1e21f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 12:51:47 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 28 Nov 2011 12:51:47 -0500
The server name for a foreign table was not quoted at need, as per report
from Ronan Dunklau. Also, queries related to FDW options were inadequately
schema-qualified in places where the search path isn't just pg_catalog, and
were inconsistently formatted everywhere, and we didn't always check that
we got the expected number of rows from them.
M src/bin/pg_dump/pg_dump.c
Ensure that whole-row junk Vars are always of composite type.
commit : 0702c86a13e6c644c32cf773af0a3a76e425ec50
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 22:27:32 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 27 Nov 2011 22:27:32 -0500
The EvalPlanQual machinery assumes that whole-row Vars generated for the
outputs of non-table RTEs will be of composite types. However, for the
case where the RTE is a function call returning a scalar type, we were
doing the wrong thing, as a result of sharing code with a parser case
where the function's scalar output is wanted. (Or at least, that's what
that case has done historically; it does seem a bit inconsistent.)
To fix, extend makeWholeRowVar's API so that it can support both use-cases.
This fixes Belinda Cussen's report of crashes during concurrent execution
of UPDATEs involving joins to the result of UNNEST() --- in READ COMMITTED
mode, we'd run the EvalPlanQual machinery after a conflicting row update
commits, and it was expecting to get a HeapTuple not a scalar datum from
the "wholerowN" variable referencing the function RTE.
Back-patch to 9.0 where the current EvalPlanQual implementation appeared.
In 9.1 and up, this patch also fixes failure to attach the correct
collation to the Var generated for a scalar-result case. An example:
regression=# select upper(x.*) from textcat('ab', 'cd') x;
ERROR: could not determine which collation to use for upper() function
M src/backend/nodes/makefuncs.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/parser/parse_expr.c
M src/backend/rewrite/rewriteHandler.c
M src/include/nodes/makefuncs.h
Fix MSVC builds broken by xsubpp change
commit : bcba9acf0d56d3fd5aa37c4ba6b24b6084032e58
author : Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 01:23:00 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sun, 27 Nov 2011 01:23:00 -0500
M src/tools/msvc/Mkvcbuild.pm
Use the right interpreter for encoding test.
commit : 9f42e5b3ecd91e0f3da278bec5d8255c1e913e62
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 18:40:54 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 18:40:54 -0500
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/sql/plperl.sql
Use the preferred version of xsubpp, not necessarily the one that came with the distro version of perl.
commit : 403372459efe4c938d6777e9c10cadc2811c835a
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 15:24:57 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 15:24:57 -0500
David Wheeler and Alex Hunsaker.
Backpatch to 9.1 where it applies cleanly. A simple workaround is available for earlier
branches, and further effort doesn't seem warranted.
M src/pl/plperl/GNUmakefile
M src/tools/msvc/Mkvcbuild.pm
Fix overly-aggressive and inconsistent quoting in OS X start script.
commit : 19d88c9f82b9a2b0e8497ec16b636dc7fdb46dfb
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 13:01:02 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 26 Nov 2011 13:01:02 -0500
Sidar Lopez, per bug #6310, with some additional improvements by me.
Back-patch to 9.0, where the issue was introduced.
M contrib/start-scripts/osx/PostgreSQL
Ensure plperl strings are always correctly UTF8 encoded.
commit : e75d41f0c3e69fefe24a98514b897716d60a83dd
author : Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 12:16:27 -0500
committer: Andrew Dunstan <andrew@dunslane.net>
date : Sat, 26 Nov 2011 12:16:27 -0500
Amit Khandekar and Alex Hunsaker.
Backpatched to 9.1 where the problem first occurred.
M src/pl/plperl/GNUmakefile
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/plperl_helpers.h
M src/pl/plperl/sql/plperl.sql
Allow pg_upgrade to upgrade clusters that use exclusion contraints by fixing pg_dump to properly preserve such indexes.
commit : 6b5510e8d64f9c76b1c24c46537d5a83a3483778
author : Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 14:35:43 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Fri, 25 Nov 2011 14:35:43 -0500
Backpatch to 9.1 and 9.0 (where the bug was introduced).
M src/bin/pg_dump/pg_dump.c
Fix erroneous replay of GIN_UPDATE_META_PAGE WAL records.
commit : eacff260fd220e82ca13cab2ad61d3aeb6eed445
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 Nov 2011 13:58:59 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 25 Nov 2011 13:58:59 -0500
A simple thinko in ginRedoUpdateMetapage, namely failing to increment a
loop counter, led to inserting records into the last pending-list page in
the wrong order (the opposite of that intended). So far as I can tell,
this would not upset the code that eventually flushes pending items into
the main part of the GIN index. But it did break the code that searched
the pending list for matches, resulting in transient failure to find
matching entries during index lookups, as illustrated in bug #6307 from
Maksym Boguk.
Back-patch to 8.4 where the incorrect code was introduced.
M src/backend/access/gin/ginxlog.c
Preserve SQLSTATE when an SPI error is propagated through PL/python exception handler. This was a regression in 9.1, when the capability to catch specific SPI errors was added, so backpatch to 9.1.
commit : d2192a108c7b118d430f03cff0ff84861d5026e0
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 24 Nov 2011 17:18:43 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Thu, 24 Nov 2011 17:18:43 +0200
Mika Eloranta, with some editing by Jan UrbaĆski.
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/pl/plpython/plpython.c
M src/pl/plpython/sql/plpython_error.sql
Fix citext upgrade script to update derived copies of pg_type.typcollation.
commit : 94bdb198813b079467d7ed07c6f72ac896da7161
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 11:24:39 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 21 Nov 2011 11:24:39 -0500
If the existing citext type has not merely been created, but used in any
tables, then the upgrade script wasn't doing enough. We have to update
attcollation for each citext table column, and indcollation for each citext
index column, as well. Per report from Rudolf van der Leeden.
M contrib/citext/citext–unpackaged–1.0.sql
Avoid floating-point underflow while tracking buffer allocation rate.
commit : 590ceed6f21fd243a6caf7233d3b2ce01350ecb6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 19 Nov 2011 00:35:29 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 19 Nov 2011 00:35:29 -0500
When the system is idle for awhile after activity, the "smoothed_alloc"
state variable in BgBufferSync converges slowly to zero. With standard
IEEE float arithmetic this results in several iterations with denormalized
values, which causes kernel traps and annoying log messages on some
poorly-designed platforms. There's no real need to track such small values
of smoothed_alloc, so we can prevent the kernel traps by forcing it to zero
as soon as it's too small to be interesting for our purposes. This issue
is purely cosmetic, since the iterations don't happen fast enough for the
kernel traps to pose any meaningful performance problem, but still it seems
worth shutting up the log messages.
The kernel log messages were previously reported by a number of people,
but kudos to Greg Matthews for tracking down exactly where they were coming
from.
M src/backend/storage/buffer/bufmgr.c
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
commit : 663e27c405a0e6bfe7c4fd7e23dce67a46fb07e9
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:40:45 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:40:45 -0500
M contrib/pg_upgrade/file.c
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes crash on Windows.
commit : 379aa2f5a40c8f46911d9979f3222f8c5abc59b0
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:24:55 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 17 Nov 2011 13:24:55 -0500
Backpatched to 9.1.
Reported by Mark Dilger
M contrib/pg_upgrade/file.c
Applied Zoltan's patch to correctly align interval and timestamp data in ecpg's sqlda.
commit : 165fd3947a72eaa576c18db42fa653e17f962280
author : Michael Meskes <meskes@postgresql.org>
date : Thu, 17 Nov 2011 14:07:25 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Thu, 17 Nov 2011 14:07:25 +0100
M src/interfaces/ecpg/ecpglib/sqlda.c
Don't elide blank lines when accumulating psql command history.
commit : 43eeaefeea603b7ac0e98879c78da8640f71c86d
author : Robert Haas <rhaas@postgresql.org>
date : Tue, 15 Nov 2011 20:34:47 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Tue, 15 Nov 2011 20:34:47 -0500
This can change the meaning of queries, if the blank line happens to
occur in the middle of a quoted literal, as per complaint from Tomas Vondra.
Back-patch to all supported branches.
M src/bin/psql/input.c
Applied patch by Zoltan to fix copy&paste bug in ecpg's sqlda handling.
commit : 8fad10a57575c7ee376ec8eaee416ffab0de00a3
author : Michael Meskes <meskes@postgresql.org>
date : Sun, 13 Nov 2011 13:46:45 +0100
committer: Michael Meskes <meskes@postgresql.org>
date : Sun, 13 Nov 2011 13:46:45 +0100
M src/interfaces/ecpg/ecpglib/sqlda.c
In plpgsql, allow foreign tables to define row types.
commit : 37fb0170b74a0a4e1ebf19c7228330d941202841
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 Nov 2011 18:49:15 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 12 Nov 2011 18:49:15 -0500
This seems to have been just an oversight in previous foreign-table work.
A quick grep didn't turn up any other places where RELKIND_FOREIGN_TABLE
was obviously omitted.
One change noted by Alexander Soudakov, the other by me.
Back-patch to 9.1.
M src/pl/plpgsql/src/pl_comp.c
Throw nice error if server is too old to support psql's \ef or \sf command.
commit : 07d5205582daa0a2b1472404f7929536d702e947
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 18:36:55 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 18:36:55 -0500
Previously, you'd get "function pg_catalog.pg_get_functiondef(integer) does
not exist", which is at best rather unprofessional-looking. Back-patch
to 8.4 where \ef was introduced.
Josh Kupershmidt
M src/bin/psql/command.c
Correct documentation for trace_userlocks.
commit : 91e8cb61a576ee48e224da1303ef37edc9067cc6
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 18:00:34 -0500
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 10 Nov 2011 18:00:34 -0500
M doc/src/sgml/config.sgml
Avoid platform-dependent infinite loop in pg_dump.
commit : febda37fda469317f15b0acadfbdedab3d7dc793
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 16:08:23 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 10 Nov 2011 16:08:23 -0500
If malloc(0) returns NULL, the binary search in findSecLabels() will
probably go into an infinite loop when there are no security labels,
because NULL-1 is greater than NULL after wraparound.
(We've seen this pathology before ... I wonder whether there's a way to
detect the class of bugs automatically?)
Diagnosis and patch by Steve Singer, cosmetic adjustments by me
M src/bin/pg_dump/pg_dump.c
Fix server header file installation with vpath builds
commit : 37e66e75d8697de0fef74dad9cd9ae75845549b2
author : Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 Nov 2011 20:52:54 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Thu, 10 Nov 2011 20:52:54 +0200
Several server header files would not be installed in vpath builds
because they live in the build directory.
M src/include/Makefile
Document that PQexec() can handle a NULL res pointer just fine.
commit : 0b6a1e8a16842f307e34218c24993c7e67644e8c
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 10 Nov 2011 13:00:51 -0500
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 10 Nov 2011 13:00:51 -0500
Backpatch to 9.1.
Mark Hills
M doc/src/sgml/libpq.sgml
Only install the extension files for the current Python major version
commit : 7e2c42c74cf71fe884b741dd601da27c357057ff
author : Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 21:43:04 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Wed, 9 Nov 2011 21:43:04 +0200
M src/pl/plpython/Makefile
Fix random discrepancies between parallel_schedule and serial_schedule.
commit : 2e16d61ddb808dce3af75e897f2262132038b77e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 23:05:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 23:05:21 -0500
In particular, my previous patch expected the create_index test to run
before the inherit test; but this was only true in the serial schedule.
Rearrange this portion of the schedules to be more consistent.
Per buildfarm results.
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
Wrap appendrel member outputs in PlaceHolderVars in additional cases.
commit : 7097e6c4a48bc02155a9a52c570be67b30b30c9a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 21:14:28 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 8 Nov 2011 21:14:28 -0500
Add PlaceHolderVar wrappers as needed to make UNION ALL sub-select output
expressions appear non-constant and distinct from each other. This makes
the world safe for add_child_rel_equivalences to do what it does. Before,
it was possible for that function to add identical expressions to different
EquivalenceClasses, which logically should imply merging such ECs, which
would be wrong; or to improperly add a constant to an EquivalenceClass,
drastically changing its behavior. Per report from Teodor Sigaev.
The only currently known consequence of this bug is "MergeAppend child's
targetlist doesn't match MergeAppend" planner failures in 9.1 and later.
I am suspicious that there may be other failure modes that could affect
older release branches; but in the absence of any hard evidence, I'll
refrain from back-patching further than 9.1.
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/placeholder.c
M src/include/optimizer/placeholder.h
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Make DatumGetInetP() unpack inet datums with a 1-byte header, and add a new macro, DatumGetInetPP(), that does not. This brings these macros in line with other DatumGet*P() macros.
commit : b1c701c90922d828a9fa4335dd36ab2588bad3a6
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 22:39:43 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Tue, 8 Nov 2011 22:39:43 +0200
Backpatch to 8.3, where 1-byte header varlenas were introduced.
M src/backend/utils/adt/network.c
M src/include/utils/inet.h
-DLINUX_OOM_ADJ=0 should be in CPPFLAGS, not CFLAGS
commit : 97c3d4853b3b095e3dadf80156a89b231f51e784
author : Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 Nov 2011 06:49:50 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Tue, 8 Nov 2011 06:49:50 +0200
M doc/src/sgml/runtime.sgml
Fix assorted bugs in contrib/unaccent's configuration file parsing.
commit : 27864da6b1cf9fb3f29dc5abe1eba333cbc4ba77
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 7 Nov 2011 11:48:53 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 7 Nov 2011 11:48:53 -0500
Make it use t_isspace() to identify whitespace, rather than relying on
sscanf which is known to get it wrong on some platform/locale combinations.
Get rid of fixed-size buffers. Make it actually continue to parse the file
after ignoring a line with untranslatable characters, as was obviously
intended.
The first of these issues is per gripe from J Smith, though not exactly
either of his proposed patches.
M contrib/unaccent/unaccent.c
Don't assume that a tuple's header size is unchanged during toasting.
commit : 8bfc2b5a8018d155a6843660c7975bb45ac49d70
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 Nov 2011 23:23:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 4 Nov 2011 23:23:06 -0400
This assumption can be wrong when the toaster is passed a raw on-disk
tuple, because the tuple might pre-date an ALTER TABLE ADD COLUMN operation
that added columns without rewriting the table. In such a case the tuple's
natts value is smaller than what we expect from the tuple descriptor, and
so its t_hoff value could be smaller too. In fact, the tuple might not
have a null bitmap at all, and yet our current opinion of it is that it
contains some trailing nulls.
In such a situation, toast_insert_or_update did the wrong thing, because
to save a few lines of code it would use the old t_hoff value as the offset
where heap_fill_tuple should start filling data. This did not leave enough
room for the new nulls bitmap, with the result that the first few bytes of
data could be overwritten with null flag bits, as in a recent report from
Hubert Depesz Lubaczewski.
The particular case reported requires ALTER TABLE ADD COLUMN followed by
CREATE TABLE AS SELECT * FROM ... or INSERT ... SELECT * FROM ..., and
further requires that there be some out-of-line toasted fields in one of
the tuples to be copied; else we'll not reach the troublesome code.
The problem can only manifest in this form in 8.4 and later, because
before commit a77eaa6a95009a3441e0d475d1980259d45da072, CREATE TABLE AS or
INSERT/SELECT wouldn't result in raw disk tuples getting passed directly
to heap_insert --- there would always have been at least a junkfilter in
between, and that would reconstitute the tuple header with an up-to-date
t_natts and hence t_hoff. But I'm backpatching the tuptoaster change all
the way anyway, because I'm not convinced there are no older code paths
that present a similar risk.
M src/backend/access/heap/tuptoaster.c
Fix archive_command example
commit : 97d5b21c86345905426a2f0ddfca2e23340bb429
author : Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 22:01:35 +0200
committer: Peter Eisentraut <peter_e@gmx.net>
date : Fri, 4 Nov 2011 22:01:35 +0200
The given archive_command example didn't use %p or %f, which wouldn't
really work in practice.
M doc/src/sgml/backup.sgml
Fix bogus code in contrib/ tsearch dictionary examples.
commit : 92375ed2bdea82cd223244cf74dff532dc776405
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 19:17:52 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 19:17:52 -0400
Both dict_int and dict_xsyn were blithely assuming that whatever memory
palloc gives back will be pre-zeroed. This would typically work for
just about long enough to run their regression tests, and no longer :-(.
The pre-9.0 code in dict_xsyn was even lamer than that, as it would
happily give back a pointer to the result of palloc(0), encouraging
its caller to access off the end of memory. Again, this would just
barely fail to fail as long as memory contained nothing but zeroes.
Per a report from Rodrigo Hjort that code based on these examples
didn't work reliably.
M contrib/dict_int/dict_int.c
M contrib/dict_xsyn/dict_xsyn.c
Fix inline_set_returning_function() to allow multiple OUT parameters.
commit : 1819a375f117b8f98f6d4dd33bf53169e5e001ba
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 17:53:19 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 17:53:19 -0400
inline_set_returning_function failed to distinguish functions returning
generic RECORD (which require a column list in the RTE, as well as run-time
type checking) from those with multiple OUT parameters (which do not).
This prevented inlining from happening. Per complaint from Jay Levitt.
Back-patch to 8.4 where this capability was introduced.
M src/backend/optimizer/util/clauses.c
Fix handling of PlaceHolderVars in nestloop parameter management.
commit : e4e60e7b6125e77f679861ebf43cc6b9f9dbf16d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 00:51:06 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 3 Nov 2011 00:51:06 -0400
If we use a PlaceHolderVar from the outer relation in an inner indexscan,
we need to reference the PlaceHolderVar as such as the value to be passed
in from the outer relation. The previous code effectively tried to
reconstruct the PHV from its component expression, which doesn't work since
(a) the Vars therein aren't necessarily bubbled up far enough, and (b) it
would be the wrong semantics anyway because of the possibility that the PHV
is supposed to have gone to null at some point before the current join.
Point (a) led to "variable not found in subplan target list" planner
errors, but point (b) would have led to silently wrong answers.
Per report from Roger Niederland.
M src/backend/executor/nodeNestloop.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/include/nodes/plannodes.h
M src/include/nodes/relation.h
M src/include/optimizer/subselect.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Revert "Stop btree indexscans upon reaching nulls in either direction."
commit : 5cd7b682427d0e912b3ddf7f4910d52089e0df71
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 13:33:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 2 Nov 2011 13:33:10 -0400
This reverts commit 048fffed55ff1d6d346130e4a6b7be434e81e82c.
As pointed out by Naoya Anzai, we need to do more work to make that
idea handle end-of-index cases, and it is looking like too much risk
for a back-patch. So bug #6278 is only going to be fixed in HEAD.
M src/backend/access/nbtree/nbtutils.c
Derive oldestActiveXid at correct time for Hot Standby. There was a timing window between when oldestActiveXid was derived and when it should have been derived that only shows itself under heavy load. Move code around to ensure correct timing of derivation. No change to StartupSUBTRANS() code, which is where this failed.
commit : bf70bf4c7177bdd5c6644da65c0ccea47405d5f3
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:53:40 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:53:40 +0000
Bug report by Chris Redekop
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
M src/include/storage/procarray.h
M src/include/storage/standby.h
Start Hot Standby faster when initial snapshot is incomplete. If the initial snapshot had overflowed then we can start whenever the latest snapshot is empty, not overflowed or as we did already, start when the xmin on primary was higher than xmax of our starting snapshot, which proves we have full snapshot data.
commit : 93b915b3d1c1a325a6458f9553a37b89d244262b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:46:11 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:46:11 +0000
Bug report by Chris Redekop
M src/backend/storage/ipc/procarray.c
Fix timing of Startup CLOG and MultiXact during Hot Standby
commit : 9e5fe4d49227c5c5297410d54d6551a726814adc
author : Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:06:54 +0000
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Wed, 2 Nov 2011 08:06:54 +0000
Patch by me, bug report by Chris Redekop, analysis by Florian Pflug
M src/backend/access/transam/clog.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/xlog.c
M src/include/access/clog.h
Fix race condition with toast table access from a stale syscache entry.
commit : 5e4dd5f63ba2f4ac6f78c42f975b58e15291f64a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 19:48:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 1 Nov 2011 19:48:43 -0400
If a tuple in a syscache contains an out-of-line toasted field, and we
try to fetch that field shortly after some other transaction has committed
an update or deletion of the tuple, there is a race condition: vacuum
could come along and remove the toast tuples before we can fetch them.
This leads to transient failures like "missing chunk number 0 for toast
value NNNNN in pg_toast_2619", as seen in recent reports from Andrew
Hammond and Tim Uckun.
The design idea of syscache is that access to stale syscache entries
should be prevented by relation-level locks, but that fails for at least
two cases where toasted fields are possible: ANALYZE updates pg_statistic
rows without locking out sessions that might want to plan queries on the
same table, and CREATE OR REPLACE FUNCTION updates pg_proc rows without
any meaningful lock at all.
The least risky fix seems to be an idea that Heikki suggested when we
were dealing with a related problem back in August: forcibly detoast any
out-of-line fields before putting a tuple into syscache in the first place.
This avoids the problem because at the time we fetch the parent tuple from
the catalog, we should be holding an MVCC snapshot that will prevent
removal of the toast tuples, even if the parent tuple is outdated
immediately after we fetch it. (Note: I'm not convinced that this
statement holds true at every instant where we could be fetching a syscache
entry at all, but it does appear to hold true at the times where we could
fetch an entry that could have a toasted field. We will need to be a bit
wary of adding toast tables to low-level catalogs that don't have them
already.) An additional benefit is that subsequent uses of the syscache
entry should be faster, since they won't have to detoast the field.
Back-patch to all supported versions. The problem is significantly harder
to reproduce in pre-9.0 releases, because of their willingness to flush
every entry in a syscache whenever the underlying catalog is vacuumed
(cf CatalogCacheFlushRelation); but there is still a window for trouble.
M src/backend/access/heap/tuptoaster.c
M src/backend/utils/cache/catcache.c
M src/include/access/tuptoaster.h
Document that multiple LDAP servers can be specified
commit : 864c38c59e6c70f18f40881e47dd5f4466dba55f
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 1 Nov 2011 15:44:26 +0100
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 1 Nov 2011 15:44:26 +0100
M doc/src/sgml/client-auth.sgml
Stop btree indexscans upon reaching nulls in either direction.
commit : 048fffed55ff1d6d346130e4a6b7be434e81e82c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 31 Oct 2011 16:40:11 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 31 Oct 2011 16:40:11 -0400
The existing scan-direction-sensitive tests were overly complex, and
failed to stop the scan in cases where it's perfectly legitimate to do so.
Per bug #6278 from Maksym Boguk.
Back-patch to 8.3, which is as far back as the patch applies easily.
Doesn't seem worth sweating over a relatively minor performance issue in
8.2 at this late date. (But note that this was a performance regression
from 8.1 and before, so 8.2 is being left as an outlier.)
M src/backend/access/nbtree/nbtutils.c
Fix assorted bogosities in cash_in() and cash_out().
commit : 6cd309bf6acd6f4e3d5d6a62b969aef5abab202e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 29 Oct 2011 14:30:59 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 29 Oct 2011 14:30:59 -0400
cash_out failed to handle multiple-byte thousands separators, as per bug
#6277 from Alexander Law. In addition, cash_in didn't handle that either,
nor could it handle multiple-byte positive_sign. Both routines failed to
support multiple-byte mon_decimal_point, which I did not think was worth
changing, but at least now they check for the possibility and fall back to
using '.' rather than emitting invalid output. Also, make cash_in handle
trailing negative signs, which formerly it would reject. Since cash_out
generates trailing negative signs whenever the locale tells it to, this
last omission represents a fail-to-reload-dumped-data bug. IMO that
justifies patching this all the way back.
M src/backend/utils/adt/cash.c
Clarify that ORDER BY/FOR UPDATE can't malfunction at higher iso levels.
commit : af0cc0f42ddb79c842d3410f31b32de9477b71e3
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 12:02:04 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 12:02:04 -0400
Kevin Grittner
M doc/src/sgml/ref/select.sgml
Change "and and" to "and".
commit : e489c000d90d96b415f3309c0ba423a1584503bf
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 11:59:55 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 28 Oct 2011 11:59:55 -0400
Report by Vik Reykja, patch by Kevin Grittner.
M doc/src/sgml/mvcc.sgml
Update docs to point to the timezone library's new home at IANA.
commit : ce6fb7b8e1286796f0b808446a8a84b4102a891d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 23:09:10 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 27 Oct 2011 23:09:10 -0400
The recent unpleasantness with copyrights has accelerated a move that
was already in planning.
M src/timezone/README
Typo fixes.
commit : 8be47f79d3a7d7bdb4a8c60d3f6055f3bc43ee4c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 18:04:13 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 18:04:13 -0400
expect -> except, noted by Andrew Dunstan. Also, "cannot" seems more
readable here than "can not", per David Wheeler.
M doc/src/sgml/func.sgml
Change FK trigger creation order to better support self-referential FKs.
commit : 8a1689d38b01dc107744095ff16093f8fc357bfe
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:02:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 26 Oct 2011 13:02:35 -0400
When a foreign-key constraint references another column of the same table,
row updates will queue both the PK's ON UPDATE action and the FK's CHECK
action in the same event. The ON UPDATE action must execute first, else
the CHECK will check a non-final state of the row and possibly throw an
inappropriate error, as seen in bug #6268 from Roman Lytovchenko.
Now, the firing order of multiple triggers for the same event is determined
by the sort order of their pg_trigger.tgnames, and the auto-generated names
we use for FK triggers are "RI_ConstraintTrigger_NNNN" where NNNN is the
trigger OID. So most of the time the firing order is the same as creation
order, and so rearranging the creation order fixes it.
This patch will fail to fix the problem if the OID counter wraps around or
adds a decimal digit (eg, from 99999 to 100000) while we are creating the
triggers for an FK constraint. Given the small odds of that, and the low
usage of self-referential FKs, we'll live with that solution in the back
branches. A better fix is to change the auto-generated names for FK
triggers, but it seems unwise to do that in stable branches because there
may be client code that depends on the naming convention. We'll fix it
that way in HEAD in a separate patch.
Back-patch to all supported branches, since this bug has existed for a long
time.
M src/backend/commands/tablecmds.c
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Fix typo
commit : 4911a274579329f50bf0fbfa735aba367aed89bd
author : Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:46:14 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Tue, 25 Oct 2011 22:46:14 +0200
M doc/src/sgml/ref/pg_basebackup.sgml
Don't trust deferred-unique indexes for join removal.
commit : 18661c67e96ff4a81ab3844843a73676d161db0c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 00:43:45 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 23 Oct 2011 00:43:45 -0400
The uniqueness condition might fail to hold intra-transaction, and assuming
it does can give incorrect query results. Per report from Marti Raudsepp,
though this is not his proposed patch.
Back-patch to 9.0, where both these features were introduced. In the
released branches, add the new IndexOptInfo field to the end of the struct,
to try to minimize ABI breakage for third-party code that may be examining
that struct.
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/nodes/relation.h
Fix overly-complicated usage of errcode_for_file_access().
commit : 8e8ac0894b196c4dd8618bca1f598f13bf5e18ea
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 22 Oct 2011 20:16:05 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 22 Oct 2011 20:16:05 +0300
No need to do "errcode(errcode_for_file_access())", just
"errcode_for_file_access()" is enough. The extra errcode() call is useless
but harmless, so there's no user-visible bug here. Nevertheless, backpatch
to 9.1 where this code were added.
M src/backend/replication/basebackup.c
More cleanup after failed reduced-lock-levels-for-DDL feature.
commit : dff178f8017e4412d14f131e4c3b5f5b385c5598
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 13:49:58 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 21 Oct 2011 13:49:58 -0400
Turns out that use of ShareUpdateExclusiveLock or ShareRowExclusiveLock
to protect DDL changes had gotten copied into several places that were
not touched by either of Simon's original patches for the feature, and
thus neither he nor I thought to revert them. (Indeed, it appears that
two of these uses were committed *after* the reversion, which just goes
to show that git merging is no panacea.) Change these places to use
AccessExclusiveLock again. If we ever manage to resurrect that feature,
we're going to have to think a bit harder about how to keep lock level
usage in sync for DDL operations that aren't within the AlterTable
infrastructure.
Two of these bugs are only in HEAD, but one is in the 9.1 branch too.
Alvaro found one of them, I found the other two.
M src/backend/catalog/toasting.c
Fix DROP OPERATOR FAMILY IF EXISTS.
commit : 5c5138f2f8c7770e05036f991e7d29b8060d5218
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 09:10:46 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 21 Oct 2011 09:10:46 -0400
Essentially, the "IF EXISTS" portion was being ignored, and an error
thrown anyway if the opfamily did not exist.
I broke this in commit fd1843ff8979c0461fb3f1a9eab61140c977e32d; so
backpatch to 9.1.X.
Report and diagnosis by KaiGai Kohei.
M src/backend/commands/opclasscmds.c
Simplify and improve ProcessStandbyHSFeedbackMessage logic.
commit : d1d094e4cf7d80cb2b4f68b5e8ce11aa9ebcbf3c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 19:43:31 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 19:43:31 -0400
There's no need to clamp the standby's xmin to be greater than
GetOldestXmin's result; if there were any such need this logic would be
hopelessly inadequate anyway, because it fails to account for
within-database versus cluster-wide values of GetOldestXmin. So get rid of
that, and just rely on sanity-checking that the xmin is not wrapped around
relative to the nextXid counter. Also, don't reset the walsender's xmin if
the current feedback xmin is indeed out of range; that just creates more
problems than we already had. Lastly, don't bother to take the
ProcArrayLock; there's no need to do that to set xmin.
Also improve the comments about this in GetOldestXmin itself.
M src/backend/replication/walsender.c
M src/backend/storage/ipc/procarray.c
Fix memory leak in tab completion.
commit : 790fa1fdd8bb32e2e9055dd47d76c2382c51c84a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 15:44:21 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 20 Oct 2011 15:44:21 -0400
This was introduced in commit e49ad77ff958b380ea6fa08c72e2dce97ac56c6b.
Fixed in another, more future-proof way in HEAD.
M src/bin/psql/tab-complete.c
Document that postmaster.opts is excluded from base backups
commit : 13a867825a0aafb7f9b417cc4e52cd5d8988eabc
author : Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 00:19:43 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Wed, 19 Oct 2011 00:19:43 -0400
Fujii Masao
M doc/src/sgml/protocol.sgml
Fix pg_dump to dump casts between auto-generated types.
commit : 35d6ce97e78be24eca29226b3b67ca9a3a1384fd
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:11:01 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 18 Oct 2011 17:11:01 -0400
The heuristic for when to dump a cast failed for a cast between table
rowtypes, as reported by Frédéric Rejol. Fix it by setting
the "dump" flag for such a type the same way as the flag is set for the
underlying table or base type. This won't result in the auto-generated
type appearing in the output, since setting its objType to DO_DUMMY_TYPE
unconditionally suppresses that. But it will result in dumpCast doing what
was intended.
Back-patch to 8.3. The 8.2 code is rather different in this area, and it
doesn't seem worth any risk to fix a corner case that nobody has stumbled
on before.
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_dump.c
Exclude postmaster.opts from base backups
commit : 8c1501b292895bb883eaf6663934e9f7c45b043d
author : Magnus Hagander <magnus@hagander.net>
date : Sun, 16 Oct 2011 17:42:59 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sun, 16 Oct 2011 17:42:59 +0200
Noted by Fujii Masao
M src/backend/replication/basebackup.c
Fix collate.linux.utf8 expected output for recent error message change.
commit : 1004f4bb876d10857508a9ab65131f96e24a4658
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 16:07:44 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 16 Oct 2011 16:07:44 -0400
Noted by Jeff Davis.
M src/test/regress/expected/collate.linux.utf8.out
Fix bugs in information_schema.referential_constraints view.
commit : 0134608f60d5a7efa5a6a3b7306d75c6ac9add97
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 20:24:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 14 Oct 2011 20:24:22 -0400
This view was being insufficiently careful about matching the FK constraint
to the depended-on primary or unique key constraint. That could result in
failure to show an FK constraint at all, or showing it multiple times, or
claiming that it depended on a different constraint than the one it really
does. Fix by joining via pg_depend to ensure that we find only the correct
dependency.
Back-patch, but don't bump catversion because we can't force initdb in back
branches. The next minor-version release notes should explain that if you
need to fix this in an existing installation, you can drop the
information_schema schema then re-create it by sourcing
$SHAREDIR/information_schema.sql in each database (as a superuser of
course).
M src/backend/catalog/information_schema.sql
Fix up Perl-to-Postgres datatype conversions in pl/perl.
commit : 7c64c9f6b767b84597d69cfa2ae03d9a9655ec75
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 18:02:43 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 18:02:43 -0400
This patch restores the pre-9.1 behavior that pl/perl functions returning
VOID ignore the result value of their last Perl statement. 9.1.0
unintentionally threw an error if the last statement returned a reference,
as reported by Amit Khandekar.
Also, make sure it works to return a string value for a composite type,
so long as the string meets the type's input format. We already allowed
the equivalent behavior for arrays, so it seems inconsistent to not allow
it for composites.
In addition, ensure we throw errors for attempts to return arrays or hashes
when the function's declared result type is not an array or composite type,
respectively. Pre-9.1 versions rather uselessly returned strings like
ARRAY(0x221a9a0) or HASH(0x221aa90), while 9.1.0 threw an error for the
hash case and returned a garbage value for the array case.
Also, clean up assorted grotty coding in Perl array conversion, including
use of a session-lifespan memory context to accumulate the array value
(resulting in session-lifespan memory leak on error), failure to apply the
declared typmod if any, and failure to detect some cases of non-rectangular
multi-dimensional arrays.
Alex Hunsaker and Tom Lane
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/expected/plperl_array.out
M src/pl/plperl/plperl.c
M src/pl/plperl/sql/plperl.sql
M src/pl/plperl/sql/plperl_array.sql
Update documentation about ts_rank().
commit : a6c96534f0dee5c1faefadb5463c78a4d8c58660
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 14:17:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 13 Oct 2011 14:17:21 -0400
M doc/src/sgml/textsearch.sgml
Fix typo in dummy_seclabel documentation.
commit : eb0ae9700d9a0b7993250b6310c152975d498063
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 12:16:07 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 13 Oct 2011 12:16:07 -0400
dummy_label -> dummy_seclabel
Thom Brown
M doc/src/sgml/dummy-seclabel.sgml
Don't mark auto-generated types as extension members.
commit : e1e1b52c051fb2d554875455629d5ed20537dd62
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 18:40:09 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 18:40:09 -0400
Relation rowtypes and automatically-generated array types do not need to
have their own extension membership dependency entries. If we create such
then it becomes more difficult to remove items from an extension, and it's
also harder for an extension upgrade script to make sure it duplicates the
dependencies created by the extension's regular installation script.
I changed the code in such a way that this happened in commit
988cccc620dd8c16d77f88ede167b22056176324, I think because of worries about
the shell-type-replacement case; but that cure was worse than the disease.
It would only matter if one extension created a shell type that was
replaced with an auto-generated type in another extension, which seems
pretty far-fetched. Better to make this work unsurprisingly in normal
cases.
Report and patch by Robert Haas, comment adjustments by me.
M src/backend/catalog/pg_type.c
Throw a useful error message if an extension script file is fed to psql.
commit : dbd35a972fabba2ed723ac9ab4c4236ab2bd271d
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 15:45:03 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 15:45:03 -0400
We have seen one too many reports of people trying to use 9.1 extension
files in the old-fashioned way of sourcing them in psql. Not only does
that usually not work (due to failure to substitute for MODULE_PATHNAME
and/or @extschema@), but if it did work they'd get a collection of loose
objects not an extension. To prevent this, insert an \echo ... \quit
line that prints a suitable error message into each extension script file,
and teach commands/extension.c to ignore lines starting with \echo.
That should not only prevent any adverse consequences of loading a script
file the wrong way, but make it crystal clear to users that they need to
do it differently now.
Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1
... there is not going to be much value in this if we wait till 9.2.
M contrib/adminpack/adminpack–1.0.sql
M contrib/btree_gin/btree_gin–1.0.sql
M contrib/btree_gin/btree_gin–unpackaged–1.0.sql
M contrib/btree_gist/btree_gist–1.0.sql
M contrib/btree_gist/btree_gist–unpackaged–1.0.sql
M contrib/chkpass/chkpass–1.0.sql
M contrib/chkpass/chkpass–unpackaged–1.0.sql
M contrib/citext/citext–1.0.sql
M contrib/citext/citext–unpackaged–1.0.sql
M contrib/cube/cube–1.0.sql
M contrib/cube/cube–unpackaged–1.0.sql
M contrib/dblink/dblink–1.0.sql
M contrib/dblink/dblink–unpackaged–1.0.sql
M contrib/dict_int/dict_int–1.0.sql
M contrib/dict_int/dict_int–unpackaged–1.0.sql
M contrib/dict_xsyn/dict_xsyn–1.0.sql
M contrib/dict_xsyn/dict_xsyn–unpackaged–1.0.sql
M contrib/earthdistance/earthdistance–1.0.sql
M contrib/earthdistance/earthdistance–unpackaged–1.0.sql
M contrib/file_fdw/file_fdw–1.0.sql
M contrib/fuzzystrmatch/fuzzystrmatch–1.0.sql
M contrib/fuzzystrmatch/fuzzystrmatch–unpackaged–1.0.sql
M contrib/hstore/hstore–1.0.sql
M contrib/hstore/hstore–unpackaged–1.0.sql
M contrib/intagg/intagg–1.0.sql
M contrib/intagg/intagg–unpackaged–1.0.sql
M contrib/intarray/intarray–1.0.sql
M contrib/intarray/intarray–unpackaged–1.0.sql
M contrib/isn/isn–1.0.sql
M contrib/isn/isn–unpackaged–1.0.sql
M contrib/lo/lo–1.0.sql
M contrib/lo/lo–unpackaged–1.0.sql
M contrib/ltree/ltree–1.0.sql
M contrib/ltree/ltree–unpackaged–1.0.sql
M contrib/pageinspect/pageinspect–1.0.sql
M contrib/pageinspect/pageinspect–unpackaged–1.0.sql
M contrib/pg_buffercache/pg_buffercache–1.0.sql
M contrib/pg_buffercache/pg_buffercache–unpackaged–1.0.sql
M contrib/pg_freespacemap/pg_freespacemap–1.0.sql
M contrib/pg_freespacemap/pg_freespacemap–unpackaged–1.0.sql
M contrib/pg_stat_statements/pg_stat_statements–1.0.sql
M contrib/pg_stat_statements/pg_stat_statements–unpackaged–1.0.sql
M contrib/pg_trgm/pg_trgm–1.0.sql
M contrib/pg_trgm/pg_trgm–unpackaged–1.0.sql
M contrib/pgcrypto/pgcrypto–1.0.sql
M contrib/pgcrypto/pgcrypto–unpackaged–1.0.sql
M contrib/pgrowlocks/pgrowlocks–1.0.sql
M contrib/pgrowlocks/pgrowlocks–unpackaged–1.0.sql
M contrib/pgstattuple/pgstattuple–1.0.sql
M contrib/pgstattuple/pgstattuple–unpackaged–1.0.sql
M contrib/seg/seg–1.0.sql
M contrib/seg/seg–unpackaged–1.0.sql
M contrib/spi/autoinc–1.0.sql
M contrib/spi/autoinc–unpackaged–1.0.sql
M contrib/spi/insert_username–1.0.sql
M contrib/spi/insert_username–unpackaged–1.0.sql
M contrib/spi/moddatetime–1.0.sql
M contrib/spi/moddatetime–unpackaged–1.0.sql
M contrib/spi/refint–1.0.sql
M contrib/spi/refint–unpackaged–1.0.sql
M contrib/spi/timetravel–1.0.sql
M contrib/spi/timetravel–unpackaged–1.0.sql
M contrib/sslinfo/sslinfo–1.0.sql
M contrib/sslinfo/sslinfo–unpackaged–1.0.sql
M contrib/tablefunc/tablefunc–1.0.sql
M contrib/tablefunc/tablefunc–unpackaged–1.0.sql
M contrib/test_parser/test_parser–1.0.sql
M contrib/test_parser/test_parser–unpackaged–1.0.sql
M contrib/tsearch2/tsearch2–1.0.sql
M contrib/tsearch2/tsearch2–unpackaged–1.0.sql
M contrib/unaccent/unaccent–1.0.sql
M contrib/unaccent/unaccent–unpackaged–1.0.sql
M contrib/uuid-ossp/uuid-ossp–1.0.sql
M contrib/uuid-ossp/uuid-ossp–unpackaged–1.0.sql
M contrib/xml2/xml2–1.0.sql
M contrib/xml2/xml2–unpackaged–1.0.sql
M doc/src/sgml/extend.sgml
M src/backend/commands/extension.c
Modify up/home macro to match standard parameter list; fixes doc build.
commit : ecd9de637b165458832ecf3b541a0cb5fdca478e
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 14:05:00 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 14:05:00 -0400
M doc/src/sgml/stylesheet.dsl
Improve documentation of psql's \q command.
commit : 66a28adbc5e46e889a7d126d9a64497f6b492920
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 13:59:30 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 12 Oct 2011 13:59:30 -0400
The documentation neglected to explain its behavior in a script file
(it only ends execution of the script, not psql as a whole), and failed
to mention the long form \quit either.
M doc/src/sgml/ref/psql-ref.sgml
Add Up/Home link to the top of the HTML doc output.
commit : e0448c0c5173bcb24a1ec97daecac17aed78eb0c
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 11:24:15 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 12 Oct 2011 11:24:15 -0400
Backpatch to 9.0.X and 9.1.X.
M doc/src/sgml/stylesheet.dsl
Document that not backing up postmaster.pid and postmaster.opts might help prevent pg_ctl from getting confused.
commit : 35db9d0ab8a81470b2be62728105cfa36e26e56c
author : Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 17:33:21 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Tue, 11 Oct 2011 17:33:21 -0400
Backpatch to 9.1.
M doc/src/sgml/backup.sgml
Improve documentation of how to fiddle with SCSI drives on FreeBSD.
commit : 262d7f8bacfbbb01d05cab5b01d8a8422c38b9e3
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:21:35 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:21:35 -0400
Per suggestions from Achilleas Mantzios and Greg Smith.
M doc/src/sgml/wal.sgml
Fix typo in docs for libpq keepalives_count option.
commit : bc397244c80a0f60d14f0bb7286776afc5e039d8
author : Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:10:47 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Mon, 10 Oct 2011 13:10:47 -0400
Shigehiro Honda
M doc/src/sgml/libpq.sgml
Revert accidental change to pg_config_manual.h.
commit : a726951c51d89b6599e2dcbd0c20b7001d1dc2a4
author : Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 22:20:44 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Sun, 9 Oct 2011 22:20:44 -0400
This was broken in commit 53dbc27c62d8e1b6c5253feba04a5094cb8fe046, which
introduced unlogged tables. Fortunately, as debugging tools go, this one
is pretty cheap, which is probably why it took nine months for someone to
notice, but it's not intended to be enabled by default, so revert.
Noted by Fujii Masao.
M src/include/pg_config_manual.h
Don't let transform_null_equals=on affect CASE foo WHEN NULL ... constructs. transform_null_equals is only supposed to affect "foo = NULL" expressions given directly by the user, not the internal "foo = NULL" expression generated from CASE-WHEN.
commit : ad885e2677754c8adbfa847d20812ce6b7594eb6
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:17:40 +0300
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Sat, 8 Oct 2011 11:17:40 +0300
This fixes bug #6242, reported by Sergey. Backpatch to all supported
branches.
M src/backend/parser/parse_expr.c
Add missing space.
commit : 1ae092ae14b0eaf5a2d3ae8908d0edfd3cc39dd4
author : Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:48:38 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Fri, 7 Oct 2011 23:48:38 -0400
Dickson S. Guedes
M doc/src/sgml/func.sgml
Ensure walsenders can be SIGTERMed while in non-walsender code
commit : 5df22bba644d1c083118942292097ba2395fad15
author : Magnus Hagander <magnus@hagander.net>
date : Thu, 6 Oct 2011 21:43:14 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Thu, 6 Oct 2011 21:43:14 +0200
In oder to exit on SIGTERM when in non-walsender code,
such as do_pg_stop_backup(), we need to set the interrupt
variables that are used there, and not just the walsender
local ones.
M src/backend/replication/walsender.c
Make pgstatindex respond to cancel interrupts.
commit : 5308abfd89b080399f4050f720ffb8824c682e59
author : Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Oct 2011 12:08:59 -0400
committer: Robert Haas <rhaas@postgresql.org>
date : Thu, 6 Oct 2011 12:08:59 -0400
A similar problem for pgstattuple() was fixed in April of 2010 by commit
33065ef8bc52253ae855bc959576e52d8a28ba06, but pgstatindex() seems to have
been overlooked.
Back-patch all the way, as with that commit, though not to 7.4 through
8.1, since those are now EOL.
M contrib/pgstattuple/pgstatindex.c
Improve and simplify CREATE EXTENSION's management of GUC variables.
commit : 3d332c8f38ced56fc7e867cce1d2b1c85dc5c064
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Oct 2011 20:44:22 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 5 Oct 2011 20:44:22 -0400
CREATE EXTENSION needs to transiently set search_path, as well as
client_min_messages and log_min_messages. We were doing this by the
expedient of saving the current string value of each variable, doing a
SET LOCAL, and then doing another SET LOCAL with the previous value at
the end of the command. This is a bit expensive though, and it also fails
badly if there is anything funny about the existing search_path value,
as seen in a recent report from Roger Niederland. Fortunately, there's a
much better way, which is to piggyback on the GUC infrastructure previously
developed for functions with SET options. We just open a new GUC nesting
level, do our assignments with GUC_ACTION_SAVE, and then close the nesting
level when done. This automatically restores the prior settings without a
re-parsing pass, so (in principle anyway) there can't be an error. And
guc.c still takes care of cleanup in event of an error abort.
The CREATE EXTENSION code for this was modeled on some much older code in
ri_triggers.c, which I also changed to use the better method, even though
there wasn't really much risk of failure there. Also improve the comments
in guc.c to reflect this additional usage.
M src/backend/commands/extension.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Add sourcefile/sourceline data to EXEC_BACKEND GUC transmission files.
commit : 99576e01a18ba3558aac20ef1715f1627ec70939
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 17:00:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 4 Oct 2011 17:00:17 -0400
This oversight meant that on Windows, the pg_settings view would not
display source file or line number information for values coming from
postgresql.conf, unless the backend had received a SIGHUP since starting.
In passing, also make the error detection in read_nondefault_variables a
tad more thorough, and fix it to not lose precision on float GUCs (these
changes are already in HEAD as of my previous commit).
M src/backend/utils/misc/guc.c
ProcedureCreate neglected to record dependencies on default expressions.
commit : b733331d0fe0ecb36aa629f187876734da25ea80
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Oct 2011 12:13:15 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 3 Oct 2011 12:13:15 -0400
Thus, an object referenced in a default expression could be dropped while
the function remained present. This was unaccountably missed in the
original patch to add default parameters for functions. Reported by
Pavel Stehule.
M src/backend/catalog/pg_proc.c
Fix pg_upgrade for EXEC_BACKEND builds (e.g. Windows) by properly passing the -b/binary-upgrade flag.
commit : 96a263f885729aeaaedbe3f1ed8e3cc6f7cd1211
author : Bruce Momjian <bruce@momjian.us>
date : Thu, 29 Sep 2011 17:20:56 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Thu, 29 Sep 2011 17:20:56 -0400
Backpatch to 9.1.X.
M src/backend/postmaster/postmaster.c
Fix index matching for operators with mixed collatable/noncollatable inputs.
commit : 0c2c2495ad485ce5a94cdd1ace92721933392fe7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 00:43:42 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Thu, 29 Sep 2011 00:43:42 -0400
If an indexable operator for a non-collatable indexed datatype has a
collatable right-hand input type, any OpExpr for it will be marked with a
nonzero inputcollid (since having one collatable input is sufficient to
make that happen). However, an index on a non-collatable column certainly
doesn't have any collation. This caused us to fail to match such operators
to their indexes, because indxpath.c required an exact match of index
collation and clause collation. It seems correct to allow a match when the
index is collation-less regardless of the clause's inputcollid: an operator
with both noncollatable and collatable inputs could perhaps depend on the
collation of the collatable input, but it could hardly expect the index for
the noncollatable input to have that same collation.
Per bug #6232 from Pierre Ducroquet. His example is specifically about
"hstore ? text" but the problem seems quite generic.
M src/backend/optimizer/path/indxpath.c
In pg_upgrade, because toast table names can be mismatched with the heap oid on 8.4, modify the toast name comparison test to only apply to old 9.0+ servers. (The test was previously 8.4+.)
commit : 2e9633c3620d4cbaa44ae61180f73137d0c63ccf
author : Bruce Momjian <bruce@momjian.us>
date : Wed, 28 Sep 2011 22:53:44 -0400
committer: Bruce Momjian <bruce@momjian.us>
date : Wed, 28 Sep 2011 22:53:44 -0400
M contrib/pg_upgrade/info.c
Take sepgsql regression tests out of the regular regression test mechanism.
commit : 39be6957725bf4b9764a10cf368cc6ec8e21dec6
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Sep 2011 20:15:54 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Tue, 27 Sep 2011 20:15:54 -0400
Back-port the new "test_sepgsql" script into 9.1 to provide a substitute
test mechanism.
M contrib/sepgsql/Makefile
A contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
Fix window functions that sort by expressions involving aggregates.
commit : 1679e9feddc94bd7372a6829db92868e55ef7177
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 23:48:39 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 26 Sep 2011 23:48:39 -0400
In commit c1d9579dd8bf3c921ca6bc2b62c40da6d25372e5, I changed things so
that the output of the Agg node that feeds the window functions would not
list any ungrouped Vars directly. Formerly, for example, the Agg tlist
might have included both "x" and "sum(x)", which is not really valid if
"x" isn't a grouping column. If we then had a window function ordering on
something like "sum(x) + 1", prepare_sort_from_pathkeys would find no exact
match for this in the Agg tlist, and would conclude that it must recompute
the expression. But it would break the expression down to just the Var
"x", which it would find in the tlist, and then rebuild the ORDER BY
expression using a reference to the subplan's "x" output. Now, after the
above-referenced changes, "x" isn't in the Agg tlist if it's not a grouping
column, so that prepare_sort_from_pathkeys fails with "could not find
pathkey item to sort", as reported by Bricklen Anderson.
The fix is to not break down Aggrefs into their component parts, but just
treat them as irreducible expressions to be sought in the subplan tlist.
This is definitely OK for the use with respect to window functions in
grouping_planner, since it just built the tlist being used on the same
basis. AFAICT it is safe for other uses too; most of the other call sites
couldn't encounter Aggrefs anyway.
M src/backend/optimizer/plan/createplan.c
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql
Un-break compression of plain-text output format in pg_dump.
commit : be64ba6230d697bca724f9c4aaa9f071164364d1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 13:59:17 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 25 Sep 2011 13:59:17 -0400
pg_dump has historically understood -Z with no -F switch to mean that
it should emit a gzip-compressed version of its plain text output.
This got broken through a misunderstanding in the 9.1 patch that added
directory output format. Restore the former behavior.
Per complaint from Roger Niederland and diagnosis by Adrian Klaver.
M src/bin/pg_dump/pg_dump.c
Fix typo
commit : 3f75cecfbb419b733069dfde0d031fd24aa6e4e5
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:34:32 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:34:32 +0200
M doc/src/sgml/install-windows.sgml
Note that sslmode=require verifies the CA if root cert is present
commit : 2b250fb077a15790c6fc1e12b981330ed007e66d
author : Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:25:12 +0200
committer: Magnus Hagander <magnus@hagander.net>
date : Sat, 24 Sep 2011 14:25:12 +0200
This mode still exists for backwards compatibility, making
sslmode=require the same as sslmode=verify-ca when the file is present,
but not causing an error when it isn't.
Per bug 6189, reported by Srinivas Aji
M doc/src/sgml/libpq.sgml
Fix our mapping of Windows timezones for Central America.
commit : c7f144b643b82352fb7c3a3917a41f959ed01058
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 22:12:36 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Fri, 23 Sep 2011 22:12:36 -0400
We were mapping "Central America Standard Time" to "CST6CDT", which seems
entirely wrong, because according to the Olson timezone database noplace
in Central America observes daylight savings time on any regular basis ---
and certainly not according to the USA DST rules that are implied by
"CST6CDT". (Mexico is an exception, but they can be disregarded since
they have a separate timezone name in Windows.) So, map this zone name to
plain "CST6", which will provide a fixed UTC offset.
As written, this patch will also result in mapping "Central America
Daylight Time" to CST6. I considered hacking things so that would still
map to CST6CDT, but it seems it would confuse win32tzlist.pl to put those
two names in separate entries. Since there's little evidence that any
such zone name is used in the wild, much less that CST6CDT would be a good
match for it, I'm not too worried about what we do with it.
Per complaint from Pratik Chirania.
M src/timezone/pgtz.c
synchronous_commit is an enum not a boolean.
commit : 8ab067da917398e6bcf733fcb835c5d4852ff03b
author : Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 23 Sep 2011 08:34:10 +0100
committer: Simon Riggs <simon@2ndQuadrant.com>
date : Fri, 23 Sep 2011 08:34:10 +0100
Jaime Casanova
M doc/src/sgml/config.sgml