Stamp 9.3.0.
commit : da645b3a73580ac30cf02e932b42d06157b98229
author : Tom Lane <[email protected]>
date : Mon, 2 Sep 2013 16:53:17 -0400
committer: Tom Lane <[email protected]>
date : Mon, 2 Sep 2013 16:53:17 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Update time zone data files to tzdata release 2013d.
commit : e3d02a10ec1831216f6d63a48e390a53a01b0927
author : Tom Lane <[email protected]>
date : Mon, 2 Sep 2013 15:06:21 -0400
committer: Tom Lane <[email protected]>
date : Mon, 2 Sep 2013 15:06:21 -0400
DST law changes in Israel, Morocco, Palestine, Paraguay.
Historical corrections for Macquarie Island.
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/southamerica
M src/timezone/data/zone.tab
Fix relfrozenxid query in docs to include TOAST tables.
commit : 4e1e5d3bad9d51e5695c8a42612343662e886a64
author : Andrew Dunstan <[email protected]>
date : Mon, 2 Sep 2013 14:37:53 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 2 Sep 2013 14:37:53 -0400
The original query ignored TOAST tables which could result in tables
needing a vacuum not being reported.
Backpatch to all live branches.
M doc/src/sgml/maintenance.sgml
Translation updates
commit : c7ef895f697627f60c51f44d8a9d64431840b4da
author : Peter Eisentraut <[email protected]>
date : Mon, 2 Sep 2013 02:28:21 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 2 Sep 2013 02:28:21 -0400
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/pl.po
M src/backend/po/ru.po
D src/backend/po/tr.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/es.po
D src/bin/initdb/po/ko.po
M src/bin/initdb/po/pl.po
D src/bin/initdb/po/ro.po
D src/bin/initdb/po/sv.po
D src/bin/initdb/po/ta.po
D src/bin/initdb/po/tr.po
D src/bin/initdb/po/zh_TW.po
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_basebackup/po/es.po
M src/bin/pg_basebackup/po/pl.po
D src/bin/pg_basebackup/po/zh_CN.po
M src/bin/pg_config/po/es.po
M src/bin/pg_config/po/sv.po
M src/bin/pg_controldata/nls.mk
M src/bin/pg_controldata/po/es.po
D src/bin/pg_controldata/po/ko.po
M src/bin/pg_controldata/po/pl.po
D src/bin/pg_controldata/po/ro.po
D src/bin/pg_controldata/po/sv.po
D src/bin/pg_controldata/po/ta.po
D src/bin/pg_controldata/po/tr.po
D src/bin/pg_controldata/po/zh_TW.po
M src/bin/pg_ctl/nls.mk
M src/bin/pg_ctl/po/es.po
D src/bin/pg_ctl/po/ko.po
M src/bin/pg_ctl/po/pl.po
M src/bin/pg_ctl/po/sv.po
D src/bin/pg_ctl/po/ta.po
D src/bin/pg_ctl/po/tr.po
M src/bin/pg_dump/nls.mk
M src/bin/pg_dump/po/es.po
D src/bin/pg_dump/po/ko.po
M src/bin/pg_dump/po/pl.po
D src/bin/pg_dump/po/sv.po
D src/bin/pg_dump/po/tr.po
D src/bin/pg_dump/po/zh_TW.po
M src/bin/pg_resetxlog/nls.mk
M src/bin/pg_resetxlog/po/es.po
D src/bin/pg_resetxlog/po/ko.po
M src/bin/pg_resetxlog/po/pl.po
D src/bin/pg_resetxlog/po/ro.po
D src/bin/pg_resetxlog/po/sv.po
D src/bin/pg_resetxlog/po/ta.po
D src/bin/pg_resetxlog/po/tr.po
D src/bin/pg_resetxlog/po/zh_TW.po
M src/bin/psql/nls.mk
M src/bin/psql/po/es.po
M src/bin/psql/po/pl.po
D src/bin/psql/po/sv.po
D src/bin/psql/po/tr.po
M src/bin/scripts/nls.mk
M src/bin/scripts/po/es.po
D src/bin/scripts/po/ko.po
M src/bin/scripts/po/pl.po
D src/bin/scripts/po/ro.po
D src/bin/scripts/po/sv.po
D src/bin/scripts/po/ta.po
D src/bin/scripts/po/tr.po
D src/bin/scripts/po/zh_TW.po
M src/interfaces/ecpg/ecpglib/po/es.po
M src/interfaces/ecpg/preproc/po/es.po
M src/interfaces/libpq/nls.mk
M src/interfaces/libpq/po/es.po
D src/interfaces/libpq/po/ko.po
M src/interfaces/libpq/po/pl.po
M src/interfaces/libpq/po/ru.po
D src/interfaces/libpq/po/sv.po
D src/interfaces/libpq/po/ta.po
M src/pl/plperl/po/es.po
M src/pl/plpgsql/src/nls.mk
M src/pl/plpgsql/src/po/es.po
D src/pl/plpgsql/src/po/ko.po
M src/pl/plpython/nls.mk
M src/pl/plpython/po/es.po
D src/pl/plpython/po/tr.po
D src/pl/plpython/po/zh_TW.po
M src/pl/tcl/po/es.po
Update "Using EXPLAIN" documentation examples using current code.
commit : b9a06c9329822259bab45f34ecc6a5839f0ffc53
author : Tom Lane <[email protected]>
date : Sun, 1 Sep 2013 19:43:02 -0400
committer: Tom Lane <[email protected]>
date : Sun, 1 Sep 2013 19:43:02 -0400
It seems like a good idea to update these examples since some fairly
basic planner behaviors have changed in 9.3; notably that the startup cost
for an indexscan plan node is no longer invariably estimated at 0.00.
M doc/src/sgml/perform.sgml
Update 9.3 release notes.
commit : 3234a64f454cf9f2f6b8df24a551bec0ecfdd74b
author : Tom Lane <[email protected]>
date : Sat, 31 Aug 2013 23:53:33 -0400
committer: Tom Lane <[email protected]>
date : Sat, 31 Aug 2013 23:53:33 -0400
Some corrections, a lot of copy-editing.
Set projected release date as 2013-09-09.
M doc/src/sgml/release-9.3.sgml
Improve regression test for #8410.
commit : 3c2a425da71d56edade2d7e2734305e8af778c9a
author : Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 21:40:21 -0400
committer: Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 21:40:21 -0400
The previous version of the query disregarded the result of the MergeAppend
instead of checking its results.
Andres Freund
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Add test case for bug #8410.
commit : ce58aad2ba13885e2c5fa50e31ee5945e883096b
author : Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 19:27:40 -0400
committer: Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 19:27:40 -0400
Per Andres Freund.
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Reset the binary heap in MergeAppend rescans.
commit : 16e8e36cebba8909ec01ca259f32e8dd40090657
author : Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 19:15:21 -0400
committer: Tom Lane <[email protected]>
date : Fri, 30 Aug 2013 19:15:21 -0400
Failing to do so can cause queries to return wrong data, error out or crash.
This requires adding a new binaryheap_reset() method to binaryheap.c,
but that probably should have been there anyway.
Per bug #8410 from Terje Elde. Diagnosis and patch by Andres Freund.
M src/backend/executor/nodeMergeAppend.c
M src/backend/lib/binaryheap.c
M src/include/lib/binaryheap.h
Make error wording more consistent
commit : dfed97b744a4706d7c7b410667c0c5bc92d0eb8d
author : Alvaro Herrera <[email protected]>
date : Thu, 29 Aug 2013 12:33:50 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 29 Aug 2013 12:33:50 -0400
M src/backend/postmaster/postmaster.c
Unconditionally use the WSA equivalents of Socket error constants.
commit : e536d47ab7eb447ef0be849a8b2e06ae9080017c
author : Andrew Dunstan <[email protected]>
date : Mon, 26 Aug 2013 14:58:14 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 26 Aug 2013 14:58:14 -0400
This change will only apply to mingw compilers, and has been found
necessary by late versions of the mingw-w64 compiler. It's the same as
what is done elsewhere for the Microsoft compilers.
Backpatch of commit 73838b5251e.
Problem reported by Michael Cronenworth, although not his patch.
M src/include/port/win32.h
Account better for planning cost when choosing whether to use custom plans.
commit : a5f11e24a4d1afb213c780812a3df14c04d7f845
author : Tom Lane <[email protected]>
date : Sat, 24 Aug 2013 15:14:21 -0400
committer: Tom Lane <[email protected]>
date : Sat, 24 Aug 2013 15:14:21 -0400
The previous coding in plancache.c essentially used 10% of the estimated
runtime as its cost estimate for planning. This can be pretty bogus,
especially when the estimated runtime is very small, such as in a simple
expression plan created by plpgsql, or a simple INSERT ... VALUES.
While we don't have a really good handle on how planning time compares
to runtime, it seems reasonable to use an estimate based on the number of
relations referenced in the query, with a rather large multiplier. This
patch uses 1000 * cpu_operator_cost * (nrelations + 1), so that even a
trivial query will be charged 1000 * cpu_operator_cost for planning.
This should address the problem reported by Marc Cousin and others that
9.2 and up prefer custom plans in cases where the planning time greatly
exceeds what can be saved.
M src/backend/utils/cache/plancache.c
Don't crash when pg_xlog is empty and pg_basebackup -x is used
commit : 3cf89057b5bced4478a285e0b49e321996b40044
author : Magnus Hagander <[email protected]>
date : Sat, 24 Aug 2013 17:11:31 +0200
committer: Magnus Hagander <[email protected]>
date : Sat, 24 Aug 2013 17:11:31 +0200
The backup will not work (without a logarchive, and that's the whole
point of -x) in this case, this patch just changes it to throw an
error instead of crashing when this happens.
Noticed and diagnosed by TAKATSUKA Haruka
M src/backend/replication/basebackup.c
In locate_grouping_columns(), don't expect an exact match of Var typmods.
commit : c19617d5355e41074623bbb7c3efda532c20f637
author : Tom Lane <[email protected]>
date : Fri, 23 Aug 2013 17:30:56 -0400
committer: Tom Lane <[email protected]>
date : Fri, 23 Aug 2013 17:30:56 -0400
It's possible that inlining of SQL functions (or perhaps other changes?)
has exposed typmod information not known at parse time. In such cases,
Vars generated by query_planner might have valid typmod values while the
original grouping columns only have typmod -1. This isn't a semantic
problem since the behavior of grouping only depends on type not typmod,
but it breaks locate_grouping_columns' use of tlist_member to locate the
matching entry in query_planner's result tlist.
We can fix this without an excessive amount of new code or complexity by
relying on the fact that locate_grouping_columns only gets called when
make_subplanTargetList has set need_tlist_eval == false, and that can only
happen if all the grouping columns are simple Vars. Therefore we only need
to search the sub_tlist for a matching Var, and we can reasonably define a
"match" as being a match of the Var identity fields
varno/varattno/varlevelsup. The code still Asserts that vartype matches,
but ignores vartypmod.
Per bug #8393 from Evan Martin. The added regression test case is
basically the same as his example. This has been broken for a very long
time, so back-patch to all supported branches.
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/tlist.c
M src/include/optimizer/tlist.h
M src/test/regress/expected/rangefuncs.out
M src/test/regress/sql/rangefuncs.sql
Fix hash table size estimation error in choose_hashed_distinct().
commit : e6d3f5b35edad5452936bf4842167fa00c8b64b8
author : Tom Lane <[email protected]>
date : Wed, 21 Aug 2013 13:38:20 -0400
committer: Tom Lane <[email protected]>
date : Wed, 21 Aug 2013 13:38:20 -0400
We should account for the per-group hashtable entry overhead when
considering whether to use a hash aggregate to implement DISTINCT. The
comparable logic in choose_hashed_grouping() gets this right, but I think
I omitted it here in the mistaken belief that there would be no overhead
if there were no aggregate functions to be evaluated. This can result in
more than 2X underestimate of the hash table size, if the tuples being
aggregated aren't very wide. Per report from Tomas Vondra.
This bug is of long standing, but per discussion we'll only back-patch into
9.3. Changing the estimation behavior in stable branches seems to carry too
much risk of destabilizing plan choices for already-tuned applications.
M src/backend/optimizer/plan/planner.c
release notes: update link to 9.3 PL/pgSQL constraint error info
commit : c9d7c192c06d0dd998067494c3be291ea6a52745
author : Bruce Momjian <[email protected]>
date : Tue, 20 Aug 2013 09:39:00 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 20 Aug 2013 09:39:00 -0400
Backpatch to 9.3.
Pavel Stehule
M doc/src/sgml/release-9.3.sgml
Stamp 9.3rc1.
commit : ce52c6fe243665e0f4d84414f9341b9719415551
author : Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 19:45:10 -0400
committer: Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 19:45:10 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Be more wary of unwanted whitespace in pgstat_reset_remove_files().
commit : 59bc4a43ec588d25fe976774bd1194f1b90251fa
author : Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 19:36:06 -0400
committer: Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 19:36:06 -0400
sscanf isn't the easiest thing to use for exact pattern checks ...
also, don't use strncmp where strcmp will do.
M src/backend/postmaster/pgstat.c
Fix removal of files in pgstats directories
commit : db5b49cdd4f481828b227f03b373fbc9bde4301a
author : Alvaro Herrera <[email protected]>
date : Mon, 19 Aug 2013 17:48:17 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 19 Aug 2013 17:48:17 -0400
Instead of deleting all files in stats_temp_directory and the permanent
directory on a crash, only remove those files that match the pattern of
files we actually write in them, to avoid possibly clobbering existing
unrelated contents of the temporary directory. Per complaint from Jeff
Janes, and subsequent discussion, starting at message
CAMkU=1z9+7RsDODnT4=cDFBRBp8wYQbd_qsLcMtKEf-oFwuOdQ@mail.gmail.com
Also, fix a bug in the same routine to avoid removing files from the
permanent directory twice (instead of once from that directory and then
from the temporary directory), also per report from Jeff Janes, in
message
CAMkU=1wbk947=-pAosDMX5VC+sQw9W4ttq6RM9rXu=MjNeEQKA@mail.gmail.com
M src/backend/postmaster/pgstat.c
Rename the "fast_promote" file to just "promote".
commit : 38c69237c21186038f6902373a0f06af1c2f7cfb
author : Heikki Linnakangas <[email protected]>
date : Mon, 19 Aug 2013 20:57:53 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 19 Aug 2013 20:57:53 +0300
This keeps the usual trigger file name unchanged from 9.2, avoiding nasty
issues if you use a pre-9.3 pg_ctl binary with a 9.3 server or vice versa.
The fallback behavior of creating a full checkpoint before starting up is now
triggered by a file called "fallback_promote". That can be useful for
debugging purposes, but we don't expect any users to have to resort to that
and we might want to remove that in the future, which is why the fallback
mechanism is undocumented.
M src/backend/access/transam/xlog.c
M src/bin/pg_ctl/pg_ctl.c
Fix qual-clause-misplacement issues with pulled-up LATERAL subqueries.
commit : b19e5a696ab28be5d55949048194922152091aa1
author : Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 13:19:28 -0400
committer: Tom Lane <[email protected]>
date : Mon, 19 Aug 2013 13:19:28 -0400
In an example such as
SELECT * FROM
i LEFT JOIN LATERAL (SELECT * FROM j WHERE i.n = j.n) j ON true;
it is safe to pull up the LATERAL subquery into its parent, but we must
then treat the "i.n = j.n" clause as a qual clause of the LEFT JOIN. The
previous coding in deconstruct_recurse mistakenly labeled the clause as
"is_pushed_down", resulting in wrong semantics if the clause were applied
at the join node, as per an example submitted awhile ago by Jeremy Evans.
To fix, postpone processing of such clauses until we return back up to
the appropriate recursion depth in deconstruct_recurse.
In addition, tighten the is-safe-to-pull-up checks in is_simple_subquery;
we previously missed the possibility that the LATERAL subquery might itself
contain an outer join that makes lateral references in lower quals unsafe.
A regression test case equivalent to Jeremy's example was already in my
commit of yesterday, but was giving the wrong results because of this
bug. This patch fixes the expected output for that, and also adds a
test case for the second problem.
M src/backend/optimizer/README
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/prep/prepjointree.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Fix pg_upgrade failure from servers older than 9.3
commit : b3c55ae0daf230555cb1932ac2c903c3fe7643db
author : Alvaro Herrera <[email protected]>
date : Mon, 19 Aug 2013 12:33:07 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 19 Aug 2013 12:33:07 -0400
When upgrading from servers of versions 9.2 and older, and MultiXactIds
have been used in the old server beyond the first page (that is, 2048
multis or more in the default 8kB-page build), pg_upgrade would set the
next multixact offset to use beyond what has been allocated in the new
cluster. This would cause a failure the first time the new cluster
needs to use this value, because the pg_multixact/offsets/ file wouldn't
exist or wouldn't be large enough. To fix, ensure that the transient
server instances launched by pg_upgrade extend the file as necessary.
Per report from Jesse Denardo in
CANiVXAj4c88YqipsyFQPboqMudnjcNTdB3pqe8ReXqAFQ=HXyA@mail.gmail.com
M src/backend/access/transam/multixact.c
M src/backend/access/transam/slru.c
M src/include/access/slru.h
release notes: remove username from 9.3 major item
commit : 064eb5098be5ee74a9dfb6bf090fea699a1be45f
author : Bruce Momjian <[email protected]>
date : Mon, 19 Aug 2013 12:26:22 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 19 Aug 2013 12:26:22 -0400
Etsuro Fujita
M doc/src/sgml/release-9.3.sgml
Translation updates
commit : 3e5dd599666f00b45311e42433ba68d0b9b89aed
author : Peter Eisentraut <[email protected]>
date : Sun, 18 Aug 2013 23:36:20 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 18 Aug 2013 23:36:20 -0400
M src/backend/po/de.po
M src/backend/po/fr.po
M src/backend/po/it.po
M src/backend/po/ja.po
M src/backend/po/pt_BR.po
M src/backend/po/ru.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/ja.po
M src/bin/initdb/po/pt_BR.po
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/fr.po
M src/bin/pg_basebackup/po/ja.po
M src/bin/pg_basebackup/po/pt_BR.po
M src/bin/pg_config/po/fr.po
M src/bin/pg_config/po/ja.po
M src/bin/pg_controldata/po/fr.po
M src/bin/pg_controldata/po/ja.po
M src/bin/pg_controldata/po/pt_BR.po
M src/bin/pg_ctl/po/fr.po
M src/bin/pg_ctl/po/ja.po
M src/bin/pg_ctl/po/pt_BR.po
M src/bin/pg_dump/po/de.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
M src/bin/pg_dump/po/pt_BR.po
M src/bin/pg_dump/po/ru.po
M src/bin/pg_resetxlog/po/de.po
M src/bin/pg_resetxlog/po/fr.po
M src/bin/pg_resetxlog/po/it.po
M src/bin/pg_resetxlog/po/ja.po
M src/bin/pg_resetxlog/po/pt_BR.po
M src/bin/pg_resetxlog/po/ru.po
M src/bin/psql/po/fr.po
M src/bin/psql/po/ja.po
M src/bin/psql/po/pt_BR.po
M src/bin/scripts/po/de.po
M src/bin/scripts/po/fr.po
M src/bin/scripts/po/it.po
M src/bin/scripts/po/ja.po
M src/bin/scripts/po/pt_BR.po
M src/bin/scripts/po/ru.po
M src/interfaces/ecpg/preproc/po/ja.po
M src/interfaces/libpq/po/de.po
M src/interfaces/libpq/po/fr.po
M src/interfaces/libpq/po/it.po
M src/interfaces/libpq/po/ja.po
M src/interfaces/libpq/po/pt_BR.po
M src/interfaces/libpq/po/ru.po
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/ja.po
Remove relcache entry invalidation in REFRESH MATERIALIZED VIEW.
commit : 5a91ea7a000295a7898f96cad6f0c3c288d41039
author : Kevin Grittner <[email protected]>
date : Sun, 18 Aug 2013 16:24:59 -0500
committer: Kevin Grittner <[email protected]>
date : Sun, 18 Aug 2013 16:24:59 -0500
This was added as part of the attempt to support unlogged matviews
along with a populated status. It got missed when unlogged
support was removed pre-commit.
Noticed by Noah Misch. Back-patched to 9.3 branch.
M src/backend/commands/matview.c
libpq: Report strerror on pthread_mutex_lock() failure
commit : 7c8de5d3e587a31279771f32291a5d4b94bd2514
author : Peter Eisentraut <[email protected]>
date : Sat, 17 Aug 2013 21:46:32 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 17 Aug 2013 21:46:32 -0400
M src/interfaces/libpq/fe-secure.c
Fix thinko in comment.
commit : 8820b502367de2669a8d3ed02a1cc485dd84fc4b
author : Tom Lane <[email protected]>
date : Sat, 17 Aug 2013 20:36:29 -0400
committer: Tom Lane <[email protected]>
date : Sat, 17 Aug 2013 20:36:29 -0400
M src/backend/optimizer/util/restrictinfo.c
Fix planner problems with LATERAL references in PlaceHolderVars.
commit : 517db4945560358a82b9152d01cfad3bbd2af17e
author : Tom Lane <[email protected]>
date : Sat, 17 Aug 2013 20:22:41 -0400
committer: Tom Lane <[email protected]>
date : Sat, 17 Aug 2013 20:22:41 -0400
The planner largely failed to consider the possibility that a
PlaceHolderVar's expression might contain a lateral reference to a Var
coming from somewhere outside the PHV's syntactic scope. We had a previous
report of a problem in this area, which I tried to fix in a quick-hack way
in commit 4da6439bd8553059766011e2a42c6e39df08717f, but Antonin Houska
pointed out that there were still some problems, and investigation turned
up other issues. This patch largely reverts that commit in favor of a more
thoroughly thought-through solution. The new theory is that a PHV's
ph_eval_at level cannot be higher than its original syntactic level. If it
contains lateral references, those don't change the ph_eval_at level, but
rather they create a lateral-reference requirement for the ph_eval_at join
relation. The code in joinpath.c needs to handle that.
Another issue is that createplan.c wasn't handling nested PlaceHolderVars
properly.
In passing, push knowledge of lateral-reference checks for join clauses
into join_clause_is_movable_to. This is mainly so that FDWs don't need
to deal with it.
This patch doesn't fix the original join-qual-placement problem reported by
Jeremy Evans (and indeed, one of the new regression test cases shows the
wrong answer because of that). But the PlaceHolderVar problems need to be
fixed before that issue can be addressed, so committing this separately
seems reasonable.
M contrib/postgres_fdw/postgres_fdw.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/README
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/orindxpath.c
M src/backend/optimizer/path/tidpath.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/restrictinfo.c
M src/backend/optimizer/util/var.c
M src/include/nodes/relation.h
M src/include/optimizer/restrictinfo.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
release notes: update 9.3 major feature list
commit : 2505aaed7be290018f999f6e9250c24b26db97d0
author : Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 18:01:04 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 18:01:04 -0400
Backpatch to 9.3.
M doc/src/sgml/release-9.3.sgml
release notes: Update to 9.3 git current
commit : c359ff298a537f9f481ca7928c655b84c17e5456
author : Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 16:54:18 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 16:54:18 -0400
Backpatch to 9.3, of course.
M doc/src/sgml/release-9.3.sgml
Rename some bgworker functions as we've done in master.
commit : 8e2eca46dbd3bb8efa56ef0aebd60eadcbcc5dd4
author : Robert Haas <[email protected]>
date : Fri, 16 Aug 2013 15:28:03 -0400
committer: Robert Haas <[email protected]>
date : Fri, 16 Aug 2013 15:28:03 -0400
Commit 2dee7998f93062e2ae7fcc9048ff170e528d1724 renames these
functions in master, for consistency; per discussion, backport
just the renaming portion of that commit to 9.3 to keep the
branches in sync.
Michael Paquier
M src/backend/postmaster/postmaster.c
pg_upgrade: shut down server after auth failure
commit : ae3c8c57cbaa8d88be61dc26f7b5c138c3c98dd7
author : Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 11:09:09 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 16 Aug 2013 11:09:09 -0400
Register atexit() server shutdown if pg_ctl successfully started the
server, but we can't connect to it.
Backpatch to 9.3.
Pavel Raiskup
M contrib/pg_upgrade/server.c
Don't allow ALTER MATERIALIZED VIEW ADD UNIQUE.
commit : cdcddc4a5a06952eafc65907c25c21510c7d54c0
author : Kevin Grittner <[email protected]>
date : Thu, 15 Aug 2013 13:16:45 -0500
committer: Kevin Grittner <[email protected]>
date : Thu, 15 Aug 2013 13:16:45 -0500
Was accidentally allowed, but not documented and lacked support
for rename or drop once created.
Per report from Noah Misch.
M src/backend/commands/tablecmds.c
Add tab completion for \dx in psql
commit : d2fa20acdd67db00b48fcc4b9a13b998c1c8bb54
author : Magnus Hagander <[email protected]>
date : Thu, 15 Aug 2013 18:24:25 +0200
committer: Magnus Hagander <[email protected]>
date : Thu, 15 Aug 2013 18:24:25 +0200
M src/bin/psql/tab-complete.c
Treat timeline IDs as unsigned in replication parser
commit : 3ed990b6ffe18e794b5020a5e5e841aacd72524e
author : Peter Eisentraut <[email protected]>
date : Wed, 14 Aug 2013 23:18:49 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 14 Aug 2013 23:18:49 -0400
Timeline IDs are unsigned ints everywhere, except the replication parser
treated them as signed ints.
M src/backend/replication/repl_gram.y
M src/backend/replication/repl_scanner.l
Improve error message when view is not updatable
commit : 9e3f42ff3f6af6b4474340175572c76fe35d9e3b
author : Peter Eisentraut <[email protected]>
date : Wed, 14 Aug 2013 23:00:34 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 14 Aug 2013 23:00:34 -0400
Avoid using the term "updatable" in confusing ways. Suggest a trigger
first, before a rule.
M src/backend/executor/execMain.c
M src/backend/rewrite/rewriteHandler.c
M src/test/regress/expected/updatable_views.out
Remove ph_may_need from PlaceHolderInfo, with attendant simplifications.
commit : 6c5f68ea1a836f8c5cf9711f24d285067e67f23f
author : Tom Lane <[email protected]>
date : Wed, 14 Aug 2013 18:38:36 -0400
committer: Tom Lane <[email protected]>
date : Wed, 14 Aug 2013 18:38:36 -0400
The planner logic that attempted to make a preliminary estimate of the
ph_needed levels for PlaceHolderVars seems to be completely broken by
lateral references. Fortunately, the potential join order optimization
that this code supported seems to be of relatively little value in
practice; so let's just get rid of it rather than trying to fix it.
Getting rid of this allows fairly substantial simplifications in
placeholder.c, too, so planning in such cases should be a bit faster.
Issue noted while pursuing bugs reported by Jeremy Evans and Antonin
Houska, though this doesn't in itself fix either of their reported cases.
What this does do is prevent an Assert crash in the kind of query
illustrated by the added regression test. (I'm not sure that the plan for
that query is stable enough across platforms to be usable as a regression
test output ... but we'll soon find out from the buildfarm.)
Back-patch to 9.3. The problem case can't arise without LATERAL, so
no need to touch older branches.
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/util/placeholder.c
M src/include/nodes/relation.h
M src/include/optimizer/placeholder.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Remove Assert that matview is not in system schema from REFRESH.
commit : 85052376a8cc4bbbfc08a50ca3bd137c1e3cda9a
author : Kevin Grittner <[email protected]>
date : Wed, 14 Aug 2013 12:43:01 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 14 Aug 2013 12:43:01 -0500
We don't want to prevent an extension which creates a matview from
being installed in pg_catalog.
Issue was raised by Hitoshi Harada.
Backpatched to 9.3.
M src/backend/commands/matview.c
Emit a log message if output is about to be redirected away from stderr.
commit : 6d8186ff779fd46f0251eb252e7489fd38ab793b
author : Tom Lane <[email protected]>
date : Tue, 13 Aug 2013 15:24:56 -0400
committer: Tom Lane <[email protected]>
date : Tue, 13 Aug 2013 15:24:56 -0400
We've seen multiple cases of people looking at the postmaster's original
stderr output to try to diagnose problems, not realizing/remembering that
their logging configuration is set up to send log messages somewhere else.
This seems particularly likely to happen in prepackaged distributions,
since many packagers patch the code to change the factory-standard logging
configuration to something more in line with their platform conventions.
In hopes of reducing confusion, emit a LOG message about this at the point
in startup where we are about to switch log output away from the original
stderr, providing a pointer to where to look instead. This message will
appear as the last thing in the original stderr output. (We might later
also try to emit such link messages when logging parameters are changed
on-the-fly; but that case seems to be both noticeably harder to do nicely,
and much less frequently a problem in practice.)
Per discussion, back-patch to 9.3 but not further.
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
M src/backend/utils/error/elog.c
M src/backend/utils/misc/guc.c
M src/include/utils/elog.h
9.3 release notes: move foreign table item
commit : 7cf5540c831460476d24566845422b8c81bd6581
author : Bruce Momjian <[email protected]>
date : Tue, 13 Aug 2013 12:51:26 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 13 Aug 2013 12:51:26 -0400
Move item about foreign data wrappers supporting inserts/updates/deletes
to object manipulation.
Backpatch to 9.3.
From Etsuro Fujita
M doc/src/sgml/release-9.3.sgml
PL/Python: Adjust the regression tests for Python 3.3
commit : 7f288a23484971dca7f75d866d0f1edb332fbc4b
author : Peter Eisentraut <[email protected]>
date : Sun, 11 Aug 2013 09:17:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 11 Aug 2013 09:17:04 -0400
Similar to 2cfb1c6f77734db81b6e74bcae630f93b94f69be, the order in which
dictionary elements are printed is not reliable. This reappeared in the
tests of the string representation of result objects. Reduce the test
case to one result set column so that there is no question of order.
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/sql/plpython_spi.sql
docs: mention Julian is midnight _UTC_ (Yes, there was no UTC back then, but we compute it that way.) Backpatch to 9.3.
commit : 2edaee01129f3494be71c7bbc7e5414ae0c37501
author : Bruce Momjian <[email protected]>
date : Fri, 9 Aug 2013 21:46:13 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 9 Aug 2013 21:46:13 -0400
M doc/src/sgml/func.sgml
Docs: Document to_*() Julian values are integers Backpatch to 9.3. Per request from Marc Dahn
commit : 95b5f5e1e75b22b1aa741b7545435d2af16f78d5
author : Bruce Momjian <[email protected]>
date : Fri, 9 Aug 2013 19:25:51 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 9 Aug 2013 19:25:51 -0400
M doc/src/sgml/func.sgml
Document how auto_explain.log_timing can be changed.
commit : 646cbc1f01b3104fb8e9ad68ea4df16bd9b4e16f
author : Fujii Masao <[email protected]>
date : Fri, 9 Aug 2013 22:14:26 +0900
committer: Fujii Masao <[email protected]>
date : Fri, 9 Aug 2013 22:14:26 +0900
M doc/src/sgml/auto-explain.sgml
Message punctuation and pluralization fixes
commit : 595f52f8171e9805c5753510a180faeb68165055
author : Peter Eisentraut <[email protected]>
date : Fri, 9 Aug 2013 07:59:53 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 9 Aug 2013 07:59:53 -0400
M src/backend/access/transam/multixact.c
M src/backend/access/transam/xlog.c
M src/backend/utils/adt/json.c
M src/backend/utils/adt/jsonfuncs.c
M src/test/regress/expected/json.out
M src/test/regress/expected/json_1.out
Message style improvements
commit : 92d003fcbfb73eebf0c1782dbd53c6e2f14d5cc4
author : Peter Eisentraut <[email protected]>
date : Wed, 7 Aug 2013 22:48:40 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 7 Aug 2013 22:48:40 -0400
M src/backend/parser/parse_utilcmd.c
M src/backend/port/sysv_shmem.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/adt/jsonfuncs.c
M src/backend/utils/misc/guc.c
Make sure float4in/float8in accept all standard spellings of "infinity".
commit : b5a20ab3e0310103ff11337faeed3c521f5eb917
author : Tom Lane <[email protected]>
date : Sat, 3 Aug 2013 12:39:51 -0400
committer: Tom Lane <[email protected]>
date : Sat, 3 Aug 2013 12:39:51 -0400
The C99 and POSIX standards require strtod() to accept all these spellings
(case-insensitively): "inf", "+inf", "-inf", "infinity", "+infinity",
"-infinity". However, pre-C99 systems might accept only some or none of
these, and apparently Windows still doesn't accept "inf". To avoid
surprising cross-platform behavioral differences, manually check for each
of these spellings if strtod() fails. We were previously handling just
"infinity" and "-infinity" that way, but since C99 is most of the world
now, it seems likely that applications are expecting all these spellings
to work.
Per bug #8355 from Basil Peace. It turns out this fix won't actually
resolve his problem, because Python isn't being this careful; but that
doesn't mean we shouldn't be.
M src/backend/utils/adt/float.c
Fix old visibility bug in HeapTupleSatisfiesDirty
commit : 69fdc9577b09dce732153c33c2484dac7d506ad9
author : Alvaro Herrera <[email protected]>
date : Fri, 2 Aug 2013 14:34:56 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 2 Aug 2013 14:34:56 -0400
If a tuple is locked but not updated by a concurrent transaction,
HeapTupleSatisfiesDirty would return that transaction's Xid in xmax,
causing callers to wait on it, when it is not necessary (in fact, if the
other transaction had used a multixact instead of a plain Xid to mark
the tuple, HeapTupleSatisfiesDirty would have behave differently and
*not* returned the Xmax).
This bug was introduced in commit 3f7fbf85dc5b42, dated December 1998,
so it's almost 15 years old now. However, it's hard to see this
misbehave, because before we had NOWAIT the only consequence of this is
that transactions would wait for slightly more time than necessary; so
it's not surprising that this hasn't been reported yet.
Craig Ringer and Andres Freund
M src/backend/utils/time/tqual.c
Fix crash in error report of invalid tuple lock
commit : 0009462e985b90d07dc430bb3c4f1e6f57e0c318
author : Alvaro Herrera <[email protected]>
date : Fri, 2 Aug 2013 12:49:03 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 2 Aug 2013 12:49:03 -0400
My tweak of these error messages in commit c359a1b082 contained the
thinko that a query would always have rowMarks set for a query
containing a locking clause. Not so: when declaring a cursor, for
instance, rowMarks isn't set at the point we're checking, so we'd be
dereferencing a NULL pointer.
The fix is to pass the lock strength to the function raising the error,
instead of trying to reverse-engineer it. The result not only is more
robust, but it also seems cleaner overall.
Per report from Robert Haas.
M src/backend/optimizer/plan/planner.c
M src/backend/parser/analyze.c
M src/include/parser/analyze.h
M src/test/regress/expected/portals.out
M src/test/regress/expected/union.out
M src/test/regress/sql/portals.sql
M src/test/regress/sql/union.sql
Improve handling of pthread_mutex_lock error case
commit : 820739cba95622033527f60467a264db0ee91f76
author : Stephen Frost <[email protected]>
date : Thu, 1 Aug 2013 15:42:07 -0400
committer: Stephen Frost <[email protected]>
date : Thu, 1 Aug 2013 15:42:07 -0400
We should really be reporting a useful error along with returning
a valid return code if pthread_mutex_lock() throws an error for
some reason. Add that and back-patch to 9.0 as the prior patch.
Pointed out by Alvaro Herrera
M src/interfaces/libpq/fe-secure.c
Add locking around SSL_context usage in libpq
commit : 55754380f36d098551bd55dd49e27f64dd1c8d2f
author : Stephen Frost <[email protected]>
date : Thu, 1 Aug 2013 01:15:45 -0400
committer: Stephen Frost <[email protected]>
date : Thu, 1 Aug 2013 01:15:45 -0400
I've been working with Nick Phillips on an issue he ran into when
trying to use threads with SSL client certificates. As it turns out,
the call in initialize_SSL() to SSL_CTX_use_certificate_chain_file()
will modify our SSL_context without any protection from other threads
also calling that function or being at some other point and trying to
read from SSL_context.
To protect against this, I've written up the attached (based on an
initial patch from Nick and much subsequent discussion) which puts
locks around SSL_CTX_use_certificate_chain_file() and all of the other
users of SSL_context which weren't already protected.
Nick Phillips, much reworked by Stephen Frost
Back-patch to 9.0 where we started loading the cert directly instead of
using a callback.
M src/interfaces/libpq/fe-secure.c
Fix mis-indented lines
commit : 603c4a90c15f601ccf44cad3d3b04b39e4dc34eb
author : Alvaro Herrera <[email protected]>
date : Wed, 31 Jul 2013 17:57:15 -0400
committer: Alvaro Herrera <[email protected]>
date : Wed, 31 Jul 2013 17:57:15 -0400
Per Coverity
M src/backend/utils/misc/guc-file.l
Fix regexp_matches() handling of zero-length matches.
commit : 5d9951a65037fe2b7bdca8ed20c8775594672e34
author : Tom Lane <[email protected]>
date : Wed, 31 Jul 2013 11:31:26 -0400
committer: Tom Lane <[email protected]>
date : Wed, 31 Jul 2013 11:31:26 -0400
We'd find the same match twice if it was of zero length and not immediately
adjacent to the previous match. replace_text_regexp() got similar cases
right, so adjust this search logic to match that. Note that even though
the regexp_split_to_xxx() functions share this code, they did not display
equivalent misbehavior, because the second match would be considered
degenerate and ignored.
Jeevan Chalke, with some cosmetic changes by me.
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/strings.out
M src/test/regress/sql/strings.sql
Fix inaccurate description of tablespace.
commit : fe136ba6fc31760efe7ac53e662395a71a92dc03
author : Fujii Masao <[email protected]>
date : Wed, 31 Jul 2013 22:36:39 +0900
committer: Fujii Masao <[email protected]>
date : Wed, 31 Jul 2013 22:36:39 +0900
Currently we don't need to update the pg_tablespace catalog
after redefining the symbolic links to the tablespaces
because pg_tablespace.spclocation column was removed in
PostgreSQL 9.2.
Back patch to 9.2 where pg_tablespace.spclocation was removed.
Ian Barwick, with minor change by me.
M doc/src/sgml/manage-ag.sgml
Restore REINDEX constraint validation.
commit : 9a78f66fdccbc85442f992f2928b4a58ae451208
author : Noah Misch <[email protected]>
date : Tue, 30 Jul 2013 18:36:52 -0400
committer: Noah Misch <[email protected]>
date : Tue, 30 Jul 2013 18:36:52 -0400
Refactoring as part of commit 8ceb24568054232696dddc1166a8563bc78c900a
had the unintended effect of making REINDEX TABLE and REINDEX DATABASE
no longer validate constraints enforced by the indexes in question;
REINDEX INDEX still did so. Indexes marked invalid remained so, and
constraint violations arising from data corruption went undetected.
Back-patch to 9.0, like the causative commit.
M src/backend/commands/indexcmds.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
pg_upgrade: clarify C comment about Windows thread struct pointers Backpatch to 9.3 to keep source trees consistent.
commit : e243e3a42887f82be6dc5a6bf6e8534a733b8bc8
author : Bruce Momjian <[email protected]>
date : Tue, 30 Jul 2013 09:23:31 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 30 Jul 2013 09:23:31 -0400
M contrib/pg_upgrade/parallel.c
Fix contrib/cube and contrib/seg to build with bison 3.0.
commit : 8cbf8dfcaf9972b723dc48359df5be0a364b2e5f
author : Tom Lane <[email protected]>
date : Mon, 29 Jul 2013 10:42:41 -0400
committer: Tom Lane <[email protected]>
date : Mon, 29 Jul 2013 10:42:41 -0400
These modules used the YYPARSE_PARAM macro, which has been deprecated
by the bison folk since 1.875, and which they finally removed in 3.0.
Adjust the code to use the replacement facility, %parse-param, which
is a much better solution anyway since it allows specification of the
type of the extra parser parameter. We can thus get rid of a lot of
unsightly casting.
Back-patch to all active branches, since somebody might try to build
a back branch with up-to-date tools.
M contrib/cube/cube.c
M contrib/cube/cubeparse.y
M contrib/cube/cubescan.l
M contrib/seg/seg.c
M contrib/seg/segparse.y
M contrib/seg/segscan.l
Message style improvements
commit : faee8f1a714f24e85ba5fa1018b22f9681b5d657
author : Peter Eisentraut <[email protected]>
date : Sun, 28 Jul 2013 06:59:09 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 28 Jul 2013 06:59:09 -0400
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/postmaster/postmaster.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
pg_upgrade: fix -j race condition on Windows Pg_Upgrade cannot write the command string to the log file and then call system() to write to the same file without causing occasional file-share errors on Windows. So instead, write the command string to the log file after system(), in those cases. Backpatch to 9.3.
commit : d83940a7f60f48292b3ae58dfda81b146eab1c50
author : Bruce Momjian <[email protected]>
date : Sat, 27 Jul 2013 15:00:58 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 27 Jul 2013 15:00:58 -0400
M contrib/pg_upgrade/exec.c
pg_upgrade docs: don't use cluster for binary/lib In a few cases, pg_upgrade said old/new cluster location when it meant old/new Postgres install location, so fix those. Per private email report
commit : 61edd524017c4a3fa5f35e72e49f70f058be7a99
author : Bruce Momjian <[email protected]>
date : Fri, 26 Jul 2013 13:52:01 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 26 Jul 2013 13:52:01 -0400
M doc/src/sgml/pgupgrade.sgml
Prevent leakage of SPI tuple tables during subtransaction abort.
commit : 89bb2c76e4fec135df19e0d4e3135a3cf7a44a8a
author : Tom Lane <[email protected]>
date : Thu, 25 Jul 2013 16:45:47 -0400
committer: Tom Lane <[email protected]>
date : Thu, 25 Jul 2013 16:45:47 -0400
plpgsql often just remembers SPI-result tuple tables in local variables,
and has no mechanism for freeing them if an ereport(ERROR) causes an escape
out of the execution function whose local variable it is. In the original
coding, that wasn't a problem because the tuple table would be cleaned up
when the function's SPI context went away during transaction abort.
However, once plpgsql grew the ability to trap exceptions, repeated
trapping of errors within a function could result in significant
intra-function-call memory leakage, as illustrated in bug #8279 from
Chad Wagner.
We could fix this locally in plpgsql with a bunch of PG_TRY/PG_CATCH
coding, but that would be tedious, probably slow, and prone to bugs of
omission; moreover it would do nothing for similar risks elsewhere.
What seems like a better plan is to make SPI itself responsible for
freeing tuple tables at subtransaction abort. This patch attacks the
problem that way, keeping a list of live tuple tables within each SPI
function context. Currently, such freeing is automatic for tuple tables
made within the failed subtransaction. We might later add a SPI call to
mark a tuple table as not to be freed this way, allowing callers to opt
out; but until someone exhibits a clear use-case for such behavior, it
doesn't seem worth bothering.
A very useful side-effect of this change is that SPI_freetuptable() can
now defend itself against bad calls, such as duplicate free requests;
this should make things more robust in many places. (In particular,
this reduces the risks involved if a third-party extension contains
now-redundant SPI_freetuptable() calls in error cleanup code.)
Even though the leakage problem is of long standing, it seems imprudent
to back-patch this into stable branches, since it does represent an API
semantics change for SPI users. We'll patch this in 9.3, but live with
the leakage in older branches.
M doc/src/sgml/spi.sgml
M src/backend/executor/spi.c
M src/include/executor/spi.h
M src/include/executor/spi_priv.h
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpython/plpy_cursorobject.c
M src/pl/plpython/plpy_spi.c
Fix configure probe for sys/ucred.h.
commit : 7f0bc6b448e70f18b9ff35be3a90444542d09d08
author : Tom Lane <[email protected]>
date : Thu, 25 Jul 2013 11:39:11 -0400
committer: Tom Lane <[email protected]>
date : Thu, 25 Jul 2013 11:39:11 -0400
The configure script's test for <sys/ucred.h> did not work on OpenBSD,
because on that platform <sys/param.h> has to be included first.
As a result, socket peer authentication was disabled on that platform.
Problem introduced in commit be4585b1c27ac5dbdd0d61740d18f7ad9a00e268.
Andres Freund, slightly simplified by me.
M configure
M configure.in
pg_upgrade: adjust umask() calls Since pg_upgrade -j on Windows uses threads, calling umask() before/after opening a file via fopen_priv() is no longer possible, so set umask() as we enter the thread-creating loop, and reset it on exit. Also adjust internal fopen_priv() calls to just use fopen(). Backpatch to 9.3beta.
commit : 830d0e0edd73c015ca07423c402a3b1f79118d8f
author : Bruce Momjian <[email protected]>
date : Thu, 25 Jul 2013 11:33:14 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 25 Jul 2013 11:33:14 -0400
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
pg_upgrade: fix initialization of thread argument Reorder initialization of thread argument marker to it happens before reap_child() is called. Backpatch to 9.3.
commit : b48f1dc2d35279b0814d60c24e488df2c295bb85
author : Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 22:01:14 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 22:01:14 -0400
M contrib/pg_upgrade/parallel.c
Improve ilist.h's support for deletion of slist elements during iteration.
commit : cf707aa70da6729a00593c49d5eb8a35ab27dd11
author : Tom Lane <[email protected]>
date : Wed, 24 Jul 2013 17:42:03 -0400
committer: Tom Lane <[email protected]>
date : Wed, 24 Jul 2013 17:42:03 -0400
Previously one had to use slist_delete(), implying an additional scan of
the list, making this infrastructure considerably less efficient than
traditional Lists when deletion of element(s) in a long list is needed.
Modify the slist_foreach_modify() macro to support deleting the current
element in O(1) time, by keeping a "prev" pointer in addition to "cur"
and "next". Although this makes iteration with this macro a bit slower,
no real harm is done, since in any scenario where you're not going to
delete the current list element you might as well just use slist_foreach
instead. Improve the comments about when to use each macro.
Back-patch to 9.3 so that we'll have consistent semantics in all branches
that provide ilist.h. Note this is an ABI break for callers of
slist_foreach_modify().
Andres Freund and Tom Lane
M src/backend/lib/ilist.c
M src/backend/postmaster/pgstat.c
M src/include/lib/ilist.h
pg_upgrade: more Windows parallel/-j fixes More fixes to handle Windows thread parameter passing. Backpatch to 9.3 beta. Patch originally from Andrew Dunstan
commit : 4a67a9ac13495d69b4d3b560b63cafda9318b4f4
author : Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 13:15:47 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 13:15:47 -0400
M contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/test.sh
pg_upgrade: fix parallel/-j crash on Windows This fixes the problem of passing the wrong function pointer when doing parallel copy/link operations on Windows. Backpatched to 9.3beta. Found and patch supplied by Andrew Dunstan
commit : 38afb907afccb4fac10f367a77c421172c04685d
author : Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 10:00:37 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 24 Jul 2013 10:00:37 -0400
M contrib/pg_upgrade/parallel.c
Fix booltestsel() for case where we have NULL stats but not MCV stats.
commit : 808d1f8122223a19d7796e2b50878b1b42450263
author : Tom Lane <[email protected]>
date : Wed, 24 Jul 2013 00:44:09 -0400
committer: Tom Lane <[email protected]>
date : Wed, 24 Jul 2013 00:44:09 -0400
In a boolean column that contains mostly nulls, ANALYZE might not find
enough non-null values to populate the most-common-values stats,
but it would still create a pg_statistic entry with stanullfrac set.
The logic in booltestsel() for this situation did the wrong thing for
"col IS NOT TRUE" and "col IS NOT FALSE" tests, forgetting that null
values would satisfy these tests (so that the true selectivity would
be close to one, not close to zero). Per bug #8274.
Fix by Andrew Gierth, some comment-smithing by me.
M src/backend/utils/adt/selfuncs.c
Further hacking on ruleutils' new column-alias-assignment code.
commit : 7f5cfe914de49130d86b2e1e9636b7135e577ef1
author : Tom Lane <[email protected]>
date : Tue, 23 Jul 2013 17:54:24 -0400
committer: Tom Lane <[email protected]>
date : Tue, 23 Jul 2013 17:54:24 -0400
After further thought about implicit coercions appearing in a joinaliasvars
list, I realized that they represent an additional reason why we might need
to reference the join output column directly instead of referencing an
underlying column. Consider SELECT x FROM t1 LEFT JOIN t2 USING (x) where
t1.x is of type date while t2.x is of type timestamptz. The merged output
variable is of type timestamptz, but it won't go to null when t2 does,
therefore neither t1.x nor t2.x is a valid substitute reference.
The code in get_variable() actually gets this case right, since it knows
it shouldn't look through a coercion, but we failed to ensure that the
unqualified output column name would be globally unique. To fix, modify
the code that trawls for a dangerous situation so that it actually scans
through an unnamed join's joinaliasvars list to see if there are any
non-simple-Var entries.
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/create_view.out
M src/test/regress/sql/create_view.sql
Check for NULL result from strdup
commit : 5ef42547c3c55a0d743ea3fabe165ce3bcc3d3c8
author : Alvaro Herrera <[email protected]>
date : Tue, 23 Jul 2013 17:38:32 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 23 Jul 2013 17:38:32 -0400
Per Coverity Scan
M src/interfaces/libpq/fe-secure.c
Change post-rewriter representation of dropped columns in joinaliasvars.
commit : b81d0691b9c6cc249511b92bb4b96f3a99a91eb0
author : Tom Lane <[email protected]>
date : Tue, 23 Jul 2013 16:23:04 -0400
committer: Tom Lane <[email protected]>
date : Tue, 23 Jul 2013 16:23:04 -0400
It's possible to drop a column from an input table of a JOIN clause in a
view, if that column is nowhere actually referenced in the view. But it
will still be there in the JOIN clause's joinaliasvars list. We used to
replace such entries with NULL Const nodes, which is handy for generation
of RowExpr expansion of a whole-row reference to the view. The trouble
with that is that it can't be distinguished from the situation after
subquery pull-up of a constant subquery output expression below the JOIN.
Instead, replace such joinaliasvars with null pointers (empty expression
trees), which can't be confused with pulled-up expressions. expandRTE()
still emits the old convention, though, for convenience of RowExpr
generation and to reduce the risk of breaking extension code.
In HEAD and 9.3, this patch also fixes a problem with some new code in
ruleutils.c that was failing to cope with implicitly-casted joinaliasvars
entries, as per recent report from Feike Steenbergen. That oversight was
because of an inadequate description of the data structure in parsenodes.h,
which I've now corrected. There were some pre-existing oversights of the
same ilk elsewhere, which I believe are now all fixed.
M src/backend/optimizer/util/var.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/ruleutils.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/create_view.out
M src/test/regress/sql/create_view.sql
Tweak FOR UPDATE/SHARE error message wording (again)
commit : 5712eeb2e7cf8e4236acffd4a403e7f14a48866f
author : Alvaro Herrera <[email protected]>
date : Tue, 23 Jul 2013 14:03:09 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 23 Jul 2013 14:03:09 -0400
In commit 0ac5ad5134 I changed some error messages from "FOR
UPDATE/SHARE" to a rather long gobbledygook which nobody liked. Then,
in commit cb9b66d31 I changed them again, but the alternative chosen
there was deemed suboptimal by Peter Eisentraut, who in message
[email protected] proposed an alternative
involving a dynamically-constructed string based on the actual locking
strength specified in the SQL command. This patch implements that
suggestion.
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/parser/analyze.c
M src/include/parser/analyze.h
Back-patch bgworker API changes to 9.3.
commit : 026bc46da33ab6a6f720b0d0500e8a95d075ab92
author : Robert Haas <[email protected]>
date : Mon, 22 Jul 2013 15:41:44 -0400
committer: Robert Haas <[email protected]>
date : Mon, 22 Jul 2013 15:41:44 -0400
Commit 7f7485a0cde92aa4ba235a1ffe4dda0ca0b6cc9a made these changes
in master; per discussion, backport the API changes (but not the
functional changes), so that people don't get used to the 9.3 API
only to see it get broken in the next release. There are already
some people coding to the original 9.3 API, and this will cause
minor breakage, but there will be even more if we wait until next
year to roll out these changes.
M contrib/worker_spi/worker_spi.c
M doc/src/sgml/bgworker.sgml
M src/backend/postmaster/postmaster.c
M src/include/postmaster/bgworker.h
Remove bgw_sighup and bgw_sigterm.
commit : 295f9bbf1d2d1e985471bd523c7c9bfd3d134759
author : Robert Haas <[email protected]>
date : Mon, 22 Jul 2013 14:13:00 -0400
committer: Robert Haas <[email protected]>
date : Mon, 22 Jul 2013 14:13:00 -0400
Per discussion on pgsql-hackers, these aren't really needed. Interim
versions of the background worker patch had the worker starting with
signals already unblocked, which would have made this necessary.
But the final version does not, so we don't really need it; and it
doesn't work well with the new facility for starting dynamic background
workers, so just rip it out.
Also per discussion on pgsql-hackers, back-patch this change to 9.3.
It's best to get the API break out of the way before we do an
official release of this facility, to avoid more pain for extension
authors later.
M contrib/worker_spi/worker_spi.c
M doc/src/sgml/bgworker.sgml
M src/backend/postmaster/postmaster.c
M src/include/postmaster/bgworker.h
Fix error handling in PLy_spi_execute_fetch_result().
commit : 15b9bdf4d46e5b2858c7666dd4a39040aa12e668
author : Tom Lane <[email protected]>
date : Sat, 20 Jul 2013 12:44:37 -0400
committer: Tom Lane <[email protected]>
date : Sat, 20 Jul 2013 12:44:37 -0400
If an error is thrown out of the datatype I/O functions called by this
function, we need to do subtransaction cleanup, which the previous coding
entirely failed to do. Fortunately, both existing callers of this function
already have proper cleanup logic, so re-throwing the exception is enough.
Also, postpone creation of the resultset tupdesc until after the I/O
conversions are complete, so that we won't leak memory in TopMemoryContext
when such an error happens.
M src/pl/plpython/plpy_spi.c
Clean up new JSON API typedefs
commit : ef8321a57d38c00592614a6d8f0872a721d301c3
author : Peter Eisentraut <[email protected]>
date : Sat, 20 Jul 2013 06:38:31 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 20 Jul 2013 06:38:31 -0400
The new JSON API uses a bit of an unusual typedef scheme, where for
example OkeysState is a pointer to okeysState. And that's not applied
consistently either. Change that to the more usual PostgreSQL style
where struct typedefs are upper case, and use pointers explicitly.
M src/backend/utils/adt/json.c
M src/backend/utils/adt/jsonfuncs.c
M src/include/utils/jsonapi.h
Fix HeapTupleSatisfiesVacuum on aborted updater xacts
commit : 0b3859f3b607b375cfabb0a95bb4c58a4c1b37ee
author : Alvaro Herrera <[email protected]>
date : Fri, 19 Jul 2013 18:35:07 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 19 Jul 2013 18:35:07 -0400
By using only the macro that checks infomask bits
HEAP_XMAX_IS_LOCKED_ONLY to verify whether a multixact is not an
updater, and not the full HeapTupleHeaderIsOnlyLocked, it would come to
the wrong result in case of a multixact containing an aborted update;
therefore returning the wrong result code. This would cause predicate.c
to break completely (as in bug report #8273 from David Leverton), and
certain index builds would misbehave. As far as I can tell, other
callers of the bogus routine would make harmless mistakes or not be
affected by the difference at all; so this was a pretty narrow case.
Also, no other user of the HEAP_XMAX_IS_LOCKED_ONLY macro is as
careless; they all check specifically for the HEAP_XMAX_IS_MULTI case,
and they all verify whether the updater is InvalidXid before concluding
that it's a valid updater. So there doesn't seem to be any similar bug.
M src/backend/utils/time/tqual.c
doc: Fix typos in conversion names.
commit : a9f8fe06bc38c9eb3e99191590713de903a91cfa
author : Robert Haas <[email protected]>
date : Fri, 19 Jul 2013 10:23:12 -0400
committer: Robert Haas <[email protected]>
date : Fri, 19 Jul 2013 10:23:12 -0400
David Christensen
M doc/src/sgml/func.sgml
Initialize day of year value.
commit : 24780e00d2bb10c6942edf579b60186ec469c77b
author : Michael Meskes <[email protected]>
date : Fri, 19 Jul 2013 08:59:20 +0200
committer: Michael Meskes <[email protected]>
date : Fri, 19 Jul 2013 08:59:20 +0200
There are cases where the day of year value in struct tm is used, but it never
got calculated. Problem found by Coverity scan.
M src/interfaces/ecpg/pgtypeslib/timestamp.c
M src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
M src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr
M src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stdout
M src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
Fix regex match failures for backrefs combined with non-greedy quantifiers.
commit : f8463fba2434d083bb699d1cc8a7d7159d614a7b
author : Tom Lane <[email protected]>
date : Thu, 18 Jul 2013 21:22:43 -0400
committer: Tom Lane <[email protected]>
date : Thu, 18 Jul 2013 21:22:43 -0400
An ancient logic error in cfindloop() could cause the regex engine to fail
to find matches that begin later than the start of the string. This
function is only used when the regex pattern contains a back reference,
and so far as we can tell the error is only reachable if the pattern is
non-greedy (i.e. its first quantifier uses the ? modifier). Furthermore,
the actual match must begin after some potential match that satisfies the
DFA but then fails the back-reference's match test.
Reported and fixed by Jeevan Chalke, with cosmetic adjustments by me.
M src/backend/regex/regexec.c
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Use correct parameter name for view_option_value
commit : dd8ea2eb5e996f3f3dfd928e20aa2462c4bd9c63
author : Stephen Frost <[email protected]>
date : Wed, 17 Jul 2013 10:50:39 -0400
committer: Stephen Frost <[email protected]>
date : Wed, 17 Jul 2013 10:50:39 -0400
The documentation for ALTER VIEW had a minor copy-and-paste error in
defining the parameters. Noticed when reviewing the WITH CHECK OPTION
patch.
Backpatch to 9.2 where this was first introduced.
M doc/src/sgml/ref/alter_view.sgml
Fix PQconninfoParse error message handling
commit : bdbb1d673834ef7af16d97158d9d0006b17949f7
author : Peter Eisentraut <[email protected]>
date : Mon, 15 Jul 2013 20:04:14 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 15 Jul 2013 20:04:14 -0400
The returned error message already includes a newline, but the callers
were adding their own when printing it out.
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/scripts/pg_isready.c
M src/interfaces/libpq/test/uri-regress.c
Correct off-by-one when reading from pipe
commit : 22b7f5c5aa1dc2909e110b171b03d6e0c85dcd43
author : Stephen Frost <[email protected]>
date : Mon, 15 Jul 2013 10:42:27 -0400
committer: Stephen Frost <[email protected]>
date : Mon, 15 Jul 2013 10:42:27 -0400
In pg_basebackup.c:reached_end_position(), we're reading from an
internal pipe with our own background process but we're possibly
reading more bytes than will actually fit into our buffer due to
an off-by-one error. As we're reading from an internal pipe
there's no real risk here, but it's good form to not depend on
such convenient arrangements.
Bug spotted by the Coverity scanner.
Back-patch to 9.2 where this showed up.
M src/bin/pg_basebackup/pg_basebackup.c
Check version before allocating PQExpBuffer
commit : 8126bfb5b5f0b413455edd23ff3bf08d83f1cddc
author : Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 21:17:59 -0400
committer: Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 21:17:59 -0400
In pg_dump.c:getEventTriggers, check what major version we are on
before calling createPQExpBuffer() to avoid leaking that bit of
memory.
Leak discovered by the Coverity scanner.
Back-patch to 9.3 where support for dumping event triggers was
added.
M src/bin/pg_dump/pg_dump.c
Be sure to close() file descriptor on error case
commit : b68a1fc7ff1a50a7282e8edff7c51333274c3334
author : Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 17:25:47 -0400
committer: Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 17:25:47 -0400
In receivelog.c:writeTimeLineHistoryFile(), we were not properly
closing the open'd file descriptor in error cases. While this
wouldn't matter much if we were about to exit due to such an
error, that's not the case with pg_receivexlog as it can be a
long-running process and these errors are non-fatal.
This resource leak was found by the Coverity scanner.
Back-patch to 9.3 where this issue first appeared.
M src/bin/pg_basebackup/receivelog.c
Ensure 64bit arithmetic when calculating tapeSpace
commit : e9010b992640d1dbf212cbbab40a00093515f16f
author : Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 16:42:58 -0400
committer: Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 16:42:58 -0400
In tuplesort.c:inittapes(), we calculate tapeSpace by first figuring
out how many 'tapes' we can use (maxTapes) and then multiplying the
result by the tape buffer overhead for each. Unfortunately, when
we are on a system with an 8-byte long, we allow work_mem to be
larger than 2GB and that allows maxTapes to be large enough that the
32bit arithmetic can overflow when multiplied against the buffer
overhead.
When this overflow happens, we end up adding the overflow to the
amount of space available, causing the amount of memory allocated to
be larger than work_mem.
Note that to reach this point, you have to set work mem to at least
24GB and be sorting a set which is at least that size. Given that a
user who can set work_mem to 24GB could also set it even higher, if
they were looking to run the system out of memory, this isn't
considered a security issue.
This overflow risk was found by the Coverity scanner.
Back-patch to all supported branches, as this issue has existed
since before 8.4.
M src/backend/utils/sort/tuplesort.c
pg_isready: Message improvement
commit : 5ab811106b58b06242047ee5dc69001bc983c3a1
author : Peter Eisentraut <[email protected]>
date : Sun, 14 Jul 2013 15:53:56 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 14 Jul 2013 15:53:56 -0400
M src/bin/scripts/pg_isready.c
pg_receivexlog - Exit on failure to parse
commit : f5acde9380e164eab10b2dc3281bb1c07f690803
author : Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 15:31:23 -0400
committer: Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 15:31:23 -0400
In streamutil.c:GetConnection(), upgrade failure to parse the
connection string to an exit(1) instead of simply returning NULL.
Most callers already immediately exited, but pg_receivexlog would
loop on this case, continually trying to re-parse the connection
string (which can't be changed after pg_receivexlog has started).
GetConnection() was already expected to exit(1) in some cases
(eg: failure to allocate memory or if unable to determine the
integer_datetimes flag), so this change shouldn't surprise anyone.
Began looking at this due to the Coverity scanner complaining that
we were leaking err_msg in this case- no longer an issue since we
just exit(1) immediately.
M src/bin/pg_basebackup/streamutil.c
During parallel pg_dump, free commands from master
commit : 8839e7362c68470f8db66acdfa60b95a1c5312cf
author : Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 14:35:26 -0400
committer: Stephen Frost <[email protected]>
date : Sun, 14 Jul 2013 14:35:26 -0400
The command strings read by the child processes during parallel
pg_dump, after being read and handled, were not being free'd.
This patch corrects this relatively minor memory leak.
Leak found by the Coverity scanner.
Back patch to 9.3 where parallel pg_dump was introduced.
M src/bin/pg_dump/parallel.c
Switch user ID to the object owner when populating a materialized view.
commit : fb7c0ac42e1a8e3cde74e83e2c758ada8c62a35e
author : Noah Misch <[email protected]>
date : Fri, 12 Jul 2013 18:21:22 -0400
committer: Noah Misch <[email protected]>
date : Fri, 12 Jul 2013 18:21:22 -0400
This makes superuser-issued REFRESH MATERIALIZED VIEW safe regardless of
the object's provenance. REINDEX is an earlier example of this pattern.
As a downside, functions called from materialized views must tolerate
running in a security-restricted operation. CREATE MATERIALIZED VIEW
need not change user ID. Nonetheless, avoid creation of materialized
views that will invariably fail REFRESH by making it, too, start a
security-restricted operation.
Back-patch to 9.3 so materialized views have this from the beginning.
Reviewed by Kevin Grittner.
M doc/src/sgml/ref/create_materialized_view.sgml
M src/backend/commands/createas.c
M src/backend/commands/matview.c
pg_dump: Formatting cleanup of new messages
commit : 7484f89daa33477e0027a86ae772f44fa99224ed
author : Peter Eisentraut <[email protected]>
date : Thu, 11 Jul 2013 21:48:09 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 11 Jul 2013 21:48:09 -0400
M src/bin/pg_dump/parallel.c
M src/bin/pg_dump/pg_backup_directory.c
pg_upgrade: document possible pg_hba.conf options Previously, pg_upgrade docs recommended using .pgpass if using MD5 authentication to avoid being prompted for a password. Turns out pg_ctl never prompts for a password, so MD5 requires .pgpass --- document that. Also recommend 'peer' for authentication too. Backpatch back to 9.1.
commit : 02e61a8488de1ac559306db888901f8fa6db0755
author : Bruce Momjian <[email protected]>
date : Thu, 11 Jul 2013 09:43:19 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 11 Jul 2013 09:43:19 -0400
M doc/src/sgml/pgupgrade.sgml
doc: Replace link to pgFouine with pgBadger
commit : 583435d079767a73e1e7581bc354387c49e208ad
author : Peter Eisentraut <[email protected]>
date : Wed, 10 Jul 2013 22:40:41 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 10 Jul 2013 22:40:41 -0400
From: Ian Lawrence Barwick <[email protected]>
M doc/src/sgml/maintenance.sgml
Fix lack of message pluralization
commit : bf470b37cc7c9e018e9f789996ef45e35b442487
author : Peter Eisentraut <[email protected]>
date : Tue, 9 Jul 2013 20:49:44 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 9 Jul 2013 20:49:44 -0400
M src/backend/postmaster/postmaster.c
Fixed incorrect description of EXEC SQL VAR command.
commit : d0450f1fa60e1d3485e7ec52bdc5e51a03b00cfa
author : Michael Meskes <[email protected]>
date : Thu, 27 Jun 2013 16:00:32 +0200
committer: Michael Meskes <[email protected]>
date : Thu, 27 Jun 2013 16:00:32 +0200
Thanks to MauMau <[email protected]> for finding and fixing this.
M doc/src/sgml/ecpg.sgml
Fix mention of htup.h in pageinspect docs
commit : 469feb7afb5ee9958c50a8b3000df027a1be8e19
author : Alvaro Herrera <[email protected]>
date : Mon, 8 Jul 2013 17:11:55 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 8 Jul 2013 17:11:55 -0400
It's htup_details.h now.
Jeff Janes
M doc/src/sgml/pageinspect.sgml
Fix planning of parameterized appendrel paths with expensive join quals.
commit : 8b6191e1d5e48d521c42d5f6bdbf8413874f7206
author : Tom Lane <[email protected]>
date : Sun, 7 Jul 2013 22:37:28 -0400
committer: Tom Lane <[email protected]>
date : Sun, 7 Jul 2013 22:37:28 -0400
The code in set_append_rel_pathlist() for building parameterized paths
for append relations (inheritance and UNION ALL combinations) supposed
that the cheapest regular path for a child relation would still be cheapest
when reparameterized. Which might not be the case, particularly if the
added join conditions are expensive to compute, as in a recent example from
Jeff Janes. Fix it to compare child path costs *after* reparameterizing.
We can short-circuit that if the cheapest pre-existing path is already
parameterized correctly, which seems likely to be true often enough to be
worth checking for.
Back-patch to 9.2 where parameterized paths were introduced.
M src/backend/optimizer/path/allpaths.c
M src/test/regress/expected/union.out
M src/test/regress/sql/union.sql
pg_isready: Make --help output more consistent with other utilities
commit : 95b4e8761e3aac9d27c59b89eb3ca5c90d93f9da
author : Peter Eisentraut <[email protected]>
date : Sun, 7 Jul 2013 16:01:29 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 7 Jul 2013 16:01:29 -0400
M src/bin/scripts/pg_isready.c
pg_resetxlog: Make --help consistent with man page
commit : 8ca0e6870c4534f3cc36899f613928b5557c22be
author : Peter Eisentraut <[email protected]>
date : Sun, 7 Jul 2013 15:56:23 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 7 Jul 2013 15:56:23 -0400
Use "MXID" as placeholder for -m option, instead of just "XID".
M src/bin/pg_resetxlog/pg_resetxlog.c
pg_upgrade: document link options Document that tablespaces and pg_xlog can be on different file systems for pg_upgrade --link mode. Backpatch to 9.3.
commit : bf8d8ddc08b9573d1b6ed2ef24c83db5fef18d8c
author : Bruce Momjian <[email protected]>
date : Sun, 7 Jul 2013 15:57:24 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 7 Jul 2013 15:57:24 -0400
M doc/src/sgml/pgupgrade.sgml
Fix include-guard
commit : 9f8830dbe203e1dde3e8aea594e4a23577e4d340
author : Magnus Hagander <[email protected]>
date : Sun, 7 Jul 2013 13:36:20 +0200
committer: Magnus Hagander <[email protected]>
date : Sun, 7 Jul 2013 13:36:20 +0200
Looks like a cut/paste error in the original addition of the file.
Andres Freund
M src/include/utils/attoptcache.h
Also escape double quotes for ECPG's #line statement.
commit : 7428a260f6ad32f3f02a98842f6f09fd8092d393
author : Michael Meskes <[email protected]>
date : Sat, 6 Jul 2013 22:08:53 +0200
committer: Michael Meskes <[email protected]>
date : Sat, 6 Jul 2013 22:08:53 +0200
M src/interfaces/ecpg/preproc/output.c
Rename a function to avoid naming conflict in parallel regression tests.
commit : e407192c937d993be1a4f5636a1afa57cf492f6f
author : Tom Lane <[email protected]>
date : Sat, 6 Jul 2013 11:16:53 -0400
committer: Tom Lane <[email protected]>
date : Sat, 6 Jul 2013 11:16:53 -0400
Commit 31a891857a128828d47d93c63e041f3b69cbab70 added some tests in
plpgsql.sql that used a function rather unthinkingly named "foo()".
However, rangefuncs.sql has some much older tests that create a function
of that name, and since these test scripts run in parallel, there is a
chance of failures if the timing is just right. Use another name to
avoid that. Per buildfarm (failure seen today on "hamerkop", but
probably it's happened before and not been noticed).
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Applied patch by MauMau <[email protected]> to escape filenames in #line statements.
commit : 7d114fb46fd2b88cfab05f8e36ba9e9762cd576a
author : Michael Meskes <[email protected]>
date : Fri, 5 Jul 2013 11:07:16 +0200
committer: Michael Meskes <[email protected]>
date : Fri, 5 Jul 2013 11:07:16 +0200
M src/interfaces/ecpg/preproc/output.c
Update messages, comments and documentation for materialized views.
commit : cf183732d2b2bda2f6fd927481f787ecb1f054fa
author : Noah Misch <[email protected]>
date : Fri, 5 Jul 2013 15:25:51 -0400
committer: Noah Misch <[email protected]>
date : Fri, 5 Jul 2013 15:25:51 -0400
All instances of the verbiage lagging the code. Back-patch to 9.3,
where materialized views were introduced.
M doc/src/sgml/maintenance.sgml
M src/backend/access/heap/tuptoaster.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/heap.c
M src/backend/commands/comment.c
M src/backend/commands/indexcmds.c
M src/backend/commands/seclabel.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/vacuum.c
M src/backend/parser/parse_utilcmd.c
M src/backend/rewrite/rewriteDefine.c
M src/bin/pg_dump/common.c
M src/pl/tcl/pltcl.c
M src/test/regress/expected/create_table_like.out
Remove stray | character
commit : 462b562ab294dc15d6a578ebf424020f0a54e835
author : Magnus Hagander <[email protected]>
date : Fri, 5 Jul 2013 16:21:08 +0200
committer: Magnus Hagander <[email protected]>
date : Fri, 5 Jul 2013 16:21:08 +0200
Erikjan Rijkers
M doc/src/sgml/ref/copy.sgml
Add contrib function references in the doc index Backpatch to 9.3. Idea from Craig Ringer
commit : 8b4c798973033156db58dbca3b605e1045cc587d
author : Bruce Momjian <[email protected]>
date : Thu, 4 Jul 2013 11:33:08 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 4 Jul 2013 11:33:08 -0400
M doc/src/sgml/dblink.sgml
M doc/src/sgml/earthdistance.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/ltree.sgml
M doc/src/sgml/pageinspect.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/pgstatstatements.sgml
M doc/src/sgml/pgstattuple.sgml
M doc/src/sgml/pgtrgm.sgml
M doc/src/sgml/sslinfo.sgml
M doc/src/sgml/tablefunc.sgml
M doc/src/sgml/uuid-ossp.sgml
M doc/src/sgml/xml2.sgml
docs: Clarify flag dependencies for background workers.
commit : cdaf7bde971b592839cbc3794ead1740d1a2125a
author : Robert Haas <[email protected]>
date : Thu, 4 Jul 2013 11:11:56 -0400
committer: Robert Haas <[email protected]>
date : Thu, 4 Jul 2013 11:11:56 -0400
BGWORKER_BACKEND_DATABASE_CONNECTION can only be used if
BGWORKER_SHMEM_ACCESS is also used.
Michael Paquier, with some tweaks by me.
M doc/src/sgml/bgworker.sgml
doc: Fix typo in event trigger documentation
commit : f960fae017635a8c212ccd2168f091ea73564150
author : Peter Eisentraut <[email protected]>
date : Thu, 4 Jul 2013 10:27:33 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 4 Jul 2013 10:27:33 -0400
From: Dimitri Fontaine <[email protected]>
M doc/src/sgml/event-trigger.sgml
doc: Add event trigger C API documentation
commit : 775a9f3025b16dcc9804cca82e744f41e1523a6e
author : Peter Eisentraut <[email protected]>
date : Wed, 3 Jul 2013 21:06:20 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 3 Jul 2013 21:06:20 -0400
From: Dimitri Fontaine <[email protected]>
M doc/src/sgml/event-trigger.sgml
pg_buffercache: document column meanings Improve documentation for usagecount and relforknumber. Backpatch to 9.3 Suggestion from Satoshi Nagayasu
commit : d3cc1b2ff087cd68f281dad33743640dffbe01d1
author : Bruce Momjian <[email protected]>
date : Wed, 3 Jul 2013 14:25:06 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 3 Jul 2013 14:25:06 -0400
M doc/src/sgml/pgbuffercache.sgml
Fix handling of auto-updatable views on inherited tables.
commit : 654b702a1c01fa047a363a887f957886503ea67c
author : Tom Lane <[email protected]>
date : Wed, 3 Jul 2013 12:26:33 -0400
committer: Tom Lane <[email protected]>
date : Wed, 3 Jul 2013 12:26:33 -0400
An INSERT into such a view should work just like an INSERT into its base
table, ie the insertion should go directly into that table ... not be
duplicated into each child table, as was happening before, per bug #8275
from Rushabh Lathia. On the other hand, the current behavior for
UPDATE/DELETE seems reasonable: the update/delete traverses the child
tables, or not, depending on whether the view specifies ONLY or not.
Add some regression tests covering this area.
Dean Rasheed
M src/backend/rewrite/rewriteHandler.c
M src/test/regress/expected/updatable_views.out
M src/test/regress/sql/updatable_views.sql
Expose object name error fields in PL/pgSQL.
commit : c21bb48d6fc1827e117e2667e0a5d9d96d984f46
author : Noah Misch <[email protected]>
date : Wed, 3 Jul 2013 07:29:23 -0400
committer: Noah Misch <[email protected]>
date : Wed, 3 Jul 2013 07:29:23 -0400
Specifically, permit attaching them to the error in RAISE and retrieving
them from a caught error in GET STACKED DIAGNOSTICS. RAISE enforces
nothing about the content of the fields; for its purposes, they are just
additional string fields. Consequently, clarify in the protocol and
libpq documentation that the usual relationships between error fields,
like a schema name appearing wherever a table name appears, are not
universal. This freedom has other applications; consider a FDW
propagating an error from an RDBMS having no schema support.
Back-patch to 9.3, where core support for the error fields was
introduced. This prevents the confusion of having a release where libpq
exposes the fields and PL/pgSQL does not.
Pavel Stehule, lexical revisions by Noah Misch.
M doc/src/sgml/libpq.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/protocol.sgml
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/pl_gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
doc: Remove i18ngurus.com link
commit : a74a977fb0ea535aeae06fe67ee1f9491c30b619
author : Peter Eisentraut <[email protected]>
date : Tue, 2 Jul 2013 20:32:09 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 2 Jul 2013 20:32:09 -0400
The web site is dead, and the Wayback Machine shows that it didn't have
much useful content before.
M doc/src/sgml/charset.sgml
doc: Arrange See Also links in more consistent order
commit : 7f3cd29f8f2bd447a34748afa6dedeeba5d463db
author : Peter Eisentraut <[email protected]>
date : Tue, 2 Jul 2013 20:12:58 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 2 Jul 2013 20:12:58 -0400
M doc/src/sgml/ref/create_event_trigger.sgml
M doc/src/sgml/ref/create_trigger.sgml
M doc/src/sgml/ref/create_view.sgml
Mention extra_float_digits in floating point docs
commit : 061c7a3c7adbf366707dd4c7fdfdb606d00b0dd7
author : Alvaro Herrera <[email protected]>
date : Tue, 2 Jul 2013 12:21:16 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 2 Jul 2013 12:21:16 -0400
Make it easier for readers of the FP docs to find out about possibly
truncated values.
Per complaint from Tom Duffey in message
[email protected]
Author: Albe Laurenz
Reviewed by: Abhijit Menon-Sen
M doc/src/sgml/config.sgml
M doc/src/sgml/datatype.sgml
Silence compiler warning in assertion-enabled builds.
commit : ae8fc624066398b8a14a97c5f950ddc844657d24
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Jul 2013 17:23:42 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Jul 2013 17:23:42 +0300
With -Wtype-limits, gcc correctly points out that size_t can never be < 0.
Backpatch to 9.3 and 9.2. It's been like this forever, but in <= 9.1 you got
a lot other warnings with -Wtype-limits anyway (at least with my version of
gcc).
Andres Freund
M src/pl/plpython/plpy_procedure.c
pg_dump docs: use escaped double-quotes, for Windows On Unix, you can embed double-quotes in single-quotes, and via versa. However, on Windows, you can only escape double-quotes in double-quotes, so use that in the pg_dump -t/table example. Backpatch to 9.3. Report from Mike Toews
commit : 4d6ae6aaec5744f734735b9ab8acf29a4e97f151
author : Bruce Momjian <[email protected]>
date : Mon, 1 Jul 2013 14:52:56 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 1 Jul 2013 14:52:56 -0400
M doc/src/sgml/ref/pg_dump.sgml
Fix cpluspluscheck in checksum code
commit : 95ffbce9a197a434bc1d5bd42268f05d3bfa8168
author : Peter Eisentraut <[email protected]>
date : Sun, 30 Jun 2013 10:25:43 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 30 Jun 2013 10:25:43 -0400
C++ is more picky about comparing signed and unsigned integers.
M src/include/storage/checksum_impl.h
Change errcode for lock_timeout to match NOWAIT
commit : 452d0c21825dd52c10af4538d850991bf6a00e38
author : Simon Riggs <[email protected]>
date : Sat, 29 Jun 2013 00:57:25 +0100
committer: Simon Riggs <[email protected]>
date : Sat, 29 Jun 2013 00:57:25 +0100
Set errcode to ERRCODE_LOCK_NOT_AVAILABLE
Zoltán Bsöszörményi
M src/backend/tcop/postgres.c
Update pg_resetxlog's documentation on multixacts
commit : 5e1ed63ac2ccb3d8e605ce2e428816c8487fe683
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Jun 2013 15:31:04 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Jun 2013 15:31:04 -0400
I added some more functionality to it in 0ac5ad5134f27 but neglected to
add it to the docs.
Per Peter Eisentraut in message
[email protected]
M doc/src/sgml/ref/pg_resetxlog.sgml
M src/bin/pg_resetxlog/pg_resetxlog.c
Document relminmxid and datminmxid
commit : deac50021beded05ab98f973b6a66a58e42a06f9
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Jun 2013 15:20:33 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Jun 2013 15:20:33 -0400
I introduced these new fields in 0ac5ad5134f27 but neglected to add them
to the system catalogs section of the docs.
Per Thom Brown in message
CAA-aLv7UiO=Whiq3MVbsEqSyQRthuX8Tb_RLyBuQt0KQBp=6EQ@mail.gmail.com
M doc/src/sgml/catalogs.sgml
Mark index-constraint comments with correct dependency in pg_dump.
commit : fc469af248a32560f6959b4ed29dc38477ab0ab0
author : Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 13:54:55 -0400
committer: Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 13:54:55 -0400
When there's a comment on an index that was created with UNIQUE or PRIMARY
KEY constraint syntax, we need to label the comment as depending on the
constraint not the index, since only the constraint object actually appears
in the dump. This incorrect dependency can lead to parallel pg_restore
trying to restore the comment before the index has been created, per bug
#8257 from Lloyd Albin.
This patch fixes pg_dump to produce the right dependency in dumps made
in the future. Usually we also try to hack pg_restore to work around
bogus dependencies, so that existing (wrong) dumps can still be restored in
parallel mode; but that doesn't seem practical here since there's no easy
way to relate the constraint dump entry to the comment after the fact.
Andres Freund
M src/bin/pg_dump/pg_dump.c
Expect EWOULDBLOCK from a non-blocking connect() call only on Windows.
commit : 0b173ced93ee7a0da0d38fa13926e7ec4925075e
author : Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 12:36:44 -0400
committer: Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 12:36:44 -0400
On Unix-ish platforms, EWOULDBLOCK may be the same as EAGAIN, which is
*not* a success return, at least not on Linux. We need to treat it as a
failure to avoid giving a misleading error message. Per the Single Unix
Spec, only EINPROGRESS and EINTR returns indicate that the connection
attempt is in progress.
On Windows, on the other hand, EWOULDBLOCK (WSAEWOULDBLOCK) is the expected
case. We must accept EINPROGRESS as well because Cygwin will return that,
and it doesn't seem worth distinguishing Cygwin from native Windows here.
It's not very clear whether EINTR can occur on Windows, but let's leave
that part of the logic alone in the absence of concrete trouble reports.
Also, remove the test for errno == 0, effectively reverting commit
da9501bddb42222dc33c031b1db6ce2133bcee7b, which AFAICS was just a thinko;
or at best it might have been a workaround for a platform-specific bug,
which we can hope is gone now thirteen years later. In any case, since
libpq makes no effort to reset errno to zero before calling connect(),
it seems unlikely that that test has ever reliably done anything useful.
Andres Freund and Tom Lane
M src/interfaces/libpq/fe-connect.c
Tweak wording in sequence-function docs to avoid PDF build failures.
commit : 4b2deb72564a35c54c01323f91ca3a6be56b02bc
author : Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 00:23:37 -0400
committer: Tom Lane <[email protected]>
date : Thu, 27 Jun 2013 00:23:37 -0400
Adjust the wording in the first para of "Sequence Manipulation Functions"
so that neither of the link phrases in it break across line boundaries,
in either A4- or US-page-size PDF output. This fixes a reported build
failure for the 9.3beta2 A4 PDF docs, and future-proofs this particular
para against causing similar problems in future. (Perhaps somebody will
fix this issue in the SGML/TeX documentation tool chain someday, but I'm
not holding my breath.)
Back-patch to all supported branches, since the same problem could rise up
to bite us in future updates if anyone changes anything earlier than this
in func.sgml.
M doc/src/sgml/func.sgml
Document effect of constant folding on CASE.
commit : 40265e3446b0c037510bb05dfe80e4131e77b754
author : Noah Misch <[email protected]>
date : Wed, 26 Jun 2013 19:51:56 -0400
committer: Noah Misch <[email protected]>
date : Wed, 26 Jun 2013 19:51:56 -0400
Back-patch to all supported versions.
Laurenz Albe
M doc/src/sgml/func.sgml
pg_receivexlog: Fix logic error
commit : dc22b34f86a29d393c6407861a6865e88736c22c
author : Peter Eisentraut <[email protected]>
date : Tue, 25 Jun 2013 23:50:14 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 25 Jun 2013 23:50:14 -0400
The code checking the WAL file name contained a logic error and wouldn't
actually catch some bad names.
M src/bin/pg_basebackup/pg_receivexlog.c
Avoid inconsistent type declaration
commit : cb687c751c8d2e9eb097339f8920ca8fcf29fc47
author : Alvaro Herrera <[email protected]>
date : Tue, 25 Jun 2013 16:36:29 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 25 Jun 2013 16:36:29 -0400
Clang 3.3 correctly complains that a variable of type enum
MultiXactStatus cannot hold a value of -1, which makes sense. Change
the declared type of the variable to int instead, and apply casting as
necessary to avoid the warning.
Per notice from Andres Freund
M src/backend/access/heap/heapam.c
Properly dump dropped foreign table cols in binary-upgrade mode.
commit : a20d7c3bc3517e0c390a08d4f589fded953c9710
author : Andrew Dunstan <[email protected]>
date : Tue, 25 Jun 2013 13:46:10 -0400
committer: Andrew Dunstan <[email protected]>
date : Tue, 25 Jun 2013 13:46:10 -0400
In binary upgrade mode, we need to recreate and then drop dropped
columns so that all the columns get the right attribute number. This is
true for foreign tables as well as for native tables. For foreign
tables we have been getting the first part right but not the second,
leading to bogus columns in the upgraded database. Fix this all the way
back to 9.1, where foreign tables were introduced.
M src/bin/pg_dump/pg_dump.c
Support clean switchover.
commit : 0b958f3efcfcc3d9b0e39d550b705a28763bc9e2
author : Fujii Masao <[email protected]>
date : Wed, 26 Jun 2013 02:18:26 +0900
committer: Fujii Masao <[email protected]>
date : Wed, 26 Jun 2013 02:18:26 +0900
In replication, when we shutdown the master, walsender tries to send
all the outstanding WAL records to the standby, and then to exit. This
basically means that all the WAL records are fully synced between
two servers after the clean shutdown of the master. So, after
promoting the standby to new master, we can restart the stopped
master as new standby without the need for a fresh backup from
new master.
But there was one problem so far: though walsender tries to send all
the outstanding WAL records, it doesn't wait for them to be replicated
to the standby. Then, before receiving all the WAL records,
walreceiver can detect the closure of connection and exit. We cannot
guarantee that there is no missing WAL in the standby after clean
shutdown of the master. In this case, backup from new master is
required when restarting the stopped master as new standby.
This patch fixes this problem. It just changes walsender so that it
waits for all the outstanding WAL records to be replicated to the
standby before closing the replication connection.
Per discussion, this is a fix that needs to get backpatched rather than
new feature. So, back-patch to 9.1 where enough infrastructure for
this exists.
Patch by me, reviewed by Andres Freund.
M src/backend/replication/walsender.c
Stamp 9.3beta2.
commit : 09bd2acbe5ac866ce93d7c0e6ed90b426a576f1b
author : Peter Eisentraut <[email protected]>
date : Mon, 24 Jun 2013 14:55:41 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 24 Jun 2013 14:55:41 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Translation updates
commit : 060ffab6b9f3e684c3a36b74af7bff4c1cfc4bc2
author : Peter Eisentraut <[email protected]>
date : Mon, 24 Jun 2013 14:16:15 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 24 Jun 2013 14:16:15 -0400
M src/backend/po/de.po
M src/backend/po/es.po
M src/backend/po/it.po
M src/backend/po/ru.po
M src/backend/po/zh_CN.po
M src/bin/initdb/po/es.po
M src/bin/pg_basebackup/po/cs.po
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/it.po
M src/bin/pg_basebackup/po/ru.po
M src/bin/pg_controldata/po/de.po
M src/bin/pg_controldata/po/es.po
M src/bin/pg_controldata/po/ru.po
M src/bin/pg_ctl/po/de.po
M src/bin/pg_ctl/po/es.po
M src/bin/pg_ctl/po/ru.po
M src/bin/pg_dump/po/es.po
M src/bin/pg_dump/po/it.po
M src/bin/pg_dump/po/ru.po
M src/bin/pg_resetxlog/po/de.po
M src/bin/pg_resetxlog/po/ru.po
M src/bin/psql/po/de.po
M src/bin/psql/po/es.po
M src/bin/psql/po/it.po
M src/bin/psql/po/ru.po
M src/bin/scripts/po/es.po
M src/bin/scripts/po/it.po
M src/bin/scripts/po/ru.po
Ensure no xid gaps during Hot Standby startup
commit : 7b2c9d682957418778dfb7217a536c5a99635a2b
author : Simon Riggs <[email protected]>
date : Sun, 23 Jun 2013 11:09:24 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 23 Jun 2013 11:09:24 +0100
In some cases with higher numbers of subtransactions
it was possible for us to incorrectly initialize
subtrans leading to complaints of missing pages.
Bug report by Sergey Konoplev
Analysis and fix by Andres Freund
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
M src/include/storage/procarray.h
doc: Fix date in EPUB manifest
commit : 0b5a5c8e05e6ebc5923375b056885c6e9934ee31
author : Peter Eisentraut <[email protected]>
date : Fri, 21 Jun 2013 22:48:06 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 21 Jun 2013 22:48:06 -0400
If there is no <date> element, the publication date for the EPUB
manifest is taken from the copyright year. But something like
"1996-2013" is not a legal date specification. So the EPUB output
currently fails epubcheck.
Put in a separate <date> element with the current year. Put it in
legal.sgml, because copyright.pl already instructs to update that
manually, so it hopefully won't be missed.
M doc/src/sgml/legal.sgml
Further update CREATE FUNCTION documentation about argument names
commit : b3b2ea4ad799f5b0e9e0711d23a884102f2d9a66
author : Peter Eisentraut <[email protected]>
date : Wed, 19 Jun 2013 22:25:13 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 19 Jun 2013 22:25:13 -0400
More languages than SQL and PL/pgSQL actually support parameter names.
M doc/src/sgml/ref/create_function.sgml
initdb: Add blank line before output about checksums
commit : 75555da10bbf9b8d7e4c8f509255331a7e20865b
author : Peter Eisentraut <[email protected]>
date : Tue, 18 Jun 2013 21:56:13 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 18 Jun 2013 21:56:13 -0400
This maintains the logical grouping of the output better.
M src/bin/initdb/initdb.c
Fix the create_index regression test for Danish collation.
commit : 854ebd0f5fb069a6c96e14cff4965350fb5374a6
author : Kevin Grittner <[email protected]>
date : Wed, 19 Jun 2013 10:37:39 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 19 Jun 2013 10:37:39 -0500
In Danish collations, there are letter combinations which sort
higher than 'Z'. A test for values > 'WA' was picking up rows
where the value started with 'AA', causing the test to fail.
Backpatch to 9.2, where the failing test was added.
Per report from Svenne Krap and analysis by Jeff Janes
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Fix docs on lock level for ALTER TABLE VALIDATE
commit : 0ae1bf8c1be7eccc54792a9c211345f97a11f78e
author : Simon Riggs <[email protected]>
date : Tue, 18 Jun 2013 12:10:10 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 18 Jun 2013 12:10:10 +0100
ALTER TABLE .. VALIDATE CONSTRAINT previously
gave incorrect details about lock levels and
therefore incomplete reasons to use the option.
Initial bug report and fix from Marko Tiikkaja
Reworded by me to include comments by Kevin Grittner
M doc/src/sgml/ref/alter_table.sgml
psql: Re-allow -1 together with -c or -l
commit : 7558c1c00a2195e9de88121e2af5119b609a8600
author : Peter Eisentraut <[email protected]>
date : Mon, 17 Jun 2013 21:53:33 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 17 Jun 2013 21:53:33 -0400
M src/bin/psql/startup.c
Add buffer_std flag to MarkBufferDirtyHint().
commit : 20723ce80121d99b07c93e5bb9b32b7e09d75231
author : Jeff Davis <[email protected]>
date : Mon, 17 Jun 2013 08:02:12 -0700
committer: Jeff Davis <[email protected]>
date : Mon, 17 Jun 2013 08:02:12 -0700
MarkBufferDirtyHint() writes WAL, and should know if it's got a
standard buffer or not. Currently, the only callers where buffer_std
is false are related to the FSM.
In passing, rename XLOG_HINT to XLOG_FPI, which is more descriptive.
Back-patch to 9.3.
M src/backend/access/hash/hash.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/xlog.c
M src/backend/commands/sequence.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/freespace/freespace.c
M src/backend/storage/freespace/fsmpage.c
M src/backend/utils/time/tqual.c
M src/include/access/xlog.h
M src/include/catalog/pg_control.h
M src/include/storage/bufmgr.h
Fix description of archive format which pg_restore -j supports.
commit : 7b5d712d08df978d7345a7bbf14786ce3879f317
author : Fujii Masao <[email protected]>
date : Sun, 16 Jun 2013 09:39:16 +0900
committer: Fujii Masao <[email protected]>
date : Sun, 16 Jun 2013 09:39:16 +0900
M doc/src/sgml/ref/pg_restore.sgml
Use WaitLatch, not pg_usleep, for delaying in pg_sleep().
commit : c38b64c2959662298f23ad5d86246009e7853b75
author : Tom Lane <[email protected]>
date : Sat, 15 Jun 2013 16:22:29 -0400
committer: Tom Lane <[email protected]>
date : Sat, 15 Jun 2013 16:22:29 -0400
This avoids platform-dependent behavior wherein pg_sleep() might fail to be
interrupted by statement timeout, query cancel, SIGTERM, etc. Also, since
there's no reason to wake up once a second any more, we can reduce the
power consumption of a sleeping backend a tad.
Back-patch to 9.3, since use of SA_RESTART for SIGALRM makes this a bigger
issue than it used to be.
M src/backend/utils/adt/misc.c
Fix pg_restore -l with the directory archive to display the correct format name.
commit : fc02d2b245e82a385785bb4a0f49d8b617680779
author : Fujii Masao <[email protected]>
date : Sun, 16 Jun 2013 05:12:39 +0900
committer: Fujii Masao <[email protected]>
date : Sun, 16 Jun 2013 05:12:39 +0900
Back-patch to 9.1 where the directory archive was introduced.
M src/bin/pg_dump/pg_backup_archiver.c
Use SA_RESTART for all signals, including SIGALRM.
commit : 61f3ada319038e7597c81f7f454982852bf02de3
author : Tom Lane <[email protected]>
date : Sat, 15 Jun 2013 15:39:51 -0400
committer: Tom Lane <[email protected]>
date : Sat, 15 Jun 2013 15:39:51 -0400
The exclusion of SIGALRM dates back to Berkeley days, when Postgres used
SIGALRM in only one very short stretch of code. Nowadays, allowing it to
interrupt kernel calls doesn't seem like a very good idea, since its use
for statement_timeout means SIGALRM could occur anyplace in the code, and
there are far too many call sites where we aren't prepared to deal with
EINTR failures. When third-party code is taken into consideration, it
seems impossible that we ever could be fully EINTR-proof, so better to
use SA_RESTART always and deal with the implications of that. One such
implication is that we should not assume pg_usleep() will be terminated
early by a signal. Therefore, long sleeps should probably be replaced
by WaitLatch operations where practical.
Back-patch to 9.3 so we can get some beta testing on this change.
M src/backend/port/sysv_sema.c
M src/port/pqsignal.c
Avoid deadlocks during insertion into SP-GiST indexes.
commit : e472b921406407794bab911c64655b8b82375196
author : Tom Lane <[email protected]>
date : Fri, 14 Jun 2013 14:26:43 -0400
committer: Tom Lane <[email protected]>
date : Fri, 14 Jun 2013 14:26:43 -0400
SP-GiST's original scheme for avoiding deadlocks during concurrent index
insertions doesn't work, as per report from Hailong Li, and there isn't any
evident way to make it work completely. We could possibly lock individual
inner tuples instead of their whole pages, but preliminary experimentation
suggests that the performance penalty would be huge. Instead, if we fail
to get a buffer lock while descending the tree, just restart the tree
descent altogether. We keep the old tuple positioning rules, though, in
hopes of reducing the number of cases where this can happen.
Teodor Sigaev, somewhat edited by Tom Lane
M src/backend/access/spgist/README
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/include/access/spgist_private.h
Remove special-case treatment of LOG severity level in standalone mode.
commit : c62866eeafd52822ec61a0d2db9428c05e97d3cc
author : Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 23:15:15 -0400
committer: Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 23:15:15 -0400
elog.c has historically treated LOG messages as low-priority during
bootstrap and standalone operation. This has led to confusion and even
masked a bug, because the normal expectation of code authors is that
elog(LOG) will put something into the postmaster log, and that wasn't
happening during initdb. So get rid of the special-case rule and make
the priority order the same as it is in normal operation. To keep from
cluttering initdb's output and the behavior of a standalone backend,
tweak the severity level of three messages routinely issued by xlog.c
during startup and shutdown so that they won't appear in these cases.
Per my proposal back in December.
M src/backend/access/transam/xlog.c
M src/backend/utils/error/elog.c
Refactor checksumming code to make it easier to use externally.
commit : f04216341dd1cc235e975f93ac806d9d3729a344
author : Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 22:35:56 -0400
committer: Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 22:35:56 -0400
pg_filedump and other external utility programs are likely to want to be
able to check Postgres page checksums. To avoid messy duplication of code,
move the checksumming functionality into an exported header file, much as
we did awhile back for the CRC code.
In passing, get rid of an unportable assumption that a static char[] array
will be word-aligned, and do some other minor code beautification.
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/page/bufpage.c
M src/backend/storage/page/checksum.c
M src/include/storage/checksum.h
A src/include/storage/checksum_impl.h
PL/Python: Fix type mixup
commit : fa2fc066f34f1b631b5f92f11e7cda9f60a25330
author : Peter Eisentraut <[email protected]>
date : Thu, 13 Jun 2013 21:42:42 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 13 Jun 2013 21:42:42 -0400
Memory was allocated based on the sizeof a type that was not the type of
the pointer that the result was being assigned to. The types happen to
be of the same size, but it's still wrong.
M src/pl/plpython/plpy_typeio.c
Only install a portal's ResourceOwner if it actually has one.
commit : 629b3e96dd64fa081d8b4610c5a723ef68af09d7
author : Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 13:11:29 -0400
committer: Tom Lane <[email protected]>
date : Thu, 13 Jun 2013 13:11:29 -0400
In most scenarios a portal without a ResourceOwner is dead and not subject
to any further execution, but a portal for a cursor WITH HOLD remains in
existence with no ResourceOwner after the creating transaction is over.
In this situation, if we attempt to "execute" the portal directly to fetch
data from it, we were setting CurrentResourceOwner to NULL, leading to a
segfault if the datatype output code did anything that required a resource
owner (such as trying to fetch system catalog entries that weren't already
cached). The case appears to be impossible to provoke with stock libpq,
but psqlODBC at least is able to cause it when working with held cursors.
Simplest fix is to just skip the assignment to CurrentResourceOwner, so
that any resources used by the data output operations will be managed by
the transaction-level resource owner instead. For consistency I changed
all the places that install a portal's resowner as current, even though
some of them are probably not reachable with a held cursor's portal.
Per report from Joshua Berry (with thanks to Hiroshi Inoue for developing
a self-contained test case). Back-patch to all supported versions.
M src/backend/commands/portalcmds.c
M src/backend/tcop/pquery.c
Avoid reading past datum end when parsing JSON.
commit : 66008564f8ce570f7ad6368fbde2138e946d328b
author : Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:51:12 -0400
committer: Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:51:12 -0400
Several loops in the JSON parser examined a byte in memory just before
checking whether its address was in-bounds, so they could read one byte
beyond the datum's allocation. A SIGSEGV is possible. New in 9.3, so
no back-patch.
M src/backend/utils/adt/json.c
Avoid reading below the start of a stack variable in tokenize_file().
commit : 3a5d0c55338e6beb4c01ed5fadb1462e90db7545
author : Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:52 -0400
committer: Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:52 -0400
We would wrongly overwrite the prior stack byte if it happened to
contain '\n' or '\r'. New in 9.3, so no back-patch.
M src/backend/libpq/hba.c
Don't pass oidvector by value.
commit : 813895e4acfa646c6c0405a0a8c5d05637f42865
author : Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:37 -0400
committer: Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:37 -0400
Since the structure ends with a flexible array, doing so truncates any
vector having more than one element. New in 9.3, so no back-patch.
M src/backend/commands/alter.c
M src/backend/commands/functioncmds.c
M src/include/commands/defrem.h
Observe array length in HaveVirtualXIDsDelayingChkpt().
commit : fb435f40d5e34f85076a0af56b2f3bf7b86122b8
author : Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:14 -0400
committer: Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:50:14 -0400
Since commit f21bb9cfb5646e1793dcc9c0ea697bab99afa523, this function
ignores the caller-provided length and loops until it finds a
terminator, which GetVirtualXIDsDelayingChkpt() never adds. Restore the
previous loop control logic. In passing, revert the addition of an
unused variable by the same commit, presumably a debugging relic.
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
Don't use ordinary NULL-terminated strings as Name datums.
commit : ff53890f687c7f6b2a10db6661e9c32faf832636
author : Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:49:50 -0400
committer: Noah Misch <[email protected]>
date : Wed, 12 Jun 2013 19:49:50 -0400
Consumers are entitled to read the full 64 bytes pertaining to a Name;
using a shorter NULL-terminated string leads to reading beyond the end
its allocation; a SIGSEGV is possible. Use the frequent idiom of
copying to a NameData on the stack. New in 9.3, so no back-patch.
M src/backend/commands/alter.c
M src/backend/commands/event_trigger.c
Improve updatability checking for views and foreign tables.
commit : dc3eb5638349e74a6628130a5101ce866455f4a3
author : Tom Lane <[email protected]>
date : Wed, 12 Jun 2013 17:52:54 -0400
committer: Tom Lane <[email protected]>
date : Wed, 12 Jun 2013 17:52:54 -0400
Extend the FDW API (which we already changed for 9.3) so that an FDW can
report whether specific foreign tables are insertable/updatable/deletable.
The default assumption continues to be that they're updatable if the
relevant executor callback function is supplied by the FDW, but finer
granularity is now possible. As a test case, add an "updatable" option to
contrib/postgres_fdw.
This patch also fixes the information_schema views, which previously did
not think that foreign tables were ever updatable, and fixes
view_is_auto_updatable() so that a view on a foreign table can be
auto-updatable.
initdb forced due to changes in information_schema views and the functions
they rely on. This is a bit unfortunate to do post-beta1, but if we don't
change this now then we'll have another API break for FDWs when we do
change it.
Dean Rasheed, somewhat editorialized on by Tom Lane
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/option.c
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/sql/postgres_fdw.sql
M doc/src/sgml/fdwhandler.sgml
M doc/src/sgml/postgres-fdw.sgml
M src/backend/catalog/information_schema.sql
M src/backend/executor/execMain.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/misc.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/foreign/fdwapi.h
M src/include/rewrite/rewriteHandler.h
M src/include/utils/builtins.h
Fix unescaping of JSON Unicode escapes, especially for non-UTF8.
commit : 78ed8e03c67d7333708f5c1873ec1d239ae2d7e0
author : Andrew Dunstan <[email protected]>
date : Wed, 12 Jun 2013 13:35:24 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 12 Jun 2013 13:35:24 -0400
Per discussion on -hackers. We treat Unicode escapes when unescaping
them similarly to the way we treat them in PostgreSQL string literals.
Escapes in the ASCII range are always accepted, no matter what the
database encoding. Escapes for higher code points are only processed in
UTF8 databases, and attempts to process them in other databases will
result in an error. \u0000 is never unescaped, since it would result in
an impermissible null byte.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
A src/test/regress/expected/json_1.out
M src/test/regress/sql/json.sql
Improve description of loread/lowrite.
commit : c1d729b419ee876c32ddf4ac3a85fa89a6b4a89b
author : Robert Haas <[email protected]>
date : Wed, 12 Jun 2013 12:20:59 -0400
committer: Robert Haas <[email protected]>
date : Wed, 12 Jun 2013 12:20:59 -0400
Patch by me, reviewed by Tatsuo Ishii.
M doc/src/sgml/lobj.sgml
Fix cache flush hazard in cache_record_field_properties().
commit : e262755bfc97f31442cc0def8098b1a7d2913355
author : Tom Lane <[email protected]>
date : Tue, 11 Jun 2013 17:26:42 -0400
committer: Tom Lane <[email protected]>
date : Tue, 11 Jun 2013 17:26:42 -0400
We need to increment the refcount on the composite type's cached tuple
descriptor while we do lookups of its column types. Otherwise a cache
flush could occur and release the tuple descriptor before we're done with
it. This fails reliably with -DCLOBBER_CACHE_ALWAYS, but the odds of a
failure in a production build seem rather low (since the pfree'd descriptor
typically wouldn't get scribbled on immediately). That may explain the
lack of any previous reports. Buildfarm issue noted by Christian Ullrich.
Back-patch to 9.1 where the bogus code was added.
M src/backend/utils/cache/typcache.c
Add description that loread()/lowrite() are corresponding to lo_read()/lo_write() in libpq to avoid confusion.
commit : ecdec470e7a39316df185d387aeaeceab7155ada
author : Tatsuo Ishii <[email protected]>
date : Tue, 11 Jun 2013 14:25:58 +0900
committer: Tatsuo Ishii <[email protected]>
date : Tue, 11 Jun 2013 14:25:58 +0900
M doc/src/sgml/lobj.sgml
Fix pg_isready to handle conninfo properly.
commit : 941c4ece98d08113b557bc8e7dbd8a9ac0ffac3e
author : Fujii Masao <[email protected]>
date : Tue, 11 Jun 2013 03:03:16 +0900
committer: Fujii Masao <[email protected]>
date : Tue, 11 Jun 2013 03:03:16 +0900
pg_isready displays the host name and the port number that it uses to connect
to the server. So far, pg_isready didn't use the conninfo specified in -d option
for calculating those host name and port number. This can lead to wrong display
to a user. This commit changes pg_isready so that it uses the conninfo for that
calculation.
Original patch by Phil Sorber, modified by me.
M src/bin/scripts/pg_isready.c
Fix ordering of obj id for Rules and EventTriggers in pg_dump.
commit : 33a4466f767be8b153ef1ef78433ad9b1867dab8
author : Joe Conway <[email protected]>
date : Sun, 9 Jun 2013 17:30:39 -0700
committer: Joe Conway <[email protected]>
date : Sun, 9 Jun 2013 17:30:39 -0700
getSchemaData() must identify extension member objects and mark them
as not to be dumped. This must happen after reading all objects that can be
direct members of extensions, but before we begin to process table subsidiary
objects. Both rules and event triggers were wrong in this regard.
Backport rules portion of patch to 9.1 -- event triggers do not exist prior to 9.3.
Suggested fix by Tom Lane, initial complaint and patch by me.
M src/bin/pg_dump/common.c
Tweak postgres_fdw regression test so autovacuum doesn't change results.
commit : e0b451e43250558b3c1ac830e067b39e25e0e348
author : Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 19:41:52 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 19:41:52 -0400
Autovacuum occurring while the test runs could allow some of the inserts to
go into recycled space, thus changing the output ordering of later queries.
While we could complicate those queries to force sorting of their output
rows, it doesn't seem like that would make the test better in any
meaningful way, and conceivably it could hide unexpected diffs. Instead,
tweak the affected queries so that the inserted rows aren't updated by the
following UPDATE. Per buildfarm.
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
Remove unnecessary restrictions about RowExprs in transformAExprIn().
commit : a4424c57c3da52efa212b21521abff4bf129b19e
author : Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 18:39:20 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 18:39:20 -0400
When the existing code here was written, it made sense to special-case
RowExprs because that was the only way that we could handle row comparisons
at all. Now that we have record_eq() and arrays of composites, the generic
logic for "scalar" types will in fact work on RowExprs too, so there's no
reason to throw error for combinations of RowExprs and other ways of
forming composite values, nor to ignore the possibility of using a
ScalarArrayOpExpr. But keep using the old logic when comparing two
RowExprs, for consistency with the main transformAExprOp() logic. (This
allows some cases with not-quite-identical rowtypes to succeed, so we might
get push-back if we removed it.) Per bug #8198 from Rafal Rzepecki.
Back-patch to all supported branches, since this works fine as far back as
8.4.
Rafal Rzepecki and Tom Lane
M src/backend/parser/parse_expr.c
M src/test/regress/expected/rowtypes.out
M src/test/regress/sql/rowtypes.sql
Remove ALTER DEFAULT PRIVILEGES' requirement of schema CREATE permissions.
commit : f3839ea117fba6fdb69c75a1fe145aa86a4c8ae3
author : Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 15:26:40 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 15:26:40 -0400
Per discussion, this restriction isn't needed for any real security reason,
and it seems to confuse people more often than it helps them. It could
also result in some database states being unrestorable. So just drop it.
Back-patch to 9.0, where ALTER DEFAULT PRIVILEGES was introduced.
M doc/src/sgml/ref/alter_default_privileges.sgml
M src/backend/catalog/aclchk.c
Remove fixed limit on the number of concurrent AllocateFile() requests.
commit : 007556bf08e6153c442fe3742adb3685fca3a0e0
author : Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 13:46:54 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Jun 2013 13:46:54 -0400
AllocateFile(), AllocateDir(), and some sister routines share a small array
for remembering requests, so that the files can be closed on transaction
failure. Previously that array had a fixed size, MAX_ALLOCATED_DESCS (32).
While historically that had seemed sufficient, Steve Toutant pointed out
that this meant you couldn't scan more than 32 file_fdw foreign tables in
one query, because file_fdw depends on the COPY code which uses
AllocateFile(). There are probably other cases, or will be in the future,
where this nonconfigurable limit impedes users.
We can't completely remove any such limit, at least not without a lot of
work, since each such request requires a kernel file descriptor and most
platforms limit the number we can have. (In principle we could
"virtualize" these descriptors, as fd.c already does for the main VFD pool,
but not without an additional layer of overhead and a lot of notational
impact on the calling code.) But we can at least let the array size be
configurable. Hence, change the code to allow up to max_safe_fds/2
allocated file requests. On modern platforms this should allow several
hundred concurrent file_fdw scans, or more if one increases the value of
max_files_per_process. To go much further than that, we'd need to do some
more work on the data structure, since the current code for closing
requests has potentially O(N^2) runtime; but it should still be all right
for request counts in this range.
Back-patch to 9.1 where contrib/file_fdw was introduced.
M src/backend/storage/file/fd.c
Don't downcase non-ascii identifier chars in multi-byte encodings.
commit : d535136b5d60b19f7ffa777b97ed301739c15a9d
author : Andrew Dunstan <[email protected]>
date : Sat, 8 Jun 2013 10:00:09 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 8 Jun 2013 10:00:09 -0400
Long-standing code has called tolower() on identifier character bytes
with the high bit set. This is clearly an error and produces junk output
when the encoding is multi-byte. This patch therefore restricts this
activity to cases where there is a character with the high bit set AND
the encoding is single-byte.
There have been numerous gripes about this, most recently from Martin
Schäfer.
Backpatch to all live releases.
M src/backend/parser/scansup.c
Handle Unicode surrogate pairs correctly when processing JSON.
commit : 94e3311b97448324d67ba9a527854271373329d9
author : Andrew Dunstan <[email protected]>
date : Sat, 8 Jun 2013 09:12:48 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 8 Jun 2013 09:12:48 -0400
In 9.2, Unicode escape sequences are not analysed at all other than
to make sure that they are in the form \uXXXX. But in 9.3 many of the
new operators and functions try to turn JSON text values into text in
the server encoding, and this includes de-escaping Unicode escape
sequences. This processing had not taken into account the possibility
that this might contain a surrogate pair to designate a character
outside the BMP. That is now handled correctly.
This also enforces correct use of surrogate pairs, something that is not
done by the type's input routines. This fact is noted in the docs.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/json.c
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
doc: Fix <synopsis> in <term> markup
commit : c99d5d1bcc137c15058458bbdcdd2789b56e4c66
author : Peter Eisentraut <[email protected]>
date : Fri, 7 Jun 2013 22:00:59 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 7 Jun 2013 22:00:59 -0400
Although the DTD technically allows this, the resulting HTML is invalid
because it puts block elements inside inline elements. DocBook 5.0 also
doesn't allow it anymore, so it's fair to assume that this was never
really intended to work. Replace <synopsis> with <literal>, which is
the markup used elsewhere in the documentation in similar cases.
M doc/src/sgml/textsearch.sgml
Correct the documentation of pg_rewrite.ev_attr.
commit : 734fbbd1d2d1babfbd195414e2445024ad549ae3
author : Kevin Grittner <[email protected]>
date : Fri, 7 Jun 2013 08:04:22 -0500
committer: Kevin Grittner <[email protected]>
date : Fri, 7 Jun 2013 08:04:22 -0500
It claimed the value was always zero; it is really always -1.
Per report from Hari Babu
M doc/src/sgml/catalogs.sgml
Minor docs wordsmithing.
commit : 7b1e893acd4b7637de93631781f82e0f6834b621
author : Tom Lane <[email protected]>
date : Fri, 7 Jun 2013 00:08:02 -0400
committer: Tom Lane <[email protected]>
date : Fri, 7 Jun 2013 00:08:02 -0400
Swap the order of a couple of phrases to clarify what the adjective
"subsequent" applies to.
Joshua Tolley
M doc/src/sgml/ref/select.sgml
doc: Clarify description of VALUES command
commit : 58617e4dc131561f4b6ba492d6a404b05bd0b968
author : Peter Eisentraut <[email protected]>
date : Thu, 6 Jun 2013 21:03:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 6 Jun 2013 21:03:04 -0400
Greg Smith
M doc/src/sgml/queries.sgml
Fix typo in comment.
commit : f73cb5567c2e27d9a02c7ddba9da8d8557cf08dd
author : Heikki Linnakangas <[email protected]>
date : Thu, 6 Jun 2013 18:25:26 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 6 Jun 2013 18:25:26 +0300
M src/backend/access/transam/xlog.c
Ensure that XLOG_HEAP2_VISIBLE always targets an initialized page.
commit : a6370fd9ed3dbad6070b789eae916d6a037e4773
author : Robert Haas <[email protected]>
date : Thu, 6 Jun 2013 10:03:37 -0400
committer: Robert Haas <[email protected]>
date : Thu, 6 Jun 2013 10:03:37 -0400
Andres Freund
M src/backend/commands/vacuumlazy.c
pg_upgrade: document that --link should be used with --check Backpatch to 9.2.
commit : e2c84bc9f5f1f2f9570c882d10c2cbdf6fe9e47d
author : Bruce Momjian <[email protected]>
date : Thu, 6 Jun 2013 10:13:55 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 6 Jun 2013 10:13:55 -0400
M doc/src/sgml/pgupgrade.sgml
Prevent pushing down WHERE clauses into unsafe UNION/INTERSECT nests.
commit : 964c0d0f80e485dd3a4073e073ddfd9bfdda90b2
author : Tom Lane <[email protected]>
date : Wed, 5 Jun 2013 23:44:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Jun 2013 23:44:02 -0400
The planner is aware that it mustn't push down upper-level quals into
subqueries if the quals reference subquery output columns that contain
set-returning functions or volatile functions, or are non-DISTINCT outputs
of a DISTINCT ON subquery. However, it missed making this check when
there were one or more levels of UNION or INTERSECT above the dangerous
expression. This could lead to "set-valued function called in context that
cannot accept a set" errors, as seen in bug #8213 from Eric Soroos, or to
silently wrong answers in the other cases.
To fix, refactor the checks so that we make the column-is-unsafe checks
during subquery_is_pushdown_safe(), which already has to recursively
inspect all arms of a set-operation tree. This makes
qual_is_pushdown_safe() considerably simpler, at the cost that we will
spend some cycles checking output columns that possibly aren't referenced
in any upper qual. But the cases where this code gets executed at all
are already nontrivial queries, so it's unlikely anybody will notice any
slowdown of planning.
This has been broken since commit 05f916e6add9726bf4ee046e4060c1b03c9961f2,
which makes the bug over ten years old. A bit surprising nobody noticed it
before now.
M src/backend/optimizer/path/allpaths.c
M src/test/regress/expected/union.out
M src/test/regress/sql/union.sql
Update SQL features list
commit : a3bd6096bdc6db70ec267116ba52a4cccbd34c2a
author : Peter Eisentraut <[email protected]>
date : Wed, 5 Jun 2013 22:05:18 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 5 Jun 2013 22:05:18 -0400
M src/backend/catalog/sql_features.txt
Put analyze_keyword back in explain_option_name production.
commit : 3f783c882712db5a5e0056f271ff765edeb2571a
author : Tom Lane <[email protected]>
date : Wed, 5 Jun 2013 13:32:53 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Jun 2013 13:32:53 -0400
In commit 2c92edad48796119c83d7dbe6c33425d1924626d, I broke "EXPLAIN
(ANALYZE)" syntax, because I mistakenly thought that ANALYZE/ANALYSE were
only partially reserved and thus would be included in NonReservedWord;
but actually they're fully reserved so they still need to be called out
here.
A nicer solution would be to demote these words to type_func_name_keyword
status (they can't be less than that because of "VACUUM [ANALYZE] ColId").
While that works fine so far as the core grammar is concerned, it breaks
ECPG's grammar for reasons I don't have time to isolate at the moment.
So do this for the time being.
Per report from Kevin Grittner. Back-patch to 9.0, like the previous
commit.
M src/backend/parser/gram.y
Provide better message when CREATE EXTENSION can't find a target schema.
commit : 530acda4dabe26a4345eccd28a92dd23b1e7a94a
author : Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 17:22:29 -0400
committer: Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 17:22:29 -0400
The new message (and SQLSTATE) matches the corresponding error cases in
namespace.c.
This was thought to be a "can't happen" case when extension.c was written,
so we didn't think hard about how to report it. But it definitely can
happen in 9.2 and later, since we no longer require search_path to contain
any valid schema names. It's probably also possible in 9.1 if search_path
came from a noninteractive source. So, back-patch to all releases
containing this code.
Per report from Sean Chittenden, though this isn't exactly his patch.
M src/backend/commands/extension.c
Add ARM64 (aarch64) support to s_lock.h.
commit : 5c7603c318872a42e1665b228f68fdf58714d945
author : Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 15:42:02 -0400
committer: Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 15:42:02 -0400
Use the same gcc atomic functions as we do on newer ARM chips.
(Basically this is a copy and paste of the __arm__ code block,
but omitting the SWPB option since that definitely won't work.)
Back-patch to 9.2. The patch would work further back, but we'd also
need to update config.guess/config.sub in older branches to make them
build out-of-the-box, and there hasn't been demand for it.
Mark Salter
M src/include/storage/s_lock.h
Fix memory leak in LogStandbySnapshot().
commit : dbc6eb1f4b840d252031419d4bf694316812124f
author : Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 14:58:46 -0400
committer: Tom Lane <[email protected]>
date : Tue, 4 Jun 2013 14:58:46 -0400
The array allocated by GetRunningTransactionLocks() needs to be pfree'd
when we're done with it. Otherwise we leak some memory during each
checkpoint, if wal_level = hot_standby. This manifests as memory bloat
in the checkpointer process, or in bgwriter in versions before we made
the checkpointer separate.
Reported and fixed by Naoya Anzai. Back-patch to 9.0 where the issue
was introduced.
In passing, improve comments for GetRunningTransactionLocks(), and add
an Assert that we didn't overrun the palloc'd array.
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
Fix off-by-one in pg_xlogdump -r option.
commit : 79e15c7d86d3f781cc390a5a04db18254ce97b79
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Jun 2013 18:51:43 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Jun 2013 18:51:43 +0300
Because of the bug, -r would not accept the rmgr with the highest ID.
M contrib/pg_xlogdump/pg_xlogdump.c
Add semicolons to eval'd strings to hide a minor Perl behavioral change.
commit : 035a5e1e8c346efe25df6be4627b5f24cc3736b1
author : Tom Lane <[email protected]>
date : Mon, 3 Jun 2013 14:19:26 -0400
committer: Tom Lane <[email protected]>
date : Mon, 3 Jun 2013 14:19:26 -0400
"eval q{foo}" used to complain that the error was on line 2 of the eval'd
string, because eval internally tacked on "\n;" so that the end of the
erroneous command was indeed on line 2. But as of Perl 5.18 it more
sanely says that the error is on line 1. To avoid Perl-version-dependent
regression test results, use "eval q{foo;}" instead in the two places
where this matters. Per buildfarm.
Since people might try to use newer Perl versions with older PG releases,
back-patch as far as 9.0 where these test cases were added.
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/expected/plperl_init.out
M src/pl/plperl/sql/plperl.sql
M src/pl/plperl/sql/plperl_init.sql
Put back allow_system_table_mods check in heap_create().
commit : 15386281a62071f322155b74cb32c2fea92e8350
author : Heikki Linnakangas <[email protected]>
date : Mon, 3 Jun 2013 17:22:31 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 3 Jun 2013 17:22:31 +0300
This reverts commit a475c6036752c26dca538632b68fd2cc592976b7.
Erik Rijkers reported back in January 2013 that after the patch, if you do
"pg_dump -t myschema.mytable" to dump a single table, and restore that in
a database where myschema does not exist, the table is silently created in
pg_catalog instead. That is because pg_dump uses
"SET search_path=myschema, pg_catalog" to set schema the table is created
in. While allow_system_table_mods is not a very elegant solution to this,
we can't leave it as it is, so for now, revert it back to the way it was
previously.
M src/backend/bootstrap/bootparse.y
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/include/catalog/heap.h
Additional spelling corrections
commit : f129615fe72f70868a86862b663dd7d78dd5cb71
author : Stephen Frost <[email protected]>
date : Mon, 3 Jun 2013 08:40:27 -0400
committer: Stephen Frost <[email protected]>
date : Mon, 3 Jun 2013 08:40:27 -0400
A few more minor spelling corrections, no functional changes.
Thom Brown
M src/backend/access/hash/README
M src/backend/access/nbtree/README
M src/backend/utils/adt/windowfuncs.c
M src/interfaces/libpq/fe-exec.c
Code review of recycling WAL segments in a restartpoint.
commit : e1e2bb34f1237cbec396bcaa795f0fa955af0e72
author : Heikki Linnakangas <[email protected]>
date : Mon, 3 Jun 2013 09:25:12 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 3 Jun 2013 09:25:12 +0300
Seems cleaner to get the currently-replayed TLI in the same call to
GetXLogReplayRecPtr that we get the WAL position. Make it more clear in the
comment what the code does when recovery has already ended
(RecoveryInProgress() will set ThisTimeLineID in that case). Finally, make
resetting ThisTimeLineID afterwards more explicit.
M src/backend/access/transam/xlog.c
Allow type_func_name_keywords in some places where they weren't before.
commit : 2c92edad48796119c83d7dbe6c33425d1924626d
author : Tom Lane <[email protected]>
date : Sun, 2 Jun 2013 20:09:20 -0400
committer: Tom Lane <[email protected]>
date : Sun, 2 Jun 2013 20:09:20 -0400
This change makes type_func_name_keywords less reserved than they were
before, by allowing them for role names, language names, EXPLAIN and COPY
options, and SET values for GUCs; which are all places where few if any
actual keywords could appear instead, so no new ambiguities are introduced.
The main driver for this change is to allow "COPY ... (FORMAT BINARY)"
to work without quoting the word "binary". That is an inconsistency that
has been complained of repeatedly over the years (at least by Pavel Golub,
Kurt Lidl, and Simon Riggs); but we hadn't thought of any non-ugly solution
until now.
Back-patch to 9.0 where the COPY (FORMAT BINARY) syntax was introduced.
M src/backend/parser/gram.y
Another man page whitespace fix
commit : 22b36412c73fdae960cc6bef58eb16a26d14b700
author : Peter Eisentraut <[email protected]>
date : Sat, 1 Jun 2013 22:22:02 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 1 Jun 2013 22:22:02 -0400
M doc/src/sgml/ref/select.sgml
Fix whitespace issues in the man pages
commit : 93874ce064836e45220978e2656cbf62eba766ed
author : Peter Eisentraut <[email protected]>
date : Sat, 1 Jun 2013 22:03:02 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 1 Jun 2013 22:03:02 -0400
See 00b0c73f1f2b98a7d09de63aaa14d6498ac521ae for an explanation.
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/create_event_trigger.sgml
M doc/src/sgml/ref/create_view.sgml
M doc/src/sgml/ref/refresh_materialized_view.sgml
M doc/src/sgml/ref/select.sgml
Fix unportable usage of isspace().
commit : a149d8bd56edc2f06643118ed8aac8bce6ebad6d
author : Tom Lane <[email protected]>
date : Sat, 1 Jun 2013 13:58:23 -0400
committer: Tom Lane <[email protected]>
date : Sat, 1 Jun 2013 13:58:23 -0400
Must cast char argument to unsigned to avoid doing the wrong thing
with high-bit-set characters. Oversight in commit
30b5ede7157e34e77c7914b8ecfd55aa8da6edc3.
M src/bin/pg_basebackup/pg_basebackup.c
Minor spelling fixes
commit : c9fc28a7f12e27d530e2657c9dc6080fbfbe8a14
author : Stephen Frost <[email protected]>
date : Sat, 1 Jun 2013 10:18:59 -0400
committer: Stephen Frost <[email protected]>
date : Sat, 1 Jun 2013 10:18:59 -0400
Fix a few spelling mistakes.
Per bug report #8193 from Lajos Veres.
M contrib/pg_upgrade/relfilenode.c
M src/backend/access/transam/xlogreader.c
M src/backend/utils/adt/tsrank.c
M src/tools/pgindent/typedefs.list
Post-pgindent cleanup
commit : 551938ae2284975b53d665fa8a82a7e1f3514dda
author : Stephen Frost <[email protected]>
date : Sat, 1 Jun 2013 09:38:15 -0400
committer: Stephen Frost <[email protected]>
date : Sat, 1 Jun 2013 09:38:15 -0400
Make slightly better decisions about indentation than what pgindent
is capable of. Mostly breaking out long function calls into one
line per argument, with a few other minor adjustments.
No functional changes- all whitespace.
pgindent ran cleanly (didn't change anything) after.
Passes all regressions.
M contrib/hstore/hstore_io.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/relfilenode.c
M contrib/pgbench/pgbench.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/heap/heapam.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/xlog.c
M src/backend/commands/event_trigger.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
doc: Remove paragraph about typesetting conventions
commit : dedf7e9919a2dc42370c0b218728e1556985de6a
author : Peter Eisentraut <[email protected]>
date : Fri, 31 May 2013 22:42:27 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 31 May 2013 22:42:27 -0400
They no longer match reality with the web site style sheets, and it is
difficult to keep the up to date in a CSS world.
M doc/src/sgml/notation.sgml
Don't emit non-canonical empty arrays in array_remove().
commit : 97c4d9b7c71519d9dc281394af2c4bcb28bdf136
author : Noah Misch <[email protected]>
date : Fri, 31 May 2013 21:50:59 -0400
committer: Noah Misch <[email protected]>
date : Fri, 31 May 2013 21:50:59 -0400
Dean Rasheed
M src/backend/utils/adt/arrayfuncs.c
M src/test/regress/expected/arrays.out
M src/test/regress/sql/arrays.sql
Add new source files to nls.mk
commit : 01497e738e58b0a5d87706353f28eccc5bea9591
author : Peter Eisentraut <[email protected]>
date : Fri, 31 May 2013 20:03:39 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 31 May 2013 20:03:39 -0400
M src/bin/pg_dump/nls.mk
M src/bin/scripts/nls.mk
doc: Fix claim that query is passed as ASCII text
commit : eff8055afb7c89c2d2629d35b074ca617a3c2310
author : Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 21:09:27 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 21:09:27 -0400
Ian Lawrence Barwick
M doc/src/sgml/arch-dev.sgml
Remove whitespace from end of lines
commit : 8b5a3998a104ef5918b50e207be0aa86e085d49d
author : Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 21:05:07 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 21:05:07 -0400
M doc/src/sgml/maintenance.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/notify.sgml
M doc/src/sgml/ref/pg_dump.sgml
M src/Makefile.global.in
M src/backend/catalog/system_views.sql
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
M src/tools/msvc/Mkvcbuild.pm
M src/tools/pgindent/perltidyrc
M src/tools/pgindent/pgindent
M src/tools/pgindent/pgindent.man
Minor spell checking
commit : d7eb6f46de900f6664918cda3b5e6f922a0a2356
author : Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 20:56:58 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 30 May 2013 20:56:58 -0400
M src/backend/replication/walreceiver.c
postgresql.conf.sample: Improve whitespace
commit : 97a11fd0e3055ab82d562930b38027b054e6c8e0
author : Peter Eisentraut <[email protected]>
date : Wed, 29 May 2013 22:00:13 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 29 May 2013 22:00:13 -0400
M src/backend/utils/misc/postgresql.conf.sample
pgindent run for release 9.3 This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
commit : 9af4159fce6654aa0e081b00d02bca40b978745c
author : Bruce Momjian <[email protected]>
date : Wed, 29 May 2013 16:58:43 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 29 May 2013 16:58:43 -0400
M contrib/btree_gist/btree_bit.c
M contrib/btree_gist/btree_text.c
M contrib/btree_gist/btree_ts.c
M contrib/btree_gist/btree_utils_num.c
M contrib/btree_gist/btree_utils_var.c
M contrib/dblink/dblink.c
M contrib/file_fdw/file_fdw.c
M contrib/hstore/hstore_io.c
M contrib/oid2name/oid2name.c
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
M contrib/pg_test_timing/pg_test_timing.c
M contrib/pg_trgm/trgm_op.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/page.c
M contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/tablespace.c
M contrib/pg_upgrade/util.c
M contrib/pg_xlogdump/compat.c
M contrib/pg_xlogdump/pg_xlogdump.c
M contrib/pg_xlogdump/rmgrdesc.c
M contrib/pg_xlogdump/rmgrdesc.h
M contrib/pgbench/pgbench.c
M contrib/pgcrypto/imath.h
M contrib/pgcrypto/pgp.h
M contrib/pgrowlocks/pgrowlocks.c
M contrib/pgstattuple/pgstatindex.c
M contrib/postgres_fdw/connection.c
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/unaccent/unaccent.c
M contrib/vacuumlo/vacuumlo.c
M contrib/worker_spi/worker_spi.c
M src/backend/access/gin/ginbtree.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hashinsert.c
M src/backend/access/hash/hashsearch.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/rmgrdesc/clogdesc.c
M src/backend/access/rmgrdesc/dbasedesc.c
M src/backend/access/rmgrdesc/gindesc.c
M src/backend/access/rmgrdesc/gistdesc.c
M src/backend/access/rmgrdesc/hashdesc.c
M src/backend/access/rmgrdesc/heapdesc.c
M src/backend/access/rmgrdesc/mxactdesc.c
M src/backend/access/rmgrdesc/nbtdesc.c
M src/backend/access/rmgrdesc/relmapdesc.c
M src/backend/access/rmgrdesc/seqdesc.c
M src/backend/access/rmgrdesc/smgrdesc.c
M src/backend/access/rmgrdesc/spgdesc.c
M src/backend/access/rmgrdesc/standbydesc.c
M src/backend/access/rmgrdesc/tblspcdesc.c
M src/backend/access/rmgrdesc/xactdesc.c
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/spgist/spgtextproc.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogarchive.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/access/transam/xlogreader.c
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/catalog.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaccess.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/storage.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/async.c
M src/backend/commands/cluster.c
M src/backend/commands/copy.c
M src/backend/commands/createas.c
M src/backend/commands/dbcommands.c
M src/backend/commands/event_trigger.c
M src/backend/commands/explain.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/matview.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/proclang.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/executor/execMain.c
M src/backend/executor/execQual.c
M src/backend/executor/functions.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/spi.c
M src/backend/lib/binaryheap.c
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/backend/libpq/pqcomm.c
M src/backend/main/main.c
M src/backend/optimizer/geqo/geqo_cx.c
M src/backend/optimizer/geqo/geqo_px.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/pathnode.c
M src/backend/parser/analyze.c
M src/backend/parser/check_keywords.pl
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_utilcmd.c
M src/backend/port/sysv_shmem.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/fork_process.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
M src/backend/regex/regc_nfa.c
M src/backend/regex/regprefix.c
M src/backend/replication/basebackup.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteManip.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/storage/lmgr/spin.c
M src/backend/storage/page/bufpage.c
M src/backend/storage/page/checksum.c
M src/backend/storage/smgr/smgr.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/utils/adt/array_typanalyze.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/json.c
M src/backend/utils/adt/jsonfuncs.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pseudotypes.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/adt/rangetypes_selfuncs.c
M src/backend/utils/adt/rangetypes_spgist.c
M src/backend/utils/adt/rangetypes_typanalyze.c
M src/backend/utils/adt/regproc.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/timestamp.c
M src/backend/utils/adt/tsquery_rewrite.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/evtcache.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/error/elog.c
M src/backend/utils/hash/dynahash.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/mb/mbutils.c
M src/backend/utils/mb/wchar.c
M src/backend/utils/misc/guc.c
M src/backend/utils/resowner/resowner.c
M src/backend/utils/sort/tuplestore.c
M src/backend/utils/time/tqual.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/parallel.c
M src/bin/pg_dump/parallel.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/pgevent/pgevent.c
M src/bin/psql/command.c
M src/bin/psql/copy.c
M src/bin/psql/create_help.pl
M src/bin/psql/describe.c
M src/bin/psql/print.c
M src/bin/psql/startup.c
M src/bin/psql/tab-complete.c
M src/bin/scripts/pg_isready.c
M src/common/fe_memutils.c
M src/common/relpath.c
M src/include/access/gist.h
M src/include/access/heapam.h
M src/include/access/heapam_xlog.h
M src/include/access/htup_details.h
M src/include/access/multixact.h
M src/include/access/rmgr.h
M src/include/access/sysattr.h
M src/include/access/timeline.h
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/c.h
M src/include/catalog/heap.h
M src/include/catalog/indexing.h
M src/include/catalog/objectaccess.h
M src/include/catalog/objectaddress.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_enum.h
M src/include/catalog/pg_event_trigger.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_statistic.h
M src/include/commands/alter.h
M src/include/commands/collationcmds.h
M src/include/commands/comment.h
M src/include/commands/conversioncmds.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/event_trigger.h
M src/include/commands/extension.h
M src/include/commands/matview.h
M src/include/commands/proclang.h
M src/include/commands/schemacmds.h
M src/include/commands/seclabel.h
M src/include/commands/sequence.h
M src/include/commands/tablecmds.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/commands/typecmds.h
M src/include/commands/user.h
M src/include/commands/view.h
M src/include/common/fe_memutils.h
M src/include/common/relpath.h
M src/include/lib/binaryheap.h
M src/include/libpq/hba.h
M src/include/libpq/libpq.h
M src/include/libpq/pqcomm.h
M src/include/mb/pg_wchar.h
M src/include/miscadmin.h
M src/include/nodes/parsenodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/relation.h
M src/include/optimizer/planner.h
M src/include/parser/parse_node.h
M src/include/parser/parse_relation.h
M src/include/port.h
M src/include/port/win32.h
M src/include/postgres.h
M src/include/postmaster/bgworker.h
M src/include/postmaster/postmaster.h
M src/include/replication/walreceiver.h
M src/include/rewrite/rewriteDefine.h
M src/include/rewrite/rewriteManip.h
M src/include/storage/bufpage.h
M src/include/storage/large_object.h
M src/include/storage/predicate_internals.h
M src/include/storage/relfilenode.h
M src/include/storage/standby.h
M src/include/tcop/utility.h
M src/include/utils/builtins.h
M src/include/utils/elog.h
M src/include/utils/evtcache.h
M src/include/utils/guc_tables.h
M src/include/utils/jsonapi.h
M src/include/utils/palloc.h
M src/include/utils/plancache.h
M src/include/utils/rel.h
M src/include/utils/reltrigger.h
M src/interfaces/ecpg/compatlib/informix.c
M src/interfaces/ecpg/ecpglib/typename.c
M src/interfaces/ecpg/pgtypeslib/datetime.c
M src/interfaces/ecpg/pgtypeslib/interval.c
M src/interfaces/ecpg/pgtypeslib/numeric.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
M src/interfaces/ecpg/preproc/type.c
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-print.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/libpq-events.h
M src/pl/plperl/plperl.c
M src/pl/plperl/plperl.h
M src/pl/plperl/plperl_helpers.h
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/pl/plpython/plpy_elog.c
M src/pl/plpython/plpy_util.c
M src/port/pgcheckdir.c
M src/port/pqsignal.c
M src/port/sprompt.c
M src/port/wait_error.c
M src/test/isolation/isolationtester.h
M src/timezone/zic.c
M src/tools/copyright.pl
M src/tools/git_changelog
M src/tools/msvc/Install.pm
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/VCBuildProject.pm
M src/tools/msvc/vcregress.pl
M src/tools/pginclude/pgcheckdefines
M src/tools/pgindent/README
M src/tools/pgindent/pgindent
M src/tools/pgindent/typedefs.list
Document auto_explain.log_timing.
commit : 07ab261ef3a9575a4a2bd3045b222d7b3dee2c46
author : Robert Haas <[email protected]>
date : Wed, 29 May 2013 07:11:21 -0400
committer: Robert Haas <[email protected]>
date : Wed, 29 May 2013 07:11:21 -0400
Tomas Vondra
M doc/src/sgml/auto-explain.sgml
pg_upgrade docs: mention need to set parameters for vacuumdb.
commit : f80e55054bb40421ee414558818cf944a6b48b7e
author : Bruce Momjian <[email protected]>
date : Tue, 28 May 2013 22:54:28 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 28 May 2013 22:54:28 -0400
M doc/src/sgml/pgupgrade.sgml
Documentation fix for ALTER TYPE .. RENAME
commit : 05624220c413eba1d7da38586dfb9aa6a8e9623d
author : Stephen Frost <[email protected]>
date : Mon, 27 May 2013 11:12:54 -0400
committer: Stephen Frost <[email protected]>
date : Mon, 27 May 2013 11:12:54 -0400
The documentation for ALTER TYPE .. RENAME claimed to support a
RESTRICT/CASCADE option at the 'type' level, which wasn't implemented
and doesn't make a whole lot of sense to begin with. What is supported,
and previously undocumented, is
ALTER TYPE .. RENAME ATTRIBUTE .. RESTRICT/CASCADE.
I've updated the documentation and back-patched this to 9.1 where it was
first introduced.
M doc/src/sgml/ref/alter_type.sgml
Remove pageinspect--1.0.sql
commit : 230e92c82b9b911ea743dce7ab7a1abcd0250f30
author : Heikki Linnakangas <[email protected]>
date : Fri, 24 May 2013 08:00:34 -0400
committer: Heikki Linnakangas <[email protected]>
date : Fri, 24 May 2013 08:00:34 -0400
We're not installing it anymore.
Michael Paquier
M contrib/pageinspect/Makefile
D contrib/pageinspect/pageinspect–1.0.sql
Fix typo in comment.
commit : 6eb971bd64073d5208ad7c51aa36b75089d55bef
author : Robert Haas <[email protected]>
date : Thu, 23 May 2013 11:34:30 -0400
committer: Robert Haas <[email protected]>
date : Thu, 23 May 2013 11:34:30 -0400
Pavan Deolasee
M src/include/replication/syncrep.h
Print line number correctly in COPY.
commit : e2ef289363f52b9dd5950c88a65803b585d86ad8
author : Heikki Linnakangas <[email protected]>
date : Thu, 23 May 2013 07:49:59 -0400
committer: Heikki Linnakangas <[email protected]>
date : Thu, 23 May 2013 07:49:59 -0400
When COPY uses the multi-insert method to insert a batch of tuples into the
heap at a time, incorrect line number was printed if something went wrong in
inserting the index tuples (primary key failure, for exampl), or processing
after row triggers.
Fixes bug #8173 reported by Lloyd Albin. Backpatch to 9.2, where the multi-
insert code was added.
M src/backend/commands/copy.c
9.3 release notes: improve cached plan mention Per suggestion from Tom Lane.
commit : bc41ef4791eb44709f18c1678957509e23abdf98
author : Bruce Momjian <[email protected]>
date : Tue, 21 May 2013 16:42:24 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 21 May 2013 16:42:24 -0400
M doc/src/sgml/release-9.3.sgml
After fast promotion use CHECKPOINT_FORCE
commit : 22a27ef113d50cad73097c0be247f06d6527363c
author : Simon Riggs <[email protected]>
date : Tue, 21 May 2013 21:27:12 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 21 May 2013 21:27:12 +0100
Not necessary for correctness, just to make
log_checkpoints output look less singular.
Requested by Fujii Masao
M src/backend/access/transam/xlog.c
Maintain ThisTimeLineID correctly in checkpointer
commit : 75a192638f93636a144a02461baae90b9fe98fd7
author : Simon Riggs <[email protected]>
date : Tue, 21 May 2013 21:17:04 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 21 May 2013 21:17:04 +0100
checkpointer needs to reset ThisTimeLineID after
a restartpoint to allow installing/recycling new
WAL files. If recovery has already ended this
would leave ThisTimeLineID set incorrectly and
so we must reset it otherwise later checkpoints
do not have the correct timeline.
Bug report by Heikki Linnakangas.
Further investigation by Heikki and myself.
M src/backend/access/transam/xlog.c
9.3 release notes: fix SGML markup for DROP TABLE IF EXISTS
commit : 8955dac2518b47cf902c22e972426309217c7d8a
author : Bruce Momjian <[email protected]>
date : Tue, 21 May 2013 08:06:32 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 21 May 2013 08:06:32 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release docs: fix DROP TABLE IF EXISTS Patch from Joe Abbate.
commit : efc7952c89f3079c86156fae313255eadcd4a5e7
author : Bruce Momjian <[email protected]>
date : Mon, 20 May 2013 22:38:37 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 20 May 2013 22:38:37 -0400
M doc/src/sgml/release-9.3.sgml
Documentation spell checking and markup improvements
commit : 256f6ba78a379733ff05d3c3d2239ca7fc56fb9e
author : Peter Eisentraut <[email protected]>
date : Mon, 20 May 2013 21:13:13 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 20 May 2013 21:13:13 -0400
M doc/src/sgml/config.sgml
M doc/src/sgml/datatype.sgml
M doc/src/sgml/fdwhandler.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/gin.sgml
M doc/src/sgml/hstore.sgml
M doc/src/sgml/indexam.sgml
M doc/src/sgml/information_schema.sgml
M doc/src/sgml/install-windows.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/ltree.sgml
M doc/src/sgml/mvcc.sgml
M doc/src/sgml/perform.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/planstats.sgml
M doc/src/sgml/plperl.sgml
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/postgres-fdw.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_type.sgml
M doc/src/sgml/ref/explain.sgml
M doc/src/sgml/ref/lock.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/regress.sgml
M doc/src/sgml/release-9.3.sgml
M doc/src/sgml/sepgsql.sgml
M doc/src/sgml/wal.sgml
Fix escaping in generated recovery.conf file.
commit : 30b5ede7157e34e77c7914b8ecfd55aa8da6edc3
author : Heikki Linnakangas <[email protected]>
date : Mon, 20 May 2013 19:34:27 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 20 May 2013 19:34:27 +0300
In the primary_conninfo line that "pg_basebackup -R" generates, single
quotes in parameter values need to be escaped into \\'; the libpq parser
requires the quotes to be escaped into \', and recovery.conf parser requires
the \ to be escaped into \\.
Also, don't quote parameter values unnecessarily, to make the connection
string prettier. Most options in a libpq connection string don't need
quoting.
Reported by Hari Babu, closer analysis by Zoltan Boszormenyi, although I
didn't use his patch.
M src/bin/pg_basebackup/pg_basebackup.c
Clarify documentation of EXPLAIN (TIMING OFF) option.
commit : 2af0971f35a4a7b87312b83782d9bb0cc6a40ad0
author : Tom Lane <[email protected]>
date : Sun, 19 May 2013 22:03:32 -0400
committer: Tom Lane <[email protected]>
date : Sun, 19 May 2013 22:03:32 -0400
Clarify that this option doesn't suppress measurement of the statement's
total runtime.
Greg Smith
M doc/src/sgml/ref/explain.sgml
M src/backend/commands/explain.c
Init crash recovery using the latest available TLI
commit : d4337a0dcbd29e5b11c2157f808916de62de05e4
author : Simon Riggs <[email protected]>
date : Sun, 19 May 2013 17:31:07 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 19 May 2013 17:31:07 +0100
This simplifies the handling of crashes after fast promotion and various
minor cases that can exist in short timing windows around that case.
Broad fix to bug reported by Michael Paquier on -hackers,
approach prompted by Heikki Linnakangas
M src/backend/access/transam/xlog.c
Emit msg correctly for timeline-crossing crash
commit : 1781744cfcfeed6e3ad2e4d52dbd475a95be03a0
author : Simon Riggs <[email protected]>
date : Sun, 19 May 2013 17:00:18 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 19 May 2013 17:00:18 +0100
M src/backend/access/transam/xlog.c
Remove single space on end of a line in xlog.c
commit : c94dff4c3c18595a9d6d8a97020145c1155de473
author : Simon Riggs <[email protected]>
date : Sun, 19 May 2013 15:38:47 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 19 May 2013 15:38:47 +0100
Michael Paquier
M src/backend/access/transam/xlog.c
Remove unused regression test files.
commit : d0cab7903bf695bf305bd4c01f99e0e28d233d91
author : Heikki Linnakangas <[email protected]>
date : Sat, 18 May 2013 22:30:20 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sat, 18 May 2013 22:30:20 +0300
euc_* and mule_internal test cases were identical to the ones in
src/test/mb. sql_ascii didn't exist elsewhere, but has been broken since
2001, and doesn't seem very interesting anyway. drop.sql hasn't been used
since 2000, when regress.sh was removed.
D src/test/regress/expected/euc_cn.out
D src/test/regress/expected/euc_jp.out
D src/test/regress/expected/euc_kr.out
D src/test/regress/expected/euc_tw.out
D src/test/regress/expected/mule_internal.out
D src/test/regress/expected/sql_ascii.out
D src/test/regress/sql/drop.sql
D src/test/regress/sql/euc_cn.sql
D src/test/regress/sql/euc_jp.sql
D src/test/regress/sql/euc_kr.sql
D src/test/regress/sql/euc_tw.sql
D src/test/regress/sql/mule_internal.sql
D src/test/regress/sql/sql_ascii.sql
release docs: mention PL/pgSQL as supporting event triggers in PG 9.3
commit : f472012a3257d022dd36c6b5e30ad8d223d0ccea
author : Bruce Momjian <[email protected]>
date : Sat, 18 May 2013 11:01:55 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 18 May 2013 11:01:55 -0400
M doc/src/sgml/release-9.3.sgml
Fix crash when trying to display a NOTIFY rule action.
commit : 403bd6a18b8ec5aeee51c08360441c3c3c239d8f
author : Tom Lane <[email protected]>
date : Thu, 16 May 2013 16:47:26 -0400
committer: Tom Lane <[email protected]>
date : Thu, 16 May 2013 16:47:26 -0400
Fixes oversight in commit 2ffa740be9d96a3743ecb7e42391c53d0760c65a.
Per report from Josh Kupershmidt.
I think we've broken this case before, so let's add a regression test
this time.
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Fix fd.c to preserve errno where needed.
commit : 6563fb2b45146852601e63828308fe04fb03b9e9
author : Tom Lane <[email protected]>
date : Thu, 16 May 2013 15:04:31 -0400
committer: Tom Lane <[email protected]>
date : Thu, 16 May 2013 15:04:31 -0400
PathNameOpenFile failed to ensure that the correct value of errno was
returned to its caller after a failure (because it incorrectly supposed
that free() can never change errno). In some cases this would result
in a user-visible failure because an expected ENOENT errno was replaced
with something else. Bogus EINVAL failures have been observed on OS X,
for example.
There were also a couple of places that could mangle an important value
of errno if FDDEBUG was defined. While the usefulness of that debug
support is highly debatable, we might as well make it safe to use,
so add errno save/restore logic to the DO_DB macro.
Per bug #8167 from Nelson Minar, diagnosed by RhodiumToad.
Back-patch to all supported branches.
M src/backend/storage/file/fd.c
Fix some uses of "the quick brown fox".
commit : e7bfc7e42cebf80507f9c9965dc4a572e9fb76a4
author : Tom Lane <[email protected]>
date : Thu, 16 May 2013 12:30:41 -0400
committer: Tom Lane <[email protected]>
date : Thu, 16 May 2013 12:30:41 -0400
If we're going to quote a well-known pangram, we should quote it
accurately. Per gripe from Thom Brown.
M doc/src/sgml/func.sgml
M src/test/regress/expected/strings.out
M src/test/regress/sql/strings.sql
Allow CREATE FOREIGN TABLE to include SERIAL columns.
commit : b14206862278347a379f2bb72d92d16fb9dcea45
author : Tom Lane <[email protected]>
date : Wed, 15 May 2013 19:03:29 -0400
committer: Tom Lane <[email protected]>
date : Wed, 15 May 2013 19:03:29 -0400
The behavior is that the required sequence is created locally, which is
appropriate because the default expression will be evaluated locally.
Per gripe from Brad Nicholson that this case was refused with a confusing
error message. We could have improved the error message but it seems
better to just allow the case.
Also, remove ALTER TABLE's arbitrary prohibition against being applied to
foreign tables, which was pretty inconsistent considering we allow it for
views, sequences, and other relation types that aren't even called tables.
This is needed to avoid breaking pg_dump, which sometimes emits column
defaults using separate ALTER TABLE commands. (I think this can happen
even when the default is not associated with a sequence, so that was a
pre-existing bug once we allowed column defaults for foreign tables.)
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
doc: Add \dm command to psql man page
commit : a2a480af889b5d9abce4181e49b6398f0e24b808
author : Peter Eisentraut <[email protected]>
date : Tue, 14 May 2013 21:12:34 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 14 May 2013 21:12:34 -0400
M doc/src/sgml/ref/psql-ref.sgml
doc: Fix some whitespace issues in the man pages
commit : a9bb274f902987b271e2f0dd844fb610de4f024b
author : Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:59:39 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:59:39 -0400
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_isready.sgml
pg_upgrade: Replace tabs in output string constants by spaces
commit : d2b920cded4db973a7b69a628e109f2aee63012a
author : Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:42:19 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:42:19 -0400
M contrib/pg_upgrade/function.c
doc: Fix order of options on pgbench man page
commit : bd1710248795a495547a96f16d16592ad45f6943
author : Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:37:01 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 13 May 2013 21:37:01 -0400
M doc/src/sgml/pgbench.sgml
Fix handling of OID wraparound while in standalone mode.
commit : e9c336c78638c191642b18628c306d1c1573fb12
author : Tom Lane <[email protected]>
date : Mon, 13 May 2013 15:40:16 -0400
committer: Tom Lane <[email protected]>
date : Mon, 13 May 2013 15:40:16 -0400
If OID wraparound should occur while in standalone mode (unlikely but
possible), we want to advance the counter to FirstNormalObjectId not
FirstBootstrapObjectId. Otherwise, user objects might be created with OIDs
in the system-reserved range. That isn't immediately harmful but it poses
a risk of conflicts during future pg_upgrade operations.
Noted by Andres Freund. Back-patch to all supported branches, since all of
them are supported sources for pg_upgrade operations.
M src/backend/access/transam/varsup.c
Fix handling of strict non-set functions with NULLs in set-valued inputs.
commit : 904af8db8a99409257db1eed0b056c8098e9013c
author : Tom Lane <[email protected]>
date : Sun, 12 May 2013 13:08:12 -0400
committer: Tom Lane <[email protected]>
date : Sun, 12 May 2013 13:08:12 -0400
In a construct like "select plain_function(set_returning_function(...))",
the plain function is applied to each output row of the SRF successively.
If some of the SRF outputs are NULL, and the plain function is strict,
you'd expect to get NULL results for such rows ... but what actually
happened was that such rows were omitted entirely from the result set.
This was due to confusion of this case with what should happen for nested
set-returning functions; a strict SRF is indeed supposed to yield an empty
set for null input. Per bug #8150 from Erwin Brandstetter.
Although this has been broken forever, we're not back-patching because
of the possibility that some apps out there expect the incorrect behavior.
This change should be listed as a possible incompatibility in the 9.3
release notes.
M src/backend/executor/execQual.c
M src/test/regress/expected/arrays.out
M src/test/regress/sql/arrays.sql
pgbench: Fix order of options in --help output
commit : f0ed3a8a99b052d2d5e0b6153a8907b90c486636
author : Peter Eisentraut <[email protected]>
date : Sat, 11 May 2013 21:57:54 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 11 May 2013 21:57:54 -0400
M contrib/pgbench/pgbench.c
pg_xlogdump: Improve --help output
commit : a4fd3366a6555a065f1be9f127110c9f642323b9
author : Peter Eisentraut <[email protected]>
date : Sat, 11 May 2013 21:55:37 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 11 May 2013 21:55:37 -0400
M contrib/pg_xlogdump/pg_xlogdump.c
Fix to_number() to correctly ignore thousands separator when it's '.'.
commit : 35d50b527a9f99e22a317269ceb00491397d0e00
author : Tom Lane <[email protected]>
date : Sat, 11 May 2013 16:35:03 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 May 2013 16:35:03 -0400
The existing code in NUM_numpart_from_char has hard-wired logic to treat
'.' as decimal point, even when we're using a locale-aware format string
and the locale says that '.' is the thousands separator. This results in
clearly wrong answers in FM mode (where we must be able to identify the
decimal point location), as per bug report from Patryk Kordylewski.
Since the initialization code in NUM_prepare_locale already sets up
Np->decimal as either the locale decimal-point string or "." depending
on which decimal-point format code was used, there's really no need to
have any extra logic at all in NUM_numpart_from_char: we only need to
test for a match to Np->decimal.
(Note: AFAICS there's nothing in here that explicitly checks for thousands
separators --- rather, any unmatched character is silently skipped over.
That's pretty bogus IMO but it's not the issue being complained of.)
This is a longstanding bug, but it's possible that some existing apps
are depending on '.' being recognized as decimal point even when using
a D format code. Hence, no back-patch. We should probably list this
as a potential incompatibility in the 9.3 release notes.
M src/backend/utils/adt/formatting.c
Fix buildfarm incompatibility in updated pg_upgrade test script.
commit : 8cade04c105f2d31c941bee9716a304f93a41351
author : Tom Lane <[email protected]>
date : Sat, 11 May 2013 16:14:19 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 May 2013 16:14:19 -0400
Looks like some versions of the buildfarm script try to set the port via
--port in $EXTRA_REGRESS_OPTS. Override that ...
M contrib/pg_upgrade/test.sh
Make pg_upgrade's test script attempt to select a non-conflicting port.
commit : 7e2b1c03ce24e8fefa2080c0f1f8cfbb86ce664e
author : Tom Lane <[email protected]>
date : Sat, 11 May 2013 14:22:18 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 May 2013 14:22:18 -0400
Previously, the port number used in this test script was hard-wired at
pg_upgrade's default of 50432; which is not so great because parallel build
runs might conflict. Commit 3d53173e20d151341f894f79d556768c845ba3e4
removed this setting for the postmasters started by the script proper
(not by pg_upgrade), which didn't do anything to fix that problem and also
guaranteed a failure if there was a live postmaster at the build's default
port number. Instead, select a non-conflicting temporary port number in
the same way that pg_regress.c does. (Its method isn't entirely
bulletproof, but given the lack of complaints I'm not going to worry
about that today.)
In passing, unset MAKEFLAGS and MAKELEVEL to avoid problems with the
script's internal invocations of make, for the same reason pg_regress.c
does: it could cause problems in a parallel make.
M contrib/pg_upgrade/test.sh
Update CREATE FUNCTION documentation about argument names.
commit : c263f16a20a12ee63bbf0c4769d87db3184709eb
author : Tom Lane <[email protected]>
date : Sat, 11 May 2013 12:07:47 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 May 2013 12:07:47 -0400
The 9.2 patch that added argument name support in SQL-language functions
missed updating a parenthetical comment about that in the CREATE FUNCTION
reference page. Noted by Erwin Brandstetter.
M doc/src/sgml/ref/create_function.sgml
Guard against input_rows == 0 in estimate_num_groups().
commit : 69cc60dcfd0fb643cd2fe3ce66d4389858bfdeb5
author : Tom Lane <[email protected]>
date : Fri, 10 May 2013 17:15:30 -0400
committer: Tom Lane <[email protected]>
date : Fri, 10 May 2013 17:15:30 -0400
This case doesn't normally happen, because the planner usually clamps
all row estimates to at least one row; but I found that it can arise
when dealing with relations excluded by constraints. Without a defense,
estimate_num_groups() can return zero, which leads to divisions by zero
inside the planner as well as assertion failures in the executor.
An alternative fix would be to change set_dummy_rel_pathlist() to make
the size estimate for a dummy relation 1 row instead of 0, but that seemed
pretty ugly; and probably someday we'll want to drop the convention that
the minimum rowcount estimate is 1 row.
Back-patch to 8.4, as the problem can be demonstrated that far back.
M src/backend/utils/adt/selfuncs.c
Fix pgp_pub_decrypt() so it works for secret keys with passwords.
commit : 477b5a0e24f3b62a470f9684e22e36a2c7735274
author : Tom Lane <[email protected]>
date : Fri, 10 May 2013 13:06:48 -0400
committer: Tom Lane <[email protected]>
date : Fri, 10 May 2013 13:06:48 -0400
Per report from Keith Fiske.
Marko Kreen
M contrib/pgcrypto/expected/pgp-pubkey-decrypt.out
M contrib/pgcrypto/pgp-pubkey.c
M contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql
Fix management of fn_extra caching during repeated GiST index scans.
commit : 91715e82932665c6e125d100eeaa1b6debf73e7b
author : Tom Lane <[email protected]>
date : Thu, 9 May 2013 23:08:19 -0400
committer: Tom Lane <[email protected]>
date : Thu, 9 May 2013 23:08:19 -0400
Commit d22a09dc70f9830fa78c1cd1a3a453e4e473d354 introduced official support
for GiST consistentFns that want to cache data using the FmgrInfo fn_extra
pointer: the idea was to preserve the cached values across gistrescan(),
whereas formerly they'd been leaked. However, there was an oversight in
that, namely that multiple scan keys might reference the same column's
consistentFn; the code would result in propagating the same cache value
into multiple scan keys, resulting in crashes or wrong answers. Use a
separate array instead to ensure that each scan key keeps its own state.
Per bug #8143 from Joel Roller. Back-patch to 9.2 where the bug was
introduced.
M src/backend/access/gist/gistscan.c
Update key words table for 9.3
commit : cda7acee5f30bfdca6cfaeacfc4fb695f8c8d5d8
author : Peter Eisentraut <[email protected]>
date : Thu, 9 May 2013 22:26:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 9 May 2013 22:26:04 -0400
M doc/src/sgml/keywords.sgml
Remove make_keywords
commit : bd98852cbd19083ea46a90056666e087f1bb0d67
author : Peter Eisentraut <[email protected]>
date : Thu, 9 May 2013 22:21:43 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 9 May 2013 22:21:43 -0400
It is not used anymore.
D src/tools/make_keywords
Use pg_dump's --quote-all-identifiers option in pg_upgrade.
commit : 1c36700e9e3cfb96fde636def87cafb57299f4da
author : Tom Lane <[email protected]>
date : Thu, 9 May 2013 17:34:34 -0400
committer: Tom Lane <[email protected]>
date : Thu, 9 May 2013 17:34:34 -0400
This helps guard against changes in the set of reserved keywords from
one version to another. In theory it should only be an issue if we
de-reserve a keyword in a newer release, since that can create the type
of problem shown in bug #8128.
Back-patch to 9.1 where the --quote-all-identifiers option was added.
M contrib/pg_upgrade/dump.c
pg_upgrade docs: give tips on automation
commit : df9d764186cf6082376e25fe04050ad39462312d
author : Bruce Momjian <[email protected]>
date : Thu, 9 May 2013 16:05:26 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 9 May 2013 16:05:26 -0400
Document that post-upgrade steps are likely to be the same for all
clusters with the same DDL/schemas; this should help automated
upgrades.
M doc/src/sgml/pgupgrade.sgml
Update collate.linux.utf8.out for ruleutils.c line-wrapping changes.
commit : 284e28f2280a8f69014df689ae5e2843eebd7c59
author : Tom Lane <[email protected]>
date : Wed, 8 May 2013 22:47:33 -0400
committer: Tom Lane <[email protected]>
date : Wed, 8 May 2013 22:47:33 -0400
Missed in commit 62e666400dddf605b9b6d9a7ac2918711b5c5629.
M src/test/regress/expected/collate.linux.utf8.out
Better fix for permissions tests in excluded subqueries.
commit : a7b965382cf0cb30aeacb112572718045e6d4be7
author : Tom Lane <[email protected]>
date : Wed, 8 May 2013 16:59:09 -0400
committer: Tom Lane <[email protected]>
date : Wed, 8 May 2013 16:59:09 -0400
This reverts the code changes in 50c137487c96e629e0e5372bb3d1b5f1a2f71a88,
which turned out to induce crashes and not completely fix the problem
anyway. That commit only considered single subqueries that were excluded
by constraint-exclusion logic, but actually the problem also exists for
subqueries that are appendrel members (ie part of a UNION ALL list). In
such cases we can't add a dummy subpath to the appendrel's AppendPath list
without defeating the logic that recognizes when an appendrel is completely
excluded. Instead, fix the problem by having setrefs.c scan the rangetable
an extra time looking for subqueries that didn't get into the plan tree.
(This approach depends on the 9.2 change that made set_subquery_pathlist
generate dummy paths for excluded single subqueries, so that the exclusion
behavior is the same for single subqueries and appendrel members.)
Note: it turns out that the appendrel form of the missed-permissions-checks
bug exists as far back as 8.4. However, since the practical effect of that
bug seems pretty minimal, consensus is to not attempt to fix it in the back
branches, at least not yet. Possibly we could back-port this patch once
it's gotten a reasonable amount of testing in HEAD. For the moment I'm
just going to revert the previous patch in 9.2.
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/setrefs.c
M src/test/regress/expected/privileges.out
M src/test/regress/sql/privileges.sql
The data structure used in unaccent is a trie, not suffix tree.
commit : 4b06c1820a1b96769ea7447a0fc8e0edabbf57f5
author : Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 20:57:42 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 20:57:42 +0300
Fix the term used in variable and struct names, and comments.
Alexander Korotkov
M contrib/unaccent/unaccent.c
Fix walsender failure at promotion.
commit : 2ffa66f4975c99e52984f7ee81b47d137b5b4751
author : Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 20:10:17 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 20:10:17 +0300
If a standby server has a cascading standby server connected to it, it's
possible that WAL has already been sent up to the next WAL page boundary,
splitting a WAL record in the middle, when the first standby server is
promoted. Don't throw an assertion failure or error in walsender if that
happens.
Also, fix a variant of the same bug in pg_receivexlog: if it had already
received WAL on previous timeline up to a segment boundary, when the
upstream standby server is promoted so that the timeline switch record falls
on the previous segment, pg_receivexlog would miss the segment containing
the timeline switch. To fix that, have walsender send the position of the
timeline switch at end-of-streaming, in addition to the next timeline's ID.
It was previously assumed that the switch happened exactly where the
streaming stopped.
Note: this is an incompatible change in the streaming protocol. You might
get an error if you try to stream over timeline switches, if the client is
running 9.3beta1 and the server is more recent. It should be fine after a
reconnect, however.
Reported by Fujii Masao.
M doc/src/sgml/protocol.sgml
M src/backend/access/transam/xlog.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Use the term "radix tree" instead of "suffix tree" for SP-GiST text opclass.
commit : cb953d8b1bf7386ff20300cd80b29b7e8657dcbd
author : Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 14:29:28 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 8 May 2013 14:29:28 +0300
What we have implemented is a radix tree (or a radix trie or a patricia
trie), but the docs and code comments incorrectly called it a "suffix tree".
Alexander Korotkov
M doc/src/sgml/indices.sgml
M doc/src/sgml/spgist.sgml
M src/backend/access/spgist/README
M src/backend/access/spgist/spgtextproc.c
M src/include/catalog/pg_proc.h
M src/test/regress/expected/create_index.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/sql/create_index.sql
doc: Add IDs to link targets used by phpPgAdmin
commit : 20c00ca668f2c5ca4e7e7afd1bd8faa0909ee527
author : Peter Eisentraut <[email protected]>
date : Tue, 7 May 2013 21:23:21 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 7 May 2013 21:23:21 -0400
Karl O. Pinc
M doc/src/sgml/ddl.sgml
M doc/src/sgml/extend.sgml
Stress that backup_label file is critical in the docs.
commit : 7f03a791fa131eb20c6df07740522163d8b3c94e
author : Heikki Linnakangas <[email protected]>
date : Tue, 7 May 2013 16:55:04 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 7 May 2013 16:55:04 +0300
It is surprisingly common mistake to leave out backup_label file from a base
backup. Say more explicitly that it must be included.
Jeff Janes, with minor rewording by me.
M doc/src/sgml/backup.sgml
Stamp 9.3beta1.
commit : 817a89423f429a6a8b36847ee499f5b6be39c3be
author : Tom Lane <[email protected]>
date : Mon, 6 May 2013 16:57:06 -0400
committer: Tom Lane <[email protected]>
date : Mon, 6 May 2013 16:57:06 -0400
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
Desultory copy-editing of the 9.3 release notes.
commit : f1ff90cfb1c5168cd442593de62b419ac9ab6469
author : Tom Lane <[email protected]>
date : Mon, 6 May 2013 16:02:37 -0400
committer: Tom Lane <[email protected]>
date : Mon, 6 May 2013 16:02:37 -0400
I had time for a quick review of the notes, so here are some fixes.
M doc/src/sgml/release-9.3.sgml
Move materialized views' is-populated status into their pg_class entries.
commit : 1d6c72a55b23554cfb946527dc77f9d80044ae2c
author : Tom Lane <[email protected]>
date : Mon, 6 May 2013 13:26:51 -0400
committer: Tom Lane <[email protected]>
date : Mon, 6 May 2013 13:26:51 -0400
Previously this state was represented by whether the view's disk file had
zero or nonzero size, which is problematic for numerous reasons, since it's
breaking a fundamental assumption about heap storage. This was done to
allow unlogged matviews to revert to unpopulated status after a crash
despite our lack of any ability to update catalog entries post-crash.
However, this poses enough risk of future problems that it seems better to
not support unlogged matviews until we can find another way. Accordingly,
revert that choice as well as a number of existing kluges forced by it
in favor of creating a pg_class.relispopulated flag column.
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/func.sgml
M src/backend/catalog/heap.c
M src/backend/catalog/system_views.sql
M src/backend/commands/cluster.c
M src/backend/commands/createas.c
M src/backend/commands/matview.c
M src/backend/commands/vacuumlazy.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/cache/relcache.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/include/catalog/catversion.h
M src/include/catalog/heap.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_proc.h
M src/include/commands/matview.h
M src/include/utils/builtins.h
M src/include/utils/rel.h
M src/test/regress/expected/matview.out
M src/test/regress/expected/rules.out
M src/test/regress/sql/matview.sql
Back out some recent translation updates.
commit : 5da5798004e90b14332918e7db702271442d465d
author : Tom Lane <[email protected]>
date : Mon, 6 May 2013 12:28:13 -0400
committer: Tom Lane <[email protected]>
date : Mon, 6 May 2013 12:28:13 -0400
Very old versions of msgfmt choke on these specific messages, for reasons
that are unclear at the moment. Remove them so that we can ship a beta
release and not get complaints from testers (these messages will just go
untranslated, instead, and we're hardly at 100% coverage anyway).
Peter Eisentraut will look for a better fix later.
M src/backend/po/de.po
M src/bin/pg_basebackup/po/cs.po
Disallow unlogged materialized views.
commit : 3223b25ff737c2bf4a642c0deb7be2b30bfecc6e
author : Tom Lane <[email protected]>
date : Mon, 6 May 2013 11:57:05 -0400
committer: Tom Lane <[email protected]>
date : Mon, 6 May 2013 11:57:05 -0400
The initial implementation of this feature was really unsupportable,
because it's relying on the physical size of an on-disk file to carry the
relation's populated/unpopulated state, which is at least a modularity
violation and could have serious long-term consequences. We could say that
an unlogged matview goes to empty on crash, but not everybody likes that
definition, so let's just remove the feature for 9.3. We can add it back
when we have a less klugy implementation.
I left the grammar and tab-completion support for CREATE UNLOGGED
MATERIALIZED VIEW in place, since it's harmless and allows delivering a
more specific error message about the unsupported feature.
I'm committing this separately to ease identification of what should be
reverted when/if we are able to re-enable the feature.
M doc/src/sgml/ref/create_materialized_view.sgml
M src/backend/parser/analyze.c
M src/test/regress/expected/matview.out
M src/test/regress/sql/matview.sql
9.3 release notes: use "restoration"
commit : c29866073ba3aab67d78c0d19ecdf790f36a8e1a
author : Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:57:23 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:57:23 -0400
Andrew Dunstan
M doc/src/sgml/release-9.3.sgml
9.3 release notes: Add cache of local locks
commit : 2fbffc0ddf1e6c7cd8744d8ae26f7daba902d631
author : Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:56:27 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:56:27 -0400
Mention this also helps in the restoring of pg_dumps.
Jeff Janes
M doc/src/sgml/release-9.3.sgml
9.3 release notes: update from Amit Kapila
commit : c750aa90f2cd411bea9ee3844bb41ff50a0eb436
author : Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:47:10 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 10:47:10 -0400
No need to mention wal_receiver_status_interval.
M doc/src/sgml/release-9.3.sgml
Execute SET TRANSACTION SNAPSHOT during pg_dump Previous coding set the SQL buffer but never executed
commit : b2ad82dafaae29975dd12e8c43cf2edaa0f23f4b
author : Simon Riggs <[email protected]>
date : Mon, 6 May 2013 15:37:17 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 6 May 2013 15:37:17 +0100
Bug noted by me during beta testing
M src/bin/pg_dump/pg_dump.c
Revert idea of zer-padding padding session id in log_line_prefix
commit : 8b06e6aba8773df8040b357a1cb058879ed2d94f
author : Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 08:59:39 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 6 May 2013 08:59:39 -0400
Removal of doc adjustment and release note mention as well.
M doc/src/sgml/config.sgml
M doc/src/sgml/release-9.3.sgml
M src/backend/utils/error/elog.c
Translation updates
commit : 539ecc92415a51bccb0805348a2a414a8e8ab7e7
author : Peter Eisentraut <[email protected]>
date : Sun, 5 May 2013 22:34:23 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 5 May 2013 22:34:23 -0400
M src/backend/nls.mk
M src/backend/po/de.po
M src/backend/po/es.po
M src/backend/po/fr.po
A src/backend/po/it.po
M src/backend/po/ja.po
A src/backend/po/pl.po
M src/backend/po/pt_BR.po
A src/backend/po/ru.po
M src/backend/po/zh_CN.po
M src/backend/po/zh_TW.po
M src/bin/initdb/nls.mk
M src/bin/initdb/po/cs.po
M src/bin/initdb/po/de.po
M src/bin/initdb/po/es.po
M src/bin/initdb/po/fr.po
M src/bin/initdb/po/it.po
M src/bin/initdb/po/ja.po
A src/bin/initdb/po/pl.po
M src/bin/initdb/po/pt_BR.po
M src/bin/initdb/po/ru.po
M src/bin/initdb/po/zh_CN.po
M src/bin/pg_basebackup/nls.mk
A src/bin/pg_basebackup/po/cs.po
M src/bin/pg_basebackup/po/de.po
M src/bin/pg_basebackup/po/es.po
M src/bin/pg_basebackup/po/fr.po
A src/bin/pg_basebackup/po/it.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
A src/bin/pg_basebackup/po/ru.po
A src/bin/pg_basebackup/po/zh_CN.po
M src/bin/pg_config/nls.mk
A src/bin/pg_config/po/cs.po
M src/bin/pg_config/po/de.po
M src/bin/pg_config/po/es.po
M src/bin/pg_config/po/fr.po
M src/bin/pg_config/po/it.po
M src/bin/pg_config/po/ja.po
A src/bin/pg_config/po/pl.po
M src/bin/pg_config/po/pt_BR.po
M src/bin/pg_config/po/ru.po
M src/bin/pg_config/po/zh_CN.po
M src/bin/pg_controldata/nls.mk
A src/bin/pg_controldata/po/cs.po
M src/bin/pg_controldata/po/de.po
M src/bin/pg_controldata/po/es.po
M src/bin/pg_controldata/po/fr.po
M src/bin/pg_controldata/po/it.po
M src/bin/pg_controldata/po/ja.po
A src/bin/pg_controldata/po/pl.po
M src/bin/pg_controldata/po/pt_BR.po
M src/bin/pg_controldata/po/ru.po
M src/bin/pg_controldata/po/zh_CN.po
M src/bin/pg_ctl/nls.mk
A src/bin/pg_ctl/po/cs.po
M src/bin/pg_ctl/po/de.po
M src/bin/pg_ctl/po/es.po
M src/bin/pg_ctl/po/fr.po
M src/bin/pg_ctl/po/it.po
M src/bin/pg_ctl/po/ja.po
A src/bin/pg_ctl/po/pl.po
M src/bin/pg_ctl/po/pt_BR.po
M src/bin/pg_ctl/po/ru.po
M src/bin/pg_ctl/po/sv.po
M 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/it.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
A src/bin/pg_dump/po/ru.po
M src/bin/pg_dump/po/zh_CN.po
M src/bin/pg_resetxlog/nls.mk
A src/bin/pg_resetxlog/po/cs.po
M src/bin/pg_resetxlog/po/de.po
M src/bin/pg_resetxlog/po/es.po
M src/bin/pg_resetxlog/po/fr.po
M src/bin/pg_resetxlog/po/it.po
M src/bin/pg_resetxlog/po/ja.po
A src/bin/pg_resetxlog/po/pl.po
M src/bin/pg_resetxlog/po/pt_BR.po
M src/bin/pg_resetxlog/po/ru.po
M src/bin/pg_resetxlog/po/zh_CN.po
M src/bin/psql/nls.mk
M src/bin/psql/po/cs.po
M src/bin/psql/po/de.po
M src/bin/psql/po/es.po
M src/bin/psql/po/fr.po
A src/bin/psql/po/it.po
M src/bin/psql/po/ja.po
A src/bin/psql/po/pl.po
M src/bin/psql/po/pt_BR.po
A src/bin/psql/po/ru.po
M src/bin/psql/po/zh_CN.po
M src/bin/psql/po/zh_TW.po
M src/bin/scripts/nls.mk
M src/bin/scripts/po/cs.po
M src/bin/scripts/po/de.po
M src/bin/scripts/po/es.po
M src/bin/scripts/po/fr.po
M src/bin/scripts/po/it.po
M src/bin/scripts/po/ja.po
A src/bin/scripts/po/pl.po
M src/bin/scripts/po/pt_BR.po
A src/bin/scripts/po/ru.po
M src/bin/scripts/po/zh_CN.po
M src/interfaces/ecpg/ecpglib/nls.mk
A src/interfaces/ecpg/ecpglib/po/cs.po
M src/interfaces/ecpg/ecpglib/po/de.po
M src/interfaces/ecpg/ecpglib/po/es.po
M src/interfaces/ecpg/ecpglib/po/fr.po
M src/interfaces/ecpg/ecpglib/po/it.po
A src/interfaces/ecpg/ecpglib/po/pl.po
M src/interfaces/ecpg/ecpglib/po/pt_BR.po
A src/interfaces/ecpg/ecpglib/po/ru.po
M src/interfaces/ecpg/ecpglib/po/zh_CN.po
M src/interfaces/ecpg/preproc/nls.mk
A src/interfaces/ecpg/preproc/po/cs.po
M src/interfaces/ecpg/preproc/po/de.po
M src/interfaces/ecpg/preproc/po/es.po
M src/interfaces/ecpg/preproc/po/fr.po
M src/interfaces/ecpg/preproc/po/it.po
A src/interfaces/ecpg/preproc/po/pl.po
M src/interfaces/ecpg/preproc/po/pt_BR.po
A src/interfaces/ecpg/preproc/po/ru.po
M src/interfaces/ecpg/preproc/po/zh_CN.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/it.po
M src/interfaces/libpq/po/ja.po
A src/interfaces/libpq/po/pl.po
M src/interfaces/libpq/po/pt_BR.po
M src/interfaces/libpq/po/ru.po
M src/interfaces/libpq/po/tr.po
M src/interfaces/libpq/po/zh_CN.po
M src/interfaces/libpq/po/zh_TW.po
M src/pl/plperl/nls.mk
A src/pl/plperl/po/cs.po
M src/pl/plperl/po/de.po
M src/pl/plperl/po/es.po
M src/pl/plperl/po/fr.po
M src/pl/plperl/po/it.po
M src/pl/plperl/po/ja.po
A src/pl/plperl/po/pl.po
M src/pl/plperl/po/pt_BR.po
M src/pl/plperl/po/ro.po
A src/pl/plperl/po/ru.po
M src/pl/plperl/po/tr.po
M src/pl/plperl/po/zh_CN.po
M src/pl/plpgsql/src/nls.mk
A src/pl/plpgsql/src/po/cs.po
M src/pl/plpgsql/src/po/de.po
M src/pl/plpgsql/src/po/es.po
M src/pl/plpgsql/src/po/fr.po
M src/pl/plpgsql/src/po/it.po
M src/pl/plpgsql/src/po/ja.po
M src/pl/plpgsql/src/po/pl.po
M src/pl/plpgsql/src/po/pt_BR.po
M src/pl/plpgsql/src/po/ro.po
A src/pl/plpgsql/src/po/ru.po
M src/pl/plpgsql/src/po/zh_CN.po
M src/pl/plpython/nls.mk
A src/pl/plpython/po/cs.po
M src/pl/plpython/po/de.po
M src/pl/plpython/po/es.po
M src/pl/plpython/po/fr.po
M src/pl/plpython/po/it.po
M src/pl/plpython/po/ja.po
A src/pl/plpython/po/pl.po
M src/pl/plpython/po/pt_BR.po
M src/pl/plpython/po/ro.po
A src/pl/plpython/po/ru.po
M src/pl/plpython/po/zh_CN.po
M src/pl/tcl/nls.mk
A src/pl/tcl/po/cs.po
M src/pl/tcl/po/de.po
M src/pl/tcl/po/es.po
M src/pl/tcl/po/fr.po
M src/pl/tcl/po/it.po
A src/pl/tcl/po/pl.po
M src/pl/tcl/po/pt_BR.po
A src/pl/tcl/po/ru.po
M src/pl/tcl/po/zh_CN.po
Improve behavior of \watch with non-tuple-returning commands.
commit : 626e6eda4f605788110bfc5fa95760305f7eb749
author : Tom Lane <[email protected]>
date : Sat, 4 May 2013 16:41:22 -0400
committer: Tom Lane <[email protected]>
date : Sat, 4 May 2013 16:41:22 -0400
Print the command tag if we get PGRES_COMMAND_OK, and throw an error for
other cases. Per gripe from Michael Paquier.
In passing, add an fflush(), just to be real sure the output appears
before we sleep.
M src/bin/psql/command.c
docs: Improve log_line_prefix session_id query
commit : 083d8fa79dbd693f48c1c195bf4f2af3d1e7dc67
author : Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 13:23:04 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 13:23:04 -0400
M doc/src/sgml/config.sgml
docs: log_line_prefix session id fix
commit : f87f214b7c09e20d954fae887809c41cc5ca68df
author : Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 13:15:54 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 13:15:54 -0400
Restore 4-byte designation for docs. Fix 9.3 doc query to properly pad
to four digits.
Backpatch to all active branches
Per suggestions from Ian Lawrence Barwick
M doc/src/sgml/config.sgml
9.3 docs: wording fixes
commit : 75d1406a194d16823e786a8d5094abd1e7e5661b
author : Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 11:52:18 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 11:52:18 -0400
From Erik Rijkers
M doc/src/sgml/release-9.3.sgml
docs: fix log_line_prefix session id docs
commit : 262a3629971bdf61c309843b385a58d97bf4badb
author : Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 11:05:16 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 11:05:16 -0400
Backpatch to 9.2.
Report from Ian Lawrence Barwick
M doc/src/sgml/config.sgml
9.3 release notes: adjustments
commit : c008ca6015732da09416381710066540cbfa735b
author : Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 10:44:49 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 May 2013 10:44:49 -0400
Fixes from Peter Geoghegan, Ian Lawrence Barwick, Marti Raudsepp
M doc/src/sgml/release-9.3.sgml
9.3 release notes: move compatibility items into their own section
commit : 2497dc0867afd5b51d50e090fce2e828baadc8c3
author : Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 21:11:35 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 21:11:35 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release notes: Add markup for pg_backup_start_time()
commit : 1136d7a74d9feeab556a970b4b1e548e05f92a70
author : Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 20:55:03 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 20:55:03 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release notes: Add links to SGML sections
commit : 15f27aebbb688495da8a77a1ae67ded38f569829
author : Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 19:40:23 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 19:40:23 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release notes: add markup for text
commit : 14c7a74b6ebe4743b79e4f500503ffaa8c8a8638
author : Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 14:48:12 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 14:48:12 -0400
Still need to add links for new features.
M doc/src/sgml/release-9.3.sgml
M doc/src/sgml/release.sgml
Improve SPI documentation about null-flags arrays.
commit : c091c431979c182bc835b345655c1c162479aeb3
author : Tom Lane <[email protected]>
date : Fri, 3 May 2013 14:39:28 -0400
committer: Tom Lane <[email protected]>
date : Fri, 3 May 2013 14:39:28 -0400
Clarify the description of nulls[] arguments, and use the same wording
for all SPI functions with this type of argument. Per gripe from Yuriy
Rusinov.
M doc/src/sgml/spi.sgml
9.3 release notes: update for current commits
commit : 5fcf944c2303232826be49c09943849480719936
author : Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 13:30:58 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 May 2013 13:30:58 -0400
Also, remove broken link in release.sgml.
M doc/src/sgml/release-9.3.sgml
M doc/src/sgml/release.sgml
9.3 release notes: suggested improvements from Jeff Janes and Josh Berkus
commit : c8f61ebdc6e0a260efeef432239d4d2e8202a30d
author : Bruce Momjian <[email protected]>
date : Thu, 2 May 2013 19:14:20 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 2 May 2013 19:14:20 -0400
M doc/src/sgml/release-9.3.sgml
Prevent (auto)vacuum from truncating first page of populated matview.
commit : b69ec7cc990fd8da75ed4c232899503217d7b9ae
author : Kevin Grittner <[email protected]>
date : Thu, 2 May 2013 17:33:03 -0500
committer: Kevin Grittner <[email protected]>
date : Thu, 2 May 2013 17:33:03 -0500
Per report from Fujii Masao, with regression test using his example.
M src/backend/commands/vacuumlazy.c
M src/test/regress/expected/matview.out
M src/test/regress/sql/matview.sql
pg_test_fsync: update output to show usecs/op clearer
commit : 095018bc32b70eff95bdf3c2959e6eef09dcfa6a
author : Bruce Momjian <[email protected]>
date : Thu, 2 May 2013 10:27:06 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 2 May 2013 10:27:06 -0400
M contrib/pg_test_fsync/pg_test_fsync.c
Use correct length to convert json unicode escapes.
commit : 5f8b4319b94476de715ffef9183227ac6f4925c0
author : Andrew Dunstan <[email protected]>
date : Wed, 1 May 2013 18:47:18 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 1 May 2013 18:47:18 -0400
Bug reported on IRC - fix due to Andrew Gierth.
M src/backend/utils/adt/json.c
Fix permission tests for views/tables proven empty by constraint exclusion.
commit : 50c137487c96e629e0e5372bb3d1b5f1a2f71a88
author : Tom Lane <[email protected]>
date : Wed, 1 May 2013 18:26:50 -0400
committer: Tom Lane <[email protected]>
date : Wed, 1 May 2013 18:26:50 -0400
A view defined as "select <something> where false" had the curious property
that the system wouldn't check whether users had the privileges necessary
to select from it. More generally, permissions checks could be skipped
for tables referenced in sub-selects or views that were proven empty by
constraint exclusion (although some quick testing suggests this seldom
happens in cases of practical interest). This happened because the planner
failed to include rangetable entries for such tables in the finished plan.
This was noticed in connection with erroneous handling of materialized
views, but actually the issue is quite unrelated to matviews. Therefore,
revert commit 200ba1667b3a8d7a9d559d2f05f83d209c9d8267 in favor of a more
direct test for the real problem.
Back-patch to 9.2 where the bug was introduced (by commit
7741dd6590073719688891898e85f0cb73453159).
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/plan/createplan.c
M src/test/regress/expected/matview.out
M src/test/regress/expected/privileges.out
M src/test/regress/sql/matview.sql
M src/test/regress/sql/privileges.sql
Add regression test for bug fixed by recent refactoring.
commit : 200ba1667b3a8d7a9d559d2f05f83d209c9d8267
author : Kevin Grittner <[email protected]>
date : Tue, 30 Apr 2013 15:02:43 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 30 Apr 2013 15:02:43 -0500
Test case by Andres Freund for bug fixed by Tom Lane's refactoring
in commit 5194024d72f33fb209e10f9ab0ada7cc67df45b7
M src/test/regress/expected/matview.out
M src/test/regress/sql/matview.sql
Fix pg_upgrade for 9.3 with data checksums. Previous changes misconstrued pg_upgrade internals causing build farm breakages.
commit : 87d3b35a1ca31a9d947a8f919a6006679216dff0
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 15:49:24 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 15:49:24 +0100
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.h
Revert previous temporary patch
commit : be475a2473b18a62a02d56c44047e16b54aac54d
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 15:32:10 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 15:32:10 +0100
M contrib/pg_upgrade/controldata.c
Temporarily silence pg_upgrade's checksums check
commit : 28377213bb6550cc5035b0ba258b518f80c1aaae
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 14:34:47 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 14:34:47 +0100
M contrib/pg_upgrade/controldata.c
Bump PG_CONTROL_VERSION to 937
commit : ceabfb20f9a7aadbb09ee1a276726fc309a39300
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 13:27:47 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 13:27:47 +0100
M src/include/catalog/pg_control.h
Record data_checksum_version in control file. The value is not used anywhere in code, but will allow future changes to the checksum version should that become necessary in the future.
commit : 443951748ce4c94b001877c7cf88b0ee969c79e7
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 12:27:12 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 12:27:12 +0100
M src/backend/access/transam/xlog.c
M src/backend/bootstrap/bootstrap.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/catalog/pg_control.h
M src/include/storage/bufpage.h
Ensure we MarkBufferDirty before visibilitymap_set() logs the heap page and sets the LSN. Otherwise a checkpoint could occur between those actions and leave us in an inconsistent state.
commit : 730924397c8151c3cf34e633211cd0fe4a0db112
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 08:15:49 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 08:15:49 +0100
Jeff Davis
M src/backend/commands/vacuumlazy.c
Compiler optimizations for page checksum code.
commit : fdea2530bd4afb3d512cb9700b1d8cd603fab0e7
author : Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 06:59:26 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 30 Apr 2013 06:59:26 +0100
Ants Aasma and Jeff Davis
M config/c-compiler.m4
M configure
M configure.in
M src/Makefile.global.in
M src/backend/storage/page/Makefile
pg_upgrade: Remove PGPORT handling from test suite
commit : 3d53173e20d151341f894f79d556768c845ba3e4
author : Peter Eisentraut <[email protected]>
date : Mon, 29 Apr 2013 22:17:29 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 29 Apr 2013 22:17:29 -0400
This code was left over from when pg_upgrade paid attention to PGPORT.
Now it would only affects the regression test run before the test run of
pg_upgrade. You can still set PGPORT for that, but there is no reason
to have the test driver default it to 50432.
M contrib/pg_upgrade/test.sh
Revert "pg_ctl: Add idempotent option"
commit : 187ca5e8e90baacc2d36c8bd0b08040f33c07fa1
author : Peter Eisentraut <[email protected]>
date : Mon, 29 Apr 2013 21:55:12 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 29 Apr 2013 21:55:12 -0400
This reverts commit 87306184580c9c49717b00d48a2f9e717f21e0a8. The
behavior in certain cases is still being debated, and it's too late to
solve this before beta.
M contrib/start-scripts/linux
M doc/src/sgml/ref/pg_ctl-ref.sgml
M src/bin/pg_ctl/pg_ctl.c
Postpone creation of pathkeys lists to fix bug #8049.
commit : db9f0e1d9a4a0842c814a464cdc9758c3f20b96c
author : Tom Lane <[email protected]>
date : Mon, 29 Apr 2013 14:49:01 -0400
committer: Tom Lane <[email protected]>
date : Mon, 29 Apr 2013 14:49:01 -0400
This patch gets rid of the concept of, and infrastructure for,
non-canonical PathKeys; we now only ever create canonical pathkey lists.
The need for non-canonical pathkeys came from the desire to have
grouping_planner initialize query_pathkeys and related pathkey lists before
calling query_planner. However, since query_planner didn't actually *do*
anything with those lists before they'd been made canonical, we can get rid
of the whole mess by just not creating the lists at all until the point
where we formerly canonicalized them.
There are several ways in which we could implement that without making
query_planner itself deal with grouping/sorting features (which are
supposed to be the province of grouping_planner). I chose to add a
callback function to query_planner's API; other alternatives would have
required adding more fields to PlannerInfo, which while not bad in itself
would create an ABI break for planner-related plugins in the 9.2 release
series. This still breaks ABI for anything that calls query_planner
directly, but it seems somewhat unlikely that there are any such plugins.
I had originally conceived of this change as merely a step on the way to
fixing bug #8049 from Teun Hoogendoorn; but it turns out that this fixes
that bug all by itself, as per the added regression test. The reason is
that now get_eclass_for_sort_expr is adding the ORDER BY expression at the
end of EquivalenceClass creation not the start, and so anything that is in
a multi-member EquivalenceClass has already been created with correct
em_nullable_relids. I am suspicious that there are related scenarios in
which we still need to teach get_eclass_for_sort_expr to compute correct
nullable_relids, but am not eager to risk destabilizing either 9.2 or 9.3
to fix bugs that are only hypothetical. So for the moment, do this and
stop here.
Back-patch to 9.2 but not to earlier branches, since they don't exhibit
this bug for lack of join-clause-movement logic that depends on
em_nullable_relids being correct. (We might have to revisit that choice
if any related bugs turn up.) In 9.2, don't change the signature of
make_pathkeys_for_sortclauses nor remove canonicalize_pathkeys, so as
not to risk more plugin breakage than we have to.
M src/backend/nodes/equalfuncs.c
M src/backend/optimizer/README
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/plan/planner.c
M src/include/nodes/relation.h
M src/include/optimizer/paths.h
M src/include/optimizer/planmain.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Ensure ANALYZE phase is not skipped because of canceled truncate.
commit : 5fc893760f60d57aca30163796db1abe516b3fac
author : Kevin Grittner <[email protected]>
date : Mon, 29 Apr 2013 13:05:26 -0500
committer: Kevin Grittner <[email protected]>
date : Mon, 29 Apr 2013 13:05:26 -0500
Patch b19e4250b45e91c9cbdd18d35ea6391ab5961c8d attempted to
preserve existing behavior regarding statistics generation in the
case that a truncation attempt was canceled due to lock conflicts.
It failed to do this accurately in two regards: (1) autovacuum had
previously generated statistics if the truncate attempt failed to
initially get the lock rather than having started the attempt, and
(2) the VACUUM ANALYZE command had always generated statistics.
Both of these changes were unintended, and are reverted by this
patch. On review, there seems to be consensus that the previous
failure to generate statistics when the truncate was terminated
was more an unfortunate consequence of how that effort was
previously terminated than a feature we want to keep; so this
patch generates statistics even when an autovacuum truncation
attempt terminates early. Another unintended change which is kept
on the basis that it is an improvement is that when a VACUUM
command is truncating, it will the new heuristic for avoiding
blocking other processes, rather than keeping an
AccessExclusiveLock on the table for however long the truncation
takes.
Per multiple reports, with some renaming per patch by Jeff Janes.
Backpatch to 9.0, where problem was created.
M src/backend/commands/vacuumlazy.c
Attempt to fix error recovery in COPY BOTH mode.
commit : 91fa8532f4053468acc08534a6aac516ccde47b7
author : Robert Haas <[email protected]>
date : Mon, 29 Apr 2013 06:29:32 -0400
committer: Robert Haas <[email protected]>
date : Mon, 29 Apr 2013 06:29:32 -0400
Previously, libpq and the backend had opposite ideas about whether
it was necessary for the client to send a CopyDone message after
receiving an ErrorResponse, making it impossible to cleanly exit
COPY BOTH mode. Fix libpq so that works correctly, adopting the
backend's notion that an ErrorResponse kills the copy in both
directions.
Adjust receivelog.c to avoid a degradation in the quality of the
resulting error messages. libpqwalreceiver.c is already doing
the right thing, so no adjustment needed there.
Add an explicit statement to the documentation explaining how
this part of the protocol is supposed to work, in the hopes of
avoiding future confusion in this area.
Since the consequences of all this confusion are very limited,
especially in the back-branches where no client ever attempts
to exit COPY BOTH mode without closing the connection entirely,
no back-patch.
M doc/src/sgml/protocol.sgml
M src/bin/pg_basebackup/receivelog.c
M src/interfaces/libpq/fe-protocol3.c
Introduce new page checksum algorithm and module. Isolate checksum calculation to its own module, so that bufpage knows little if anything about the details of the calculation.
commit : 43e7a668499b8a69a62cc539a0fbe6983384339c
author : Simon Riggs <[email protected]>
date : Mon, 29 Apr 2013 09:05:27 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 29 Apr 2013 09:05:27 +0100
This implementation is a modified FNV-1a hash checksum, details
of which are given in the new checksum.c header comments.
Basic implementation only, so we fix the output value.
Later related commits will add version numbers to pg_control,
compiler optimization flags and memory barriers.
Ants Aasma, reviewed by Jeff Davis and Simon Riggs
M src/backend/storage/page/Makefile
M src/backend/storage/page/bufpage.c
A src/backend/storage/page/checksum.c
A src/include/storage/checksum.h
Editorialize a bit on new ProcessUtility() API.
commit : f8db76e875099e5e49f5cd729a673e84c0b0471b
author : Tom Lane <[email protected]>
date : Sun, 28 Apr 2013 00:18:45 -0400
committer: Tom Lane <[email protected]>
date : Sun, 28 Apr 2013 00:18:45 -0400
Choose a saner ordering of parameters (adding a new input param after
the output params seemed a bit random), update the function's header
comment to match reality (cmon folks, is this really that hard?),
get rid of useless and sloppily-defined distinction between
PROCESS_UTILITY_SUBCOMMAND and PROCESS_UTILITY_GENERATED.
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/sepgsql/hooks.c
M src/backend/commands/extension.c
M src/backend/commands/schemacmds.c
M src/backend/commands/trigger.c
M src/backend/executor/functions.c
M src/backend/executor/spi.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/include/tcop/utility.h
Fix unsafe event-trigger coding in ProcessUtility().
commit : 5525e6c40bbda351a19b48317eba0f79aa32e447
author : Tom Lane <[email protected]>
date : Sat, 27 Apr 2013 23:11:28 -0400
committer: Tom Lane <[email protected]>
date : Sat, 27 Apr 2013 23:11:28 -0400
We mustn't run any of the event-trigger support code when handling
utility statements like START TRANSACTION or ABORT, because that code
may need to refresh event-trigger cache data, which requires being
inside a valid transaction. (This mistake explains the consistent
build failures exhibited by the CLOBBER_CACHE_ALWAYS buildfarm members,
as well as some irreproducible failures on other members.)
The least messy fix seems to be to break standard_ProcessUtility into two
functions, one that handles all the statements not supported by event
triggers, and one that contains the event-trigger support code and handles
the statements that are supported by event triggers.
This change also fixes several inconsistencies, such as four cases where
support had been installed for "ddl_event_start" but not "ddl_event_end"
triggers, plus the fact that InvokeDDLCommandEventTriggersIfSupported()
paid no mind to isCompleteQuery.
Dimitri Fontaine and Tom Lane
M src/backend/tcop/utility.c
pg_dump: Improve message formatting
commit : bbb4db4e04d4691d7bc42fa19995aee3e80fe2dc
author : Peter Eisentraut <[email protected]>
date : Sat, 27 Apr 2013 23:06:37 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 27 Apr 2013 23:06:37 -0400
M src/bin/pg_dump/pg_dump.c
Incidental cleanup of matviews code.
commit : 5194024d72f33fb209e10f9ab0ada7cc67df45b7
author : Tom Lane <[email protected]>
date : Sat, 27 Apr 2013 17:48:57 -0400
committer: Tom Lane <[email protected]>
date : Sat, 27 Apr 2013 17:48:57 -0400
Move checking for unscannable matviews into ExecOpenScanRelation, which is
a better place for it first because the open relation is already available
(saving a relcache lookup cycle), and second because this eliminates the
problem of telling the difference between rangetable entries that will or
will not be scanned by the query. In particular we can get rid of the
not-terribly-well-thought-out-or-implemented isResultRel field that the
initial matviews patch added to RangeTblEntry.
Also get rid of entirely unnecessary scannability check in the rewriter,
and a bogus decision about whether RefreshMatViewStmt requires a parse-time
snapshot.
catversion bump due to removal of a RangeTblEntry field, which changes
stored rules.
M src/backend/commands/createas.c
M src/backend/commands/matview.c
M src/backend/executor/execMain.c
M src/backend/executor/execUtils.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeIndexonlyscan.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/nodeTidscan.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/parser/analyze.c
M src/backend/rewrite/rewriteHandler.c
M src/include/catalog/catversion.h
M src/include/executor/executor.h
M src/include/nodes/parsenodes.h
Improve message about failed transaction log archiving
commit : f5d576c6d278a61beec282b9b276a3a3cb2aec50
author : Peter Eisentraut <[email protected]>
date : Fri, 26 Apr 2013 22:43:54 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 26 Apr 2013 22:43:54 -0400
The old phrasing appeared to imply that the failure was terminal.
Improve that by indicating that archiving will be tried again later.
M src/backend/postmaster/pgarch.c
Update config.guess and config.sub
commit : b53b603c919dd37444da0f15e8867c707ce1a03a
author : Peter Eisentraut <[email protected]>
date : Fri, 26 Apr 2013 22:13:03 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 26 Apr 2013 22:13:03 -0400
M config/config.guess
M config/config.sub
Fix collation assignment for aggregates with ORDER BY.
commit : 41a2760f611d1b3c1e67f755baf0a052b5cec9af
author : Tom Lane <[email protected]>
date : Fri, 26 Apr 2013 15:48:24 -0400
committer: Tom Lane <[email protected]>
date : Fri, 26 Apr 2013 15:48:24 -0400
ORDER BY expressions were being treated the same as regular aggregate
arguments for purposes of collation determination, but really they should
not affect the aggregate's collation at all; only collations of the
aggregate's regular arguments should affect it.
In many cases this mistake would lead to incorrectly throwing a "collation
conflict" error; but in some cases the corrected code will silently assign
a different collation to the aggregate than before, for example
agg(foo ORDER BY bar COLLATE "x")
which will now use foo's collation rather than "x" for the aggregate.
Given this risk and the lack of field complaints about the issue, it
doesn't seem prudent to back-patch.
In passing, rearrange code in assign_collations_walker so that we don't
need multiple copies of the standard logic for computing collation of a
node with children. (Previously, CaseExpr duplicated the standard logic,
and we would have needed a third copy for Aggref without this change.)
Andrew Gierth and David Fetter
M src/backend/parser/parse_collate.c
M src/test/regress/expected/collate.out
M src/test/regress/sql/collate.sql
Ensure that user created rows in extension tables get dumped if the table is explicitly requested, either with a -t/--table switch of the table itself, or by -n/--schema switch of the schema containing the extension table. Patch reviewed by Vibhor Kumar and Dimitri Fontaine.
commit : b42ea7981ce1e7484951a22662937541066d8647
author : Joe Conway <[email protected]>
date : Fri, 26 Apr 2013 11:50:00 -0700
committer: Joe Conway <[email protected]>
date : Fri, 26 Apr 2013 11:50:00 -0700
Backpatched to 9.1 when the extension management facility was added.
M src/bin/pg_dump/pg_dump.c
libpq: Fix a few bits that didn't get the memo about COPY BOTH.
commit : 5eb7c4d364c8733d20d7fc8a453a145ee6da10cf
author : Robert Haas <[email protected]>
date : Fri, 26 Apr 2013 08:57:47 -0400
committer: Robert Haas <[email protected]>
date : Fri, 26 Apr 2013 08:57:47 -0400
There's probably no real bug here at present, so not backpatching.
But it seems good to make these bits consistent with the rest of
libpq, so as to avoid future surprises.
Patch by me. Review by Tom Lane.
M src/interfaces/libpq/fe-protocol3.c
Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY commands.
commit : c3d09b3bd23f5f65b5eb8124a3c7592dad85a50c
author : Tom Lane <[email protected]>
date : Thu, 25 Apr 2013 16:58:05 -0400
committer: Tom Lane <[email protected]>
date : Thu, 25 Apr 2013 16:58:05 -0400
There was a high probability of two or more concurrent C.I.C. commands
deadlocking just before completion, because each would wait for the others
to release their reference snapshots. Fix by releasing the snapshot
before waiting for other snapshots to go away.
Per report from Paul Hinze. Back-patch to all active branches.
M src/backend/commands/indexcmds.c
Fix typo in comment.
commit : 447b3174f58be808e81408b2166b41d898292ab3
author : Heikki Linnakangas <[email protected]>
date : Thu, 25 Apr 2013 14:03:10 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 25 Apr 2013 14:03:10 +0300
Peter Geoghegan
M src/backend/storage/lmgr/lock.c
pg_basebackup: Add missing newlines at end of lines
commit : 6cf84628342ca859a15c9b1576fdbebc3575a0d2
author : Peter Eisentraut <[email protected]>
date : Wed, 24 Apr 2013 22:51:10 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 24 Apr 2013 22:51:10 -0400
M src/bin/pg_basebackup/receivelog.c
initdb: Improve some messages
commit : 4c0343d4af716813388a585390f5660c17a848f9
author : Peter Eisentraut <[email protected]>
date : Wed, 24 Apr 2013 22:50:33 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 24 Apr 2013 22:50:33 -0400
M src/bin/initdb/initdb.c
PL/pgSQL doc: Add example for RETURN QUERY
commit : 4d67961110d17768021bac2c00fd395942d03170
author : Peter Eisentraut <[email protected]>
date : Tue, 23 Apr 2013 22:46:36 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 23 Apr 2013 22:46:36 -0400
Erwin Brandstetter and Pavel Stěhule
M doc/src/sgml/plpgsql.sgml
Add missing #include.
commit : 0c1a160a68b89f5b2c31eac458ca2d62a622a524
author : Heikki Linnakangas <[email protected]>
date : Wed, 24 Apr 2013 19:11:25 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 24 Apr 2013 19:11:25 +0300
On non-Windows systems, sys/time.h was pulled in by portability/instr_time.h,
which pulled in time.h. We certainly should include time.h directly, since
we're using time(2), but the indirect include masked the problem on most
platforms.
Andres Freund
M src/bin/psql/command.c
Fix assertion failure for REFRESH MATERIALIZED VIEW in PL.
commit : 63e20041a2b5f98fdfe6b32af9550ca54ff8649f
author : Kevin Grittner <[email protected]>
date : Wed, 24 Apr 2013 08:39:06 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 24 Apr 2013 08:39:06 -0500
This was due to incomplete implementation of rowcount reporting
for RMV, which was due to initial waffling on whether it should
be provided. It seems unlikely to be a useful or universally
available number as more sophisticated techniques for maintaining
matviews are added, so remove the partial support rather than
completing it.
Per report of Jeevan Chalke, but with a different fix
M src/backend/executor/spi.c
Make fast promotion the default promotion mode. Continue to allow a request for synchronous checkpoints as a mechanism in case of problems.
commit : 2317a63328cd9d1c22d02218c6959f340b63d98f
author : Simon Riggs <[email protected]>
date : Wed, 24 Apr 2013 12:21:18 +0100
committer: Simon Riggs <[email protected]>
date : Wed, 24 Apr 2013 12:21:18 +0100
M src/backend/access/transam/xlog.c
M src/bin/pg_ctl/pg_ctl.c
9.3 release notes: adjustments per Alvaro
commit : 173c252bb2d9549fa091f606264e8da65672d5f4
author : Bruce Momjian <[email protected]>
date : Tue, 23 Apr 2013 23:21:09 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 23 Apr 2013 23:21:09 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release note updates from Dean Rasheed, Jov, Heikki Linnakangas, Erikjan Rijkers
commit : 2d3edce6b32b6c9a37c14684d63e457f1bd5c55a
author : Bruce Momjian <[email protected]>
date : Tue, 23 Apr 2013 17:06:17 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 23 Apr 2013 17:06:17 -0400
M doc/src/sgml/release-9.3.sgml
Remove prototype for cube(text) function that doesn't exist anymore.
commit : cc7b0c2553a69eee914783a1cf0f34a2cbbf9afe
author : Heikki Linnakangas <[email protected]>
date : Tue, 23 Apr 2013 13:48:14 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 23 Apr 2013 13:48:14 +0300
Adrian Schreyer
M contrib/cube/cube.c
9.3 release notes: add diacritics
commit : 98a1e7a735886b38bb0cc3bac5e96cffbf245de1
author : Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 17:17:00 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 17:17:00 -0400
Alvaro Herrera
M doc/src/sgml/release-9.3.sgml
9.3 release notes: adjustments per Alvaro and Robert
commit : e35388451bb7c32be2783d700bd8076e08514c2c
author : Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 16:05:06 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 16:05:06 -0400
M doc/src/sgml/release-9.3.sgml
Mention in docs that you can create SP-GiST indexes on range types.
commit : ae7363999ff36a6857b968ffee8487519273709b
author : Heikki Linnakangas <[email protected]>
date : Mon, 22 Apr 2013 21:51:14 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 22 Apr 2013 21:51:14 +0300
This is new in 9.3devel.
M doc/src/sgml/rangetypes.sgml
9.3 release notes: apply fixes suggested by Alvaro
commit : 4f8799a948a6b701e23de692237094c83146d3b6
author : Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 14:33:28 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 14:33:28 -0400
M doc/src/sgml/release-9.3.sgml
9.3 release notes: update streaming replication speedups
commit : beaa823bea8663779b12ce896e40038dd4796eaa
author : Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 10:22:43 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 22 Apr 2013 10:22:43 -0400
Andres Freund
M doc/src/sgml/release-9.3.sgml
doc: Improve example formatting
commit : e7d5ffe8ea9883f1b472036dfc098d555f5cd3ea
author : Peter Eisentraut <[email protected]>
date : Sun, 21 Apr 2013 22:21:29 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 21 Apr 2013 22:21:29 -0400
Erwin Brandstetter
M doc/src/sgml/plpgsql.sgml
doc: Fix syntax in example
commit : 53ecfddcebbf607badc678e294bf977334b79327
author : Peter Eisentraut <[email protected]>
date : Sun, 21 Apr 2013 22:16:12 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 21 Apr 2013 22:16:12 -0400
LANGUAGE 'plpgsql' no longer works. The single quotes need to be
removed.
Erwin Brandstetter
M doc/src/sgml/plpgsql.sgml
In 9.3 release notes, split up items
commit : c3ab4ea27d5e2cd341fc189eb413909f177d835e
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 21:05:31 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 21:05:31 -0400
Split log shipping speed improvement and fail-over speed improvement items.
Per request from Simon
M doc/src/sgml/release-9.3.sgml
9.3 release note adjustments per request from Andres Freund
commit : 4be535e2e44025975814937818c899fed7aafca3
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 10:08:58 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 10:08:58 -0400
M doc/src/sgml/release-9.3.sgml
Remove 9.3 item about fixing DROP INDEX CONCURRENTLY
commit : 1f2236edd1876a8718453f7d4e8e7fdef378c91e
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:16:23 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:16:23 -0400
Already fixed in back branch.
M doc/src/sgml/release-9.3.sgml
9.3 release note fixes
commit : ac96e6a8c2c5477344e78840e689e39e7b7b3cf1
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:14:34 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:14:34 -0400
Move commit_delay, fix Zoltan's name, and adjust range type histogram
text.
M doc/src/sgml/release-9.3.sgml
Adjust 9.3 release notes per request from Simon
commit : 864ec2f0cd5dd2ba5a7b40cc150cecb3010f739c
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:05:16 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 09:05:16 -0400
M doc/src/sgml/release-9.3.sgml
Reorder 9.3 release note items
commit : ef3defcf0d507abb75d9e9696f11b44f4fc09291
author : Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 00:57:18 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 21 Apr 2013 00:57:18 -0400
Typo fix from David Fetter.
M doc/src/sgml/release-9.3.sgml
More 9.3 release note reorderings
commit : f0922cbdcc54a11ea7eef955763aab4d540bf22f
author : Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 17:31:06 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 17:31:06 -0400
M doc/src/sgml/release-9.3.sgml
Fix Gilles Darold's name in 9.3 release notes.
commit : 488eb9055d3135268fdb401953f395885829d2f4
author : Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 17:09:10 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 17:09:10 -0400
M doc/src/sgml/release-9.3.sgml
Fix longstanding race condition in plancache.c.
commit : ac63dca607e8e22247defbc8fe03b6baa3628c42
author : Tom Lane <[email protected]>
date : Sat, 20 Apr 2013 16:59:21 -0400
committer: Tom Lane <[email protected]>
date : Sat, 20 Apr 2013 16:59:21 -0400
When creating or manipulating a cached plan for a transaction control
command (particularly ROLLBACK), we must not perform any catalog accesses,
since we might be in an aborted transaction. However, plancache.c busily
saved or examined the search_path for every cached plan. If we were
unlucky enough to do this at a moment where the path's expansion into
schema OIDs wasn't already cached, we'd do some catalog accesses; and with
some more bad luck such as an ill-timed signal arrival, that could lead to
crashes or Assert failures, as exhibited in bug #8095 from Nachiket Vaidya.
Fortunately, there's no real need to consider the search path for such
commands, so we can just skip the relevant steps when the subject statement
is a TransactionStmt. This is somewhat related to bug #5269, though the
failure happens during initial cached-plan creation rather than
revalidation.
This bug has been there since the plan cache was invented, so back-patch
to all supported branches.
M src/backend/utils/cache/plancache.c
Reorder some 9.3 release item entries
commit : 61b962345dd87276452922a5dbc21836266b43e0
author : Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:50:56 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:50:56 -0400
More to go.
M doc/src/sgml/release-9.3.sgml
Push 9.3 release SGML file
commit : 22f956f50cac33287daf76d79890057ba2fb3789
author : Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:32:32 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:32:32 -0400
Forgotten in previous commit.
A doc/src/sgml/release-9.3.sgml
Publish draft 9.3 release notes
commit : e9a35c2082e638c34567db1b5738f355475811d6
author : Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:29:58 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 20 Apr 2013 16:29:58 -0400
No links added yet.
M doc/src/sgml/filelist.sgml
M doc/src/sgml/release.sgml
doc: Mention SATA alongside IDE for Linux
commit : 540ec93e33c4eea7da502e8a4e76e5de4b994ac1
author : Peter Eisentraut <[email protected]>
date : Sat, 20 Apr 2013 15:56:22 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 20 Apr 2013 15:56:22 -0400
suggested by Jov
M doc/src/sgml/wal.sgml
Clean up references to SQL92
commit : cc26ea9fe2e41e73c955ea75bea7a77fbd062d64
author : Peter Eisentraut <[email protected]>
date : Sat, 20 Apr 2013 11:04:41 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 20 Apr 2013 11:04:41 -0400
In most cases, these were just references to the SQL standard in
general. In a few cases, a contrast was made between SQL92 and later
standards -- those have been kept unchanged.
M src/backend/catalog/pg_operator.c
M src/backend/executor/execMain.c
M src/backend/parser/gram.y
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_utilcmd.c
M src/backend/tcop/pquery.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/like_match.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/varlena.c
M src/include/nodes/parsenodes.h
M src/include/utils/date.h
M src/include/utils/timestamp.h
M src/interfaces/ecpg/preproc/pgc.l
M src/test/regress/expected/boolean.out
M src/test/regress/expected/case.out
M src/test/regress/expected/strings.out
M src/test/regress/input/constraints.source
M src/test/regress/output/constraints.source
M src/test/regress/sql/boolean.sql
M src/test/regress/sql/case.sql
M src/test/regress/sql/strings.sql
Improve error message when an FDW doesn't support WHERE CURRENT OF.
commit : 6e481ebff6368cb0ab5351a5ef3463747c35af22
author : Tom Lane <[email protected]>
date : Fri, 19 Apr 2013 16:14:56 -0400
committer: Tom Lane <[email protected]>
date : Fri, 19 Apr 2013 16:14:56 -0400
If an FDW fails to take special measures with a CurrentOfExpr, we will
end up trying to execute it as an ordinary qual, which was being treated
as a purely internal failure condition. Provide a more user-oriented
error message for such cases.
M src/backend/executor/execQual.c
Don't try to pass -I switch to postmaster in contrib/start-scripts/linux.
commit : 3353583d7ecf7c9f8bc5966ed0a2537dec71ffdc
author : Tom Lane <[email protected]>
date : Fri, 19 Apr 2013 13:28:45 -0400
committer: Tom Lane <[email protected]>
date : Fri, 19 Apr 2013 13:28:45 -0400
Undo thinko in commit 87306184580c9c49717b00d48a2f9e717f21e0a8.
Per bug #8098 from Catherine Devlin.
M contrib/start-scripts/linux
Fix typo in comment.
commit : 4580a4bd2c858acf85c578609b8373d730a04534
author : Robert Haas <[email protected]>
date : Fri, 19 Apr 2013 09:32:49 -0400
committer: Robert Haas <[email protected]>
date : Fri, 19 Apr 2013 09:32:49 -0400
Fabrízio de Royes Mello
M contrib/hstore/crc32.c
Standardize spelling of "nonblocking"
commit : acd5803053eb5ff6ad055ac1f7670625f1d111e0
author : Peter Eisentraut <[email protected]>
date : Thu, 18 Apr 2013 23:35:19 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 18 Apr 2013 23:35:19 -0400
Only adjusted the user-exposed messages and documentation, not all
source code comments.
M doc/src/sgml/indexam.sgml
M doc/src/sgml/mvcc.sgml
M src/backend/libpq/pqcomm.c
M src/backend/postmaster/postmaster.c
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-connect.c
pg_upgrade: Add checksum C comment
commit : 5286963066ce7420d80882528b5f07c28f39eacf
author : Bruce Momjian <[email protected]>
date : Wed, 17 Apr 2013 17:39:14 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 17 Apr 2013 17:39:14 -0400
We might eventually allow checksum to no-checksum upgrades.
M contrib/pg_upgrade/controldata.c
sepgsql: Minor improvement to test script, doc fix.
commit : f050457978f4f8deb1ac850439bf7c46c818f4ae
author : Robert Haas <[email protected]>
date : Wed, 17 Apr 2013 09:55:24 -0400
committer: Robert Haas <[email protected]>
date : Wed, 17 Apr 2013 09:55:24 -0400
KaiGai Kohei
M contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
sepgsql: One more getObjectIdentity in lieu of getObjectDescription.
commit : 0bf5c548d64b66b92197c6d8490b9b131ba02269
author : Robert Haas <[email protected]>
date : Wed, 17 Apr 2013 09:52:25 -0400
committer: Robert Haas <[email protected]>
date : Wed, 17 Apr 2013 09:52:25 -0400
KaiGai Kohei, based on a suggestion from Álvaro Herrera
M contrib/sepgsql/expected/label.out
M contrib/sepgsql/expected/misc.out
M contrib/sepgsql/proc.c
doc: Update PQgetssl() documentation
commit : b9bdaf3964a1fbd32e6140eb180dfa82ff1d8f23
author : Peter Eisentraut <[email protected]>
date : Tue, 16 Apr 2013 21:42:10 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 16 Apr 2013 21:42:10 -0400
The return type of PQgetssl() was changed from SSL* to void* a long time
ago, but the documentation was not updated.
M doc/src/sgml/libpq.sgml
pgindent: add newline to die() so script line number is not reported on failure.
commit : d61dddba37c27b1b5157b493bd04913c23ade7c2
author : Bruce Momjian <[email protected]>
date : Tue, 16 Apr 2013 10:30:31 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 16 Apr 2013 10:30:31 -0400
M src/tools/pgindent/pgindent
Remove some unused and seldom used fields from RelationAmInfo.
commit : 87ae9e72654ddddf25433b8a178e9268cf03f5b5
author : Heikki Linnakangas <[email protected]>
date : Tue, 16 Apr 2013 15:01:21 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 16 Apr 2013 15:01:21 +0300
This saves some memory from each index relcache entry. At least on a 64-bit
machine, it saves just enough to shrink a typical relcache entry's memory
usage from 2k to 1k. That's nice if you have a lot of backends and a lot of
indexes.
M src/backend/access/index/indexam.c
M src/include/utils/rel.h
Fix function return type confusion
commit : c74d586d2fc8aeaa303d8c60a8a9d959fdc5e791
author : Peter Eisentraut <[email protected]>
date : Mon, 15 Apr 2013 22:33:24 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 15 Apr 2013 22:33:24 -0400
When parse_hba_line's return type was changed from bool to a pointer,
the MANDATORY_AUTH_ARG macro wasn't adjusted.
M src/backend/libpq/hba.c
Mark json IO and extraction functions immutable.
commit : d788121aba3425b5d52fe20cc9facb6aca1294ce
author : Andrew Dunstan <[email protected]>
date : Mon, 15 Apr 2013 21:46:25 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 15 Apr 2013 21:46:25 -0400
Per complaint from Hubert Depesz Lubaczewski.
Catalog version bumped.
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
Correct handling of NULL arguments in json funcs.
commit : 728ec9731fb0b3f2de8ce66a394b71c64930f445
author : Andrew Dunstan <[email protected]>
date : Mon, 15 Apr 2013 16:20:21 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 15 Apr 2013 16:20:21 -0400
Per gripe from Tom Lane.
M src/backend/utils/adt/jsonfuncs.c
Improve GiST index search performance for trigram regex queries.
commit : 410bed2ab8c3864d7f34f9694d080adcaf446352
author : Tom Lane <[email protected]>
date : Mon, 15 Apr 2013 12:49:29 -0400
committer: Tom Lane <[email protected]>
date : Mon, 15 Apr 2013 12:49:29 -0400
The initial coding just descended the index if any of the target trigrams
were possibly present at the next level down. But actually we can apply
trigramsMatchGraph() so as to take advantage of AND requirements when there
are some. The input data might contain false positive matches, but that
can only result in a false positive result, not false negative, so it's
safe to do it this way.
Alexander Korotkov
M contrib/pg_trgm/trgm_gist.c
Add serial comma
commit : e08fdf13107b6685047cf055c7966845c8c96f90
author : Peter Eisentraut <[email protected]>
date : Sun, 14 Apr 2013 11:12:30 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 14 Apr 2013 11:12:30 -0400
M src/backend/rewrite/rewriteHandler.c
M src/test/regress/expected/updatable_views.out
pg_ctl: Add idempotent option
commit : 87306184580c9c49717b00d48a2f9e717f21e0a8
author : Peter Eisentraut <[email protected]>
date : Sat, 13 Apr 2013 23:42:42 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 13 Apr 2013 23:42:42 -0400
This changes the behavior of the start and stop actions to exit
successfully if the server was already started or stopped.
This changes the default behavior of the start action: Before, if the
server was already running, it would print a message and succeed. Now,
that situation will result in an error. When running in idempotent
mode, no message is printed and pg_ctl exits successfully.
It was considered to just make the idempotent behavior the default and
only option, but pg_upgrade needs the old behavior.
M contrib/start-scripts/linux
M doc/src/sgml/ref/pg_ctl-ref.sgml
M src/bin/pg_ctl/pg_ctl.c
Fix sporadic rebuilds for .pc files
commit : ba66752d278818b6b8797aec2e36cccf727db055
author : Peter Eisentraut <[email protected]>
date : Fri, 12 Apr 2013 22:45:51 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 12 Apr 2013 22:45:51 -0400
The build of .pc (pkg-config) files depends on all makefiles in use, and
in dependency tracking mode, the previous coding ended up including
/dev/null as a makefile. Apparently, on some platforms the modification
time of /dev/null changes sporadically, and so the .pc files would end
up being rebuilt every so often. Fix that by changing the makefile code
to do without using /dev/null.
M src/Makefile.global.in
Clean up the mess around EXPLAIN and materialized views.
commit : 0b337904213337db5026ef0a756a447588023935
author : Tom Lane <[email protected]>
date : Fri, 12 Apr 2013 19:25:20 -0400
committer: Tom Lane <[email protected]>
date : Fri, 12 Apr 2013 19:25:20 -0400
Revert the matview-related changes in explain.c's API, as per recent
complaint from Robert Haas. The reason for these appears to have been
principally some ill-considered choices around having intorel_startup do
what ought to be parse-time checking, plus a poor arrangement for passing
it the view parsetree it needs to store into pg_rewrite when creating a
materialized view. Do the latter by having parse analysis stick a copy
into the IntoClause, instead of doing it at runtime. (On the whole,
I seriously question the choice to represent CREATE MATERIALIZED VIEW as a
variant of SELECT INTO/CREATE TABLE AS, because that means injecting even
more complexity into what was already a horrid legacy kluge. However,
I didn't go so far as to rethink that choice ... yet.)
I also moved several error checks into matview parse analysis, and
made the check for external Params in a matview more accurate.
In passing, clean things up a bit more around interpretOidsOption(),
and fix things so that we can use that to force no-oids for views,
sequences, etc, thereby eliminating the need to cons up "oids = false"
options when creating them.
catversion bump due to change in IntoClause. (I wonder though if we
really need readfuncs/outfuncs support for IntoClause anymore.)
M src/backend/commands/createas.c
M src/backend/commands/explain.c
M src/backend/commands/prepare.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/view.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_param.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_utilcmd.c
M src/include/catalog/catversion.h
M src/include/commands/createas.h
M src/include/commands/explain.h
M src/include/commands/tablecmds.h
M src/include/nodes/primnodes.h
M src/include/parser/parse_clause.h
M src/include/parser/parse_param.h
M src/include/parser/parse_relation.h
pgindent: improve error messages
commit : 5003f94f661d3eff0c44774576fe2f1ae202da86
author : Bruce Momjian <[email protected]>
date : Fri, 12 Apr 2013 15:25:33 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 12 Apr 2013 15:25:33 -0400
per suggestion from Gurjeet Singh
M src/tools/pgindent/pgindent
pgindent: fix downloading of BSD indent binary
commit : 8daa4e960e15eb31e141585968c91cc666889585
author : Bruce Momjian <[email protected]>
date : Fri, 12 Apr 2013 11:42:27 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 12 Apr 2013 11:42:27 -0400
Also fix accessing pgentab binary and tar.
Gurjeet Singh
M src/tools/pgindent/pgindent
sepgsql: Enforce db_procedure:{execute} permission.
commit : f8a54e936bdf4c31b395a2ab7d7bc98eefa6dbad
author : Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:55:56 -0400
committer: Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:55:56 -0400
To do this, we add an additional object access hook type,
OAT_FUNCTION_EXECUTE.
KaiGai Kohei
M contrib/sepgsql/expected/label.out
M contrib/sepgsql/expected/misc.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/sepgsql-regtest.te
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/sql/label.sql
M contrib/sepgsql/sql/misc.sql
M doc/src/sgml/sepgsql.sgml
M src/backend/catalog/objectaccess.c
M src/backend/executor/execQual.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/tcop/fastpath.c
M src/include/catalog/objectaccess.h
Minor wording corrections for object-access hook stuff.
commit : d017bf41a32d08885f00a274603ed2e50816fe7f
author : Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:39:38 -0400
committer: Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:39:38 -0400
KaiGai Kohei
M src/backend/catalog/objectaccess.c
M src/include/catalog/objectaccess.h
sepgql: Use getObjectIdentity rather than getObjectDescription.
commit : b620fdabba3fd3c00587fb586f74eb7dc6eca223
author : Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:35:55 -0400
committer: Robert Haas <[email protected]>
date : Fri, 12 Apr 2013 08:35:55 -0400
KaiGai Kohei, based on a suggestion from Álvaro Herrera
M contrib/sepgsql/database.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/expected/alter.out
M contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
Document that git_changelog needs updating for major version stamping.
commit : be55f3b85966034028a8f162b8a6ca1deca66103
author : Bruce Momjian <[email protected]>
date : Thu, 11 Apr 2013 12:27:02 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 11 Apr 2013 12:27:02 -0400
M src/tools/RELEASE_CHANGES
Remove quotes around SQL statement in error message
commit : 6cd18a88b604ec2a9940d894f36e1bfdb22daf78
author : Alvaro Herrera <[email protected]>
date : Thu, 11 Apr 2013 12:00:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 11 Apr 2013 12:00:09 -0300
M src/backend/commands/event_trigger.c
M src/test/regress/expected/event_trigger.out
Fix confusion between ObjectType and ObjectClass
commit : 6a76edb1880d99744453dd275f30e0361281caab
author : Alvaro Herrera <[email protected]>
date : Thu, 11 Apr 2013 11:59:47 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 11 Apr 2013 11:59:47 -0300
Per report by Will Leinweber and Peter Eisentraut
M src/backend/catalog/dependency.c
M src/backend/commands/event_trigger.c
M src/include/commands/event_trigger.h
doc: Update DTrace information
commit : 82b55c9769ac1ae6146ab34b6e5fe49251e79a90
author : Peter Eisentraut <[email protected]>
date : Wed, 10 Apr 2013 23:05:13 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 10 Apr 2013 23:05:13 -0400
The old web site link no longer worked, and some information was
outdated.
M doc/src/sgml/monitoring.sgml
Update the description for the graphical installers
commit : d334b337b41e0c2e660324af2502dc9a5a691a02
author : Magnus Hagander <[email protected]>
date : Wed, 10 Apr 2013 21:37:49 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 10 Apr 2013 21:37:49 +0200
Remove references to "one click", as we're not supposed to call
them that anymore.
M doc/src/sgml/install-windows.sgml
M doc/src/sgml/pgupgrade.sgml
Fix SIGUSR1 handling by unconnected bgworkers
commit : f62ab623adc63023c6aee22e2a6fe190439ca0c3
author : Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 16:01:16 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 16:01:16 -0300
Latch activity was not being detected by non-database-connected workers; the
SIGUSR1 signal handler which is normally in charge of that was set to SIG_IGN.
Create a simple handler to call latch_sigusr1_handler instead.
Robert Haas (bug report and suggested fix)
M src/backend/postmaster/postmaster.c
Fix SIGHUP handling by unconnected bgworkers
commit : 61a7d576f2a287ef59071da9d9d7a0cd473ed98b
author : Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 15:59:45 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 15:59:45 -0300
Add a SignalUnconnectedWorkers() call so that non-database-connected background
workers are also notified when postmaster is SIGHUPped. Previously, only
database-connected workers were.
Michael Paquier (bug report and fix)
M src/backend/postmaster/postmaster.c
Make contrib/pg_trgm also support regex searches with GiST indexes.
commit : 6f5b8beb64d481c28a483090d10099c8d619c797
author : Tom Lane <[email protected]>
date : Wed, 10 Apr 2013 13:30:14 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Apr 2013 13:30:14 -0400
This wasn't addressed in the original patch, but it doesn't take very
much additional code to cover the case, so let's get it done.
Since pg_trgm 1.1 hasn't been released yet, I just changed the definition
of what's in it, rather than inventing a 1.2.
M contrib/pg_trgm/expected/pg_trgm.out
M contrib/pg_trgm/pg_trgm–1.0–1.1.sql
M contrib/pg_trgm/pg_trgm–1.1.sql
M contrib/pg_trgm/sql/pg_trgm.sql
M contrib/pg_trgm/trgm.h
M contrib/pg_trgm/trgm_gin.c
M contrib/pg_trgm/trgm_gist.c
M contrib/pg_trgm/trgm_op.c
M contrib/pg_trgm/trgm_regexp.c
M doc/src/sgml/pgtrgm.sgml
Make worker_spi sample code more complete
commit : e543631f3c162ab5f6020b1d0209e0353ca2229a
author : Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 13:29:25 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 10 Apr 2013 13:29:25 -0300
Make use of some GUC variables, and add SIGHUP handling to reload
the config file. Patch submitted by Guillaume Lelarge.
Also, report to pg_stat_activity. Per report from Marc Cousin, add
setting of statement start time.
M contrib/worker_spi/worker_spi.c
Fix hstore_to_json_loose example in docs.
commit : 66c01707c6ac9ce7cc7a7e45d0892f6506f1680b
author : Andrew Dunstan <[email protected]>
date : Wed, 10 Apr 2013 09:26:46 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 10 Apr 2013 09:26:46 -0400
Marti Raudsepp.
M doc/src/sgml/hstore.sgml
Remove duplicate initialization in XLogReadRecord.
commit : 4cff7b9dd6d39ed5f6bb3914870c7d0602f88242
author : Robert Haas <[email protected]>
date : Tue, 9 Apr 2013 23:58:02 -0400
committer: Robert Haas <[email protected]>
date : Tue, 9 Apr 2013 23:58:02 -0400
Per a note from Dickson S. Guedes.
M src/backend/access/transam/xlogreader.c
Create a distinction between a populated matview and a scannable one.
commit : 52e6e33ab495cb2b0e694ee480ba7c6394315053
author : Kevin Grittner <[email protected]>
date : Tue, 9 Apr 2013 13:02:49 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 9 Apr 2013 13:02:49 -0500
The intent was that being populated would, long term, be just one
of the conditions which could affect whether a matview was
scannable; being populated should be necessary but not always
sufficient to scan the relation. Since only CREATE and REFRESH
currently determine the scannability, names and comments
accidentally conflated these concepts, leading to confusion.
Also add missing locking for the SQL function which allows a
test for scannability, and fix a modularity violatiion.
Per complaints from Tom Lane, although its not clear that these
will satisfy his concerns. Hopefully this will at least better
frame the discussion.
M src/backend/commands/cluster.c
M src/backend/commands/createas.c
M src/backend/commands/matview.c
M src/backend/executor/execMain.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/cache/relcache.c
M src/bin/pg_dump/pg_dump.c
M src/include/commands/matview.h
M src/include/utils/rel.h
Adjust ExplainOneQuery_hook_type to take a DestReceiver argument.
commit : 0bf42a5f3b62cde41cb366d3442585429c6d9c50
author : Robert Haas <[email protected]>
date : Tue, 9 Apr 2013 10:13:38 -0400
committer: Robert Haas <[email protected]>
date : Tue, 9 Apr 2013 10:13:38 -0400
The materialized views patch adjusted ExplainOneQuery to take an
additional DestReceiver argument, but failed to add a matching
argument to the definition of ExplainOneQuery_hook. This is a
problem for users of the hook that want to call ExplainOnePlan.
Fix by adding the missing argument.
M src/backend/commands/explain.c
M src/include/commands/explain.h
Support indexing of regular-expression searches in contrib/pg_trgm.
commit : 3ccae48f44d993351e1f881761bd6c556ebd6638
author : Tom Lane <[email protected]>
date : Tue, 9 Apr 2013 01:05:55 -0400
committer: Tom Lane <[email protected]>
date : Tue, 9 Apr 2013 01:05:55 -0400
This works by extracting trigrams from the given regular expression,
in generally the same spirit as the previously-existing support for
LIKE searches, though of course the details are far more complicated.
Currently, only GIN indexes are supported. We might be able to make
it work with GiST indexes later.
The implementation includes adding API functions to backend/regex/
to provide a view of the search NFA created from a regular expression.
These functions are meant to be generic enough to be supportable in
a standalone version of the regex library, should that ever happen.
Alexander Korotkov, reviewed by Heikki Linnakangas and Tom Lane
M contrib/pg_trgm/Makefile
M contrib/pg_trgm/expected/pg_trgm.out
A contrib/pg_trgm/pg_trgm–1.0–1.1.sql
R095 contrib/pg_trgm/pg_trgm–1.0.sql contrib/pg_trgm/pg_trgm–1.1.sql
M contrib/pg_trgm/pg_trgm.control
M contrib/pg_trgm/sql/pg_trgm.sql
M contrib/pg_trgm/trgm.h
M contrib/pg_trgm/trgm_gin.c
M contrib/pg_trgm/trgm_op.c
A contrib/pg_trgm/trgm_regexp.c
M doc/src/sgml/pgtrgm.sgml
M src/backend/regex/Makefile
M src/backend/regex/README
A src/backend/regex/regexport.c
M src/backend/utils/adt/selfuncs.c
M src/include/mb/pg_wchar.h
A src/include/regex/regexport.h
Minor rewording of README comments
commit : e60d20a35e436cef3c454bfeab34d8ea71b54910
author : Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 17:20:26 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 17:20:26 +0100
M src/backend/storage/page/README
Fix calculation of how many segments to retain for wal_keep_segments.
commit : 594041311c8263832258d35632aa3eebf9371fd1
author : Heikki Linnakangas <[email protected]>
date : Mon, 8 Apr 2013 16:26:52 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 8 Apr 2013 16:26:52 +0300
KeepLogSeg function was broken when we switched to use a 64-bit int for the
segment number.
Per report from Jeff Janes.
M src/backend/access/transam/xlog.c
Skip extraneous locking in XLogCheckBuffer(). Heikki reported comment was wrong, so fixed code to match the comment: we only need to take additional locking precautions when we have a shared lock on the buffer.
commit : 5787c6730e7a848ef95d5c4194e27614ea8e6e41
author : Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 09:11:49 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 09:11:49 +0100
M src/backend/access/transam/xlog.c
Avoid tricky race condition recording XLOG_HINT We copy the buffer before inserting an XLOG_HINT to avoid WAL CRC errors caused by concurrent hint writes to buffer while share locked. To make this work we refactor RestoreBackupBlock() to allow an XLOG_HINT to avoid the normal path for backup blocks, which assumes the underlying buffer is exclusive locked. Resulting code completely changes layout of XLOG_HINT WAL records, but this isn't even beta code, so this is a low impact change. In passing, avoid taking WALInsertLock for full page writes on checksummed hints, remove related cruft from XLogInsert() and improve xlog_desc record for XLOG_HINT.
commit : 47c4333189c9eb5ac1f95adc90213e61996f53c4
author : Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 08:52:39 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 08:52:39 +0100
Andres Freund
Bug report by Fujii Masao, testing by Jeff Janes and Jaime Casanova,
review by Jeff Davis and Simon Riggs. Applied with changes from review
and some comment editing.
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/xlog.c
M src/backend/storage/buffer/bufmgr.c
M src/include/catalog/catversion.h
README comments on checksums on page holes.
commit : a4b94b85156192b839a3c840f8aaf0cf8699a8c8
author : Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 08:42:52 +0100
committer: Simon Riggs <[email protected]>
date : Mon, 8 Apr 2013 08:42:52 +0100
M src/backend/storage/page/README
Tune BufferGetLSNAtomic() when checksums !enabled
commit : 1be203519ac4da238bf6dfe8f7015d5780723e0f
author : Simon Riggs <[email protected]>
date : Sun, 7 Apr 2013 22:37:39 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 7 Apr 2013 22:37:39 +0100
From performance analysis by Heikki Linnakangas
M src/backend/storage/buffer/bufmgr.c
Fix checksums for CLUSTER, VACUUM FULL etc. In CLUSTER, VACUUM FULL and ALTER TABLE SET TABLESPACE I erroneously set checksum before log_newpage, which sets the LSN and invalidates the checksum. So set checksum immediately *after* log_newpage.
commit : cf8dc9e10c0d954970cbe5ca9be4c6b881cde482
author : Simon Riggs <[email protected]>
date : Sun, 7 Apr 2013 22:16:51 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 7 Apr 2013 22:16:51 +0100
Bug report Fujii Masao, Fix and patch by Jeff Davis
M src/backend/access/heap/rewriteheap.c
M src/backend/commands/tablecmds.c
Get rid of USE_WIDE_UPPER_LOWER dependency in trigram construction.
commit : 7844608e54a3a2e3dee461b00fd6ef028a845d7c
author : Tom Lane <[email protected]>
date : Sun, 7 Apr 2013 14:45:33 -0400
committer: Tom Lane <[email protected]>
date : Sun, 7 Apr 2013 14:45:33 -0400
contrib/pg_trgm's make_trigrams() was coded to ignore multibyte character
boundaries and just make trigrams from bytes if USE_WIDE_UPPER_LOWER wasn't
defined. This is a bit odd, since there's no obvious reason why trigram
compaction rules should depend on the presence of towlower() and friends.
What's more, there was an Assert() that would fail if that code path was
fed any multibyte characters.
We need to do something about this since the pending regex-indexing patch
has an assumption that you get just one "trgm" from any three characters.
The best solution seems to be to remove the USE_WIDE_UPPER_LOWER
dependency, which shouldn't really have been there in the first place.
The second loop in make_trigrams() is now just a fast path and not a
potentially incompatible algorithm.
If there is anybody still using Postgres on machines without wcstombs() or
towlower(), and they have non-ASCII data indexed by pg_trgm, they'll need
to REINDEX those indexes after pg_upgrade to 9.3, else searches may fail
incorrectly. It seems likely that there are no such installations, though.
In passing, rename cnt_trigram to compact_trigram, which seems to better
describe its functionality, and improve make_trigrams' test for whether it
has to use the slow path or not (per a suggestion from Alexander Korotkov).
M contrib/pg_trgm/trgm_op.c
In isolationtester, retry after EINTR return from select(2).
commit : faf4726c9fd5748ad25dbce55a7d31deeabe9866
author : Tom Lane <[email protected]>
date : Sat, 6 Apr 2013 22:28:49 -0400
committer: Tom Lane <[email protected]>
date : Sat, 6 Apr 2013 22:28:49 -0400
Per report from Jaime Casanova. Very curious that no one else has seen
this failure ... but the code is clearly wrong as-is.
M src/test/isolation/isolationtester.c
sepgsql: Enforce db_schema:search permission.
commit : e965e6344cfaff0708a032721b56f61eea777bc5
author : Robert Haas <[email protected]>
date : Fri, 5 Apr 2013 08:51:31 -0400
committer: Robert Haas <[email protected]>
date : Fri, 5 Apr 2013 08:51:31 -0400
KaiGai Kohei, with comment and doc wordsmithing by me
M contrib/sepgsql/expected/alter.out
M contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/expected/dml.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql-regtest.te
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/sql/dml.sql
M doc/src/sgml/sepgsql.sgml
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaccess.c
M src/backend/tcop/fastpath.c
M src/include/catalog/objectaccess.h
Improve documentation about the relationship of extensions and schemas.
commit : 52f436b807b0d02203ea6be19bafa56e4e1381e8
author : Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 22:37:25 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 22:37:25 -0400
There's been some confusion expressed about this point, so clarify.
Extended version of a patch by David Wheeler.
M doc/src/sgml/extend.sgml
M doc/src/sgml/ref/create_extension.sgml
doc: Fix number of columns in table
commit : e3f719c3671c293bf9e1a7293c7bd5eb6d9a2611
author : Peter Eisentraut <[email protected]>
date : Thu, 4 Apr 2013 21:07:05 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 4 Apr 2013 21:07:05 -0400
M doc/src/sgml/event-trigger.sgml
Fix line count in slashUsage().
commit : 927e1dc96ce3eb4a618fd7b67f69eec72b56d850
author : Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 20:29:46 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 20:29:46 -0400
Counting newlines shows that quite a few recent patches have neglected
to update the output-lines count given to PageOutput(). Fortunately
it's not terribly critical that this be exact, since we long since
exceeded the height of most people's terminal windows. Still, maybe
we ought to think of a way to not have to maintain this manually anymore.
M src/bin/psql/help.c
Add \watch [SEC] command to psql.
commit : c6a3fce7dd4dae6e1a005e5b09cdd7c1d7f9c4f4
author : Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 19:56:33 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Apr 2013 19:56:33 -0400
This allows convenient re-execution of commands.
Will Leinweber, reviewed by Peter Eisentraut, Daniel Farina, and Tom Lane
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/help.c
M src/bin/psql/tab-complete.c
Fix off by one error in JSON extract path code.
commit : e75feb28341ea49e9d41266906e701a4e3742e2e
author : Andrew Dunstan <[email protected]>
date : Thu, 4 Apr 2013 18:26:52 -0400
committer: Andrew Dunstan <[email protected]>
date : Thu, 4 Apr 2013 18:26:52 -0400
Bug report by David Wheeler, diagnosis assistance from Tom Lane.
M src/backend/utils/adt/jsonfuncs.c
psql: fix startup crash caused by PSQLRC containing a tilde
commit : 48a2cd370e2610f0a196240aed9f5abd82d3dada
author : Bruce Momjian <[email protected]>
date : Thu, 4 Apr 2013 12:56:21 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 4 Apr 2013 12:56:21 -0400
'strdup' the PSQLRC environment variable value before calling a routine
that might free() it.
Backpatch to 9.2, where the bug first appeared.
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/psql/startup.c
Fix crash on compiling a regular expression with more than 32k colors.
commit : bf2b0a147857f63daa2e5c17eed0169861371af8
author : Heikki Linnakangas <[email protected]>
date : Thu, 4 Apr 2013 19:04:57 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 4 Apr 2013 19:04:57 +0300
Throw an error instead.
Backpatch to all supported branches.
M src/backend/regex/regc_color.c
M src/include/regex/regerrs.h
M src/include/regex/regex.h
M src/include/regex/regguts.h
Fix a few thinkos in the JSON functions docs.
commit : d7d5832012ae5174707643af1a450d26d3350719
author : Andrew Dunstan <[email protected]>
date : Thu, 4 Apr 2013 10:41:29 -0400
committer: Andrew Dunstan <[email protected]>
date : Thu, 4 Apr 2013 10:41:29 -0400
Dickson S. Guedes
M doc/src/sgml/func.sgml
Calculate # of semaphores correctly with --disable-spinlocks.
commit : b8ed4cc9627de437e5eafdb81631a0d0f063abb3
author : Heikki Linnakangas <[email protected]>
date : Thu, 4 Apr 2013 16:31:44 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 4 Apr 2013 16:31:44 +0300
The old formula didn't take into account that each WAL sender process needs
a spinlock. We had also already exceeded the fixed number of spinlocks
reserved for misc purposes (10). Bump that to 30.
Backpatch to 9.0, where WAL senders were introduced. If I counted correctly,
9.0 had exactly 10 predefined spinlocks, and 9.1 exceeded that, but bump the
limit in 9.0 too because 10 is uncomfortably close to the edge.
M src/backend/storage/lmgr/spin.c
Avoid updating our PgBackendStatus entry when track_activities is off.
commit : f7b0006f42913b6d641c9f0bef6fad1f670b9194
author : Tom Lane <[email protected]>
date : Wed, 3 Apr 2013 14:13:28 -0400
committer: Tom Lane <[email protected]>
date : Wed, 3 Apr 2013 14:13:28 -0400
The point of turning off track_activities is to avoid this reporting
overhead, but a thinko in commit 4f42b546fd87a80be30c53a0f2c897acb826ad52
caused pgstat_report_activity() to perform half of its updates anyway.
Fix that, and also make sure that we clear all the now-disabled fields
when transitioning to the non-reporting state.
M src/backend/postmaster/pgstat.c
M src/backend/utils/adt/pgstatfuncs.c
Fix typo in FDW docs.
commit : 0f1345d38b4d7b35175d4f4be322da0aa6d6aaeb
author : Tom Lane <[email protected]>
date : Wed, 3 Apr 2013 10:26:18 -0400
committer: Tom Lane <[email protected]>
date : Wed, 3 Apr 2013 10:26:18 -0400
Laurenz Albe
M doc/src/sgml/fdwhandler.sgml
Minor robustness improvements for isolationtester.
commit : 845d335a90b684dd51e80a6470ebb923a59a1f91
author : Tom Lane <[email protected]>
date : Tue, 2 Apr 2013 21:15:37 -0400
committer: Tom Lane <[email protected]>
date : Tue, 2 Apr 2013 21:15:37 -0400
Notice and complain about PQcancel() failures. Also, don't dump core if
an error PGresult doesn't contain severity and message subfields, as it
might not if it was generated by libpq itself. (We have a longstanding
TODO item to improve that, but in the meantime isolationtester had better
cope.)
I tripped across the latter item while investigating a trouble report on
buildfarm member spoonbill. As for the former, there's no evidence that
PQcancel failure is actually involved in spoonbill's problem, but it still
seems like a bad idea to ignore an error return code.
M src/test/isolation/isolationtester.c
Update release notes for 9.2.4, 9.1.9, 9.0.13, 8.4.17.
commit : 89b661bab99e8573fad271f68755ba286932dec2
author : Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 14:11:11 -0400
committer: Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 14:11:11 -0400
Security: CVE-2013-1899, CVE-2013-1901
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Fix insecure parsing of server command-line switches.
commit : 17fe2793ea7fe269ed616cb305150b6cf38dbaa8
author : Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 14:00:51 -0400
committer: Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 14:00:51 -0400
An oversight in commit e710b65c1c56ca7b91f662c63d37ff2e72862a94 allowed
database names beginning with "-" to be treated as though they were secure
command-line switches; and this switch processing occurs before client
authentication, so that even an unprivileged remote attacker could exploit
the bug, needing only connectivity to the postmaster's port. Assorted
exploits for this are possible, some requiring a valid database login,
some not. The worst known problem is that the "-r" switch can be invoked
to redirect the process's stderr output, so that subsequent error messages
will be appended to any file the server can write. This can for example be
used to corrupt the server's configuration files, so that it will fail when
next restarted. Complete destruction of database tables is also possible.
Fix by keeping the database name extracted from a startup packet fully
separate from command-line switches, as had already been done with the
user name field.
The Postgres project thanks Mitsumasa Kondo for discovering this bug,
Kyotaro Horiguchi for drafting the fix, and Noah Misch for recognizing
the full extent of the danger.
Security: CVE-2013-1899
M src/backend/main/main.c
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/postinit.c
M src/include/tcop/tcopprot.h
Make REPLICATION privilege checks test current user not authenticated user.
commit : ce9ab88981495d975aade8fc664f99f68fc18e2b
author : Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 13:09:24 -0400
committer: Tom Lane <[email protected]>
date : Mon, 1 Apr 2013 13:09:24 -0400
The pg_start_backup() and pg_stop_backup() functions checked the privileges
of the initially-authenticated user rather than the current user, which is
wrong. For example, a user-defined index function could successfully call
these functions when executed by ANALYZE within autovacuum. This could
allow an attacker with valid but low-privilege database access to interfere
with creation of routine backups. Reported and fixed by Noah Misch.
Security: CVE-2013-1901
M src/backend/access/transam/xlog.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/include/miscadmin.h
Revert "ecpg: Don't link compatlib with libpq"
commit : 85079078acb4f120335f54f38f93635dd8c8b83d
author : Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 23:50:51 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 23:50:51 -0400
This reverts commit 3780fc679cc428c1f211e1728c4281ca15e9746b.
HP-UX didn't like it. There would probably be a way to fix that, but
since the net effect of all of this is zero because ecpg ends up using
libpq anyway, it's not worth bothering further.
M src/interfaces/ecpg/compatlib/Makefile
Update release notes for changes through today.
commit : e48a7bd527481556f7068832331ef6b00805920b
author : Tom Lane <[email protected]>
date : Sun, 31 Mar 2013 18:59:35 -0400
committer: Tom Lane <[email protected]>
date : Sun, 31 Mar 2013 18:59:35 -0400
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Ignore extra subquery outputs in set_subquery_size_estimates().
commit : d931ac0ec4c25b61f480562a13f1974f913afd59
author : Tom Lane <[email protected]>
date : Sun, 31 Mar 2013 18:32:54 -0400
committer: Tom Lane <[email protected]>
date : Sun, 31 Mar 2013 18:32:54 -0400
In commit 0f61d4dd1b4f95832dcd81c9688dac56fd6b5687, I added code to copy up
column width estimates for each column of a subquery. That code supposed
that the subquery couldn't have any output columns that didn't correspond
to known columns of the current query level --- which is true when a query
is parsed from scratch, but the assumption fails when planning a view that
depends on another view that's been redefined (adding output columns) since
the upper view was made. This results in an assertion failure or even a
crash, as per bug #8025 from lindebg. Remove the Assert and instead skip
the column if its resno is out of the expected range.
M src/backend/optimizer/path/costsize.c
Add pkg-config files for libpq and ecpg libraries
commit : 64f890905f3a5186bc4df980c8becfda5c39c2ea
author : Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 16:58:40 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 16:58:40 -0400
This will hopefully be easier to use than pg_config for users who are
already used to the pkg-config interface. It also works better for
multi-arch installations.
reviewed by Tom Lane
M .gitignore
M doc/src/sgml/ecpg.sgml
M doc/src/sgml/libpq.sgml
M src/Makefile.shlib
M src/interfaces/ecpg/compatlib/Makefile
M src/interfaces/ecpg/ecpglib/Makefile
ecpg: Don't link compatlib with libpq
commit : 3780fc679cc428c1f211e1728c4281ca15e9746b
author : Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 16:51:00 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 31 Mar 2013 16:51:00 -0400
It doesn't actually use libpq. But we need to keep libpq in the
CPPFLAGS for building, because compatlib uses ecpglib.h which uses
libpq-fe.h, but we don't need to refer to libpq for linking.
reviewed by Tom Lane
M src/interfaces/ecpg/compatlib/Makefile
pg_upgrade: don't copy/link files for invalid indexes
commit : 203d8ae2db4cf255b94520fdc1521b5f96778596
author : Bruce Momjian <[email protected]>
date : Sat, 30 Mar 2013 22:20:53 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 30 Mar 2013 22:20:53 -0400
Now that pg_dump no longer dumps invalid indexes, per commit
683abc73dff549e94555d4020dae8d02f32ed78b, have pg_upgrade also skip
them. Previously pg_upgrade threw an error if invalid indexes existed.
Backpatch to 9.2, 9.1, and 9.0 (where pg_upgrade was added to git)
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/info.c
Improve code documentation about "magnetic disk" storage manager.
commit : 22f7b9613e5a60bc3daca35f87f546baa9fd934c
author : Tom Lane <[email protected]>
date : Sat, 30 Mar 2013 14:23:45 -0400
committer: Tom Lane <[email protected]>
date : Sat, 30 Mar 2013 14:23:45 -0400
The modern incarnation of md.c is by no means specific to magnetic disk
technology, but every so often we hear from someone who's misled by the
label. Try to clarify that it will work for anything that supports
standard filesystem operations. Per suggestion from Andrew Dunstan.
M src/backend/storage/smgr/README
M src/backend/storage/smgr/md.c
Avoid moving data directory in upgrade testing.
commit : 67eb3e5075b52bb9d91dc3bd9358ac1da2ded5fc
author : Andrew Dunstan <[email protected]>
date : Sat, 30 Mar 2013 12:44:29 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 30 Mar 2013 12:44:29 -0400
Windows sometimes gets upset if we rename a large directory and then try
to use the old name quickly, as seen in occasional buildfarm failures.
So we avoid that by building the old version in the intended
destination in the first place instead of renaming it, similar to the
change made for the same reason in commit b7f8465c.
M contrib/pg_upgrade/test.sh
Remove tab from SGML file.
commit : b015558091075a898a8348934f1d36386d87f5e5
author : Bruce Momjian <[email protected]>
date : Fri, 29 Mar 2013 23:19:03 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 29 Mar 2013 23:19:03 -0400
M doc/src/sgml/func.sgml
ecpg: Parallel make fix
commit : 602070f9cce790debd8d1469254e7726ab499ae7
author : Peter Eisentraut <[email protected]>
date : Fri, 29 Mar 2013 21:39:55 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 29 Mar 2013 21:39:55 -0400
In some parallel make situations, the install-headers target could be
called before the installation directories are created by installdirs,
causing the installation to fail. Fix that by making install-headers
depend on installdirs.
M src/interfaces/ecpg/include/Makefile
Fix page title for JSON Functions and Operators.
commit : 6caf759f3f34eb496f4a92c3db9d3289299066b9
author : Andrew Dunstan <[email protected]>
date : Fri, 29 Mar 2013 16:56:22 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 29 Mar 2013 16:56:22 -0400
M doc/src/sgml/func.sgml
Add new JSON processing functions and parser API.
commit : a570c98d7fa0841f17bbf51d62d02d9e493c7fcc
author : Andrew Dunstan <[email protected]>
date : Fri, 29 Mar 2013 14:12:13 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 29 Mar 2013 14:12:13 -0400
The JSON parser is converted into a recursive descent parser, and
exposed for use by other modules such as extensions. The API provides
hooks for all the significant parser event such as the beginning and end
of objects and arrays, and providing functions to handle these hooks
allows for fairly simple construction of a wide variety of JSON
processing functions. A set of new basic processing functions and
operators is also added, which use this API, including operations to
extract array elements, object fields, get the length of arrays and the
set of keys of a field, deconstruct an object into a set of key/value
pairs, and create records from JSON objects and arrays of objects.
Catalog version bumped.
Andrew Dunstan, with some documentation assistance from Merlin Moncure.
M doc/src/sgml/func.sgml
M src/backend/catalog/system_views.sql
M src/backend/utils/adt/Makefile
M src/backend/utils/adt/json.c
A src/backend/utils/adt/jsonfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/utils/json.h
A src/include/utils/jsonapi.h
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
Document encode(bytea, 'escape')'s behavior correctly.
commit : 9ad27c215362df436f8c16f1aace923011f31be4
author : Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 23:14:54 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 23:14:54 -0400
I changed this in commit fd15dba543247eb1ce879d22632b9fdb4c230831, but
missed the fact that the SGML documentation of the function specified
exactly what it did. Well, one of the two places where it's specified
documented that --- probably I looked at the other place and thought
nothing needed to be done. Sync the two places where encode() and
decode() are described.
M doc/src/sgml/func.sgml
Must check indisready not just indisvalid when dumping from 9.2 server.
commit : aa02864f64c46807f7682a41882fe40f7f5cb819
author : Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 22:09:12 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 22:09:12 -0400
9.2 uses a kluge representation of "indislive"; we have to account for
that when examining pg_index. Simplest solution is to check indisready
for 9.0 and 9.1 as well; that's harmless though unnecessary, so it's
not worth making a version distinction for.
Fixes oversight in commit 683abc73dff549e94555d4020dae8d02f32ed78b,
as noted by Andres Freund.
M src/bin/pg_dump/pg_dump.c
Draft release notes for 9.2.4, 9.1.9, 9.0.13, 8.4.17.
commit : 29505a894e1ece60bf42a2756ae99c9e44b5ae6a
author : Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 21:40:19 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 21:40:19 -0400
Covers commits through today. Not back-patching into back branches
yet, since this is just for people to review in advance.
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
sepgsql: Documentation improvements.
commit : 2a3db8cec24d0c95136b74b305bf1f1e41615a4d
author : Robert Haas <[email protected]>
date : Thu, 28 Mar 2013 15:55:44 -0400
committer: Robert Haas <[email protected]>
date : Thu, 28 Mar 2013 15:55:44 -0400
Fixes by me, per griping by Thom Brown.
M doc/src/sgml/sepgsql.sgml
Allow sepgsql labels to depend on object name.
commit : 0f05840bf4c256b838eca8f1be9d7b5be82ccd0e
author : Robert Haas <[email protected]>
date : Thu, 28 Mar 2013 15:38:35 -0400
committer: Robert Haas <[email protected]>
date : Thu, 28 Mar 2013 15:38:35 -0400
The main change here is to call security_compute_create_name_raw()
rather than security_compute_create_raw(). This ups the minimum
requirement for libselinux from 2.0.99 to 2.1.10, but it looks
like most distributions will have picked that up before 9.3 is out.
KaiGai Kohei
M configure
M configure.in
M contrib/sepgsql/database.c
M contrib/sepgsql/expected/label.out
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql-regtest.te
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/sql/label.sql
M contrib/sepgsql/uavc.c
M doc/src/sgml/sepgsql.sgml
Update time zone data files to tzdata release 2013b.
commit : ae7f1c3ef2eef9584e3c9a42c395eb0c0e59a5ed
author : Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 15:25:48 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 15:25:48 -0400
DST law changes in Chile, Haiti, Morocco, Paraguay, some Russian areas.
Historical corrections for numerous places.
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/northamerica
M src/timezone/data/southamerica
M src/timezone/data/zone.tab
Avoid "variable might be clobbered by longjmp" warning.
commit : 58bc48179b3cad0793ae20b002d60289c8bf0b9b
author : Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 13:19:49 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Mar 2013 13:19:49 -0400
On older-model gcc, the original coding of UTILITY_BEGIN_QUERY() can
draw this error because of multiple assignments to _needCleanup.
Rather than mark that variable volatile, we can suppress the warning
by arranging to have just one unconditional assignment before PG_TRY.
M src/backend/tcop/utility.c
Add sql_drop event for event triggers
commit : 473ab40c8bb3fcb1a7645f6a7443a0424d70fbaf
author : Alvaro Herrera <[email protected]>
date : Wed, 27 Mar 2013 16:02:10 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 27 Mar 2013 16:02:10 -0300
This event takes place just before ddl_command_end, and is fired if and
only if at least one object has been dropped by the command. (For
instance, DROP TABLE IF EXISTS of a table that does not in fact exist
will not lead to such a trigger firing). Commands that drop multiple
objects (such as DROP SCHEMA or DROP OWNED BY) will cause a single event
to fire. Some firings might be surprising, such as
ALTER TABLE DROP COLUMN.
The trigger is fired after the drop has taken place, because that has
been deemed the safest design, to avoid exposing possibly-inconsistent
internal state (system catalogs as well as current transaction) to the
user function code. This means that careful tracking of object
identification is required during the object removal phase.
Like other currently existing events, there is support for tag
filtering.
To support the new event, add a new pg_event_trigger_dropped_objects()
set-returning function, which returns a set of rows comprising the
objects affected by the command. This is to be used within the user
function code, and is mostly modelled after the recently introduced
pg_identify_object() function.
Catalog version bumped due to the new function.
Dimitri Fontaine and Álvaro Herrera
Review by Robert Haas, Tom Lane
M doc/src/sgml/event-trigger.sgml
M doc/src/sgml/func.sgml
M src/backend/catalog/dependency.c
M src/backend/commands/event_trigger.c
M src/backend/parser/gram.y
M src/backend/tcop/utility.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/cache/evtcache.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/commands/event_trigger.h
M src/include/utils/builtins.h
M src/include/utils/evtcache.h
M src/test/regress/expected/event_trigger.out
M src/test/regress/sql/event_trigger.sql
Revoke bc5334d8679c428a709d150666b288171795bd76
commit : 593c39d156fd13e07dbfc43e63b53a3e89e82aa4
author : Simon Riggs <[email protected]>
date : Thu, 28 Mar 2013 09:18:02 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 28 Mar 2013 09:18:02 +0000
M doc/src/sgml/config.sgml
M src/backend/access/transam/xlog.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/misc/guc.c
M src/include/miscadmin.h
M src/include/utils/guc.h
Revoke 7a5a59d378e052618d6feae64d1d2b4f2ad6f9bc
commit : d139a5e26b0d1123d77c403e2e95feaf77634a40
author : Simon Riggs <[email protected]>
date : Thu, 28 Mar 2013 09:12:55 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 28 Mar 2013 09:12:55 +0000
M src/backend/utils/misc/guc.c
Reset OpenSSL randomness state in each postmaster child process.
commit : 0d1ecd6300191a450978ca2fcd12bbbb7c5e65e6
author : Tom Lane <[email protected]>
date : Wed, 27 Mar 2013 18:50:21 -0400
committer: Tom Lane <[email protected]>
date : Wed, 27 Mar 2013 18:50:21 -0400
Previously, if the postmaster initialized OpenSSL's PRNG (which it will do
when ssl=on in postgresql.conf), the same pseudo-random state would be
inherited by each forked child process. The problem is masked to a
considerable extent if the incoming connection uses SSL encryption, but
when it does not, identical pseudo-random state is made available to
functions like contrib/pgcrypto. The process's PID does get mixed into any
requested random output, but on most systems that still only results in 32K
or so distinct random sequences available across all Postgres sessions.
This might allow an attacker who has database access to guess the results
of "secure" operations happening in another session.
To fix, forcibly reset the PRNG after fork(). Each child process that has
need for random numbers from OpenSSL's generator will thereby be forced to
go through OpenSSL's normal initialization sequence, which should provide
much greater variability of the sequences. There are other ways we might
do this that would be slightly cheaper, but this approach seems the most
future-proof against SSL-related code changes.
This has been assigned CVE-2013-1900, but since the issue and the patch
have already been publicized on pgsql-hackers, there's no point in trying
to hide this commit.
Back-patch to all supported branches.
Marko Kreen
M src/backend/postmaster/fork_process.c
Fix pasto which broke docs build.
commit : 40e873d854cae046df941d162c3cbcefd00b3915
author : Kevin Grittner <[email protected]>
date : Wed, 27 Mar 2013 16:11:46 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 27 Mar 2013 16:11:46 -0500
Commit bc5334d8679c428a709d150666b288171795bd76 accidentally
included a second <variablelist> tag for a new list item.
M doc/src/sgml/config.sgml
Fix buffer pin leak in heap update redo routine.
commit : 3cfb572dde2095df1bfc6665862dcf8ee0a95b99
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Mar 2013 21:51:27 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Mar 2013 21:51:27 +0200
In a heap update, if the old and new tuple were on different pages, and the
new page no longer existed (because it was subsequently truncated away by
vacuum), heap_xlog_update forgot to release the pin on the old buffer. This
bug was introduced by the "Fix multiple problems in WAL replay" patch,
commit 3bbf668de9f1bc172371681e80a4e769b6d014c8 (on master branch).
With full_page_writes=off, this triggered an "incorrect local pin count"
error later in replay, if the old page was vacuumed.
This fixes bug #7969, reported by Yunong Xiao. Backpatch to 9.0, like the
commit that introduced this bug.
M src/backend/access/heap/heapam.c
Set recovery_config_directory for EXEC_BACKEND. Remove comment questioning whether this is necessary for DataDir. From buildfarm failures on Windows.
commit : 7a5a59d378e052618d6feae64d1d2b4f2ad6f9bc
author : Simon Riggs <[email protected]>
date : Wed, 27 Mar 2013 16:35:38 +0000
committer: Simon Riggs <[email protected]>
date : Wed, 27 Mar 2013 16:35:38 +0000
M src/backend/utils/misc/guc.c
Move some pg_dump function around.
commit : 7800a71291690dcc34eb3b7aab18750b5a7ebe2c
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Mar 2013 18:10:40 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Mar 2013 18:10:40 +0200
Move functions used only by pg_dump and pg_restore from dumputils.c to a new
file, pg_backup_utils.c. dumputils.c is linked into psql and some programs
in bin/scripts, so it seems good to keep it slim. The parallel functionality
is moved to parallel.c, as is exit_horribly, because the interesting code in
exit_horribly is parallel-related.
This refactoring gets rid of the on_exit_msg_func function pointer. It was
problematic, because a modern gcc version with -Wmissing-format-attribute
complained if it wasn't marked with PF_PRINTF_ATTRIBUTE, but the ancient gcc
version that Tom Lane's old HP-UX box has didn't accept that attribute on a
function pointer, and gave an error. We still use a similar function pointer
trick for getLocalPQBuffer() function, to use a thread-local version of that
in parallel mode on Windows, but that dodges the problem because it doesn't
take printf-like arguments.
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/parallel.c
M src/bin/pg_dump/parallel.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_null.c
M src/bin/pg_dump/pg_backup_tar.c
A src/bin/pg_dump/pg_backup_utils.c
A src/bin/pg_dump/pg_backup_utils.h
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
sepgsql: Support for new post-ALTER access hook.
commit : 1cea9bbb21e9e90dc7085ce605d9160e7161fa58
author : Robert Haas <[email protected]>
date : Wed, 27 Mar 2013 08:10:14 -0400
committer: Robert Haas <[email protected]>
date : Wed, 27 Mar 2013 08:10:14 -0400
KaiGai Kohei
M contrib/sepgsql/database.c
A contrib/sepgsql/expected/alter.out
M contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/sepgsql.h
A contrib/sepgsql/sql/alter.sql
M contrib/sepgsql/sql/ddl.sql
M contrib/sepgsql/test_sepgsql
M doc/src/sgml/sepgsql.sgml
Allow external recovery_config_directory If required, recovery.conf can now be located outside of the data directory. Server needs read/write permissions on this directory.
commit : bc5334d8679c428a709d150666b288171795bd76
author : Simon Riggs <[email protected]>
date : Wed, 27 Mar 2013 11:45:42 +0000
committer: Simon Riggs <[email protected]>
date : Wed, 27 Mar 2013 11:45:42 +0000
M doc/src/sgml/config.sgml
M src/backend/access/transam/xlog.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/misc/guc.c
M src/include/miscadmin.h
M src/include/utils/guc.h
Fix grammatical errors in some new message strings.
commit : f7f210b5c4c9c76e87fffc5abef7dea752d1ac9a
author : Tom Lane <[email protected]>
date : Tue, 26 Mar 2013 17:52:00 -0400
committer: Tom Lane <[email protected]>
date : Tue, 26 Mar 2013 17:52:00 -0400
Daniele Varrazzo
M src/backend/access/transam/multixact.c
Ignore invalid indexes in pg_dump.
commit : 683abc73dff549e94555d4020dae8d02f32ed78b
author : Tom Lane <[email protected]>
date : Tue, 26 Mar 2013 17:43:19 -0400
committer: Tom Lane <[email protected]>
date : Tue, 26 Mar 2013 17:43:19 -0400
Dumping invalid indexes can cause problems at restore time, for example
if the reason the index creation failed was because it tried to enforce
a uniqueness condition not satisfied by the table's data. Also, if the
index creation is in fact still in progress, it seems reasonable to
consider it to be an uncommitted DDL change, which pg_dump wouldn't be
expected to dump anyway.
Back-patch to all active versions, and teach them to ignore invalid
indexes in servers back to 8.2, where the concept was introduced.
Michael Paquier
M src/bin/pg_dump/pg_dump.c
Fix pg_dump against 9.1/9.2 servers.
commit : 625b237f79ec59369e6083f041649adf4fdc1080
author : Heikki Linnakangas <[email protected]>
date : Tue, 26 Mar 2013 15:43:19 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 26 Mar 2013 15:43:19 +0200
The parallel pg_dump patch forgot to add relpages column to 9.1/9.2 version
of the getTables() query.
Reported by Bernd Helmle.
M src/bin/pg_dump/pg_dump.c
Get rid of obsolete parse_version helper function.
commit : 901b89e37bb8e71224ee76987679010ff3c93c05
author : Heikki Linnakangas <[email protected]>
date : Tue, 26 Mar 2013 15:21:57 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 26 Mar 2013 15:21:57 +0200
For getting the server's version in numeric form, use PQserverVersion().
It does the exact same parsing as dumputils.c's parse_version(), and has
been around in libpq for a long time. For the client's version, just use
the PG_VERSION_NUM constant.
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/psql/command.c
Fix a small logic bug in adjusted parallel restore code.
commit : ec143f94051779bb5d07419723529b4cc4fcce95
author : Andrew Dunstan <[email protected]>
date : Mon, 25 Mar 2013 22:52:28 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 25 Mar 2013 22:52:28 -0400
M src/bin/pg_dump/pg_backup_archiver.c
In base backup, only include our own tablespace version directory.
commit : 28ba260906c87ffbda42f93d867191f491025a04
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 20:19:22 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 20:19:22 +0200
If you have clusters of different versions pointing to the same tablespace
location, we would incorrectly include all the data belonging to the other
versions, too.
Fixes bug #7986, reported by Sergey Burladyan.
M src/backend/replication/basebackup.c
Make pg_basebackup work with pre-9.3 servers, and add server version check.
commit : d298b50a3b469c088bb40a4d36d38111b4cd574d
author : Heikki Linnakangas <[email protected]>
date : Fri, 22 Mar 2013 13:02:59 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 22 Mar 2013 13:02:59 +0200
A new 'starttli' field was added to the response of BASE_BACKUP command.
Make pg_basebackup tolerate the case that it's missing, so that it still
works with older servers.
Add an explicit check for the server version, so that you get a nicer error
message if you try to use it with a pre-9.1 server.
The streaming protocol message format changed in 9.3, so -X stream still won't
work with pre-9.3 servers. I added a version check to ReceiveXLogStream()
earlier, but write that slightly differently, so that in 9.4, it will still
work with a 9.3 server. (In 9.4, the error message needs to be adjusted to
"9.3 or above", though). Also, if the version check fails, don't retry.
M doc/src/sgml/ref/pg_basebackup.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/receivelog.h
Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.
commit : ea988ee8c8b191615e730f930bcde6144a598688
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 10:06:03 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 10:06:03 +0200
Per warning from -Wmissing-format-attribute.
M src/bin/pg_dump/dumputils.h
Add missing #include.
commit : 4eefd0f86b6ce2e657c566fe40301930ab31eddd
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 09:55:43 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Mar 2013 09:55:43 +0200
time(2) requires time.h.
M src/timezone/zic.c
Fix some unportable constructs in parallel pg_dump code.
commit : 846681fdd574548d4f430f2ff7ab44d77b4c79fe
author : Tom Lane <[email protected]>
date : Sun, 24 Mar 2013 15:35:37 -0400
committer: Tom Lane <[email protected]>
date : Sun, 24 Mar 2013 15:35:37 -0400
Didn't compile on semi-obsolete gcc, and probably not on not-gcc-at-all
either.
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/parallel.h
M src/bin/pg_dump/pg_backup_archiver.h
Add parallel pg_dump option.
commit : 9e257a181cc1dc5e19eb5d770ce09cc98f470f5f
author : Andrew Dunstan <[email protected]>
date : Sun, 24 Mar 2013 11:27:20 -0400
committer: Andrew Dunstan <[email protected]>
date : Sun, 24 Mar 2013 11:27:20 -0400
New infrastructure is added which creates a set number of workers
(threads on Windows, forked processes on Unix). Jobs are then
handed out to these workers by the master process as needed.
pg_restore is adjusted to use this new infrastructure in place of the
old setup which created a new worker for each step on the fly. Parallel
dumps acquire a snapshot clone in order to stay consistent, if
available.
The parallel option is selected by the -j / --jobs command line
parameter of pg_dump.
Joachim Wieland, lightly editorialized by Andrew Dunstan.
M doc/src/sgml/backup.sgml
M doc/src/sgml/perform.sgml
M doc/src/sgml/ref/pg_dump.sgml
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
A src/bin/pg_dump/parallel.c
A src/bin/pg_dump/parallel.h
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_archiver.h
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/tools/msvc/Mkvcbuild.pm
Update time zone abbreviation lists for changes missed since 2006.
commit : 3b91fe185a71c05ac4528f93a39ba27232acc9e0
author : Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 19:16:36 -0400
committer: Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 19:16:36 -0400
Most (all?) of Russia has moved to what's effectively year-round daylight
savings time, so that the "standard" zone names now mean an hour later
than they used to. Update that, notably changing MSK as per recent
complaint from Sergey Konoplev, but also CHOT, GET, IRKT, KGT, KRAT,
MAGT, NOVT, OMST, VLAT, YAKT, YEKT. The corresponding DST abbreviations
are presumably now obsolete, but I left them in place with their old
definitions, just to reduce any possible breakage from this change.
Also add VOLT (Europe/Volgograd), which for some reason we never had
before, as well as MIST (Antarctica/Macquarie), and fix obsolete
definitions of MAWT, TKT, and WST.
M src/timezone/known_abbrevs.txt
M src/timezone/tznames/Antarctica.txt
M src/timezone/tznames/Asia.txt
M src/timezone/tznames/Default
M src/timezone/tznames/Europe.txt
M src/timezone/tznames/Pacific.txt
Semi-automatically detect changes in timezone abbreviations.
commit : 69602772700e62b7b03e3f0ac7b10aa651c0c998
author : Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 18:47:22 -0400
committer: Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 18:47:22 -0400
Add an option to zic.c to dump out all non-obsolete timezone abbreviations
defined in the Olson database. Comparing this list to its previous state
will clue us in when something happens that we may need to account for in
the tznames/ time zone abbreviation lists. The README file's previous
exhortation to "just grep for differences" was completely useless advice,
in my now-considerable experience; but maybe this will be a bit more
useful. As a starting point I built the same list from the tzdata files
as they existed in 2006, which is committed here as known_abbrevs.txt.
Comparison indeed turned up quite a few changes we had neglected to account
for, which I will commit separately.
M src/timezone/.gitignore
M src/timezone/Makefile
M src/timezone/README
A src/timezone/known_abbrevs.txt
M src/timezone/zic.c
Avoid renaming data directory during MSVC upgrade testing.
commit : b7f8465cc6c95da5b1af1de19bc7b7b1b2621276
author : Andrew Dunstan <[email protected]>
date : Sat, 23 Mar 2013 16:26:06 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 23 Mar 2013 16:26:06 -0400
This appears to cause some intermittent file system problems
on Windows 8. Instead, set up the old data directory in its
intended final location to start with.
M src/tools/msvc/vcregress.pl
Don't put <indexterm> before <term> in <varlistentry> items.
commit : cdc67938c086104ef7a0e2f1e6912e9ee0ba4c85
author : Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 14:06:33 -0400
committer: Tom Lane <[email protected]>
date : Sat, 23 Mar 2013 14:06:33 -0400
Doing that results in a broken index entry in PDF output. We had only
a few like that, which is probably why nobody noticed before.
Standardize on putting the <term> first.
Josh Kupershmidt
M doc/src/sgml/config.sgml
M doc/src/sgml/libpq.sgml
Document cross-version compatibility issues for contrib/postgres_fdw.
commit : 5b86fedfb57ea943f883a13c6d50c5a9e2a1cc57
author : Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 17:22:31 -0400
committer: Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 17:22:31 -0400
One of the use-cases for postgres_fdw is extracting data from older PG
servers, so cross-version compatibility is important. Document what we
can do here, and further annotate some of the coding choices that create
compatibility constraints. In passing, remove one unnecessary
incompatibility with old servers, namely assuming that we didn't need to
quote the timezone name 'UTC'.
M contrib/postgres_fdw/connection.c
M contrib/postgres_fdw/postgres_fdw.c
M doc/src/sgml/postgres-fdw.sgml
Fix contrib/dblink to handle inconsistent DateStyle/IntervalStyle safely.
commit : 8a3b6772aedbd95557ab1fc489ddf007ac9d405d
author : Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 15:22:15 -0400
committer: Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 15:22:15 -0400
If the remote database's settings of these GUCs are different from ours,
ambiguous datetime values may be read incorrectly. To fix, temporarily
adopt the remote server's settings while we ingest a query result.
This is not a complete fix, since it doesn't do anything about ambiguous
values in commands sent to the remote server; but there seems little we
can do about that end of it given dblink's entirely textual API for
transmitted commands.
Back-patch to 9.2. The hazard exists in all versions, but this patch
would need more work to apply before 9.2. Given the lack of field
complaints about this issue, it doesn't seem worth the effort at present.
Daniel Farina and Tom Lane
M contrib/dblink/dblink.c
M contrib/dblink/expected/dblink.out
M contrib/dblink/sql/dblink.sql
Fix problems with incomplete attempt to prohibit OIDS with MVs.
commit : 549dae0352a06a43ec664dc158556e12ec2d30e5
author : Kevin Grittner <[email protected]>
date : Fri, 22 Mar 2013 13:27:34 -0500
committer: Kevin Grittner <[email protected]>
date : Fri, 22 Mar 2013 13:27:34 -0500
Problem with assertion failure in restoring from pg_dump output
reported by Joachim Wieland.
Review and suggestions by Tom Lane and Robert Haas.
M doc/src/sgml/ref/create_materialized_view.sgml
M src/backend/commands/createas.c
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_utilcmd.c
M src/include/parser/parse_clause.h
Suppress uninitialized-variable warning in new checksum code.
commit : 4912385b56afe68ef76e47d38df1d61ada0fde2f
author : Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 12:27:50 -0400
committer: Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 12:27:50 -0400
Some compilers understand that this coding is safe, and some don't.
M src/backend/storage/page/bufpage.c
Update commit_delay documentation.
commit : 82b945c0979350c87ddc52adefe9f0a36dd5b4c8
author : Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 11:39:15 -0400
committer: Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 11:39:15 -0400
Commit 13fe298ca06f5390df5edf073cf401f9f0b67458 changed this GUC to be
PGC_SUSET, but neglected to update the documentation to match.
While at it, edit and rearrange the text a little for clarity.
M doc/src/sgml/config.sgml
Add new README file for pages/checksums
commit : 9df56f6d91c3d67b23925b8f8b70365636995b71
author : Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 14:21:58 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 14:21:58 +0000
A src/backend/storage/page/README
Allow I/O reliability checks using 16-bit checksums
commit : 96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56
author : Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 13:54:07 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 13:54:07 +0000
Checksums are set immediately prior to flush out of shared buffers
and checked when pages are read in again. Hint bit setting will
require full page write when block is dirtied, which causes various
infrastructure changes. Extensive comments, docs and README.
WARNING message thrown if checksum fails on non-all zeroes page;
ERROR thrown but can be disabled with ignore_checksum_failure = on.
Feature enabled by an initdb option, since transition from option off
to option on is long and complex and has not yet been implemented.
Default is not to use checksums.
Checksum used is WAL CRC-32 truncated to 16-bits.
Simon Riggs, Jeff Davis, Greg Smith
Wide input and assistance from many community members. Thank you.
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.h
M doc/src/sgml/config.sgml
M doc/src/sgml/ref/initdb.sgml
M src/backend/access/gist/gistget.c
M src/backend/access/hash/hash.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/transam/README
M src/backend/access/transam/xlog.c
M src/backend/bootstrap/bootstrap.c
M src/backend/commands/matview.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/vacuumlazy.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/freespace/README
M src/backend/storage/freespace/freespace.c
M src/backend/storage/freespace/fsmpage.c
M src/backend/storage/page/bufpage.c
M src/backend/utils/misc/guc.c
M src/backend/utils/time/tqual.c
M src/bin/initdb/initdb.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/heapam_xlog.h
M src/include/access/visibilitymap.h
M src/include/access/xlog.h
M src/include/catalog/pg_control.h
M src/include/storage/bufmgr.h
M src/include/storage/bufpage.h
Silence compiler warnings about unused values.
commit : e4a05c7512b23c8f48c186e685f2ef186374a20a
author : Andrew Dunstan <[email protected]>
date : Fri, 22 Mar 2013 09:14:16 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 22 Mar 2013 09:14:16 -0400
Per gripe from Kevin Grittner.
M contrib/hstore/hstore_io.c
Change commit_delay to be SUSET for 9.3+ Prior to 9.3 the commit_delay affected only the current user, whereas now only the group leader waits while holding the WALWriteLock. Deliberate or accidental settings to a poor value could seriously degrade performance for all users. Privileges may be delegated by SECURITY DEFINER functions for anyone that needs per-user settings in real situations. Request for change from Peter Geoghegan
commit : 13fe298ca06f5390df5edf073cf401f9f0b67458
author : Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 12:01:16 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 22 Mar 2013 12:01:16 +0000
M src/backend/utils/misc/guc.c
Avoid retrieving dummy NULL columns in postgres_fdw.
commit : e690b9515072fd7767fdeca5c54166f6a77733bc
author : Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 00:31:11 -0400
committer: Tom Lane <[email protected]>
date : Fri, 22 Mar 2013 00:31:11 -0400
This should provide some marginal overall savings, since it surely takes
many more cycles for the remote server to deal with the NULL columns than
it takes for postgres_fdw not to emit them. But really the reason is to
keep the emitted queries from looking quite so silly ...
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/postgres_fdw/sql/postgres_fdw.sql
Redo postgres_fdw's planner code so it can handle parameterized paths.
commit : 9cbc4b80ddc10b36c64514104caa69747c386dcf
author : Tom Lane <[email protected]>
date : Thu, 21 Mar 2013 19:43:59 -0400
committer: Tom Lane <[email protected]>
date : Thu, 21 Mar 2013 19:43:59 -0400
I wasn't going to ship this without having at least some example of how
to do that. This version isn't terribly bright; in particular it won't
consider any combinations of multiple join clauses. Given the cost of
executing a remote EXPLAIN, I'm not sure we want to be very aggressive
about doing that, anyway.
In support of this, refactor generate_implied_equalities_for_indexcol
so that it can be used to extract equivalence clauses that aren't
necessarily tied to an index.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/postgres_fdw/sql/postgres_fdw.sql
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/include/optimizer/paths.h
Eliminate trivial whitespace inconsistency in docs sample code.
commit : 08af1a0a2ae8fbbd9949d9fa0f7583f6c09cf4ec
author : Kevin Grittner <[email protected]>
date : Thu, 21 Mar 2013 10:34:47 -0500
committer: Kevin Grittner <[email protected]>
date : Thu, 21 Mar 2013 10:34:47 -0500
M doc/src/sgml/rules.sgml
Fix "element <@ range" cost estimation.
commit : f897c4744fea221dfc7bbd277081edad41d1d58d
author : Heikki Linnakangas <[email protected]>
date : Thu, 21 Mar 2013 11:15:45 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 21 Mar 2013 11:15:45 +0200
The statistics-based cost estimation patch for range types broke that, by
incorrectly assuming that the left operand of all range oeprators is a
range. That lead to a "type x is not a range type" error. Because it took so
long for anyone to notice, add a regression test for that case.
We still don't do proper statistics-based cost estimation for that, so you
just get a default constant estimate. We should look into implementing that,
but this patch at least fixes the regression.
Spotted by Tom Lane, when testing query from Josh Berkus.
M src/backend/utils/adt/rangetypes_selfuncs.c
M src/test/regress/expected/rangetypes.out
M src/test/regress/sql/rangetypes.sql
Allow extracting machine-readable object identity
commit : f8348ea32ec8d713cd6e5d5e16f15edef22c4d03
author : Alvaro Herrera <[email protected]>
date : Wed, 20 Mar 2013 18:19:19 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 20 Mar 2013 18:19:19 -0300
Introduce pg_identify_object(oid,oid,int4), which is similar in spirit
to pg_describe_object but instead produces a row of machine-readable
information to uniquely identify the given object, without resorting to
OIDs or other internal representation. This is intended to be used in
the event trigger implementation, to report objects being operated on;
but it has usefulness of its own.
Catalog version bumped because of the new function.
M doc/src/sgml/func.sgml
M src/backend/catalog/dependency.c
M src/backend/catalog/objectaddress.c
M src/backend/commands/alter.c
M src/backend/parser/gram.y
M src/backend/utils/adt/format_type.c
M src/backend/utils/adt/regproc.c
M src/include/catalog/catversion.h
M src/include/catalog/dependency.h
M src/include/catalog/objectaddress.h
M src/include/catalog/pg_proc.h
M src/include/utils/builtins.h
Bump up timeout delays some more in timeouts isolation test.
commit : a7921f71a3c747141344d8604f6a6d7b4cddb2a9
author : Tom Lane <[email protected]>
date : Wed, 20 Mar 2013 13:53:43 -0400
committer: Tom Lane <[email protected]>
date : Wed, 20 Mar 2013 13:53:43 -0400
The buildfarm members using -DCLOBBER_CACHE_ALWAYS still don't like this
test. Some experimentation shows that on my machine, isolationtester's
query to check for "waiting" state takes 2 to 2.5 seconds to bind+execute
under -DCLOBBER_CACHE_ALWAYS. Set the timeouts to 5 seconds to leave some
headroom for possibly-slower buildfarm critters.
Really we ought to fix the "waiting" query, which is not only horridly
slow but outright wrong in detail; and then maybe we can back off these
timeouts. But right now I'm just trying to get the buildfarm green again.
M src/test/isolation/expected/timeouts.out
M src/test/isolation/specs/timeouts.spec
Use ORDER BY on matview definitions were needed for stable plans.
commit : 241139ae4baf6264c3c2cd053a547833c6e49a59
author : Kevin Grittner <[email protected]>
date : Tue, 19 Mar 2013 10:33:37 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 19 Mar 2013 10:33:37 -0500
Per report from Hadi Moshayedi of matview regression test failure
with optimization of aggregates. A few ORDER BY clauses improve
code coverage for matviews while solving that problem.
M src/test/regress/expected/matview.out
M src/test/regress/sql/matview.sql
Clarify assumption of filesystem metadata integrity.
commit : 1a091002cfa2180a908b36d56c58749a175b4be7
author : Simon Riggs <[email protected]>
date : Tue, 19 Mar 2013 08:57:29 +0000
committer: Simon Riggs <[email protected]>
date : Tue, 19 Mar 2013 08:57:29 +0000
Jeff Davis
M doc/src/sgml/wal.sgml
Correction that 2pc state files use CRC-32.
commit : 8c3b87ca10a54daf06e41986d763e12538c06ab9
author : Simon Riggs <[email protected]>
date : Tue, 19 Mar 2013 08:51:35 +0000
committer: Simon Riggs <[email protected]>
date : Tue, 19 Mar 2013 08:51:35 +0000
Jeff Davis
M doc/src/sgml/wal.sgml
Add reliability docs about storage/memory corruptions. Add section to the Reliability section about what is and is not protected for various file types. Further edits welcome.
commit : 2266db392cb825eccb39518e7b652e7f336fff6c
author : Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 22:38:07 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 22:38:07 +0000
Designed to allow 1-2 line change when/if checksums are committed.
Inspired by docs written by Jeff Davis, though completely different from his
patch.
M doc/src/sgml/wal.sgml
Improve documentation of EXTRACT(WEEK).
commit : e39feb1006ac5c64fd804597088bc7f40ff7b635
author : Tom Lane <[email protected]>
date : Mon, 18 Mar 2013 13:34:15 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Mar 2013 13:34:15 -0400
The docs showed that early-January dates can be considered part of the
previous year for week-counting purposes, but failed to say explicitly
that late-December dates can also be considered part of the next year.
Fix that, and add a cross-reference to the "isoyear" field. Per bug
#7967 from Pawel Kobylak.
M doc/src/sgml/func.sgml
Add pageinspect--1.0--1.sql for checksum changes
commit : e016b72411caa7027f9c980fb2c0560cdab2a129
author : Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 14:39:17 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 14:39:17 +0000
A contrib/pageinspect/pageinspect–1.0–1.1.sql
Add pageinspect--1.1.sql for checksum changes
commit : ef04cb745fc3167264f369a2710f237de4db0bf4
author : Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 14:19:06 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 14:19:06 +0000
A contrib/pageinspect/pageinspect–1.1.sql
Remove PageSetTLI and rename pd_tli to pd_checksum Remove use of PageSetTLI() from all page manipulation functions and adjust README to indicate change in the way we make changes to pages. Repurpose those bytes into the pd_checksum field and explain how that works in comments about page header.
commit : bb7cc2623f242ffafae404f8ebbb331b9a7f2b68
author : Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 13:46:42 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 18 Mar 2013 13:46:42 +0000
Refactoring ahead of actual feature patch which would make use
of the checksum field, arriving later.
Jeff Davis, with comments and doc changes by Simon Riggs
Direction suggested by Robert Haas; many others providing
review comments.
M contrib/pageinspect/Makefile
M contrib/pageinspect/pageinspect.control
M contrib/pageinspect/rawpage.c
M doc/src/sgml/pageinspect.sgml
M src/backend/access/gin/ginbtree.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/gininsert.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gin/ginvacuum.c
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/README
M src/backend/access/transam/xlog.c
M src/backend/commands/sequence.c
M src/backend/commands/vacuumlazy.c
M src/include/storage/bufpage.h
Increase timeout delays in new timeouts isolation test.
commit : 4c855750fc0ba9bd30fa397eafbfee354908bbca
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 23:00:44 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 23:00:44 -0400
Buildfarm member friarbird doesn't like this test as-committed, evidently
because it's so slow that the test framework doesn't reliably notice that
the backend is waiting before the timeout goes off. (This is not totally
surprising, since friarbird builds with -DCLOBBER_CACHE_ALWAYS.) Increase
the timeout delay from 1 second to 2 in hopes of resolving that problem.
M src/test/isolation/expected/timeouts.out
M src/test/isolation/specs/timeouts.spec
Extend object-access hook machinery to support post-alter events.
commit : 05f3f9c7b2922b2a064418b5cd87b372d1b73412
author : Robert Haas <[email protected]>
date : Sun, 17 Mar 2013 22:55:14 -0400
committer: Robert Haas <[email protected]>
date : Sun, 17 Mar 2013 22:55:14 -0400
This also slightly widens the scope of what we support in terms of
post-create events.
KaiGai Kohei, with a few changes, mostly to the comments, by me
M src/backend/catalog/aclchk.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/objectaccess.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_db_role_setting.c
M src/backend/catalog/pg_type.c
M src/backend/commands/alter.c
M src/backend/commands/cluster.c
M src/backend/commands/dbcommands.c
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/matview.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/schemacmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/rewrite/rewriteDefine.c
M src/include/catalog/heap.h
M src/include/catalog/index.h
M src/include/catalog/objectaccess.h
M src/include/catalog/pg_constraint.h
M src/include/commands/cluster.h
M src/include/commands/tablecmds.h
Improve signal-handler lockout mechanism in timeout.c.
commit : 6ac7facdd3990baf47efc124e9d7229422a06452
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 22:42:19 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 22:42:19 -0400
Rather than doing a fairly-expensive setitimer() call to prevent interrupts
from happening, let's just invent a simple boolean flag that the signal
handler is required to check. This is not only faster but considerably
more robust than before, since the previous code effectively assumed that
only ITIMER_REAL events would ever fire the SIGALRM handler, which is
obviously something that can be broken easily by third-party code.
Zoltán Böszörményi and Tom Lane
M src/backend/utils/misc/timeout.c
Use pqsignal() in contrib programs rather than calling signal(2) directly.
commit : 3c07fbf40bd0276e4be02fc72cba6b1cd62da301
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 16:09:47 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 16:09:47 -0400
The semantics of signal(2) are more variable than one could wish; in
particular, on strict-POSIX platforms the signal handler will be reset
to SIG_DFL when the signal is delivered. This demonstrably breaks
pg_test_fsync's use of SIGALRM. The other changes I made are not
absolutely necessary today, because the called handlers all exit the
program anyway. But it seems like a good general practice to use
pqsignal() exclusively in Postgres code, now that we have it available
everywhere.
M contrib/pg_standby/pg_standby.c
M contrib/pg_test_fsync/pg_test_fsync.c
Re-include pqsignal() in libpq.
commit : b1fae823ee46a26e7e557591d659351835742537
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 15:45:31 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 15:45:31 -0400
We need this in non-ENABLE_THREAD_SAFETY builds, and also to satisfy
the exports.txt entry; while it might be a good idea to remove the
latter, I'm hesitant to do so except in the context of an intentional
ABI break. At least we don't have a separately maintained source file
for it anymore.
M src/interfaces/libpq/.gitignore
M src/interfaces/libpq/Makefile
M src/interfaces/libpq/bcc32.mak
M src/interfaces/libpq/win32.mak
initdb needs pqsignal() even on Windows.
commit : e2a203a1903367135457f12e0032626f96ef04ca
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 15:19:47 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 15:19:47 -0400
I had thought we weren't using this version of pqsignal() at all on
Windows, but that's wrong --- initdb is using it (and coping with the
POSIX-ish semantics of bare signal() :-(). So allow the file to be
built in WIN32+FRONTEND case, and add it to the MSVC build logic.
M src/include/port.h
M src/port/pqsignal.c
M src/tools/msvc/Mkvcbuild.pm
Fix inclusions in pgbench.c.
commit : 8c41cb695cc5f90eee3d2226ad09016381700ca7
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 14:18:33 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 14:18:33 -0400
Apparently this was depending on pqsignal.h for <signal.h>.
Not sure why I didn't see the failure on my other machine.
M contrib/pgbench/pgbench.c
Fix inclusions in pg_receivexlog.c.
commit : c68b5eff13b97ecaaa87b24406455fafe568aa3f
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 14:11:48 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 14:11:48 -0400
Apparently this was depending on pqsignal.h for <signal.h>.
Not sure why I didn't see the failure on my other machine.
M src/bin/pg_basebackup/pg_receivexlog.c
Move pqsignal() to libpgport.
commit : da5aeccf64b37a8e9bd3cb605848590595dbcbf8
author : Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 12:06:42 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Mar 2013 12:06:42 -0400
We had two copies of this function in the backend and libpq, which was
already pretty bogus, but it turns out that we need it in some other
programs that don't use libpq (such as pg_test_fsync). So put it where
it probably should have been all along. The signal-mask-initialization
support in src/backend/libpq/pqsignal.c stays where it is, though, since
we only need that in the backend.
M contrib/pgbench/pgbench.c
M src/backend/access/transam/xlog.c
M src/backend/libpq/pqsignal.c
M src/backend/main/main.c
M src/backend/port/win32/signal.c
M src/backend/port/win32/timer.c
M src/backend/replication/walsender.c
M src/backend/utils/misc/timeout.c
M src/bin/initdb/.gitignore
M src/bin/initdb/Makefile
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/psql/common.c
M src/bin/psql/copy.c
M src/bin/psql/print.c
M src/bin/scripts/common.c
M src/include/libpq/pqsignal.h
M src/include/port.h
M src/interfaces/libpq/Makefile
M src/interfaces/libpq/bcc32.mak
M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-print.c
M src/interfaces/libpq/fe-secure.c
D src/interfaces/libpq/pqsignal.c
D src/interfaces/libpq/pqsignal.h
M src/interfaces/libpq/win32.mak
M src/pl/plperl/plperl.c
M src/port/Makefile
A src/port/pqsignal.c
Add lock_timeout configuration parameter.
commit : d43837d03067487560af481474ae985df894f786
author : Tom Lane <[email protected]>
date : Sat, 16 Mar 2013 23:22:17 -0400
committer: Tom Lane <[email protected]>
date : Sat, 16 Mar 2013 23:22:17 -0400
This GUC allows limiting the time spent waiting to acquire any one
heavyweight lock.
In support of this, improve the recently-added timeout infrastructure
to permit efficiently enabling or disabling multiple timeouts at once.
That reduces the performance hit from turning on lock_timeout, though
it's still not zero.
Zoltán Böszörményi, reviewed by Tom Lane,
Stephen Frost, and Hari Babu
M doc/src/sgml/config.sgml
M src/backend/postmaster/autovacuum.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/backend/utils/misc/timeout.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
M src/include/storage/proc.h
M src/include/utils/timeout.h
A src/test/isolation/expected/timeouts.out
M src/test/isolation/isolation_schedule
A src/test/isolation/specs/timeouts.spec
pg_resetxlog: Capitalize placeholder in --help output
commit : d2bef5f7db5f3afdbbb3f58b8eff49f0bc7ef790
author : Peter Eisentraut <[email protected]>
date : Sat, 16 Mar 2013 21:47:52 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 16 Mar 2013 21:47:52 -0400
M src/bin/pg_resetxlog/pg_resetxlog.c
pg_controldata: Undo message spelling change
commit : ea1aee88e343969ad7122a18aff7a43e789dbbd7
author : Peter Eisentraut <[email protected]>
date : Sat, 16 Mar 2013 21:47:10 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 16 Mar 2013 21:47:10 -0400
M src/bin/pg_controldata/pg_controldata.c
Improve the documentation about commit_delay.
commit : 70ec2f8f4392f4e3d379c2c759789d631ffeec10
author : Tom Lane <[email protected]>
date : Fri, 15 Mar 2013 17:41:47 -0400
committer: Tom Lane <[email protected]>
date : Fri, 15 Mar 2013 17:41:47 -0400
Clarify the docs explaining what commit_delay does, and add a
recommendation about a useful value for it, namely half of the single-page
fsync time reported by pg_test_fsync. This is informed by testing of
the new-in-9.3 implementation of commit_delay; in prior versions it
was far harder to arrive at a useful setting.
In passing, do some wordsmithing and markup-fixing in the same general
area.
Also, change pg_test_fsync's default time-per-test from 2 seconds to 5.
The old value was about the minimum at which the results could be taken
seriously at all, and so seems a tad optimistic as a default.
Peter Geoghegan, reviewed by Noah Misch; some additional editing by me
M contrib/pg_test_fsync/pg_test_fsync.c
M doc/src/sgml/config.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/wal.sgml
Improve error reporting in code that checks for buffer refcount leaks.
commit : dcafdbcde1baf256891be6af77868b84889b435d
author : Tom Lane <[email protected]>
date : Fri, 15 Mar 2013 12:26:26 -0400
committer: Tom Lane <[email protected]>
date : Fri, 15 Mar 2013 12:26:26 -0400
Formerly we just Assert'ed that each refcount was zero, which was quick
and easy but failed to provide a good overview of what was wrong.
Change the code so that we'll call PrintBufferLeakWarning() for each
buffer with a nonzero refcount, and then Assert at the end of the loop.
This costs nothing in runtime and might ease diagnosis of some bugs.
Greg Smith, reviewed by Satoshi Nagayasu, further tweaked by me
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
Extend format() to handle field width and left/right alignment.
commit : 73e7025bd8eed941a068f0a7a71e02dca8d38d1c
author : Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 22:56:56 -0400
committer: Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 22:56:56 -0400
This change adds some more standard sprintf() functionality to format().
Pavel Stehule, reviewed by Dean Rasheed and Kyotaro Horiguchi
M doc/src/sgml/func.sgml
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/text.out
M src/test/regress/sql/text.sql
Avoid inserting no-op Limit plan nodes.
commit : 1a1832eb085e5bca198735e5d0e766a3cb61b8fc
author : Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 15:10:41 -0400
committer: Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 15:10:41 -0400
This was discussed in connection with the patch to avoid inserting no-op
Result nodes, but not actually implemented therein.
M src/backend/optimizer/plan/planner.c
M src/test/regress/expected/updatable_views.out
Revert unnecessary change in MV call to checkRuleResultList().
commit : fb60e7296c2cf15195802b4596496b179bdc905a
author : Kevin Grittner <[email protected]>
date : Thu, 14 Mar 2013 13:59:52 -0500
committer: Kevin Grittner <[email protected]>
date : Thu, 14 Mar 2013 13:59:52 -0500
Due to a misreading of the function's comment block, there was an
unneeded change to a call in rewriteDefine.c. There is, in fact
no reason to pass false for a MV; it should be true just like a
view.
Fixes issue pointed out by Tom Lane
M src/backend/rewrite/rewriteDefine.c
Add regression test for MV join to view.
commit : 8d7ff13ed5626ecdac2bb0b356445ff4192810aa
author : Kevin Grittner <[email protected]>
date : Thu, 14 Mar 2013 13:34:51 -0500
committer: Kevin Grittner <[email protected]>
date : Thu, 14 Mar 2013 13:34:51 -0500
This would have caught a bug in the initial patch, and seems like
a good thing to test going forward.
Per bug report by Erik Rijkers and fix by Tom Lane
M src/test/regress/expected/matview.out
M src/test/regress/sql/matview.sql
Also update psqlscan.l with the UESCAPE error rule changes.
commit : f7559c0101afa33bfb4e104036ca46adac900111
author : Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 20:31:27 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 20:31:27 +0200
Even though this patch had no user-visible difference, better keep the code
in psqlscan.l sync with the backend lexer. And of course it's nice to shrink
the psql binary, too. Ecpg's version of the lexer doesn't have the error
rule, it doesn't try to avoid backing up, so it doesn't need to be modified.
As reminded by Tom Lane
M src/bin/psql/psqlscan.l
Minor fixes for hstore_to_json_loose().
commit : c2754991ba6e513a07c15b4058df13d58f8c55ba
author : Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 13:51:47 -0400
committer: Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 13:51:47 -0400
Fix unportable use of isdigit(), get rid of useless calculations.
M contrib/hstore/hstore_io.c
Avoid inserting Result nodes that only compute identity projections.
commit : 4387cf956b9eb13aad569634e0c4df081d76e2e3
author : Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 13:42:51 -0400
committer: Tom Lane <[email protected]>
date : Thu, 14 Mar 2013 13:42:51 -0400
The planner sometimes inserts Result nodes to perform column projections
(ie, arbitrary scalar calculations) above plan nodes that lack projection
logic of their own. However, we did that even if the lower plan node was
in fact producing the required column set already; which is a pretty common
case given the popularity of "SELECT * FROM ...". Measurements show that
the useless plan node adds non-negligible overhead, especially when there
are many columns in the result. So add a check to avoid inserting a Result
node unless there's something useful for it to do.
There are a couple of remaining places where unnecessary Result nodes
could get inserted, but they are (a) much less performance-critical,
and (b) coded in such a way that it's hard to avoid inserting a Result,
because the desired tlist is changed on-the-fly in subsequent logic.
We'll leave those alone for now.
Kyotaro Horiguchi; reviewed and further hacked on by Amit Kapila and
Tom Lane.
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/tlist.c
M src/include/optimizer/tlist.h
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/inherit.out
M src/test/regress/expected/union.out
Change the way UESCAPE is lexed, to reduce the size of the flex tables.
commit : a5ff502fceadc7c203b0d7a11b45c73f1b421f69
author : Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 19:00:09 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 19:00:09 +0200
The error rule used to avoid backtracking with the U&'...' UESCAPE 'x'
syntax bloated the flex tables, so refactor that. This patch makes the error
rule shorter, by introducing a new exclusive flex state that's entered after
parsing U&'...'. This shrinks the postgres binary by about 220kB.
M src/backend/parser/scan.l
Add cost estimation of range @> and <@ operators.
commit : 59d0bf9dca58b237902c2fd1507e8bc5d54d4a63
author : Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 15:36:56 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 14 Mar 2013 15:36:56 +0200
The estimates are based on the existing lower bound histogram, and a new
histogram of range lengths.
Bump catversion, because the range length histogram now needs to be present
in statistic slot kind 6, or you get an error on @> and <@ queries. (A
re-ANALYZE would be enough to fix that, though)
Alexander Korotkov, with some refactoring by me.
M src/backend/utils/adt/rangetypes_selfuncs.c
M src/backend/utils/adt/rangetypes_typanalyze.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_statistic.h
Add regression tests for XML mapping of domains
commit : 788bce13d3249ddbcdf3443ee078145f4888ab45
author : Peter Eisentraut <[email protected]>
date : Wed, 13 Mar 2013 22:42:57 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 13 Mar 2013 22:42:57 -0400
Pavel Stěhule
M src/test/regress/expected/xmlmap.out
M src/test/regress/expected/xmlmap_1.out
M src/test/regress/sql/xmlmap.sql
Fix bug in dumping prior releases due to MV REFRESH dependency checking.
commit : a18b72adcd3632aa21ebf84cc6ed1caf46ba43da
author : Kevin Grittner <[email protected]>
date : Wed, 13 Mar 2013 20:20:32 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 13 Mar 2013 20:20:32 -0500
Reports and suggested patches from Fujii Masao and Andrew Dunstan.
Andrew Dunstan
M src/bin/pg_dump/pg_dump.c
Introduce less-bogus handling of collations in contrib/postgres_fdw.
commit : ed3ddf918b59545583a4b374566bc1148e75f593
author : Tom Lane <[email protected]>
date : Wed, 13 Mar 2013 19:46:31 -0400
committer: Tom Lane <[email protected]>
date : Wed, 13 Mar 2013 19:46:31 -0400
Treat expressions as being remotely executable only if all collations used
in them are determined by Vars of the foreign table. This means that, if
the foreign server gets different answers than we do, it's the user's fault
for not having marked the foreign table columns with collations equivalent
to the remote table's. This rule allows most simple expressions such as
"var < 'constant'" to be sent to the remote side, because the constant
isn't determining the collation (the Var's collation would win). There's
still room for improvement, but it's hard to see how to do it without a
lot more knowledge and/or assumptions about what the remote side will do.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
Fix documentation oversight.
commit : 209f675f0f9094015414eee39c435ed3bf65d82a
author : Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 19:06:43 -0400
committer: Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 19:06:43 -0400
Mention that PlanForeignModify's result must be copiable by copyObject.
M doc/src/sgml/fdwhandler.sgml
Fix contrib/postgres_fdw's handling of column defaults.
commit : 50c19fc76f05124b80fc4c5d20a359c5dbf017af
author : Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 18:58:13 -0400
committer: Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 18:58:13 -0400
Adopt the position that only locally-defined defaults matter. Any defaults
defined in the remote database do not affect insertions performed through
a foreign table (unless they are for columns not known to the foreign
table). While it'd arguably be more useful to permit remote defaults to be
used, making that work in a consistent fashion requires far more work than
seems possible for 9.3.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/postgres_fdw/sql/postgres_fdw.sql
Allow default expressions to be attached to columns of foreign tables.
commit : a0c6dfeecfcc860858b04617a9d96eaee1d82c66
author : Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 17:37:07 -0400
committer: Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 17:37:07 -0400
There's still some discussion about exactly how postgres_fdw ought to
handle this case, but there seems no debate that we want to allow defaults
to be used for inserts into foreign tables. So remove the core-code
restrictions that prevented it.
While at it, get rid of the special grammar productions for CREATE FOREIGN
TABLE, and instead add explicit FEATURE_NOT_SUPPORTED error checks for the
disallowed cases. This makes the grammar a shade smaller, and more
importantly results in much more intelligible error messages for
unsupported cases. It's also one less thing to fix if we ever start
supporting constraints on foreign tables.
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/create_foreign_table.sgml
M src/backend/commands/tablecmds.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/test/regress/expected/foreign_data.out
M src/test/regress/sql/foreign_data.sql
Fix orthotypographical mistake
commit : 1ba0119308e74e522c75662147d89d154f45bb5d
author : Alvaro Herrera <[email protected]>
date : Tue, 12 Mar 2013 11:57:22 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 12 Mar 2013 11:57:22 -0300
Apparently I lost some of the edits I had done on this page for commit
0ac5ad5134.
Per note from Etsuro Fujita, although I didn't use his patch.
Make some of the wording in the affected section a bit more complete,
too.
M doc/src/sgml/ref/select.sgml
Avoid row-processing-order dependency in postgres_fdw regression test.
commit : 0247d43dd9c4ba3d2e121f98e3d5adcf769ab1e3
author : Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 10:47:04 -0400
committer: Tom Lane <[email protected]>
date : Tue, 12 Mar 2013 10:47:04 -0400
A test intended to provoke an error on the remote side was coded in such
a way that multiple rows should be updated, so the output would vary
depending on which one was processed first. Per buildfarm.
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
Fix postgres_fdw's issues with inconsistent interpretation of data values.
commit : cc3f281ffb0a5d9b187e7a7b7de4a045809ff683
author : Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 21:31:28 -0400
committer: Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 21:31:28 -0400
For datatypes whose output formatting depends on one or more GUC settings,
we have to worry about whether the other server will interpret the value
the same way it was meant. pg_dump has been aware of this hazard for a
long time, but postgres_fdw needs to deal with it too. To fix data
retrieval from the remote server, set the necessary remote GUC settings at
connection startup. (We were already assuming that settings made then
would persist throughout the remote session.) To fix data transmission to
the remote server, temporarily force the relevant GUCs to the right values
when we're about to convert any data values to text for transmission.
This is all pretty grotty, and not very cheap either. It's tempting to
think of defining one uber-GUC that would override any settings that might
render printed data values unportable. But of course, older remote servers
wouldn't know any such thing and would still need this logic.
While at it, revert commit f7951eef89be78c50ea2241f593d76dfefe176c9, since
this provides a real fix. (The timestamptz given in the error message
returned from the "remote" server will now reliably be shown in UTC.)
M contrib/postgres_fdw/connection.c
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/postgres_fdw/sql/postgres_fdw.sql
Avoid generating bad remote SQL for INSERT ... DEFAULT VALUES.
commit : 8f9cc41daf08be802933dc788517743719ee0949
author : Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 14:26:05 -0400
committer: Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 14:26:05 -0400
"INSERT INTO foo() VALUES ()" is invalid syntax, so don't do that.
M contrib/postgres_fdw/deparse.c
Fix thinko in matview patch.
commit : 41eef0ff75c3ea905513ae46f795c0409635fac8
author : Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 12:00:24 -0400
committer: Tom Lane <[email protected]>
date : Mon, 11 Mar 2013 12:00:24 -0400
"break" instead of "continue" suppressed view expansion for views appearing
later in the range table. Per report from Erikjan Rijkers.
While at it, improve the associated comment a bit.
M src/backend/rewrite/rewriteHandler.c
JSON generation improvements.
commit : 38fb4d978c5bfc377ef979e2595e3472744a3b05
author : Andrew Dunstan <[email protected]>
date : Sun, 10 Mar 2013 17:35:36 -0400
committer: Andrew Dunstan <[email protected]>
date : Sun, 10 Mar 2013 17:35:36 -0400
This adds the following:
json_agg(anyrecord) -> json
to_json(any) -> json
hstore_to_json(hstore) -> json (also used as a cast)
hstore_to_json_loose(hstore) -> json
The last provides heuristic treatment of numbers and booleans.
Also, in json generation, if any non-builtin type has a cast to json,
that function is used instead of the type's output function.
Andrew Dunstan, reviewed by Steve Singer.
Catalog version bumped.
M contrib/hstore/expected/hstore.out
M contrib/hstore/hstore–1.1.sql
M contrib/hstore/hstore_io.c
M contrib/hstore/sql/hstore.sql
M doc/src/sgml/func.sgml
M doc/src/sgml/hstore.sgml
M src/backend/utils/adt/json.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_aggregate.h
M src/include/catalog/pg_proc.h
M src/include/utils/json.h
M src/test/regress/expected/json.out
M src/test/regress/sql/json.sql
doc: Add note about checkpoint_warning vs checkpoint_timeout
commit : dd28c410f77e415ce104cb42bf52c4a5457085da
author : Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 17:16:18 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 17:16:18 -0400
suggested by Tianyin Xu
M doc/src/sgml/config.sgml
pg_ctl: Adjust nls.mk for split out of wait_error.c
commit : 31531325a4d374e6470b51e4b1dbc3cdc78f7d6e
author : Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 16:54:27 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 16:54:27 -0400
M src/bin/pg_ctl/nls.mk
pg_basebackup: Add missing newlines to several error messages
commit : 74e629cb0987fd3505173c4e117108e079e7e930
author : Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 16:53:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 10 Mar 2013 16:53:04 -0400
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/receivelog.c
Band-aid for regression test expected-results problem with timestamptz.
commit : f7951eef89be78c50ea2241f593d76dfefe176c9
author : Tom Lane <[email protected]>
date : Sun, 10 Mar 2013 15:07:38 -0400
committer: Tom Lane <[email protected]>
date : Sun, 10 Mar 2013 15:07:38 -0400
We probably need to tell the remote server to use specific timezone and
datestyle settings, and maybe other things. But for now let's just hack
the postgres_fdw regression test to not provoke failures when run in
non-EST5EDT environments. Per buildfarm.
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
Support writable foreign tables.
commit : 21734d2fb896e0ecdddd3251caa72a3576e2d415
author : Tom Lane <[email protected]>
date : Sun, 10 Mar 2013 14:14:53 -0400
committer: Tom Lane <[email protected]>
date : Sun, 10 Mar 2013 14:14:53 -0400
This patch adds the core-system infrastructure needed to support updates
on foreign tables, and extends contrib/postgres_fdw to allow updates
against remote Postgres servers. There's still a great deal of room for
improvement in optimization of remote updates, but at least there's basic
functionality there now.
KaiGai Kohei, reviewed by Alexander Korotkov and Laurenz Albe, and rather
heavily revised by Tom Lane.
M contrib/file_fdw/input/file_fdw.source
M contrib/file_fdw/output/file_fdw.source
M contrib/postgres_fdw/connection.c
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
M contrib/postgres_fdw/sql/postgres_fdw.sql
M doc/src/sgml/ddl.sgml
M doc/src/sgml/fdwhandler.sgml
M doc/src/sgml/file-fdw.sgml
M doc/src/sgml/postgres-fdw.sgml
M doc/src/sgml/ref/create_foreign_data_wrapper.sgml
M src/backend/commands/copy.c
M src/backend/commands/explain.c
M src/backend/executor/execMain.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeModifyTable.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/parser/analyze.c
M src/backend/rewrite/rewriteHandler.c
M src/include/foreign/fdwapi.h
M src/include/nodes/execnodes.h
M src/include/nodes/plannodes.h
M src/include/optimizer/planmain.h
Report pg_hba line number and contents when users fail to log in
commit : 7f49a67f954db3e92fd96963169fb8302959576e
author : Magnus Hagander <[email protected]>
date : Sun, 10 Mar 2013 15:54:37 +0100
committer: Magnus Hagander <[email protected]>
date : Sun, 10 Mar 2013 15:54:37 +0100
Instead of just reporting which user failed to log in, log both the
line number in the active pg_hba.conf file (which may not match reality
in case the file has been edited and not reloaded) and the contents of
the matching line (which will always be correct), to make it easier
to debug incorrect pg_hba.conf files.
The message to the client remains unchanged and does not include this
information, to prevent leaking security sensitive information.
Reviewed by Tom Lane and Dean Rasheed
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/include/libpq/hba.h
Forgot catversion bump in the SP-GiST adjacent support patch.
commit : 96443d142002a6c17ee51fa0633ee5de3bffdc83
author : Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 17:12:38 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 17:12:38 +0200
M src/include/catalog/catversion.h
SP-GiST support of the range adjacent operator -|-
commit : 23f10b6473ed58c3699b81ca4677f4ff51878ec0
author : Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 15:03:19 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 15:03:19 +0200
Alexander Korotkov, reviewed by Jeff Davis.
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_spgist.c
M src/include/catalog/pg_amop.h
M src/include/utils/rangetypes.h
M src/test/regress/expected/opr_sanity.out
Remove unnecessary #ifdef FRONTEND check to choose between strdup and pstrdup.
commit : 2443a26b9b905e66cd9b95a2faf57e1f1ebcafb1
author : Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 11:21:44 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 8 Mar 2013 11:21:44 +0200
The libpgcommon patch made that unnecessary, palloc and friends are now
available in frontend programs too, mapped to plain old malloc.
As pointed out by Alvaro Herrera.
M src/port/wait_error.c
Fix typo in docs for ALTER MATERIALIZED VIEW.
commit : 71877c18a869b858f69e813659ed4bb22b117c4a
author : Kevin Grittner <[email protected]>
date : Thu, 7 Mar 2013 11:39:36 -0600
committer: Kevin Grittner <[email protected]>
date : Thu, 7 Mar 2013 11:39:36 -0600
Fujii Masao
M doc/src/sgml/ref/alter_materialized_view.sgml
Fix infinite-loop risk in fixempties() stage of regex compilation.
commit : a7b61d4f5af37344f8973b2dfce47e2ba2680061
author : Tom Lane <[email protected]>
date : Thu, 7 Mar 2013 11:51:03 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Mar 2013 11:51:03 -0500
The previous coding of this function could get into situations where it
would never terminate, because successive passes would re-add EMPTY arcs
that had been removed by the previous pass. Rewrite the function
completely using a new algorithm that is guaranteed to terminate, and
also seems to be usually faster than the old one. Per Tcl bugs 3604074
and 3606683.
Tom Lane and Don Porter
M src/backend/regex/regc_nfa.c
M src/backend/regex/regcomp.c
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Fix tli history file fetching, broken by the archive after crash recevery patch.
commit : 7ccefe8610db8b339bad2c5b51abc07448a32947
author : Heikki Linnakangas <[email protected]>
date : Thu, 7 Mar 2013 12:18:41 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 7 Mar 2013 12:18:41 +0200
If we were about to enter archive recovery after crash recovery, we scanned
the archive for the latest tli history file, and set the recovery target
timeline to that. However, when we actually tried to read the history file,
we would not fetch the file from the archive, because we were not in archive
recovery yet.
To fix, make readTimeLineHistory and existsTimeLineHistory to always fetch
the file from archive if archive recovery is requested, even if we're not in
archive recovery yet.
Backpatch to 9.2. Mitsumasa KONDO
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/include/access/xlog_internal.h
Arrange to cache FdwRoutine structs in foreign tables' relcache entries.
commit : 1908abc4a37d397356c9cdf0fd31c33a86281d63
author : Tom Lane <[email protected]>
date : Wed, 6 Mar 2013 23:47:38 -0500
committer: Tom Lane <[email protected]>
date : Wed, 6 Mar 2013 23:47:38 -0500
This saves several catalog lookups per reference. It's not all that
exciting right now, because we'd managed to minimize the number of places
that need to fetch the data; but the upcoming writable-foreign-tables patch
needs this info in a lot more places.
M src/backend/commands/analyze.c
M src/backend/executor/nodeForeignscan.c
M src/backend/foreign/foreign.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/cache/relcache.c
M src/include/foreign/fdwapi.h
M src/include/utils/rel.h
Add fe_memutils.c to nls.mk where used
commit : 97951139164055d6bae5aae7ea058c28e1462253
author : Peter Eisentraut <[email protected]>
date : Wed, 6 Mar 2013 23:45:16 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 6 Mar 2013 23:45:16 -0500
M src/bin/initdb/nls.mk
M src/bin/pg_basebackup/nls.mk
M src/bin/pg_ctl/nls.mk
M src/bin/pg_dump/nls.mk
M src/bin/psql/nls.mk
M src/bin/scripts/nls.mk
Code beautification for object-access hook machinery.
commit : f90cc269823ba5282341a197c7387f5ada6703a6
author : Robert Haas <[email protected]>
date : Wed, 6 Mar 2013 20:52:06 -0500
committer: Robert Haas <[email protected]>
date : Wed, 6 Mar 2013 20:52:06 -0500
KaiGai Kohei
M src/backend/catalog/Makefile
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
A src/backend/catalog/objectaccess.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_type.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/dbcommands.c
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/proclang.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/user.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/storage/large_object/inv_api.c
M src/backend/utils/init/globals.c
M src/include/catalog/objectaccess.h
Adjust nls.mk for split out of wait_error.c
commit : f11af2bcab36b51a7e41df7986d6f030459d7d09
author : Peter Eisentraut <[email protected]>
date : Wed, 6 Mar 2013 20:25:25 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 6 Mar 2013 20:25:25 -0500
M src/bin/initdb/nls.mk
M src/bin/psql/nls.mk
Fix missing #include in commands/matview.h.
commit : e11cb8ba2c9134c9f16253213f2f0cf089c5838e
author : Tom Lane <[email protected]>
date : Wed, 6 Mar 2013 18:20:51 -0500
committer: Tom Lane <[email protected]>
date : Wed, 6 Mar 2013 18:20:51 -0500
It needs parsenodes.h to be compilable regardless of previous headers.
M src/include/commands/matview.h
WAL-log the extension of a new empty MV heap which is being populated.
commit : c5bf7a2052c8e7ebbd1ca3986525c3629d7345d1
author : Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 17:15:34 -0600
committer: Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 17:15:34 -0600
This page with no tuples is used to distinguish an MV containing a
zero-row resultset of its backing query from an MV which has not
been populated by its backing query. Unless WAL-logged, recovery
and hot standby don't work correctly with what should be an empty
but scannable materialized view.
Fixes bugs reported by Fujii Masao in testing MVs on hot standby.
M src/backend/commands/matview.c
Add docs for pg_matviews, which were missed in the initial MV commit.
commit : 5141603ebd162a50c36583f1a80eceadc94ef25e
author : Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 15:35:59 -0600
committer: Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 15:35:59 -0600
M doc/src/sgml/catalogs.sgml
Fix broken pg_dump for 9.0 and 9.1 caused by the MV patch.
commit : cfa3df3de14b437d5f1691d1636a57c9ec595f51
author : Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 09:51:49 -0600
committer: Kevin Grittner <[email protected]>
date : Wed, 6 Mar 2013 09:51:49 -0600
Per report and suggestion from Bernd Helmle
M src/bin/pg_dump/pg_dump.c
Fix message typo.
commit : cd340ca89a06d6386f1af3b519db6f77c21ac84e
author : Andrew Dunstan <[email protected]>
date : Wed, 6 Mar 2013 09:53:38 -0500
committer: Andrew Dunstan <[email protected]>
date : Wed, 6 Mar 2013 09:53:38 -0500
M src/tools/msvc/vcregress.pl
pg_ctl: Add comma to message
commit : 71ea7e9737c1817cfa1747b181b27e73ce620f3b
author : Peter Eisentraut <[email protected]>
date : Tue, 5 Mar 2013 23:22:12 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 5 Mar 2013 23:22:12 -0500
M src/bin/pg_ctl/pg_ctl.c
Remove dependency on the DLL of pythonxx.def file.
commit : 0d147e43adcf5d2bff9caa073608f381a27439bf
author : Andrew Dunstan <[email protected]>
date : Tue, 5 Mar 2013 19:24:29 -0500
committer: Andrew Dunstan <[email protected]>
date : Tue, 5 Mar 2013 19:24:29 -0500
This confused Cygwin's make because of the colon in the path. The
DLL isn't likely to change under us so preserving the dependency
doesn't gain us much, and it's useful to be able to do a native
Windows build with the Cygwin mingw toolset.
Noah Misch.
M src/pl/plpython/Makefile
Fix to_char() to use ASCII-only case-folding rules where appropriate.
commit : 80b011ef0a13bb326861f79ba987b4fa04ae4a27
author : Tom Lane <[email protected]>
date : Tue, 5 Mar 2013 13:02:30 -0500
committer: Tom Lane <[email protected]>
date : Tue, 5 Mar 2013 13:02:30 -0500
formatting.c used locale-dependent case folding rules in some code paths
where the result isn't supposed to be locale-dependent, for example
to_char(timestamp, 'DAY'). Since the source data is always just ASCII
in these cases, that usually didn't matter ... but it does matter in
Turkish locales, which have unusual treatment of "i" and "I". To confuse
matters even more, the misbehavior was only visible in UTF8 encoding,
because in single-byte encodings we used pg_toupper/pg_tolower which
don't have locale-specific behavior for ASCII characters. Fix by providing
intentionally ASCII-only case-folding functions and using these where
appropriate. Per bug #7913 from Adnan Dursun. Back-patch to all active
branches, since it's been like this for a long time.
M src/backend/utils/adt/formatting.c
M src/include/utils/formatting.h
Bump catversion because of new function in the materialized view patch.
commit : c8056592bcbed183fb03266d22fa1073bc8b04b4
author : Kevin Grittner <[email protected]>
date : Tue, 5 Mar 2013 05:32:03 -0600
committer: Kevin Grittner <[email protected]>
date : Tue, 5 Mar 2013 05:32:03 -0600
M src/include/catalog/catversion.h
Fix overflow check in tm2timestamp (this time for sure).
commit : 542eeba26992305d872be699158cb3ab1c2be6e6
author : Tom Lane <[email protected]>
date : Mon, 4 Mar 2013 15:13:31 -0500
committer: Tom Lane <[email protected]>
date : Mon, 4 Mar 2013 15:13:31 -0500
I fixed this code back in commit 841b4a2d5, but didn't think carefully
enough about the behavior near zero, which meant it improperly rejected
1999-12-31 24:00:00. Per report from Magnus Hagander.
M src/backend/utils/adt/timestamp.c
M src/interfaces/ecpg/pgtypeslib/timestamp.c
psql: Let \l accept a pattern
commit : 0ea1f6e98fc84f1c5f66cc6355f6e20582295e81
author : Peter Eisentraut <[email protected]>
date : Sun, 3 Mar 2013 22:17:08 -0500
committer: Magnus Hagander <[email protected]>
date : Sun, 3 Mar 2013 22:17:08 -0500
reviewed by Satoshi Nagayasu
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
M src/bin/psql/startup.c
Remove accidentally-committed .orig file.
commit : 54d6706ded5c612a7f9b16eb6ddb08f44e24bb70
author : Kevin Grittner <[email protected]>
date : Sun, 3 Mar 2013 18:38:44 -0600
committer: Magnus Hagander <[email protected]>
date : Sun, 3 Mar 2013 18:38:44 -0600
D src/backend/rewrite/rewriteDefine.c.orig
Fix map_sql_value_to_xml_value() to treat domains like their base types.
commit : bc61878682051678ade5f59da7bfd90ab72ce13b
author : Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 19:32:12 -0500
committer: Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 19:32:12 -0500
This was already the case for domains over arrays, but not for domains
over certain built-in types such as boolean. The special formatting
rules for those types should apply to domains over them as well.
Per discussion.
While this is a bug fix, it's also a behavioral change that seems likely
to trip up some applications. So no back-patch.
Pavel Stehule
M src/backend/utils/adt/xml.c
Add a materialized view relations.
commit : 3bf3ab8c563699138be02f9dc305b7b77a724307
author : Kevin Grittner <[email protected]>
date : Sun, 3 Mar 2013 18:23:31 -0600
committer: Kevin Grittner <[email protected]>
date : Sun, 3 Mar 2013 18:23:31 -0600
A materialized view has a rule just like a view and a heap and
other physical properties like a table. The rule is only used to
populate the table, references in queries refer to the
materialized data.
This is a minimal implementation, but should still be useful in
many cases. Currently data is only populated "on demand" by the
CREATE MATERIALIZED VIEW and REFRESH MATERIALIZED VIEW statements.
It is expected that future releases will add incremental updates
with various timings, and that a more refined concept of defining
what is "fresh" data will be developed. At some point it may even
be possible to have queries use a materialized in place of
references to underlying tables, but that requires the other
above-mentioned features to be working first.
Much of the documentation work by Robert Haas.
Review by Noah Misch, Thom Brown, Robert Haas, Marko Tiikkaja
Security review by KaiGai Kohei, with a decision on how best to
implement sepgsql still pending.
M contrib/oid2name/oid2name.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pgstattuple/pgstattuple.c
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/ref/allfiles.sgml
M doc/src/sgml/ref/alter_extension.sgml
A doc/src/sgml/ref/alter_materialized_view.sgml
M doc/src/sgml/ref/comment.sgml
M doc/src/sgml/ref/create_index.sgml
A doc/src/sgml/ref/create_materialized_view.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/create_view.sgml
A doc/src/sgml/ref/drop_materialized_view.sgml
A doc/src/sgml/ref/refresh_materialized_view.sgml
M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/reference.sgml
M doc/src/sgml/rules.sgml
M src/backend/access/common/reloptions.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/tuptoaster.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/system_views.sql
M src/backend/catalog/toasting.c
M src/backend/commands/Makefile
M src/backend/commands/alter.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/comment.c
M src/backend/commands/copy.c
M src/backend/commands/createas.c
M src/backend/commands/event_trigger.c
M src/backend/commands/explain.c
M src/backend/commands/indexcmds.c
A src/backend/commands/matview.c
M src/backend/commands/prepare.c
M src/backend/commands/seclabel.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/vacuum.c
M src/backend/commands/view.c
M src/backend/executor/execMain.c
M src/backend/executor/spi.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgstat.c
M src/backend/rewrite/rewriteDefine.c
A src/backend/rewrite/rewriteDefine.c.orig
M src/backend/rewrite/rewriteHandler.c
M src/backend/storage/lmgr/predicate.c
M src/backend/tcop/dest.c
M src/backend/tcop/utility.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/relcache.c
M src/bin/initdb/initdb.c
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/help.c
M src/bin/psql/tab-complete.c
M src/include/catalog/heap.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_proc.h
M src/include/commands/createas.h
M src/include/commands/explain.h
A src/include/commands/matview.h
M src/include/commands/tablecmds.h
M src/include/commands/view.h
M src/include/executor/executor.h
M src/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
M src/include/nodes/primnodes.h
M src/include/parser/kwlist.h
M src/include/tcop/dest.h
M src/include/utils/builtins.h
M src/include/utils/rel.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/tcl/pltcl.c
A src/test/regress/expected/matview.out
M src/test/regress/expected/rules.out
M src/test/regress/output/misc.source
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/matview.sql
Get rid of any toast table when converting a table to a view.
commit : b15a6da29217b14f02895af1d9271e84415a91ae
author : Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 19:05:47 -0500
committer: Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 19:05:47 -0500
Also make sure other fields of the view's pg_class entry are appropriate
for a view; it shouldn't have relfrozenxid set for instance.
This ancient omission isn't believed to have any serious consequences in
versions 8.4-9.2, so no backpatch. But let's fix it before it does bite
us in some serious way. It's just luck that the case doesn't cause
problems for autovacuum. (It did cause problems in 8.3, but that's out
of support.)
Andres Freund
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteSupport.c
M src/include/rewrite/rewriteSupport.h
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Fix SQL function execution to be safe with long-lived FmgrInfos.
commit : 2b78d101d1d6b1d8533a7b7aeff4d82b10a915f8
author : Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 17:39:58 -0500
committer: Tom Lane <[email protected]>
date : Sun, 3 Mar 2013 17:39:58 -0500
fmgr_sql had been designed on the assumption that the FmgrInfo it's called
with has only query lifespan. This is demonstrably unsafe in connection
with range types, as shown in bug #7881 from Andrew Gierth. Fix things
so that we re-generate the function's cache data if the (sub)transaction
it was made in is no longer active.
Back-patch to 9.2. This might be needed further back, but it's not clear
whether the case can realistically arise without range types, so for now
I'll desist from back-patching further.
M src/backend/access/transam/xact.c
M src/backend/executor/functions.c
M src/include/access/xact.h
doc: Small tweak for consistency
commit : 891869c352160e480d4afdc2a3443035c2560282
author : Peter Eisentraut <[email protected]>
date : Sun, 3 Mar 2013 08:58:34 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 3 Mar 2013 08:58:34 -0500
submitted by "Lyle"
M doc/src/sgml/datatype.sgml
doc: A few awkward phrasing fixes
commit : 743b73bdf57a21d39cf764d92536b4080fb2925a
author : Peter Eisentraut <[email protected]>
date : Sun, 3 Mar 2013 08:49:49 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 3 Mar 2013 08:49:49 -0500
Josh Kupershmidt
M doc/src/sgml/docguide.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
Exclude utils/probes.h and pg_trace.h from cpluspluscheck
commit : 1275b88f711c663e3b7a77c7526a934752efe52d
author : Peter Eisentraut <[email protected]>
date : Fri, 1 Mar 2013 22:43:47 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 1 Mar 2013 22:43:47 -0500
They can include sys/sdt.h from SystemTap, which itself contains C++
code and so won't compile with a C++ compiler under extern "C" linkage.
M src/tools/pginclude/cpluspluscheck
Eliminate memory leaks in plperl's spi_prepare() function.
commit : a4d3a504e730c47ccee5082ee703082e42c8b5ce
author : Tom Lane <[email protected]>
date : Fri, 1 Mar 2013 21:33:34 -0500
committer: Tom Lane <[email protected]>
date : Fri, 1 Mar 2013 21:33:34 -0500
Careless use of TopMemoryContext for I/O function data meant that repeated
use of spi_prepare and spi_freeplan would leak memory at the session level,
as per report from Christian Schröder. In addition, spi_prepare
leaked a lot of transient data within the current plperl function's SPI
Proc context, which would be a problem for repeated use of spi_prepare
within a single plperl function call; and it wasn't terribly careful
about releasing permanent allocations in event of an error, either.
In passing, clean up some copy-and-pasteos in query-lookup error messages.
Alex Hunsaker and Tom Lane
M src/pl/plperl/plperl.c
Improve pg_upgrade commentary on multixact change
commit : cd7d00ad65fab11496ad9990cfc145c06c6ee53d
author : Alvaro Herrera <[email protected]>
date : Thu, 28 Feb 2013 16:29:17 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 28 Feb 2013 16:29:17 -0300
Per gripe from Andres Freund
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
Flush stderr and stdout in isolation tester.
commit : 63d283ecd0bc5078594a64dfbae29276072cdf45
author : Andrew Dunstan <[email protected]>
date : Wed, 27 Feb 2013 19:13:07 -0500
committer: Andrew Dunstan <[email protected]>
date : Wed, 27 Feb 2013 19:13:07 -0500
This is a possibly vain attempt to fix a buffering issue
observed for some MSVC builds.
M src/test/isolation/isolationtester.c
Remove spurious "the", and add a missing one.
commit : 7d6b8f7158f0ea2e55b42c1db1d31991e3c67572
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:50:15 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:50:15 +0200
Thom Brown and me.
M doc/src/sgml/ref/copy.sgml
Fix MSVC build.
commit : f70b1b274824e5116c8e993d274629d3934b3978
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:31:41 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:31:41 +0200
The new file in src/port needs to be listed in Mkvcbuild.pm as well.
M src/tools/msvc/Mkvcbuild.pm
Fix typo in "pg_xlogdump --help" and error message.
commit : 26b45dc54f379c4e7b44b308584dc14d0ed17482
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:27:01 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 21:27:01 +0200
Fujii Masao and me.
M contrib/pg_xlogdump/pg_xlogdump.c
Cannot use WL_SOCKET_WRITEABLE without WL_SOCKET_READABLE.
commit : 3a9e64aa0d96c8ffb6c682b082d0f72b1d373327
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 19:17:07 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 19:17:07 +0200
In copy-out mode, the frontend should not send any messages until the
backend has finished streaming, by sending a CopyDone message. I'm not sure
if it would be legal for the client to send a new query before receiving the
CopyDone message from the backend, but trying to support that would require
bigger changes to the backend code structure.
Fixes an assertion failure reported by Fujii Masao.
M src/backend/replication/walsender.c
Add standard file header comment to quotes.c.
commit : 5ddf38f21d3f34c794de2d1c9b61ba92a7d6f39c
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 18:42:40 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 18:42:40 +0200
M src/port/quotes.c
Add support for piping COPY to/from an external program.
commit : 3d009e45bde2a2681826ef549637ada76508b597
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 18:17:21 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Feb 2013 18:17:21 +0200
This includes backend "COPY TO/FROM PROGRAM '...'" syntax, and corresponding
psql \copy syntax. Like with reading/writing files, the backend version is
superuser-only, and in the psql version, the program is run in the client.
In the passing, the psql \copy STDIN/STDOUT syntax is subtly changed: if you
the stdin/stdout is quoted, it's now interpreted as a filename. For example,
"\copy foo from 'stdin'" now reads from a file called 'stdin', not from
standard input. Before this, there was no way to specify a filename called
stdin, stdout, pstdin or pstdout.
This creates a new function in pgport, wait_result_to_str(), which can
be used to convert the exit status of a process, as returned by wait(3),
to a human-readable string.
Etsuro Fujita, reviewed by Amit Kapila.
M contrib/file_fdw/file_fdw.c
M doc/src/sgml/keywords.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/psql-ref.sgml
M src/backend/commands/copy.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/storage/file/fd.c
M src/bin/psql/copy.c
M src/bin/psql/stringutils.c
M src/bin/psql/stringutils.h
M src/include/commands/copy.h
M src/include/nodes/parsenodes.h
M src/include/parser/kwlist.h
M src/include/port.h
M src/include/storage/fd.h
M src/interfaces/ecpg/preproc/ecpg.addons
M src/port/Makefile
M src/port/exec.c
A src/port/wait_error.c
Add missing error check in regexp parser.
commit : 73dc003beef859e0b67da463c5e28f5468d3f17f
author : Tom Lane <[email protected]>
date : Wed, 27 Feb 2013 10:40:03 -0500
committer: Tom Lane <[email protected]>
date : Wed, 27 Feb 2013 10:40:03 -0500
parseqatom() failed to check for an error return (NULL result) from its
recursive call to parsebranch(), and in consequence could crash with a
null-pointer dereference after an error return. This bug has been there
since day one, but wasn't noticed before, probably because most error cases
in parsebranch() didn't actually lead to returning NULL. Add the missing
error check, and also tweak parsebranch() to exit in a less indirect
fashion after a call to parseqatom() fails.
Report by Tomasz Karlik, fix by me.
M src/backend/regex/regcomp.c
Add missing .gitignore file.
commit : 08f9728057a485edf5b3a589e70548e1f0da4e53
author : Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:58:34 -0500
committer: Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:58:34 -0500
A contrib/pg_xlogdump/.gitignore
Clean up "stopgap" implementation of timestamptz_to_str().
commit : 1418e6e07b69766ea1e231917601f18fcf0c2624
author : Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:50:22 -0500
committer: Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:50:22 -0500
Use correct type for "result", fix bogus strftime argument, don't use
unnecessary static variables, improve comments.
Andres Freund and Tom Lane
M contrib/pg_xlogdump/compat.c
Install headers from the new src/include/common subdirectory.
commit : c153530dc10bf5ff6dc5a89249f9cb596dd71a63
author : Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:27:30 -0500
committer: Tom Lane <[email protected]>
date : Tue, 26 Feb 2013 15:27:30 -0500
This got missed in commit 8396447cdbdff0b62914748de2fec04281dc9114.
Andres Freund
M src/include/Makefile
Remove the check for COPY TO STDIN and COPY FROM STDOUT from ecpg.
commit : 0a4fe8a318ed37556dd019def073ccd956645e27
author : Heikki Linnakangas <[email protected]>
date : Tue, 26 Feb 2013 19:30:15 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 26 Feb 2013 19:30:15 +0200
The backend grammar treats STDIN and STDOUT completely interchangeable, so
that the above accepted. Arguably that was a mistake the backend grammar,
but it's not ecpg's business to second guess that.
M src/interfaces/ecpg/preproc/ecpg.addons
doc: Fix markup typo
commit : 8337e3b4575b1588462c2d74135516fd22f60942
author : Peter Eisentraut <[email protected]>
date : Mon, 25 Feb 2013 17:58:14 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 25 Feb 2013 17:58:14 -0500
M doc/src/sgml/xml2.sgml
Only quote libpq connection string values that need quoting.
commit : 2953cd6d17210935098c803c52c6df5b12a725b9
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:53:04 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:53:04 +0200
There's no harm in excessive quoting per se, but it makes the strings nicer
to read. The values can get quite unwieldy, when they're first quoted within
within single-quotes when included in the connection string, and then all
the single-quotes are escaped when the connection string is passed as a
shell argument.
M src/bin/pg_dump/pg_dumpall.c
Add -d option to pg_dumpall, for specifying a connection string.
commit : 3dee636e0404885d07885d41c0d70e50c784f324
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:39:10 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:39:10 +0200
Like with pg_basebackup and pg_receivexlog, it's a bit strange to call the
option -d/--dbname, when in fact you cannot pass a database name in it.
Original patch by Amit Kapila, heavily modified by me.
M doc/src/sgml/ref/pg_dumpall.sgml
M src/bin/pg_dump/pg_dumpall.c
Add -d/--dbname option to pg_dump.
commit : 691e595dd9c7786d37d73ccd327f8c2b6f0dace6
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:39:04 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 19:39:04 +0200
You could already pass a database name just by passing it as the last
option, without -d. This is an alias for that, like the -d/--dbname option
in psql and many other client applications. For consistency.
M doc/src/sgml/ref/pg_dump.sgml
M src/bin/pg_dump/pg_dump.c
Redo MSVC build implementation for pg_xlogdump.
commit : a64e33f030f3ba379a0d3e22fe6bcda9dc3bbc60
author : Andrew Dunstan <[email protected]>
date : Mon, 25 Feb 2013 12:00:53 -0500
committer: Andrew Dunstan <[email protected]>
date : Mon, 25 Feb 2013 12:00:53 -0500
The previous commit didn't work on MSVC editions earlier than
Visual Studio 2011, apparently. This works by copying files into the
contrib directory, and making provision to clean them up, which should
work on all editions.
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/clean.bat
Add -d option to pg_basebackup and pg_receivexlog, for connection string.
commit : aa05c37e823a41056273e73f6b3d168009a67c3f
author : Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 14:48:27 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 25 Feb 2013 14:48:27 +0200
Without this, there's no way to pass arbitrary libpq connection parameters
to these applications. It's a bit strange that the option is called
-d/--dbname, when in fact you can *not* pass a database name in it, but it's
consistent with other client applications where a connection string is also
passed using -d.
Original patch by Amit Kapila, heavily modified by me.
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_basebackup/streamutil.h
Provide MSVC build setup for pg_xlogdump.
commit : 786170d74f30bc8d3017149dc444f3f3e29029a7
author : Andrew Dunstan <[email protected]>
date : Sun, 24 Feb 2013 20:28:42 -0500
committer: Andrew Dunstan <[email protected]>
date : Sun, 24 Feb 2013 20:28:42 -0500
M src/tools/msvc/Mkvcbuild.pm
doc: Remove PostgreSQL version number from xml2 deprecation notice
commit : 3163baa6d2d12c28f45fec60ab313537ea9a43a4
author : Peter Eisentraut <[email protected]>
date : Sun, 24 Feb 2013 15:38:07 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 24 Feb 2013 15:38:07 -0500
It is obviously no longer true.
M doc/src/sgml/xml2.sgml
Fix build of contrib/pg_xlogdump.
commit : e5bf0c376ed43feaebbe37519a6b8bc8e795f1d2
author : Tom Lane <[email protected]>
date : Sun, 24 Feb 2013 08:58:00 -0500
committer: Tom Lane <[email protected]>
date : Sun, 24 Feb 2013 08:58:00 -0500
rmgrdesc.c is not auto-generated now, though it apparently was the last
time the Makefile was updated.
M contrib/pg_xlogdump/Makefile
Correct tense in log message
commit : ca9c66660207164d08c5bbeba1a992152275d4e7
author : Peter Eisentraut <[email protected]>
date : Sat, 23 Feb 2013 23:30:14 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 23 Feb 2013 23:30:14 -0500
M src/backend/commands/vacuumlazy.c
Rename postgres_fdw's use_remote_explain option to use_remote_estimate.
commit : 09a7cd409e762f0430a5d474f4d8d7c962369a8e
author : Tom Lane <[email protected]>
date : Sat, 23 Feb 2013 12:20:48 -0500
committer: Tom Lane <[email protected]>
date : Sat, 23 Feb 2013 12:20:48 -0500
The new name was originally my typo, but per discussion it seems like a
better name anyway. So make the code match the docs, not vice versa.
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/option.c
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/sql/postgres_fdw.sql
doc: Add more compatibility information for triggers
commit : 8e8d0f7e80d80c61b09346a84059457aeeeae548
author : Peter Eisentraut <[email protected]>
date : Sat, 23 Feb 2013 00:28:33 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 23 Feb 2013 00:28:33 -0500
Louis-Claude Canon and Josh Kupershmidt
M doc/src/sgml/ref/create_trigger.sgml
Add quotes to messages
commit : 4f362926692631a67cd76b747f92389c8f63478e
author : Peter Eisentraut <[email protected]>
date : Fri, 22 Feb 2013 23:33:07 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 22 Feb 2013 23:33:07 -0500
M src/backend/replication/basebackup.c
contrib/Makefile also needs updated
commit : 36f697cbba44fd55f23727066c3274fd01919640
author : Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 18:56:42 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 18:56:42 -0300
Erik Rijkers
M contrib/Makefile
Fix some typos and grammatical mistakes
commit : 45919335493291ef43f9b66c81a56d32a562ab5a
author : Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 18:52:59 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 18:52:59 -0300
... as well a update copyrights statements to 2013.
Noted by Thom Brown and Peter Geoghegan
M contrib/pg_xlogdump/compat.c
M contrib/pg_xlogdump/pg_xlogdump.c
M doc/src/sgml/pg_xlogdump.sgml
Fix copy-and-pasteo
commit : f03a779751f6fc8dc87628d021510c4ec9e1e667
author : Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 17:03:22 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 17:03:22 -0300
Harmless, but it's certainly better like this.
Noticed by Andres Freund
M contrib/pg_xlogdump/pg_xlogdump.c
Add pg_xlogdump contrib program
commit : 639ed4e84b7493594860f56b78b25fd113e78fd7
author : Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 16:46:24 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 16:46:24 -0300
This program relies on rm_desc backend routines and the xlogreader
infrastructure to emit human-readable rendering of WAL records.
Author: Andres Freund, with many reworks by Álvaro
Reviewed (in a much earlier version) by Peter Eisentraut
A contrib/pg_xlogdump/Makefile
A contrib/pg_xlogdump/compat.c
A contrib/pg_xlogdump/pg_xlogdump.c
A contrib/pg_xlogdump/rmgrdesc.c
A contrib/pg_xlogdump/rmgrdesc.h
M doc/src/sgml/contrib.sgml
M doc/src/sgml/filelist.sgml
A doc/src/sgml/pg_xlogdump.sgml
M doc/src/sgml/ref/pg_isready.sgml
M src/include/utils/palloc.h
Fix some planning oversights in postgres_fdw.
commit : c0c6acdfa055b0c76ea0d1defd4c2c0d5a5c256f
author : Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 10:56:06 -0500
committer: Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 10:56:06 -0500
Include eval costs of local conditions in remote-estimate mode, and don't
assume the remote eval cost is zero in local-estimate mode. (The best
we can do with that at the moment is to assume a seqscan, which may well
be wildly pessimistic ... but zero won't do at all.)
To get a reasonable local estimate, we need to know the relpages count
for the remote rel, so improve the ANALYZE code to fetch that rather
than just setting the foreign table's relpages field to zero.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/postgres_fdw.c
M contrib/postgres_fdw/postgres_fdw.h
Blind attempt at fixing the non-MSVC Windows builds
commit : af0a4c5924061869ee3db391900ab745107c966f
author : Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 11:51:15 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 22 Feb 2013 11:51:15 -0300
Apparently, they need -DBUILDING_DLL for the Assert() declarations to
work correctly.
M src/makefiles/Makefile.cygwin
M src/makefiles/Makefile.win32
Fix whole-row references in postgres_fdw.
commit : 6da378dbc97f1b96bf5778a558e168a0dc405bce
author : Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 09:21:50 -0500
committer: Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 09:21:50 -0500
The optimization to not retrieve unnecessary columns wasn't smart enough.
Noted by Thom Brown.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
Change postgres_fdw to show casts as casts, not underlying function calls.
commit : 211e157a51bf94dfcc143e78221951411f87e4b2
author : Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 07:30:21 -0500
committer: Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 07:30:21 -0500
On reflection this method seems to be exposing an unreasonable amount of
implementation detail. It wouldn't matter when talking to a remote server
of the identical Postgres version, but it seems likely to make things worse
not better if the remote is a different version with different casting
infrastructure. Instead adopt ruleutils.c's policy of regurgitating the
cast as it was originally specified; including not showing it at all, if
it was implicit to start with. (We must do that because for some datatypes
explicit and implicit casts have different semantics.)
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
Get rid of postgres_fdw's assumption that remote type OIDs match ours.
commit : 5fd386bb31f9a8ed5058093bc3f8937fdde3dbec
author : Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 06:36:09 -0500
committer: Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 06:36:09 -0500
The only place we depended on that was in sending numeric type OIDs in
PQexecParams; but we can replace that usage with explicitly casting
each Param symbol in the query string, so that the types are specified
to the remote by name not OID. This makes no immediate difference but
will be essential if we ever hope to support use of non-builtin types.
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/postgres_fdw.c
Fix thinko in previous commit.
commit : 6c4f6664b201bea77eb6e3f813559e3911a5ef35
author : Heikki Linnakangas <[email protected]>
date : Fri, 22 Feb 2013 13:07:02 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 22 Feb 2013 13:07:02 +0200
We must still initialize minRecoveryPoint if we start straight with archive
recovery, e.g when recovering from a normal base backup taken with
pg_start/stop_backup. Otherwise we never consider the system consistent.
M src/backend/access/transam/xlog.c
Adjust postgres_fdw's search path handling.
commit : 6d06049493862f7f6b639035198fc817949723ae
author : Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 06:03:46 -0500
committer: Tom Lane <[email protected]>
date : Fri, 22 Feb 2013 06:03:46 -0500
Set the remote session's search path to exactly "pg_catalog" at session
start, then schema-qualify only names that aren't in that schema. This
greatly reduces clutter in the generated SQL commands, as seen in the
regression test changes. Per discussion.
Also, rethink use of FirstNormalObjectId as the "built-in object" cutoff
--- FirstBootstrapObjectId is safer, since the former will accept
objects in information_schema for instance.
M contrib/postgres_fdw/connection.c
M contrib/postgres_fdw/deparse.c
M contrib/postgres_fdw/expected/postgres_fdw.out
If recovery.conf is created after "pg_ctl stop -m i", do crash recovery.
commit : abf5c5c9a4f142b3343614746bb9e99a794f8e7b
author : Heikki Linnakangas <[email protected]>
date : Fri, 22 Feb 2013 11:43:04 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 22 Feb 2013 11:43:04 +0200
If you create a base backup using an atomic filesystem snapshot, and try to
perform PITR starting from that base backup, or if you just kill a master
server and create recovery.conf to put it into standby mode, we don't know
how far we need to recover before reaching consistency. Normally in crash
recovery, we replay all the WAL present in pg_xlog, and assume that we're
consistent after that. And normally in archive recovery, minRecoveryPoint,
backupEndRequired, or backupEndPoint is set in the control file, indicating
how far we need to replay to reach consistency. But if the server was
previously up and running normally, and you kill -9 it or take an atomic
filesystem snapshot, none of those fields are set in the control file.
The solution is to perform crash recovery first, replaying all the WAL in
pg_xlog. After that's done, we assume that the system is consistent like in
normal crash recovery, and switch to archive recovery mode after that.
Per report from Kyotaro HORIGUCHI. In his scenario, recovery.conf was
created after "pg_ctl stop -m i". I'm not sure we need to support that exact
scenario, but we should support backing up using a filesystem snapshot,
which looks identical.
This issue goes back to at least 9.0, where hot standby was introduced and
we started to track when consistency is reached. In 9.1 and 9.2, we would
open up for hot standby too early, and queries could briefly see an
inconsistent state. But 9.2 made it more visible, as we started to PANIC if
we see a reference to a non-existing page during recovery, if we've already
reached consistency. This is a fairly big patch, so back-patch to 9.2 only,
where the issue is more visible. We can consider back-patching further after
this has received some more testing in 9.2 and master.
M src/backend/access/transam/xlog.c
Move relpath() to libpgcommon
commit : a73018392636ce832b09b5c31f6ad1f18a4643ea
author : Alvaro Herrera <[email protected]>
date : Thu, 21 Feb 2013 22:46:17 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 21 Feb 2013 22:46:17 -0300
This enables non-backend code, such as pg_xlogdump, to use it easily.
The previous location, in src/backend/catalog/catalog.c, made that
essentially impossible because that file depends on many backend-only
facilities; so this needs to live separately.
M src/backend/Makefile
M src/backend/access/rmgrdesc/smgrdesc.c
M src/backend/access/rmgrdesc/xactdesc.c
M src/backend/access/transam/xlogutils.c
M src/backend/catalog/catalog.c
M src/backend/commands/tablespace.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/file/fd.c
M src/backend/storage/file/reinit.c
M src/backend/storage/smgr/md.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/misc.c
M src/backend/utils/cache/relcache.c
M src/common/Makefile
A src/common/relpath.c
M src/include/catalog/catalog.h
A src/include/common/relpath.h
M src/tools/msvc/Mkvcbuild.pm
Remove useless variable
commit : 6e3fd964632e95c7359457b7d67aa20c72a71679
author : Alvaro Herrera <[email protected]>
date : Thu, 21 Feb 2013 11:46:46 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 21 Feb 2013 11:46:46 -0300
Per Jeff Janes
M src/backend/postmaster/pgstat.c
Need to decorate XactIsoLevel as PGDLLIMPORT for postgres_fdw.
commit : 54a278683531edac535e6aa4d5427799409823f1
author : Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 09:28:42 -0500
committer: Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 09:28:42 -0500
Per buildfarm.
M contrib/postgres_fdw/connection.c
M src/include/access/xact.h
Teach MSVC build system about postgres_fdw.
commit : 699d70b2ec2cb6dc07f6c5b2876609301ddd20a8
author : Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 06:43:15 -0500
committer: Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 06:43:15 -0500
Per buildfarm.
M src/tools/msvc/Mkvcbuild.pm
Add postgres_fdw contrib module.
commit : d0d75c402217421b691050857eb3d7af82d0c770
author : Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 05:26:23 -0500
committer: Tom Lane <[email protected]>
date : Thu, 21 Feb 2013 05:26:23 -0500
There's still a lot of room for improvement, but it basically works,
and we need this to be present before we can do anything much with the
writable-foreign-tables patch. So let's commit it and get on with testing.
Shigeru Hanada, reviewed by KaiGai Kohei and Tom Lane
M contrib/Makefile
A contrib/postgres_fdw/.gitignore
A contrib/postgres_fdw/Makefile
A contrib/postgres_fdw/connection.c
A contrib/postgres_fdw/deparse.c
A contrib/postgres_fdw/expected/postgres_fdw.out
A contrib/postgres_fdw/option.c
A contrib/postgres_fdw/postgres_fdw–1.0.sql
A contrib/postgres_fdw/postgres_fdw.c
A contrib/postgres_fdw/postgres_fdw.control
A contrib/postgres_fdw/postgres_fdw.h
A contrib/postgres_fdw/sql/postgres_fdw.sql
M doc/src/sgml/client-auth.sgml
M doc/src/sgml/contrib.sgml
M doc/src/sgml/dblink.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/libpq.sgml
A doc/src/sgml/postgres-fdw.sgml
M doc/src/sgml/queries.sgml
M doc/src/sgml/recovery-config.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_server.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/pg_isready.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/runtime.sgml
M src/backend/foreign/foreign.c
Fix pg_dumpall with database names containing =
commit : f435cd1d385859a0cdb1d70fccc21dde2b1ee116
author : Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 17:08:54 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 17:08:54 +0200
If a database name contained a '=' character, pg_dumpall failed. The problem
was in the way pg_dumpall passes the database name to pg_dump on the
command line. If it contained a '=' character, pg_dump would interpret it
as a libpq connection string instead of a plain database name.
To fix, pass the database name to pg_dump as a connection string,
"dbname=foo", with the database name escaped if necessary.
Back-patch to all supported branches.
M src/bin/pg_dump/pg_dumpall.c
Don't pass NULL to fprintf, if a bogus connection string is given to pg_dump.
commit : 2930c05634bcb7491bc443a493405e927ed08443
author : Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 16:22:47 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 16:22:47 +0200
Back-patch to all supported branches.
M src/bin/pg_dump/pg_backup_db.c
Fix yet another typo in comment.
commit : 5d6899dbae7ac19d90f135e2ad64832e4ca8d064
author : Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 12:30:59 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 20 Feb 2013 12:30:59 +0200
Etsuro Fujita
M src/backend/storage/file/fd.c
Move ExceptionalCondition back to postgres.h
commit : a40d09e27fefbeca0d6994471b3e6965f1ac9dda
author : Alvaro Herrera <[email protected]>
date : Mon, 18 Feb 2013 18:53:32 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 18 Feb 2013 18:53:32 -0300
It needs to be defined in the backend even when assertions are not
enabled. It's cleaner to put it back, than create a separate #ifdef
section in c.h.
Per trouble report from Jeff Janes
M src/include/c.h
M src/include/postgres.h
Split pgstat file in smaller pieces
commit : 187492b6c2e8cafc5b39063ca3b67846e8155d24
author : Alvaro Herrera <[email protected]>
date : Mon, 18 Feb 2013 17:56:08 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 18 Feb 2013 17:56:08 -0300
We now write one file per database and one global file, instead of
having the whole thing in a single huge file. This reduces the I/O that
must be done when partial data is required -- which is all the time,
because each process only needs information on its own database anyway.
Also, the autovacuum launcher does not need data about tables and
functions in each database; having the global stats for all DBs is
enough.
Catalog version bumped because we have a new subdir under PGDATA.
Author: Tomas Vondra. Some rework by Álvaro
Testing by Jeff Janes
Other discussion by Heikki Linnakangas, Tom Lane.
M src/backend/postmaster/pgstat.c
M src/backend/utils/misc/guc.c
M src/bin/initdb/initdb.c
M src/include/catalog/catversion.h
M src/include/pgstat.h
Add ALTER ROLE ALL SET command
commit : 9475db3a4eb5876b364254886d2730db01e042fd
author : Peter Eisentraut <[email protected]>
date : Sun, 17 Feb 2013 23:45:36 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 17 Feb 2013 23:45:36 -0500
This generalizes the existing ALTER ROLE ... SET and ALTER DATABASE
... SET functionality to allow creating settings that apply to all users
in all databases.
reviewed by Pavel Stehule
M doc/src/sgml/ref/alter_role.sgml
M src/backend/commands/user.c
M src/backend/parser/gram.y
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/guc.c
M src/include/utils/guc.h
Warn about initdb using mount-points
commit : 17f15239325a88581bb4f9cf91d38005f1f52d69
author : Bruce Momjian <[email protected]>
date : Sat, 16 Feb 2013 18:52:50 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 16 Feb 2013 18:52:50 -0500
Add code to detect and warn about trying to initdb or create pg_xlog on
mount points.
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/port/pgcheckdir.c
Better fix for "unarchived WAL files get deleted on crash recovery" bug.
commit : 1bd42cd70abdbc946ad64c3c8eaefed4bb8b1145
author : Heikki Linnakangas <[email protected]>
date : Fri, 15 Feb 2013 19:33:31 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 15 Feb 2013 19:33:31 +0200
Revert my earlier fix for the bug that unarchived WAL files get deleted on
crash recovery, commit c9cc7e05c6d82a9781883a016c70d95aa4923122. We create
a .done file for files streamed or restored from archive, so the WAL file
recycling logic used during normal operation works just as well during
archive recovery.
Per Fujii Masao's suggestion.
M src/backend/access/transam/xlog.c
Force archive_status of .done for xlogs created by dearchival/replication.
commit : c2f79ba2691a4863db53003f25538f8806ebd2db
author : Simon Riggs <[email protected]>
date : Wed, 8 Aug 2012 23:58:49 +0100
committer: Heikki Linnakangas <[email protected]>
date : Wed, 8 Aug 2012 23:58:49 +0100
This is a forward-patch of commit 6f4b8a4f4f7a2d683ff79ab59d3693714b965e3d,
applied to 9.2 back in August. The plan was to do something else in master,
but it looks like it's not going to happen, so let's just apply the 9.2
solution to master as well.
Fujii Masao
M src/backend/access/transam/xlogarchive.c
M src/backend/replication/walreceiver.c
M src/include/access/xlog_internal.h
Don't delete unarchived WAL files during crash recovery.
commit : c9cc7e05c6d82a9781883a016c70d95aa4923122
author : Heikki Linnakangas <[email protected]>
date : Fri, 15 Feb 2013 17:25:16 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 15 Feb 2013 17:25:16 +0200
Bug reported by Jehan-Guillaume (ioguix) de Rorthais. This was introduced
with the change to keep WAL files restored from archive in pg_xlog, in 9.2.
M src/backend/access/transam/xlog.c
pgindent: Fix order in instructions
commit : 8e6c8da16a51e24a33bf4afeb311ca5d0ecd2b21
author : Peter Eisentraut <[email protected]>
date : Thu, 14 Feb 2013 21:40:05 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 14 Feb 2013 21:40:05 -0500
The previous order of steps didn't literally work, because git clean
-fdx would delete the downloaded typedefs.list. Also, pgindent needs to
be called with a path when one is in at the top of the build tree.
M src/tools/pgindent/README
Invent pre-commit/pre-prepare/pre-subcommit events for xact callbacks.
commit : fdaf44862beba24c12434d31df556fab25fd3ee7
author : Tom Lane <[email protected]>
date : Thu, 14 Feb 2013 20:35:08 -0500
committer: Tom Lane <[email protected]>
date : Thu, 14 Feb 2013 20:35:08 -0500
Currently it's only possible for loadable modules to get control during
post-commit cleanup of a transaction. That doesn't work too well if they
want to do something that could throw an error; for example, an FDW might
need to issue a remote commit, which could well fail. To improve matters,
extend the existing APIs for XactCallback and SubXactCallback functions
to provide new pre-commit events for this purpose.
The release notes will need to mention that existing callback functions
should be checked to make sure they don't do something unwanted when one
of the new event types occurs. In the examples within our source tree,
contrib/sepgsql was fine but plpgsql had been a bit too cute.
M src/backend/access/transam/xact.c
M src/include/access/xact.h
M src/pl/plpgsql/src/pl_exec.c
pg_upgrade: conditionally create cluster delete script
commit : 4765dd79219b9697d84f5c2c70f3fe00455609a1
author : Bruce Momjian <[email protected]>
date : Thu, 14 Feb 2013 10:53:03 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 14 Feb 2013 10:53:03 -0500
If users create tablespaces inside the old cluster directory, it is
impossible for the delete script to delete _only_ the old cluster files,
so don't create a script in that case, and issue a message to the user.
M contrib/pg_upgrade/check.c
Fix pg_upgrade log file cleanup code
commit : 74205266d4925b54bf1d77bae7b0e7f60f68840a
author : Bruce Momjian <[email protected]>
date : Thu, 14 Feb 2013 00:04:15 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 14 Feb 2013 00:04:15 -0500
Recent pg_upgrade parallel improvements introduced a bug that prevented
cleanup of per-database log files.
M contrib/pg_upgrade/pg_upgrade.c
doc: Add make target to produce EPUB from DocBook
commit : ff64fd49ce91534ebbfd5774a8715b11bfc09b97
author : Peter Eisentraut <[email protected]>
date : Wed, 13 Feb 2013 23:12:21 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 13 Feb 2013 23:12:21 -0500
M doc/src/sgml/Makefile
Fix CVE-2013-0255 properly.
commit : 71627f3d1964ef9831ea7997d2f4ac5617c718cc
author : Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 16:20:01 -0500
committer: Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 16:20:01 -0500
Revert commit ab0f7b6089fd215f6ce6081e2e222c38d643a526 (in HEAD only)
in favor of the proper solution, which is to declare enum_recv() correctly
in the system catalogs. It should be declared to take type "internal"
not "cstring".
Also improve the type_sanity regression test, which should have caught
this typo, so that it actually would. Most of the relevant checks on
the signature of type I/O functions should not have been restricted to
basetypes/pseudotypes, as they should apply to any type's I/O functions.
M src/backend/utils/adt/enum.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/test/regress/expected/type_sanity.out
M src/test/regress/sql/type_sanity.sql
Fix contrib/pg_trgm's similarity() function for trigram-free strings.
commit : 9728eda7925b6d42621b38c48e91ef9ab8d90cbc
author : Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 14:07:06 -0500
committer: Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 14:07:06 -0500
Cases such as similarity('', '') produced a NaN result due to computing
0/0. Per discussion, make it return zero instead.
This appears to be the basic cause of bug #7867 from Michele Baravalle,
although it remains unclear why her installation doesn't think Cyrillic
letters are letters.
Back-patch to all active branches.
M contrib/pg_trgm/expected/pg_trgm.out
M contrib/pg_trgm/sql/pg_trgm.sql
M contrib/pg_trgm/trgm_op.c
Fix bogus when-to-deregister-from-listener-array logic.
commit : cd89965aab34463252b9354bc1bf1bcf0339c102
author : Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 12:48:05 -0500
committer: Tom Lane <[email protected]>
date : Wed, 13 Feb 2013 12:48:05 -0500
Since a backend adds itself to the global listener array during
Exec_ListenPreCommit, it's inappropriate for it to remove itself during
Exec_UnlistenCommit or Exec_UnlistenAllCommit --- that leads to failure
when committing a transaction that did UNLISTEN then LISTEN, since we end
up not registered though we should be. (This leads to missing later
notifications, or to Assert failures in assert-enabled builds.) Instead
deal with deregistering at the bottom of AtCommit_Notify, when we know the
final state of the listenChannels list.
Also, simplify the representation of registration status by replacing the
transient backendHasExecutedInitialListen flag with an amRegisteredListener
flag.
Per report from Greg Sabino Mullane. Back-patch to 9.0, where the problem
was introduced during the LISTEN/NOTIFY rewrite.
M src/backend/commands/async.c
Update visibility map in the second phase of vacuum.
commit : fdf9e21196a6f58c6021c967dc5776a16190f295
author : Heikki Linnakangas <[email protected]>
date : Wed, 13 Feb 2013 17:46:23 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 13 Feb 2013 17:46:23 +0200
There's a high chance that a page becomes all-visible when the second phase
of vacuum removes all the dead tuples on it, so it makes sense to check for
that. Otherwise the visibility map won't get updated until the next vacuum.
Pavan Deolasee, reviewed by Jeff Janes.
M src/backend/commands/vacuumlazy.c
Rename "string" pstrdup argument to "in"
commit : 0e81ddde2c62ada7f818114ca961d80d42370e32
author : Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 12:43:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 12:43:09 -0300
The former name collides with a symbol also used in the isolation test's
parser, causing assorted failures in certain platforms.
M src/common/fe_memutils.c
M src/include/common/fe_memutils.h
Don't build libpgcommon_srv.a just yet
commit : 0f980b0e17d95e77dc2822eb7855d072a5874d9a
author : Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 12:21:27 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 12:21:27 -0300
It's empty, and some archivers do not support that case.
M src/common/Makefile
Create libpgcommon, and move pg_malloc et al to it
commit : 8396447cdbdff0b62914748de2fec04281dc9114
author : Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 10:33:40 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 12 Feb 2013 10:33:40 -0300
libpgcommon is a new static library to allow sharing code among the
various frontend programs and backend; this lets us eliminate duplicate
implementations of common routines. We avoid libpgport, because that's
intended as a place for porting issues; per discussion, it seems better
to keep them separate.
The first use case, and the only implemented by this patch, is pg_malloc
and friends, which many frontend programs were already using.
At the same time, we can use this to provide palloc emulation functions
for the frontend; this way, some palloc-using files in the backend can
also be used by the frontend cleanly. To do this, we change palloc() in
the backend to be a function instead of a macro on top of
MemoryContextAlloc(). This was previously believed to cause loss of
performance, but this implementation has been tweaked by Tom and Andres
so that on modern compilers it provides a slight improvement over the
previous one.
This lets us clean up some places that were already with
localized hacks.
Most of the pg_malloc/palloc changes in this patch were authored by
Andres Freund. Zoltán Böszörményi also independently provided a form of
that. libpgcommon infrastructure was authored by Álvaro.
M contrib/oid2name/oid2name.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/function.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/page.c
M contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/tablespace.c
M contrib/pg_upgrade/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pgbench/pgbench.c
M src/Makefile
M src/Makefile.global.in
M src/backend/storage/file/copydir.c
M src/backend/utils/mmgr/mcxt.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_basebackup/streamutil.h
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.c
D src/bin/pg_dump/dumpmem.c
D src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/nls.mk
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_null.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/scripts/common.c
M src/bin/scripts/common.h
A src/common/Makefile
A src/common/fe_memutils.c
A src/include/common/fe_memutils.h
M src/include/postgres_fe.h
M src/include/utils/palloc.h
M src/port/dirmod.c
M src/tools/msvc/Install.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
Add noreturn attributes to some error reporting functions
commit : 0cb1fac3b19f01025b63d2cdceabb8767185da28
author : Peter Eisentraut <[email protected]>
date : Tue, 12 Feb 2013 07:13:22 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 12 Feb 2013 07:13:22 -0500
M contrib/cube/cubescan.l
M contrib/seg/segscan.l
M src/backend/replication/repl_scanner.l
M src/include/mb/pg_wchar.h
M src/include/parser/parse_relation.h
M src/include/storage/lock.h
M src/include/tcop/tcopprot.h
M src/pl/plpgsql/src/pl_scanner.c
Support unlogged GiST index.
commit : 62401db45c4feff9be296fa78a8bb7b9947d69de
author : Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 22:50:15 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 22:50:15 +0200
The reason this wasn't supported before was that GiST indexes need an
increasing sequence to detect concurrent page-splits. In a regular WAL-
logged GiST index, the LSN of the page-split record is used for that
purpose, and in a temporary index, we can get away with a backend-local
counter. Neither of those methods works for an unlogged relation.
To provide such an increasing sequence of numbers, create a "fake LSN"
counter that is saved and restored across shutdowns. On recovery, unlogged
relations are blown away, so the counter doesn't need to survive that
either.
Jeevan Chalke, based on discussions with Robert Haas, Tom Lane and me.
M doc/src/sgml/ref/create_table.sgml
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/transam/xlog.c
M src/backend/storage/buffer/bufmgr.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/gist_private.h
M src/include/access/xlog.h
M src/include/catalog/pg_control.h
Fix checkpoint after fast promotion.
commit : b669f416cee77ef9025b80f9c4201688578447d1
author : Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 22:16:56 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 22:16:56 +0200
The intention was to request a regular online checkpoint immediately after
end of recovery, when performing "fast promotion". However, because the
checkpoint was requested before other backends were allowed to write WAL,
the checkpointer process performed a restartpoint rather than a checkpoint.
Delay the RequestCheckPoint call until after recovery has truly ended, so
that you get a real checkpoint.
M src/backend/access/transam/xlog.c
Include previous TLI in end-of-recovery and shutdown checkpoint records.
commit : 7803e9327db3788f68d820c19f4081afb79edd12
author : Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 18:13:09 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 11 Feb 2013 18:13:09 +0200
This isn't used for anything but a sanity check at the moment, but it could
be highly valuable for debugging purposes. It could also be used to recreate
timeline history by traversing WAL, which seems useful.
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/xlog.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/xlog_internal.h
M src/include/catalog/pg_control.h
Further cleanup of gistsplit.c.
commit : c352ea2d74c4e317bf2a1471ec1f750f9f072276
author : Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 16:21:26 -0500
committer: Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 16:21:26 -0500
After further reflection I was unconvinced that the existing coding is
guaranteed to return valid union datums in every code path for multi-column
indexes. Fix that by forcing a gistunionsubkey() call at the end of the
recursion. Having done that, we can remove some clearly-redundant calls
elsewhere. This should be a little faster for multi-column indexes (since
the previous coding would uselessly do such a call for each column while
unwinding the recursion), as well as much harder to break.
Also, simplify the handling of cases where one side or the other of a
primary split contains only don't-care tuples. The previous coding used a
very ugly hack in removeDontCares() that essentially forced one random
tuple to be treated as non-don't-care, providing a random initial choice of
seed datum for the secondary split. It seems unlikely that that method
will give better-than-random splits. Instead, treat such a split as
degenerate and just let the next column determine the split, the same way
that we handle fully degenerate cases where the two sides produce identical
union datums.
M src/backend/access/gist/gistsplit.c
Remove useless picksplit-doesn't-support-secondary-split log spam.
commit : db3d7e9f0d7d2a7edf57d154f62dff0a18f1b1f9
author : Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 13:07:40 -0500
committer: Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 13:07:40 -0500
This LOG message was put in over five years ago with the evident
expectation that we'd make all GiST opclasses support secondary split
directly. However, no such thing ever happened, and indeed the number of
opclasses supporting it decreased to zero in 9.2. The reason is that
improving on the default implementation isn't that easy --- the
opclass-specific code that did exist, before 9.2, doesn't appear to have
been any improvement over the default.
Hence, remove the message altogether. There's certainly no point in
nagging users about this in released branches, but I doubt that we'll
ever implement complete opclass-specific support anyway.
M src/backend/access/gist/gistsplit.c
Remove vestigial secondary-split support in gist_box_picksplit().
commit : dacc185f52e9937e9c2fe1bf29c6e92e0c16ae14
author : Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 12:40:09 -0500
committer: Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 12:40:09 -0500
Not only is this implementation of secondary-split not better than the
default implementation in gistsplit.c, it's actually worse. The gistsplit.c
code at least looks to see if switching the left and right sides would make
a better merge with the previously-split tuples, while this doesn't.
In any case it's rather useless to support secondary split only in an edge
case. There used to be more complete support for it here (in chooseLR()),
but that was removed in commit 7f3bd86843e5aad84585a57d3f6b80db3c609916.
It appears to me though that the chooseLR() code was really isomorphic to
the default implementation, since it was still based on choosing the cheaper
way of adding two sub-split vectors that had been chosen without regard to
the primary split initially. I think an implementation of secondary split
that could beat the default implementation would have to be pretty fully
integrated into the split algorithm, not plastered on at the end.
Back-patch to 9.2, but not further; previous branches have the chooseLR()
code which I don't feel a great need to mess with. This is mainly so we
just have two behaviors and not three among the various branches (IOW, this
patch is cleanup for commit 7f3bd86843e5aad84585a57d3f6b80db3c609916's
incomplete removal of secondary-split support).
M src/backend/access/gist/gistproc.c
Document and clean up gistsplit.c.
commit : 0fd0f3688b7a8ab0b907d431cf7022098110cfc8
author : Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 11:58:15 -0500
committer: Tom Lane <[email protected]>
date : Sun, 10 Feb 2013 11:58:15 -0500
Improve comments, rename some variables and functions, slightly simplify
a couple of APIs, in an attempt to make this code readable by people other
than its original author.
Even though this is essentially just cosmetic, back-patch to all active
branches, because otherwise it's going to make back-patching future fixes
in this file very painful.
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistsplit.c
M src/include/access/gist.h
M src/include/access/gist_private.h
Reduce log level of picksplit-doesn't-support-secondary-split whining.
commit : a187c96d26520695fc392edb1c8f38d86b16ef5b
author : Tom Lane <[email protected]>
date : Sat, 9 Feb 2013 12:17:55 -0500
committer: Tom Lane <[email protected]>
date : Sat, 9 Feb 2013 12:17:55 -0500
This was agreed to back in 2007, but never actually done.
Josh Hansen
M src/backend/access/gist/gistsplit.c
Add an example of attaching a default value to an updatable view.
commit : 3a1f8cdfa90443117049c601364009b71eaad3d1
author : Tom Lane <[email protected]>
date : Sat, 9 Feb 2013 11:43:48 -0500
committer: Tom Lane <[email protected]>
date : Sat, 9 Feb 2013 11:43:48 -0500
This is probably the single most useful thing that ALTER VIEW can do,
particularly now that we have auto-updatable views. So show an explicit
example.
M doc/src/sgml/ref/alter_view.sgml
psql: Improve unaligned expanded output for zero rows
commit : 0343a59d119de3fb835234fa34fbcd697b9335db
author : Peter Eisentraut <[email protected]>
date : Sat, 9 Feb 2013 00:05:27 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 9 Feb 2013 00:05:27 -0500
This used to erroneously print an empty line. Now it prints nothing.
M src/bin/psql/print.c
psql: Improve expanded print output in tuples-only mode
commit : 8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d
author : Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 23:39:22 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 23:39:22 -0500
When there are zero result rows, in expanded mode, "(No rows)" is
printed. So far, there was no way to turn this off. Now, when
tuples-only mode is turned on, nothing is printed in this case.
M src/bin/psql/print.c
Add support for ALTER RULE ... RENAME TO.
commit : c61e26ee3e447c0277c6c4e5a8a452dbefdc502d
author : Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 23:58:40 -0500
committer: Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 23:58:40 -0500
Ali Dar, reviewed by Dean Rasheed.
M doc/src/sgml/ref/allfiles.sgml
A doc/src/sgml/ref/alter_rule.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/drop_rule.sgml
M doc/src/sgml/reference.sgml
M src/backend/commands/alter.c
M src/backend/parser/gram.y
M src/backend/rewrite/rewriteDefine.c
M src/bin/psql/tab-complete.c
M src/include/rewrite/rewriteDefine.h
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Simplify box_overlap computations.
commit : f806c191a3d5faa1af1e5032d394fc6c5f93df86
author : Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 18:26:08 -0500
committer: Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 18:26:08 -0500
Given the assumption that a box's high coordinates are not less than its
low coordinates, the tests in box_ov() are overly complicated and can be
reduced to about half as much work. Since many other functions in
geo_ops.c rely on that assumption, there doesn't seem to be a good reason
not to use it here.
Per discussion of Alexander Korotkov's GiST fix, which was already using
the simplified logic (in a non-fuzzy form, but the equivalence holds just
as well for fuzzy).
M src/backend/utils/adt/geo_ops.c
Fix gist_box_same and gist_point_consistent to handle fuzziness correctly.
commit : 3c29b196b0ce46662cb9bb7a1f91079fbacbcabb
author : Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 18:03:17 -0500
committer: Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 18:03:17 -0500
While there's considerable doubt that we want fuzzy behavior in the
geometric operators at all (let alone as currently implemented), nobody is
stepping forward to redesign that stuff. In the meantime it behooves us
to make sure that index searches agree with the behavior of the underlying
operators. This patch fixes two problems in this area.
First, gist_box_same was using fuzzy equality, but it really needs to use
exact equality to prevent not-quite-identical upper index keys from being
treated as identical, which for example would prevent an existing upper
key from being extended by an amount less than epsilon. This would result
in inconsistent indexes. (The next release notes will need to recommend
that users reindex GiST indexes on boxes, polygons, circles, and points,
since all four opclasses use gist_box_same.)
Second, gist_point_consistent used exact comparisons for upper-page
comparisons in ~= searches, when it needs to use fuzzy comparisons to
ensure it finds all matches; and it used fuzzy comparisons for point <@ box
searches, when it needs to use exact comparisons because that's what the
<@ operator (rather inconsistently) does.
The added regression test cases illustrate all three misbehaviors.
Back-patch to all active branches. (8.4 did not have GiST point_ops,
but it still seems prudent to apply the gist_box_same patch to it.)
Alexander Korotkov, reviewed by Noah Misch
M src/backend/access/gist/gistproc.c
M src/test/regress/expected/point.out
M src/test/regress/sql/point.sql
Clean up c.h / postgres.h after Assert() move
commit : 381d4b70a9854a7b5b9f12d828a0824f8564f1e7
author : Alvaro Herrera <[email protected]>
date : Fri, 8 Feb 2013 12:13:34 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 8 Feb 2013 12:13:34 -0300
Per Tom
M src/include/c.h
M src/include/postgres.h
Fix Xmax freeze conditions
commit : 5766228bc64268369b59b07cffa7d31cd4f9c9ff
author : Alvaro Herrera <[email protected]>
date : Fri, 8 Feb 2013 01:27:54 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 8 Feb 2013 01:27:54 -0300
I broke this in 0ac5ad5134; previously, freezing a tuple marked with an
IS_MULTI xmax was not necessary.
Per brokenness report from Jeff Janes.
M src/backend/access/heap/heapam.c
doc: Fix mistakes in the most recent set of release notes.
commit : 335c5e9206b40c2fac3945db2499a57b948cc996
author : Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 10:41:15 -0500
committer: Tom Lane <[email protected]>
date : Fri, 8 Feb 2013 10:41:15 -0500
Improve description of the vacuum_freeze_table_age bug (it's much more
serious than we realized at the time the fix was committed), and correct
attribution of pg_upgrade -O/-o fix (Marti Raudsepp contributed that,
but Bruce forgot to credit him in the commit log).
No need to back-patch right now, it'll happen when the next set of
release notes are prepared.
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Fix another typo in a comment
commit : c572bfaf39d87b0c603f28e1ff385cd85b0a0879
author : Magnus Hagander <[email protected]>
date : Fri, 8 Feb 2013 15:14:40 +0100
committer: Magnus Hagander <[email protected]>
date : Fri, 8 Feb 2013 15:14:40 +0100
Noted by Thom Brown
M src/backend/storage/file/fd.c
Exclude access/rmgrlist.h from cpluspluscheck
commit : cf4d67e819e05d46836d896cce2a2b52f4a194d0
author : Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 07:01:21 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 07:01:21 -0500
It is not meant to be included standalone.
M src/tools/pginclude/cpluspluscheck
scripts: Add build prerequisite on libpgport
commit : 4760142146ffc0a88a17b7ef477b8a84b041238e
author : Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 06:43:54 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 8 Feb 2013 06:43:54 -0500
Without this, building in src/bin/scripts directly will fail if
libpgport wasn't built first. Other bin components are handled the same
way.
Phil Sorber
M src/bin/scripts/Makefile
Fix typo in comment
commit : 733701d2748b6bbbe5f3cdc6421fdc83f6aa0c01
author : Magnus Hagander <[email protected]>
date : Fri, 8 Feb 2013 11:45:42 +0100
committer: Magnus Hagander <[email protected]>
date : Fri, 8 Feb 2013 11:45:42 +0100
Etsuro Fujita
M src/backend/storage/file/fd.c
doc: Rewrite how to get the source code
commit : 858ef718ba6301b24e245bbe3ecf20aa10cb60a4
author : Peter Eisentraut <[email protected]>
date : Thu, 7 Feb 2013 23:19:18 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 7 Feb 2013 23:19:18 -0500
Instead of hardcoding a specific link, give a general link to the
download section of the web site. This gives the user more download
options and the sysadmins more flexibility. Also, the previously
presented link didn't work for devel versions.
M doc/src/sgml/installation.sgml
Fix performance issue in EXPLAIN (ANALYZE, TIMING OFF).
commit : bcc6c4c2914ab4f9a39e4a6673f9b6c36ad93914
author : Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 22:53:00 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 22:53:00 -0500
Commit af7914c6627bcf0b0ca614e9ce95d3f8056602bf, which added the TIMING
option to EXPLAIN, had an oversight: if the TIMING option is disabled
then control in InstrStartNode() goes through an elog(DEBUG2) call, which
typically does nothing but takes a noticeable amount of time to do it.
Tweak the logic to avoid that.
In HEAD, also change the elog(DEBUG2)'s in instrument.c to elog(ERROR).
It's not very clear why they weren't like that to begin with, but this
episode shows that not complaining more vociferously about misuse is
likely to do little except allow bugs to remain hidden.
While at it, adjust some code that was making possibly-dangerous
assumptions about flag bits being in the rightmost byte of the
instrument_options word.
Problem reported by Pavel Stehule (via Tomas Vondra).
M src/backend/executor/instrument.c
Make contrib/btree_gist's GiST penalty function a bit saner.
commit : 9221f9d485b26d8c663fa2c381e6ecf59b6b3488
author : Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 19:13:59 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 19:13:59 -0500
The previous coding supposed that the first differing bytes in two varlena
datums must have the same sign difference as their overall comparison
result. This is obviously bogus for text strings in non-C locales, and
probably wrong for numeric, and even for bytea I think it was wrong on
machines where char is signed. When the assumption failed, the function
could deliver a zero or negative penalty in situations where such a result
is quite ridiculous, leading the core GiST code to make very bad page-split
decisions.
To fix, take the absolute values of the byte-level differences. Also,
switch the code to using unsigned char not just char, so that the behavior
will be consistent whether char is signed or not.
Per investigation of a trouble report from Tomas Vondra. Back-patch to all
supported branches.
M contrib/btree_gist/btree_utils_var.c
Fix erroneous range-union logic for varlena types in contrib/btree_gist.
commit : 94f565dcf1ada1f2a7c6905f205e14060c4ce08b
author : Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 18:22:19 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 18:22:19 -0500
gbt_var_bin_union() failed to do the right thing when the existing range
needed to be widened at both ends rather than just one end. This could
result in an invalid index in which keys that are present would not be
found by searches, because the searches would not think they need to
descend to the relevant leaf pages. This error affected all the varlena
datatypes supported by btree_gist (text, bytea, bit, numeric).
Per investigation of a trouble report from Tomas Vondra. (There is also
an issue in gbt_var_penalty(), but that should only result in inefficiency
not wrong answers. I'm committing this separately so that we have a git
state in which it can be tested that bad penalty results don't produce
invalid indexes.) Back-patch to all supported branches.
M contrib/btree_gist/btree_utils_var.c
Repair bugs in GiST page splitting code for multi-column indexes.
commit : 166d534fcd1d16edb7c6d57429b2ebde80c02ff7
author : Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 17:44:02 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 17:44:02 -0500
When considering a non-last column in a multi-column GiST index,
gistsplit.c tries to improve on the split chosen by the opclass-specific
pickSplit function by considering penalties for the next column. However,
there were two bugs in this code: it failed to recompute the union keys for
the leftmost index columns, even though these might well change after
reassigning tuples; and it included the old union keys in the recomputation
for the columns it did recompute, so that those keys couldn't get smaller
even if they should. The first problem could result in an invalid index
in which searches wouldn't find index entries that are in fact present;
the second would make the index less efficient to search.
Both of these errors were caused by misuse of gistMakeUnionItVec, whose
API was designed in a way that just begged such errors to be made. There
is no situation in which it's safe or useful to compute the union keys for
a subset of the index columns, and there is no caller that wants any
previous union keys to be included in the computation; so the undocumented
choice to treat the union keys as in/out rather than pure output parameters
is a waste of code as well as being dangerous.
Hence, rather than just making a minimal patch, I've changed the API of
gistMakeUnionItVec to remove the "startkey" parameter (it now always
processes all index columns) and treat the attr/isnull arrays as purely
output parameters.
In passing, also get rid of a couple of unnecessary and dangerous uses
of static variables in gistutil.c. It's remarkable that the one in
gistMakeUnionKey hasn't given us portability troubles before now, because
in addition to posing a re-entrancy hazard, it was unsafely assuming that
a static char[] array would have at least Datum alignment.
Per investigation of a trouble report from Tomas Vondra. (There are also
some bugs in contrib/btree_gist to be fixed, but that seems like material
for a separate patch.) Back-patch to all supported branches.
M src/backend/access/gist/gistsplit.c
M src/backend/access/gist/gistutil.c
M src/include/access/gist_private.h
Fix possible failure to send final transaction counts to stats collector.
commit : c5aad8dc14d8ad9d7d55ee4a9b136b6273c7991a
author : Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 14:44:00 -0500
committer: Tom Lane <[email protected]>
date : Thu, 7 Feb 2013 14:44:00 -0500
Normally, we suppress sending a tabstats message to the collector unless
there were some actual table stats to send. However, during backend exit
we should force out the message if there are any transaction commit/abort
counts to send, else the session's last few commit/abort counts will never
get reported at all. We had logic for this, but the short-circuit test
at the top of pgstat_report_stat() ignored the "force" flag, with the
consequence that session-ending transactions that touched no database-local
tables would not get counted. Seems to be an oversight in my commit
641912b4d17fd214a5e5bae4e7bb9ddbc28b144b, which added the "force" flag.
That was back in 8.3, so back-patch to all supported versions.
M src/backend/postmaster/pgstat.c
Rely only on checkpoint 1 at end of recovery. Searching for checkpoint 2 (previous) is not correct in all cases.
commit : 072521b8c804cc15800e503244661d17c6202ccc
author : Simon Riggs <[email protected]>
date : Thu, 7 Feb 2013 16:33:05 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 7 Feb 2013 16:33:05 +0000
Bug report from Heikki Linnakangas
M src/backend/access/transam/xlog.c
Enable building with Microsoft Visual Studio 2012.
commit : e1c1e2173248f39c1b15fca7b2a31ad7b5199ce7
author : Andrew Dunstan <[email protected]>
date : Wed, 6 Feb 2013 14:52:29 -0500
committer: Andrew Dunstan <[email protected]>
date : Wed, 6 Feb 2013 14:52:29 -0500
Backpatch to release 9.2
Brar Piening and Noah Misch, reviewed by Craig Ringer.
M doc/src/sgml/install-windows.sgml
M src/backend/utils/adt/pg_locale.c
M src/bin/initdb/initdb.c
M src/port/chklocale.c
M src/port/win32env.c
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/README
M src/tools/msvc/Solution.pm
M src/tools/msvc/VSObjectFactory.pm
M src/tools/msvc/build.pl
M src/tools/msvc/gendef.pl
Split out list of XLog resource managers
commit : 5a1cd89f8f4a0bc13c85810de47d48bb6386ea89
author : Alvaro Herrera <[email protected]>
date : Tue, 5 Feb 2013 17:21:29 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 5 Feb 2013 17:21:29 -0300
The new rmgrlist.h header, containing all necessary data
about built-in resource managers, allows other pieces of code to
access them.
In particular, this allows a future pg_xlogdump program to extract
rm_desc function pointers, without having to keep a duplicate list of
them.
M src/backend/access/transam/rmgr.c
M src/include/access/rmgr.h
A src/include/access/rmgrlist.h
M src/include/access/xlog_internal.h
Improve error message wording
commit : cb9b66d31ad4bcd37226f20d651a213323621b89
author : Alvaro Herrera <[email protected]>
date : Tue, 5 Feb 2013 22:46:26 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 5 Feb 2013 22:46:26 -0300
The wording changes applied in 0ac5ad513 were universally disliked.
Per gripe from Andrew Dunstan
M contrib/file_fdw/output/file_fdw.source
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/parser/analyze.c
Prevent execution of enum_recv() from SQL.
commit : ab0f7b6089fd215f6ce6081e2e222c38d643a526
author : Tom Lane <[email protected]>
date : Mon, 4 Feb 2013 16:25:01 -0500
committer: Tom Lane <[email protected]>
date : Mon, 4 Feb 2013 16:25:01 -0500
This function was misdeclared to take cstring when it should take internal.
This at least allows crashing the server, and in principle an attacker
might be able to use the function to examine the contents of server memory.
The correct fix is to adjust the system catalog contents (and fix the
regression tests that should have caught this but failed to). However,
asking users to correct the catalog contents in existing installations
is a pain, so as a band-aid fix for the back branches, install a check
in enum_recv() to make it throw error if called with a cstring argument.
We will later revert this in HEAD in favor of correcting the catalogs.
Our thanks to Sumit Soni (via Secunia SVCRP) for reporting this issue.
Security: CVE-2013-0255
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
M doc/src/sgml/release-9.2.sgml
M src/backend/utils/adt/enum.c
Update release notes for 9.2.3, 9.1.8, 9.0.12, 8.4.16, 8.3.23.
commit : 318db6b2a05ca12d7ca7bae288bf473def4bdd42
author : Tom Lane <[email protected]>
date : Mon, 4 Feb 2013 15:50:42 -0500
committer: Tom Lane <[email protected]>
date : Mon, 4 Feb 2013 15:50:42 -0500
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Reset vacuum_defer_cleanup_age to PGC_SIGHUP. Revert commit 84725aa5efe11688633b553e58113efce4181f2e
commit : f480e294498533820f3ef3e6de4dcb8ff5401140
author : Simon Riggs <[email protected]>
date : Mon, 4 Feb 2013 16:39:55 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 4 Feb 2013 16:39:55 +0000
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc.c
Reset master xmin when hot_standby_feedback disabled. If walsender has xmin of standby then ensure we reset the value to 0 when we change from hot_standby_feedback=on to hot_standby_feedback=off.
commit : bd56e74127dea4102d1fc761d65fefbb32146713
author : Simon Riggs <[email protected]>
date : Mon, 4 Feb 2013 10:29:22 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 4 Feb 2013 10:29:22 +0000
M doc/src/sgml/protocol.sgml
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
Perform line wrapping and indenting by default in ruleutils.c.
commit : 62e666400dddf605b9b6d9a7ac2918711b5c5629
author : Tom Lane <[email protected]>
date : Sun, 3 Feb 2013 15:56:45 -0500
committer: Tom Lane <[email protected]>
date : Sun, 3 Feb 2013 15:56:45 -0500
This patch changes pg_get_viewdef() and allied functions so that
PRETTY_INDENT processing is always enabled. Per discussion, only the
PRETTY_PAREN processing (that is, stripping of "unnecessary" parentheses)
poses any real forward-compatibility risk, so we may as well make dump
output look as nice as we safely can.
Also, set the default wrap length to zero (i.e, wrap after each SELECT
or FROM list item), since there's no very principled argument for the
former default of 80-column wrapping, and most people seem to agree this
way looks better.
Marko Tiikkaja, reviewed by Jeevan Chalke, further hacking by Tom Lane
M doc/src/sgml/func.sgml
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/aggregates.out
M src/test/regress/expected/collate.out
M src/test/regress/expected/create_view.out
M src/test/regress/expected/polymorphism.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/triggers.out
M src/test/regress/expected/window.out
M src/test/regress/expected/with.out
M src/test/regress/expected/xml.out
M src/test/regress/expected/xml_1.out
PL/Python: Add result object str handler
commit : 330ed4ac6c55294c62bfd975d6e1aafda274e096
author : Peter Eisentraut <[email protected]>
date : Sun, 3 Feb 2013 00:31:01 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 3 Feb 2013 00:31:01 -0500
This is intended so that say plpy.debug(rv) prints something useful for
debugging query execution results.
reviewed by Steve Singer
M doc/src/sgml/plpython.sgml
M src/pl/plpython/expected/plpython_spi.out
M src/pl/plpython/plpy_resultobject.c
M src/pl/plpython/sql/plpython_spi.sql
Create a psql command \gset to store query results into psql variables.
commit : d2d153fdb08053d655bd0fef14187eed6a674193
author : Tom Lane <[email protected]>
date : Sat, 2 Feb 2013 17:06:38 -0500
committer: Tom Lane <[email protected]>
date : Sat, 2 Feb 2013 17:06:38 -0500
This eases manipulation of query results in psql scripts.
Pavel Stehule, reviewed by Piyush Newe, Shigeru Hanada, and Tom Lane
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/help.c
M src/bin/psql/settings.h
M src/bin/psql/tab-complete.c
A src/test/regress/expected/psql.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/psql.sql
Prevent "\g filename" from affecting subsequent commands after an error.
commit : 101d6ae755656b675b7c18db655249511982b780
author : Tom Lane <[email protected]>
date : Sat, 2 Feb 2013 14:21:24 -0500
committer: Tom Lane <[email protected]>
date : Sat, 2 Feb 2013 14:21:24 -0500
In the previous coding, psql's state variable saying that output should
go to a file was only reset after successful completion of a query
returning tuples. Thus for example,
regression=# select 1/0
regression-# \g somefile
ERROR: division by zero
regression=# select 1/2;
regression=#
... huh, I wonder where that output went. Even more oddly, the state
was not reset even if it's the file that's causing the failure:
regression=# select 1/2 \g /foo
/foo: Permission denied
regression=# select 1/2;
/foo: Permission denied
regression=# select 1/2;
/foo: Permission denied
This seems to me not to satisfy the principle of least surprise.
\g is certainly not documented in a way that suggests its effects are
at all persistent.
To fix, adjust the code so that the flag is reset at exit from SendQuery
no matter what happened.
Noted while reviewing the \gset patch, which had comparable issues.
Arguably this is a bug fix, but I'll refrain from back-patching for now.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/common.c
Mark vacuum_defer_cleanup_age as PGC_POSTMASTER.
commit : 84725aa5efe11688633b553e58113efce4181f2e
author : Simon Riggs <[email protected]>
date : Sat, 2 Feb 2013 18:49:54 +0000
committer: Simon Riggs <[email protected]>
date : Sat, 2 Feb 2013 18:49:54 +0000
Following bug analysis of #7819 by Tom Lane
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc.c
Adjust COPY FREEZE error message to be more accurate and consistent.
commit : e8ae01966115a35d3815e0445da5f78878f6dd14
author : Bruce Momjian <[email protected]>
date : Sat, 2 Feb 2013 12:56:14 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 2 Feb 2013 12:56:14 -0500
Per suggestions from Noah and Tom.
M src/backend/commands/copy.c
M src/test/regress/expected/copy2.out
doc: Tiny whitespace fix
commit : f4987049ef7dd28d810a77c3b15a0a202ad493f8
author : Peter Eisentraut <[email protected]>
date : Fri, 1 Feb 2013 21:44:22 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 1 Feb 2013 21:44:22 -0500
M doc/src/sgml/func.sgml
Move Assert() definitions to c.h
commit : e1d25de35a2b1f809e8f8d7b182ce0af004f3ec9
author : Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 17:50:04 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 17:50:04 -0300
This way, they can be used by frontend and backend code. We already
supported that, but doing it this way allows us to mix true frontend
files with backend files compiled in frontend environment.
Author: Andres Freund
M src/include/c.h
M src/include/postgres.h
M src/include/postgres_fe.h
Fix typo in freeze_table_age implementation
commit : dd1569da67937b819d1589a9f664af9aa9657945
author : Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 12:00:40 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 12:00:40 -0300
The original code used freeze_min_age instead of freeze_table_age. The
main consequence of this mistake is that lowering freeze_min_age would
cause full-table scans to occur much more frequently, which causes
serious issues because the number of writes required is much larger.
That feature (freeze_min_age) is supposed to affect only how soon tuples
are frozen; some pages should still be skipped due to the visibility
map.
Backpatch to 8.4, where the freeze_table_age feature was introduced.
Report and patch from Andres Freund
M src/backend/commands/vacuum.c
Fill tuple before HeapSatisfiesHOTAndKeyUpdate
commit : 9ee00ef4c7de991b9371f614ce9c03ff436ce383
author : Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 10:43:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 1 Feb 2013 10:43:09 -0300
Failing to do this results in almost all updates to system catalogs
being non-HOT updates, because the OID column would differ (not having
been set for the new tuple), which is an indexed column.
While at it, make sure to set the tableoid early in both old and new
tuples as well. This isn't of much consequence, since that column is
seldom (never?) indexed.
Report and patch from Andres Freund.
M src/backend/access/heap/heapam.c
Add CREATE RECURSIVE VIEW syntax
commit : 583905269378bf41c24585773885b1e226a998ce
author : Peter Eisentraut <[email protected]>
date : Thu, 31 Jan 2013 22:31:58 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 31 Jan 2013 22:31:58 -0500
This is specified in the SQL standard. The CREATE RECURSIVE VIEW
specification is transformed into a normal CREATE VIEW statement with a
WITH RECURSIVE clause.
reviewed by Abhijit Menon-Sen and Stephen Frost
M doc/src/sgml/ref/create_view.sgml
M src/backend/parser/gram.y
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
PL/Tcl: Fix compiler warnings with Tcl 8.6
commit : b1980f6d03f79ab57da8f32aa8cd9677dbe1d58f
author : Peter Eisentraut <[email protected]>
date : Thu, 31 Jan 2013 22:08:53 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 31 Jan 2013 22:08:53 -0500
Some constification was added in the Tcl APIs, so add the modifiers in
PL/Tcl as well.
M src/pl/tcl/pltcl.c
Restrict infomask bits to set on multixacts
commit : b78647a0e6f7b110273e98601f26d3d1db0ad931
author : Alvaro Herrera <[email protected]>
date : Thu, 31 Jan 2013 19:12:35 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 31 Jan 2013 19:12:35 -0300
We must only set the bit(s) for the strongest lock held in the tuple;
otherwise, a multixact containing members with exclusive lock and
key-share lock will behave as though only a share lock is held.
This bug was introduced in commit 0ac5ad5134, somewhere along
development, when we allowed a singleton FOR SHARE lock to be
implemented without a MultiXact by using a multi-bit pattern.
I overlooked that GetMultiXactIdHintBits() needed to be tweaked as well.
Previously, we could have the bits for FOR KEY SHARE and FOR UPDATE
simultaneously set and it wouldn't cause a problem.
Per report from [email protected]
M src/backend/access/heap/heapam.c
pgrowlocks: fix bogus lock strength output
commit : 77a3082fc546774808b76f58173caec3852ebf62
author : Alvaro Herrera <[email protected]>
date : Thu, 31 Jan 2013 19:11:34 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 31 Jan 2013 19:11:34 -0300
Per report from [email protected]
M contrib/pgrowlocks/pgrowlocks.c
pg_upgrade docs: mention modification of postgresql.conf in new cluster
commit : a11e15c7b66c647269ecad73560be0e717ffc400
author : Bruce Momjian <[email protected]>
date : Thu, 31 Jan 2013 16:32:35 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 31 Jan 2013 16:32:35 -0500
Mention it might be necessary to modify postgresql.conf in the new
cluster to match the old cluster.
Backpatch to 9.2.
Suggested by user.
M doc/src/sgml/pgupgrade.sgml
Switch timelines if we crash soon after promotion. Previous patch to skip checkpoints at end of recovery didn't correctly perform crash recovery, fumbling the timeline switch. Now we record the minRecoveryPointTLI of the newly selected timeline, so that we crash recover to the correct timeline.
commit : 3f0ab052330905f1ad2183684e75e6a2cbfa0c76
author : Simon Riggs <[email protected]>
date : Thu, 31 Jan 2013 19:29:32 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 31 Jan 2013 19:29:32 +0000
Bug report from Fujii Masao, investigated by me.
M src/backend/access/transam/xlog.c
Reject nonzero day fields in AT TIME ZONE INTERVAL functions.
commit : 9afc58396af75d59ea2eec467724faf68fe63890
author : Tom Lane <[email protected]>
date : Thu, 31 Jan 2013 12:12:23 -0500
committer: Tom Lane <[email protected]>
date : Thu, 31 Jan 2013 12:12:23 -0500
It's not sensible for an interval that's used as a time zone value to be
larger than a day. When we changed the interval type to contain a separate
day field, check_timezone() was adjusted to reject nonzero day values, but
timetz_izone(), timestamp_izone(), and timestamptz_izone() evidently were
overlooked.
While at it, make the error messages for these three cases consistent.
M src/backend/utils/adt/date.c
M src/backend/utils/adt/timestamp.c
Properly zero-pad the day-of-year part of the win32 build number
commit : bfb8a8d3818972faf1976eccedddfaee7eb0f613
author : Magnus Hagander <[email protected]>
date : Thu, 31 Jan 2013 15:03:24 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 31 Jan 2013 15:03:24 +0100
This ensure the version number increases over time. The first three digits
in the version number is still set to the actual PostgreSQL version
number, but the last one is intended to be an ever increasing build number,
which previosly failed when it changed between 1, 2 and 3 digits long values.
Noted by Deepak
M src/tools/msvc/Project.pm
Add --aggregate-interval option.
commit : 6a651d85eb6b2df7cbcbdf4b2f82a1660e691d12
author : Tatsuo Ishii <[email protected]>
date : Thu, 31 Jan 2013 15:53:58 +0900
committer: Tatsuo Ishii <[email protected]>
date : Thu, 31 Jan 2013 15:53:58 +0900
The new option specifies length of aggregation interval (in
seconds). May be used only together with -l. With this option, the log
contains per-interval summary (number of transactions, min/max latency
and two additional fields useful for variance estimation).
Patch contributed by Tomas Vondra, reviewed by Pavel Stehule. Slight
change by Tatsuo Ishii, suggested by Robert Hass to emit an error
message indicating that the option is not currently supported on
Windows.
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Don't use spi_priv.h in plpython.
commit : 2ab218b57698bf76fc31b03e6230d057f5187ba3
author : Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 20:11:58 -0500
committer: Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 20:11:58 -0500
There may once have been a reason to violate modularity like that,
but it doesn't appear that there is anymore.
M src/pl/plpython/plpy_spi.c
Fix plpgsql's reporting of plan-time errors in possibly-simple expressions.
commit : 0900ac2d0dba3168ba574e5b0b61170237b4fdea
author : Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 20:02:23 -0500
committer: Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 20:02:23 -0500
exec_simple_check_plan and exec_eval_simple_expr attempted to call
GetCachedPlan directly. This meant that if an error was thrown during
planning, the resulting context traceback would not include the line
normally contributed by _SPI_error_callback. This is already inconsistent,
but just to be really odd, a re-execution of the very same expression
*would* show the additional context line, because we'd already have cached
the plan and marked the expression as non-simple.
The problem is easy to demonstrate in 9.2 and HEAD because planning of a
cached plan doesn't occur at all until GetCachedPlan is done. In earlier
versions, it could only be an issue if initial planning had succeeded, then
a replan was forced (already somewhat improbable for a simple expression),
and the replan attempt failed. Since the issue is mainly cosmetic in older
branches anyway, it doesn't seem worth the risk of trying to fix it there.
It is worth fixing in 9.2 since the instability of the context printout can
affect the results of GET STACKED DIAGNOSTICS, as per a recent discussion
on pgsql-novice.
To fix, introduce a SPI function that wraps GetCachedPlan while installing
the correct callback function. Use this instead of calling GetCachedPlan
directly from plpgsql.
Also introduce a wrapper function for extracting a SPI plan's
CachedPlanSource list. This lets us stop including spi_priv.h in
pl_exec.c, which was never a very good idea from a modularity standpoint.
In passing, fix a similar inconsistency that could occur in SPI_cursor_open,
which was also calling GetCachedPlan without setting up a context callback.
M src/backend/executor/spi.c
M src/include/executor/spi.h
M src/pl/plpgsql/src/pl_exec.c
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Fix grammar for subscripting or field selection from a sub-SELECT result.
commit : 670a6c7a228aea1f31fb96f6bfa69969962e133e
author : Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 14:16:16 -0500
committer: Tom Lane <[email protected]>
date : Wed, 30 Jan 2013 14:16:16 -0500
Such cases should work, but the grammar failed to accept them because of
our ancient precedence hacks to convince bison that extra parentheses
around a sub-SELECT in an expression are unambiguous. (Formally, they
*are* ambiguous, but we don't especially care whether they're treated as
part of the sub-SELECT or part of the expression. Bison cares, though.)
Fix by adding a redundant-looking production for this case.
This is a fine example of why fixing shift/reduce conflicts via
precedence declarations is more dangerous than it looks: you can easily
cause the parser to reject cases that should work.
This has been wrong since commit 3db4056e22b0c6b2adc92543baf8408d2894fe91
or maybe before, and apparently some people have been working around it
by inserting no-op casts. That method introduces a dump/reload hazard,
as illustrated in bug #7838 from Jan Mate. Hence, back-patch to all
active branches.
M src/backend/parser/gram.y
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
pg_regress: Allow overriding diff options
commit : 574f7643214d8381a03083ffbb08ecceec44d6b2
author : Peter Eisentraut <[email protected]>
date : Tue, 29 Jan 2013 22:58:38 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 29 Jan 2013 22:58:38 -0500
By setting the environment variable PG_REGRESS_DIFF_OPTS, custom diff
options can be passed.
reviewed by Jeevan Chalke
M doc/src/sgml/regress.sgml
M src/test/regress/pg_regress.c
entab: Fix some compiler warnings
commit : 5bb2ddc0af62cfcd538e0e51460fc1f4f91ee333
author : Peter Eisentraut <[email protected]>
date : Tue, 29 Jan 2013 22:21:21 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 29 Jan 2013 22:21:21 -0500
M src/tools/entab/entab.c
M src/tools/entab/halt.c
Provide database object names as separate fields in error messages.
commit : 991f3e5ab3f8196d18d5b313c81a5f744f3baaea
author : Tom Lane <[email protected]>
date : Tue, 29 Jan 2013 17:06:26 -0500
committer: Tom Lane <[email protected]>
date : Tue, 29 Jan 2013 17:06:26 -0500
This patch addresses the problem that applications currently have to
extract object names from possibly-localized textual error messages,
if they want to know for example which index caused a UNIQUE_VIOLATION
failure. It adds new error message fields to the wire protocol, which
can carry the name of a table, table column, data type, or constraint
associated with the error. (Since the protocol spec has always instructed
clients to ignore unrecognized field types, this should not create any
compatibility problem.)
Support for providing these new fields has been added to just a limited set
of error reports (mainly, those in the "integrity constraint violation"
SQLSTATE class), but we will doubtless add them to more calls in future.
Pavel Stehule, reviewed and extensively revised by Peter Geoghegan, with
additional hacking by Tom Lane.
M doc/src/sgml/errcodes.sgml
M doc/src/sgml/libpq.sgml
M doc/src/sgml/protocol.sgml
M doc/src/sgml/sources.sgml
M src/backend/access/hash/hash.c
M src/backend/access/hash/hashsort.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/backend/executor/execMain.c
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/backend/utils/adt/domains.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/error/elog.c
M src/backend/utils/sort/tuplesort.c
M src/include/access/hash.h
M src/include/access/nbtree.h
M src/include/postgres_ext.h
M src/include/utils/builtins.h
M src/include/utils/elog.h
M src/include/utils/relcache.h
M src/include/utils/tuplesort.h
M src/interfaces/libpq/fe-protocol3.c
Allow pgbench to use a scale larger than 21474.
commit : 89d00cbe01447fd36edbc3bed659f869b18172d1
author : Heikki Linnakangas <[email protected]>
date : Tue, 29 Jan 2013 11:49:40 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 29 Jan 2013 11:49:40 +0200
Beyond 21474, the number of accounts exceed the range for int4. Change the
initialization code to use bigint for account id columns when scale is large
enough, and switch to using int64s for the variables in pgbench code. The
threshold where we switch to bigints is set at 20000, because that's easier
to remember and document than 21474, and ensures that there is some headroom
when int4s are used.
Greg Smith, with various changes by Euler Taveira de Oliveira, Gurjeet
Singh and Satoshi Nagayasu.
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Skip truncating ON COMMIT DELETE ROWS temp tables, if the transaction hasn't touched any temporary tables.
commit : c9d7dbacd387ab3814bc6b38010a9e72a02ea4f5
author : Heikki Linnakangas <[email protected]>
date : Tue, 29 Jan 2013 10:40:22 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 29 Jan 2013 10:40:22 +0200
We could try harder, and keep track of whether we've inserted to any temp
tables, rather than accessed them, and which temp tables have been inserted
to. But this is dead simple, and already covers many interesting scenarios.
M src/backend/commands/tablecmds.c
Fast promote mode skips checkpoint at end of recovery. pg_ctl promote -m fast will skip the checkpoint at end of recovery so that we can achieve very fast failover when the apply delay is low. Write new WAL record XLOG_END_OF_RECOVERY to allow us to switch timeline correctly for downstream log readers. If we skip synchronous end of recovery checkpoint we request a normal spread checkpoint so that the window of re-recovery is low.
commit : fd4ced5230162b50a5c9d33b4bf9cfb1231aa62e
author : Simon Riggs <[email protected]>
date : Tue, 29 Jan 2013 00:06:15 +0000
committer: Simon Riggs <[email protected]>
date : Tue, 29 Jan 2013 00:06:15 +0000
Simon Riggs and Kyotaro Horiguchi, with input from Fujii Masao.
Review by Heikki Linnakangas
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/xlog.c
M src/bin/pg_ctl/pg_ctl.c
M src/include/access/xlog_internal.h
M src/include/catalog/pg_control.h
REASSIGN OWNED: handle shared objects, too
commit : ee22c55f5ad2e7b7032cd6c0243254d84d4496c7
author : Alvaro Herrera <[email protected]>
date : Mon, 28 Jan 2013 18:03:23 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 28 Jan 2013 18:03:23 -0300
Give away ownership of shared objects (databases, tablespaces) along
with local objects, per original code intention. Try to make the
documentation clearer, too.
Per discussion about DROP OWNED's brokenness, in bug #7748.
This is not backpatched because it'd require some refactoring of the
ALTER/SET OWNER code for databases and tablespaces.
M doc/src/sgml/ref/reassign_owned.sgml
M src/backend/catalog/pg_shdepend.c
DROP OWNED: don't try to drop tablespaces/databases
commit : ec41b8edc1192e87f4ad05471c176cc735bda2c9
author : Alvaro Herrera <[email protected]>
date : Mon, 28 Jan 2013 17:46:47 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 28 Jan 2013 17:46:47 -0300
My "fix" for bugs #7578 and #6116 on DROP OWNED at fe3b5eb08a1 not only
misstated that it applied to REASSIGN OWNED (which it did not affect),
but it also failed to fix the problems fully, because I didn't test the
case of owned shared objects. Thus I created a new bug, reported by
Thomas Kellerer as #7748, which would cause DROP OWNED to fail with a
not-for-user-consumption error message. The code would attempt to drop
the database, which not only fails to work because the underlying code
does not support that, but is a pretty dangerous and undesirable thing
to be doing as well.
This patch fixes that bug by having DROP OWNED only attempt to process
shared objects when grants on them are found, ignoring ownership.
Backpatch to 8.3, which is as far as the previous bug was backpatched.
M doc/src/sgml/ref/drop_owned.sgml
M src/backend/catalog/pg_shdepend.c
Handle SPIErrors raised directly in PL/Python code.
commit : 316186f2893d37ecd8e32392ee7c910cca9b93eb
author : Heikki Linnakangas <[email protected]>
date : Mon, 28 Jan 2013 09:40:20 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 28 Jan 2013 09:40:20 +0200
If a PL/Python function raises an SPIError (or one if its subclasses)
directly with python's raise statement, treat it the same as an SPIError
generated internally. In particular, if the user sets the sqlstate
attribute, preserve that.
Oskari Saarenmaa and Jan Urbański, reviewed by Karl O. Pinc.
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/pl/plpython/plpy_elog.c
M src/pl/plpython/sql/plpython_error.sql
Made ecpglib use translated messages.
commit : 96bb29dc444f2b7fc8fbddae4fd7fe25d6544665
author : Michael Meskes <[email protected]>
date : Sun, 27 Jan 2013 13:48:12 +0100
committer: Michael Meskes <[email protected]>
date : Sun, 27 Jan 2013 13:48:12 +0100
Bug reported and fixed by Chen Huajun <[email protected]>.
M src/interfaces/ecpg/ecpglib/misc.c
Make LATERAL implicit for functions in FROM.
commit : 2378d79ab29865f59245744beb8f04a3ce56d2ae
author : Tom Lane <[email protected]>
date : Sat, 26 Jan 2013 16:18:42 -0500
committer: Tom Lane <[email protected]>
date : Sat, 26 Jan 2013 16:18:42 -0500
The SQL standard does not have general functions-in-FROM, but it does
allow UNNEST() there (see the <collection derived table> production),
and the semantics of that are defined to include lateral references.
So spec compliance requires allowing lateral references within UNNEST()
even without an explicit LATERAL keyword. Rather than making UNNEST()
a special case, it seems best to extend this flexibility to any
function-in-FROM. We'll still allow LATERAL to be written explicitly
for clarity's sake, but it's now a noise word in this context.
In theory this change could result in a change in behavior of existing
queries, by allowing what had been an outer reference in a function-in-FROM
to be captured by an earlier FROM-item at the same level. However, all
pre-9.3 PG releases have a bug that causes them to match variable
references to earlier FROM-items in preference to outer references (and
then throw an error). So no previously-working query could contain the
type of ambiguity that would risk a change of behavior.
Per a suggestion from Andrew Gierth, though I didn't use his patch.
M doc/src/sgml/queries.sgml
M doc/src/sgml/ref/select.sgml
M src/backend/parser/parse_clause.c
M src/test/regress/expected/join.out
M src/test/regress/expected/rangefuncs.out
M src/test/regress/sql/join.sql
M src/test/regress/sql/rangefuncs.sql
Update comments in new DROP IF EXISTS code; commit message update
commit : 8865fe0ad3e4260db0e67e2064200d96c0999fa0
author : Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 14:51:59 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 14:51:59 -0500
DROP IF EXISTS with a missing schema in commit
7e2322dff30c04d90c0602d2b5ae24b4881db88b applies not only to tables, but
to DROP IF EXISTS with missing schemas for indexes, views, sequences,
and foreign tables. Yeah!
M src/backend/catalog/namespace.c
Update LookupExplicitNamespace() comments; commit message update
commit : 51cfb87ae235ffc875946bcb6cb8404fe97cbb9b
author : Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:47:50 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:47:50 -0500
Also, commit 7e2322dff30c04d90c0602d2b5ae24b4881db88b affected DROP
TABLE IF EXISTS, not CREATE TABLE IF EXISTS.
M src/backend/catalog/namespace.c
Issue ERROR if FREEZE mode can't be honored by COPY
commit : 4deb57de7dcfb66f850f16c0324731fdf3d86d09
author : Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:33:24 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:33:24 -0500
Previously non-honored FREEZE mode was ignored. This also issues an
appropriate error message based on the cause of the failure, per
suggestion from Tom. Additional regression test case added.
M doc/src/sgml/ref/copy.sgml
M src/backend/commands/copy.c
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
Allow CREATE TABLE IF EXIST so succeed if the schema is nonexistent
commit : 7e2322dff30c04d90c0602d2b5ae24b4881db88b
author : Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:24:50 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 26 Jan 2013 13:24:50 -0500
Previously, CREATE TABLE IF EXIST threw an error if the schema was
nonexistent. This was done by passing 'missing_ok' to the function that
looks up the schema oid.
M src/backend/catalog/aclchk.c
M src/backend/catalog/namespace.c
M src/backend/commands/indexcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/trigger.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_type.c
M src/backend/utils/adt/xml.c
M src/include/catalog/namespace.h
doc: revert 80c20fcf3df17309b3c131962045825f42e45bc7 and 0e93959a70ac6e7c7858d1d6fb00645e7540a1cc
commit : 7c83619b50c8f8a6d75105636e3ca63a9d2eb7a9
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 21:01:17 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 21:01:17 -0500
Revert patch that modified doc index mentions of search_path
Per Peter E.
M doc/src/sgml/config.sgml
M doc/src/sgml/ddl.sgml
M doc/src/sgml/ref/create_function.sgml
Fix plpython's handling of functions used as triggers on multiple tables.
commit : 08be00fabebfa5efb843c9464d994891d80121f5
author : Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 16:58:55 -0500
committer: Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 16:58:55 -0500
plpython tried to use a single cache entry for a trigger function, but it
needs a separate cache entry for each table the trigger is applied to,
because there is table-dependent data in there. This was done correctly
before 9.1, but commit 46211da1b84bc3537e799ee1126098e71c2428e8 broke it
by simplifying the lookup key from "function OID and triggered table OID"
to "function OID and is-trigger boolean". Go back to using both OIDs
as the lookup key. Per bug report from Sandro Santilli.
Andres Freund
M src/pl/plpython/expected/plpython_trigger.out
M src/pl/plpython/plpy_main.c
M src/pl/plpython/plpy_procedure.c
M src/pl/plpython/plpy_procedure.h
M src/pl/plpython/sql/plpython_trigger.sql
doc: mention commit_delay is only honored if fsync is enabled
commit : bb1e504951bbdb1931365b1c6d1b4e5f3a3043d1
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 15:53:59 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 15:53:59 -0500
per Tianyin Xu
M doc/src/sgml/config.sgml
Change plan caching to honor, not resist, changes in search_path.
commit : 0d5fbdc157a17abc379052f5099b1c29a33cebe2
author : Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 14:14:41 -0500
committer: Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 14:14:41 -0500
In the initial implementation of plan caching, we saved the active
search_path when a plan was first cached, then reinstalled that path
anytime we needed to reparse or replan. The idea of that was to try to
reselect the same referenced objects, in somewhat the same way that views
continue to refer to the same objects in the face of schema or name
changes. Of course, that analogy doesn't bear close inspection, since
holding the search_path fixed doesn't cope with object drops or renames.
Moreover sticking with the old path seems to create more surprises than
it avoids. So instead of doing that, consider that the cached plan depends
on search_path, and force reparse/replan if the active search_path is
different than it was when we last saved the plan.
This gets us fairly close to having "transparency" of plan caching, in the
sense that the cached statement acts the same as if you'd just resubmitted
the original query text for another execution. There are still some corner
cases where this fails though: a new object added in the search path
schema(s) might capture a reference in the query text, but we'd not realize
that and force a reparse. We might try to fix that in the future, but for
the moment it looks too expensive and complicated.
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/ref/prepare.sgml
M doc/src/sgml/spi.sgml
M src/backend/catalog/namespace.c
M src/backend/utils/cache/plancache.c
M src/include/catalog/namespace.h
M src/include/utils/plancache.h
M src/test/regress/expected/plancache.out
M src/test/regress/sql/plancache.sql
doc: merge ecpg username/password example into C comment
commit : d309be0fb7246cc2ebfbdcb2e4781f956c0d7d12
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 13:46:38 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 13:46:38 -0500
Backpatch to 9.2
per Tom Lane
M doc/src/sgml/ecpg.sgml
doc: adjust search_path secondary index mention
commit : 0e93959a70ac6e7c7858d1d6fb00645e7540a1cc
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 13:45:09 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 13:45:09 -0500
per Tom Lane
M doc/src/sgml/ddl.sgml
doc: split search_path index entries into separate secondaries
commit : 80c20fcf3df17309b3c131962045825f42e45bc7
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 12:48:51 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 12:48:51 -0500
Karl O. Pinc
M doc/src/sgml/config.sgml
M doc/src/sgml/ddl.sgml
M doc/src/sgml/ref/create_function.sgml
Make it easy to time out pg_isready, and make the default 3 seconds.
commit : a37e83c0a99ecf50c64baffc6c88c3d805d6e822
author : Robert Haas <[email protected]>
date : Fri, 25 Jan 2013 12:01:45 -0500
committer: Robert Haas <[email protected]>
date : Fri, 25 Jan 2013 12:01:45 -0500
Along the way, add a missing line to the help message.
Phil Sorber, reviewed by Fujii Masao
M doc/src/sgml/ref/pg_isready.sgml
M src/bin/scripts/pg_isready.c
docs: In ecpg, clarify how username/password colon parameters are used
commit : 88886c79cc4fc8d8f7c5b7304ad1f13508f5b025
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 11:18:44 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 11:18:44 -0500
Backpatch to 9.2.
Patch from Alan B
M doc/src/sgml/ecpg.sgml
Add prosecdef to \df+ output.
commit : 89368676273a4455a20eea61b8c2f30190a223ec
author : Heikki Linnakangas <[email protected]>
date : Fri, 25 Jan 2013 17:19:11 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 25 Jan 2013 17:19:11 +0200
Jon Erdman, reviewed by Phil Sorber and Stephen Frost.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/describe.c
doc: improve wording of "foreign data server" in file-fdw docs
commit : 7441b49d1930a56b20c8ab4bb3ecb9bcdb4878de
author : Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 10:13:41 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 25 Jan 2013 10:13:41 -0500
Backpatch to 9.2
Shigeru HANADA
M doc/src/sgml/file-fdw.sgml
Add some randomness to the choice of which GiST page to insert to.
commit : ba1cc6501e98aee7d43098b032d6656f243bca5b
author : Heikki Linnakangas <[email protected]>
date : Fri, 25 Jan 2013 16:49:13 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 25 Jan 2013 16:49:13 +0200
When descending the tree for an insert, and there are multiple equally good
pages we could insert to, make the choice in random. Previously, we would
always choose the tuple with lowest offset number. That meant that when two
non-leaf pages overlap - in the extreme case they might have exactly the same
key - all but the first such page went unused. That wasn't optimal for space
usage; if you deleted some tuples from the non-first pages, the space would
never be reused.
With this patch, the other pages are sometimes chosen too, although there's
still a heavy bias towards low-offset tuples, so that we don't lose cache
locality when doing a lot of inserts with similar keys.
Original idea by Alexander Korotkov, although this patch version was written
by me and copy-edited by Tom Lane.
M src/backend/access/gist/gistutil.c
Make pg_dump exclude unlogged table data on hot standby slaves
commit : be926474be57ae73ae2052b968fd785a0096514e
author : Magnus Hagander <[email protected]>
date : Fri, 25 Jan 2013 09:44:14 +0100
committer: Magnus Hagander <[email protected]>
date : Fri, 25 Jan 2013 09:44:14 +0100
Noted by Joe Van Dyk
M doc/src/sgml/ref/pg_dump.sgml
M src/bin/pg_dump/pg_dump.c
Fix concat() and format() to handle VARIADIC-labeled arguments correctly.
commit : 760f3c043ad4ee622b596d005ec31bb5e0322c4a
author : Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 00:19:18 -0500
committer: Tom Lane <[email protected]>
date : Fri, 25 Jan 2013 00:19:18 -0500
Previously, the VARIADIC labeling was effectively ignored, but now these
functions act as though the array elements had all been given as separate
arguments.
Pavel Stehule
M doc/src/sgml/func.sgml
M doc/src/sgml/xfunc.sgml
M src/backend/utils/adt/varlena.c
M src/test/regress/expected/text.out
M src/test/regress/sql/text.sql
doc: add mention of ssi read anomolies to mvcc docs
commit : 56a6317bf54625c7fdade6cd1ab38178bba42448
author : Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 21:44:54 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 21:44:54 -0500
From Jeff Davis, modified by Kevin Grittner
M doc/src/sgml/mvcc.sgml
doc: correct sepgsql doc about permission checking of CASCADE
commit : 9971f6f5172a8f9525459eb1da840cbc73e6f29f
author : Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 21:21:50 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 21:21:50 -0500
Backpatch to 9.2.
Patch from Kohei KaiGai
M doc/src/sgml/sepgsql.sgml
Fix SPI documentation for new handling of ExecutorRun's count parameter.
commit : 2ddc600f8f0252a0864e85d5cc1eeb3b9687d7e9
author : Tom Lane <[email protected]>
date : Thu, 24 Jan 2013 18:34:00 -0500
committer: Tom Lane <[email protected]>
date : Thu, 24 Jan 2013 18:34:00 -0500
Since 9.0, the count parameter has only limited the number of tuples
actually returned by the executor. It doesn't affect the behavior of
INSERT/UPDATE/DELETE unless RETURNING is specified, because without
RETURNING, the ModifyTable plan node doesn't return control to execMain.c
for each tuple. And we only check the limit at the top level.
While this behavioral change was unintentional at the time, discussion of
bug #6572 led us to the conclusion that we prefer the new behavior anyway,
and so we should just adjust the docs to match rather than change the code.
Accordingly, do that. Back-patch as far as 9.0 so that the docs match the
code in each branch.
M doc/src/sgml/spi.sgml
M src/backend/executor/execMain.c
Use correct output device for Windows prompts.
commit : 1068771abfeec148a9c1ce4782785bddc1982070
author : Andrew Dunstan <[email protected]>
date : Thu, 24 Jan 2013 16:01:31 -0500
committer: Andrew Dunstan <[email protected]>
date : Thu, 24 Jan 2013 16:01:31 -0500
This ensures that mapping of non-ascii prompts
to the correct code page occurs.
Bug report and original patch from Alexander Law,
reviewed and reworked by Noah Misch.
Backpatch to all live branches.
M src/bin/psql/command.c
M src/include/port.h
M src/port/sprompt.c
pg_upgrade: detect stale postmaster.pid lock files
commit : a9ceaa53be766a324e41953a78e8bd9fa408edf6
author : Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 15:20:11 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 15:20:11 -0500
If the postmaster.pid lock file exists, try starting/stopping the
cluster to check if the lock file is valid.
Per request from Tom.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
Redefine HEAP_XMAX_IS_LOCKED_ONLY
commit : 74ebba84aeb6b0e6320f9b992527715f7e2ace8e
author : Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 16:04:48 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 16:04:48 -0300
Tuples marked SELECT FOR UPDATE in a cluster that's later processed by
pg_upgrade would have a different infomask bit pattern than those
produced by 9.3dev; that bit pattern was being seen as "dead" by HEAD
(because they would fail the "is this tuple locked" test, and so the
visibility rules would thing they're updated, even though there's no
HEAP_UPDATED version of them). In other words, some rows could silently
disappear after pg_upgrade.
With this new definition, those tuples become visible again.
This is breakage resulting from my commit 0ac5ad5134.
M src/include/access/htup_details.h
Use the catversion to distinguish old/new clusters
commit : 34da700405737be055d1b3d310af23a98da72e8e
author : Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 12:25:48 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 12:25:48 -0300
This makes 9.3 -> 9.3 upgrades work when they cross the commit that
added persistent multixacts; early 9.3 pg_controldata did not have the
required oldestMultiXact line, and so would fail to upgrade.
per Bruce Momjian
M contrib/pg_upgrade/controldata.c
Don't require oldestMultixact if server doesn't have it
commit : 2494a9af4c8523f33ec78cd092d21a17780b4b5c
author : Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 11:53:15 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 11:53:15 -0300
M contrib/pg_upgrade/controldata.c
Make output identical to pg_resetxlog's
commit : 6772c1e542569980e54db8ff87667811dc5f9e86
author : Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 11:52:53 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 24 Jan 2013 11:52:53 -0300
M src/bin/pg_controldata/pg_controldata.c
Fix rare missing cancellations in Hot Standby. The machinery around XLOG_HEAP2_CLEANUP_INFO failed to correctly pass through the necessary information on latestRemovedXid, avoiding cancellations in some infrequent concurrent update/cleanup scenarios.
commit : 5c54f63fd66973c32f6e96333d3bee1ba3669563
author : Simon Riggs <[email protected]>
date : Thu, 24 Jan 2013 14:19:29 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 24 Jan 2013 14:19:29 +0000
Backpatchable fix to 9.0
Detailed bug report and fix by Noah Misch,
backpatchable version by me.
M src/backend/access/heap/pruneheap.c
pg_upgrade: report failed cluster name
commit : bd6aca8a7713ecc0bed94dfb081bf24eda0c1f55
author : Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 08:35:57 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 24 Jan 2013 08:35:57 -0500
When pg_upgrade can't find required pg_controldata information, report
_which_ cluster is failing, with this message:
The %s cluster lacks some required control information:
M contrib/pg_upgrade/controldata.c
Also fix rotation of csvlog on Windows.
commit : 168d315703287989fd9dab0badb212c529e88691
author : Heikki Linnakangas <[email protected]>
date : Thu, 24 Jan 2013 11:41:30 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 24 Jan 2013 11:41:30 +0200
Backpatch to 9.2, like the previous fix.
M src/backend/postmaster/syslogger.c
Docs shouldn't say HOT Standby. Not an acronym.
commit : f64315c6e67e8f37e61bdbd5cb27248f2f6050da
author : Simon Riggs <[email protected]>
date : Thu, 24 Jan 2013 08:01:16 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 24 Jan 2013 08:01:16 +0000
Jeff Janes
M doc/src/sgml/bgworker.sgml
Fix failure to rotate postmaster log file for size reasons on Windows.
commit : 8556869f2f31ce6f5fab68de08fb1556a2134080
author : Tom Lane <[email protected]>
date : Wed, 23 Jan 2013 22:08:01 -0500
committer: Tom Lane <[email protected]>
date : Wed, 23 Jan 2013 22:08:01 -0500
When we eliminated "unnecessary" wakeups of the syslogger process, we
broke size-based logfile rotation on Windows, because on that platform
data transfer is done in a separate thread. While non-Windows platforms
would recheck the output file size after every log message, Windows only
did so when the control thread woke up for some other reason, which might
be quite infrequent. Per bug #7814 from Tsunezumi. Back-patch to 9.2
where the problem was introduced.
Jeff Janes
M src/backend/postmaster/syslogger.c
isolationtester: add a few fflush(stderr) calls
commit : ca5db759b8b7f2574a34842fc9284e58618e15b9
author : Alvaro Herrera <[email protected]>
date : Wed, 23 Jan 2013 13:30:14 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 23 Jan 2013 13:30:14 -0300
The lack of them is causing failures in some BF members.
Per Andrew Dunstan.
M src/test/isolation/isolationtester.c
Clarify that connection parameters aren't totally meaningless for PQping.
commit : 40ed59b2867fff9b1b4470e430c2d66732a05c2c
author : Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 11:05:15 -0500
committer: Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 11:05:15 -0500
Per discussion with Phil Sorber.
M doc/src/sgml/libpq.sgml
pg_isready
commit : ac2e9673622591319d107272747a02d2c7f343bd
author : Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 10:58:04 -0500
committer: Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 10:58:04 -0500
New command-line utility to test whether a server is ready to
accept connections.
Phil Sorber, reviewed by Michael Paquier and Peter Eisentraut
M doc/src/sgml/ref/allfiles.sgml
A doc/src/sgml/ref/pg_isready.sgml
M doc/src/sgml/reference.sgml
M src/bin/scripts/.gitignore
M src/bin/scripts/Makefile
A src/bin/scripts/pg_isready.c
M src/interfaces/libpq/libpq-fe.h
Improve concurrency of foreign key locking
commit : 0ac5ad5134f2769ccbaefec73844f8504c4d6182
author : Alvaro Herrera <[email protected]>
date : Wed, 23 Jan 2013 12:04:59 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 23 Jan 2013 12:04:59 -0300
This patch introduces two additional lock modes for tuples: "SELECT FOR
KEY SHARE" and "SELECT FOR NO KEY UPDATE". These don't block each
other, in contrast with already existing "SELECT FOR SHARE" and "SELECT
FOR UPDATE". UPDATE commands that do not modify the values stored in
the columns that are part of the key of the tuple now grab a SELECT FOR
NO KEY UPDATE lock on the tuple, allowing them to proceed concurrently
with tuple locks of the FOR KEY SHARE variety.
Foreign key triggers now use FOR KEY SHARE instead of FOR SHARE; this
means the concurrency improvement applies to them, which is the whole
point of this patch.
The added tuple lock semantics require some rejiggering of the multixact
module, so that the locking level that each transaction is holding can
be stored alongside its Xid. Also, multixacts now need to persist
across server restarts and crashes, because they can now represent not
only tuple locks, but also tuple updates. This means we need more
careful tracking of lifetime of pg_multixact SLRU files; since they now
persist longer, we require more infrastructure to figure out when they
can be removed. pg_upgrade also needs to be careful to copy
pg_multixact files over from the old server to the new, or at least part
of multixact.c state, depending on the versions of the old and new
servers.
Tuple time qualification rules (HeapTupleSatisfies routines) need to be
careful not to consider tuples with the "is multi" infomask bit set as
being only locked; they might need to look up MultiXact values (i.e.
possibly do pg_multixact I/O) to find out the Xid that updated a tuple,
whereas they previously were assured to only use information readily
available from the tuple header. This is considered acceptable, because
the extra I/O would involve cases that would previously cause some
commands to block waiting for concurrent transactions to finish.
Another important change is the fact that locking tuples that have
previously been updated causes the future versions to be marked as
locked, too; this is essential for correctness of foreign key checks.
This causes additional WAL-logging, also (there was previously a single
WAL record for a locked tuple; now there are as many as updated copies
of the tuple there exist.)
With all this in place, contention related to tuples being checked by
foreign key rules should be much reduced.
As a bonus, the old behavior that a subtransaction grabbing a stronger
tuple lock than the parent (sub)transaction held on a given tuple and
later aborting caused the weaker lock to be lost, has been fixed.
Many new spec files were added for isolation tester framework, to ensure
overall behavior is sane. There's probably room for several more tests.
There were several reviewers of this patch; in particular, Noah Misch
and Andres Freund spent considerable time in it. Original idea for the
patch came from Simon Riggs, after a problem report by Joel Jacobson.
Most code is from me, with contributions from Marti Raudsepp, Alexander
Shulgin, Noah Misch and Andres Freund.
This patch was discussed in several pgsql-hackers threads; the most
important start at the following message-ids:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
M contrib/file_fdw/output/file_fdw.source
M contrib/pageinspect/heapfuncs.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pgrowlocks/Makefile
A contrib/pgrowlocks/pgrowlocks–1.0–1.1.sql
R083 contrib/pgrowlocks/pgrowlocks–1.0.sql contrib/pgrowlocks/pgrowlocks–1.1.sql
M contrib/pgrowlocks/pgrowlocks.c
M contrib/pgrowlocks/pgrowlocks.control
M doc/src/sgml/pgrowlocks.sgml
M doc/src/sgml/ref/select.sgml
M src/backend/access/common/heaptuple.c
A src/backend/access/heap/README.tuplock
M src/backend/access/heap/heapam.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/rmgrdesc/heapdesc.c
M src/backend/access/rmgrdesc/mxactdesc.c
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/README
M src/backend/access/transam/multixact.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/commands/analyze.c
M src/backend/commands/cluster.c
M src/backend/commands/dbcommands.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/executor/execMain.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeModifyTable.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/initsplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/postmaster/autovacuum.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/tcop/utility.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/time/combocid.c
M src/backend/utils/time/tqual.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/heapam.h
M src/include/access/heapam_xlog.h
M src/include/access/htup.h
M src/include/access/htup_details.h
M src/include/access/multixact.h
M src/include/access/rewriteheap.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_database.h
M src/include/catalog/pg_proc.h
M src/include/commands/cluster.h
M src/include/commands/vacuum.h
M src/include/executor/executor.h
M src/include/nodes/execnodes.h
M src/include/nodes/parsenodes.h
M src/include/nodes/plannodes.h
M src/include/parser/analyze.h
M src/include/postgres.h
M src/include/storage/lock.h
M src/include/utils/builtins.h
M src/include/utils/rel.h
M src/include/utils/relcache.h
M src/include/utils/tqual.h
A src/test/isolation/expected/aborted-keyrevoke.out
A src/test/isolation/expected/aborted-keyrevoke_2.out
A src/test/isolation/expected/delete-abort-savept-2.out
A src/test/isolation/expected/delete-abort-savept.out
M src/test/isolation/expected/fk-contention.out
M src/test/isolation/expected/fk-deadlock.out
M src/test/isolation/expected/fk-deadlock2.out
M src/test/isolation/expected/fk-deadlock2_1.out
A src/test/isolation/expected/fk-deadlock2_2.out
M src/test/isolation/expected/fk-deadlock_1.out
A src/test/isolation/expected/fk-deadlock_2.out
A src/test/isolation/expected/fk-delete-insert.out
A src/test/isolation/expected/lock-update-delete.out
A src/test/isolation/expected/lock-update-traversal.out
A src/test/isolation/expected/multixact-no-deadlock.out
M src/test/isolation/isolation_schedule
M src/test/isolation/isolationtester.c
A src/test/isolation/specs/aborted-keyrevoke.spec
A src/test/isolation/specs/delete-abort-savept-2.spec
A src/test/isolation/specs/delete-abort-savept.spec
M src/test/isolation/specs/fk-deadlock.spec
M src/test/isolation/specs/fk-deadlock2.spec
A src/test/isolation/specs/lock-update-delete.spec
A src/test/isolation/specs/lock-update-traversal.spec
A src/test/isolation/specs/multixact-no-deadlock.spec
Further documentation tweaks for event triggers.
commit : f925c79b9f36c54b67053ade5ad225a75b8dc803
author : Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 09:17:20 -0500
committer: Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 09:17:20 -0500
Per discussion between Dimitri Fontaine, myself, and others.
M doc/src/sgml/event-trigger.sgml
Update comments and output for event_trigger regression test.
commit : 601e2935e28735e6bc285794fd9d558e6735bb8e
author : Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 06:46:27 -0500
committer: Robert Haas <[email protected]>
date : Wed, 23 Jan 2013 06:46:27 -0500
M src/test/regress/expected/event_trigger.out
M src/test/regress/sql/event_trigger.sql
Implement pg_unreachable() on MSVC.
commit : 52906f175a05a4e7e5e4a0e6021c32b1bfb221cf
author : Heikki Linnakangas <[email protected]>
date : Wed, 23 Jan 2013 12:47:00 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 23 Jan 2013 12:47:00 +0200
M src/include/c.h
Gitignore vcxproj files.
commit : eaf764842eb2fb755096a352be813ce61d94d249
author : Andrew Dunstan <[email protected]>
date : Wed, 23 Jan 2013 03:44:37 -0500
committer: Andrew Dunstan <[email protected]>
date : Wed, 23 Jan 2013 03:44:37 -0500
Per request from Craig Ringer.
M .gitignore
Fix more issues with cascading replication and timeline switches.
commit : 990fe3c4edfdabf4f56aa9a403a11f53006d0dd7
author : Heikki Linnakangas <[email protected]>
date : Wed, 23 Jan 2013 10:01:04 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 23 Jan 2013 10:01:04 +0200
When a standby server follows the master using WAL archive, and it chooses
a new timeline (recovery_target_timeline='latest'), it only fetches the
timeline history file for the chosen target timeline, not any other history
files that might be missing from pg_xlog. For example, if the current
timeline is 2, and we choose 4 as the new recovery target timeline, the
history file for timeline 3 is not fetched, even if it's part of this
server's history. That's enough for the standby itself - the history file
for timeline 4 includes timeline 3 as well - but if a cascading standby
server wants to recover to timeline 3, it needs the history file. To fix,
when a new recovery target timeline is chosen, try to copy any missing
history files from the archive to pg_xlog between the old and new target
timeline.
A second similar issue was with the WAL files. When a standby recovers from
archive, and it reaches a segment that contains a switch to a new timeline,
recovery fetches only the WAL file labelled with the new timeline's ID. The
file from the new timeline contains a copy of the WAL from the old timeline
up to the point where the switch happened, and recovery recovers it from the
new file. But in streaming replication, walsender only tries to read it
from the old timeline's file. To fix, change walsender to read it from the
new file, so that it behaves the same as recovery in that sense, and doesn't
try to open the possibly nonexistent file with the old timeline's ID.
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/replication/walsender.c
M src/include/access/timeline.h
M src/include/replication/walsender_private.h
pg_upgrade: remove --single-transaction usage
commit : 861ad67bd9546a8328ea31d0141406db16f4c57c
author : Bruce Momjian <[email protected]>
date : Tue, 22 Jan 2013 22:27:13 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 22 Jan 2013 22:27:13 -0500
With AtEOXact applied, --single-transaction makes pg_restore slower, and
has the potential to require lock table configuration, so remove the
argument.
Per suggestion from Tom.
M contrib/pg_upgrade/pg_upgrade.c
doc: Fix declared number of columns in table
commit : 21c87a0d46c8e9eb299d0fdfb75728c931452ddb
author : Peter Eisentraut <[email protected]>
date : Tue, 22 Jan 2013 21:47:49 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 22 Jan 2013 21:47:49 -0500
This was broken in 841a5150c575ccd89e4b03aec66eeeefb21f3cbe.
M doc/src/sgml/event-trigger.sgml
Fix a few small bugs in yesterday's event trigger patch.
commit : ddef9a00289fcdb21651b9ea8f0ee9e9095bdab4
author : Robert Haas <[email protected]>
date : Tue, 22 Jan 2013 21:37:01 -0500
committer: Robert Haas <[email protected]>
date : Tue, 22 Jan 2013 21:37:01 -0500
Dimitri Fontaine
M src/backend/commands/event_trigger.c
Fix CREATE EVENT TRIGGER syntax synopsis in documentation.
commit : 4c97731928aadd6510a85a5979372bcc4a9f2d2d
author : Robert Haas <[email protected]>
date : Tue, 22 Jan 2013 18:52:26 -0500
committer: Robert Haas <[email protected]>
date : Tue, 22 Jan 2013 18:52:26 -0500
Dimitri Fontaine, per a report from Thom Brown
M doc/src/sgml/ref/create_event_trigger.sgml
Typo fixes.
commit : 9917a491fd5e3a74e927292602c8adf0465ce575
author : Robert Haas <[email protected]>
date : Mon, 21 Jan 2013 22:35:32 -0500
committer: Robert Haas <[email protected]>
date : Mon, 21 Jan 2013 22:35:32 -0500
Noted by Thom Brown.
M doc/src/sgml/event-trigger.sgml
Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag.
commit : 75b39e79099fb1da43542e12698df717d1bd120f
author : Tom Lane <[email protected]>
date : Mon, 21 Jan 2013 20:25:26 -0500
committer: Tom Lane <[email protected]>
date : Mon, 21 Jan 2013 20:25:26 -0500
Originally we didn't bother to mark FuncExprs with any indication whether
VARIADIC had been given in the source text, because there didn't seem to be
any need for it at runtime. However, because we cannot fold a VARIADIC ANY
function's arguments into an array (since they're not necessarily all the
same type), we do actually need that information at runtime if VARIADIC ANY
functions are to respond unsurprisingly to use of the VARIADIC keyword.
Add the missing field, and also fix ruleutils.c so that VARIADIC ANY
function calls are dumped properly.
Extracted from a larger patch that also fixes concat() and format() (the
only two extant VARIADIC ANY functions) to behave properly when VARIADIC is
specified. This portion seems appropriate to review and commit separately.
Pavel Stehule
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/makefuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/readfuncs.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_func.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/fmgr/fmgr.c
M src/include/catalog/catversion.h
M src/include/fmgr.h
M src/include/nodes/primnodes.h
Add ddl_command_end support for event triggers.
commit : 841a5150c575ccd89e4b03aec66eeeefb21f3cbe
author : Robert Haas <[email protected]>
date : Mon, 21 Jan 2013 18:00:24 -0500
committer: Robert Haas <[email protected]>
date : Mon, 21 Jan 2013 18:00:24 -0500
Dimitri Fontaine, with slight changes by me
M doc/src/sgml/event-trigger.sgml
M src/backend/commands/event_trigger.c
M src/backend/tcop/utility.c
M src/backend/utils/cache/evtcache.c
M src/include/commands/event_trigger.h
M src/include/utils/evtcache.h
M src/test/regress/expected/event_trigger.out
M src/test/regress/sql/event_trigger.sql
Refactor ALTER some-obj RENAME implementation
commit : 765cbfdc9263bf7c90b9d1f1044c6950b8b7088c
author : Alvaro Herrera <[email protected]>
date : Mon, 21 Jan 2013 12:06:41 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 21 Jan 2013 12:06:41 -0300
Remove duplicate implementations of catalog munging and miscellaneous
privilege checks. Instead rely on already existing data in
objectaddress.c to do the work.
Author: KaiGai Kohei, changes by me
Reviewed by: Robert Haas, Álvaro Herrera, Dimitri Fontaine
M src/backend/catalog/objectaddress.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/event_trigger.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/backend/parser/gram.y
M src/include/commands/collationcmds.h
M src/include/commands/conversioncmds.h
M src/include/commands/defrem.h
M src/include/commands/event_trigger.h
M src/include/commands/proclang.h
M src/test/regress/expected/alter_generic.out
M src/test/regress/sql/alter_generic.sql
Fix one-byte buffer overrun in PQprintTuples().
commit : 8f0d8f481e86514bb35538827df7e1e35baee368
author : Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 23:43:46 -0500
committer: Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 23:43:46 -0500
This bug goes back to the original Postgres95 sources. Its significance
to modern PG versions is marginal, since we have not used PQprintTuples()
internally in a very long time, and it doesn't seem to have ever been
documented either. Still, it *is* exposed to client apps, so somebody
out there might possibly be using it.
Xi Wang
M src/interfaces/libpq/fe-print.c
Fix error-checking typo in check_TSCurrentConfig().
commit : 535e69a43f14673557d281b112859e7a25cc7939
author : Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 23:09:35 -0500
committer: Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 23:09:35 -0500
The code failed to detect an out-of-memory failure.
Xi Wang
M src/backend/utils/cache/ts_cache.c
doc: Fix syntax of a URL
commit : 693eb9dfd97da7fc970e9f525a04239a1cb22654
author : Peter Eisentraut <[email protected]>
date : Sun, 20 Jan 2013 19:36:30 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 20 Jan 2013 19:36:30 -0500
Leading white space before the "http:" is apparently treated as a
relative link at least by some browsers.
M doc/src/sgml/installation.sgml
Fix an O(N^2) performance issue for sessions modifying many relations.
commit : d5b31cc32b0762fa8920a9c1f70af2f82fb0aaa5
author : Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 13:44:49 -0500
committer: Tom Lane <[email protected]>
date : Sun, 20 Jan 2013 13:44:49 -0500
AtEOXact_RelationCache() scanned the entire relation cache at the end of
any transaction that created a new relation or assigned a new relfilenode.
Thus, clients such as pg_restore had an O(N^2) performance problem that
would start to be noticeable after creating 10000 or so tables. Since
typically only a small number of relcache entries need any cleanup, we
can fix this by keeping a small list of their OIDs and doing hash_searches
for them. We fall back to the full-table scan if the list overflows.
Ideally, the maximum list length would be set at the point where N
hash_searches would cost just less than the full-table scan. Some quick
experimentation says that point might be around 50-100; I (tgl)
conservatively set MAX_EOXACT_LIST = 32. For the case that we're worried
about here, which is short single-statement transactions, it's unlikely
there would ever be more than about a dozen list entries anyway; so it's
probably not worth being too tense about the value.
We could avoid the hash_searches by instead keeping the target relcache
entries linked into a list, but that would be noticeably more complicated
and bug-prone because of the need to maintain such a list in the face of
relcache entry drops. Since a relcache entry can only need such cleanup
after a somewhat-heavyweight filesystem operation, trying to save a
hash_search per cleanup doesn't seem very useful anyway --- it's the scan
over all the not-needing-cleanup entries that we wish to avoid here.
Jeff Janes, reviewed and tweaked a bit by Tom Lane
M src/backend/utils/cache/relcache.c
Clarify that streaming replication can be both async and sync
commit : 0a2da5282a2372b651e2096f16d97d6029e5f54f
author : Magnus Hagander <[email protected]>
date : Sun, 20 Jan 2013 16:10:12 +0100
committer: Magnus Hagander <[email protected]>
date : Sun, 20 Jan 2013 16:10:12 +0100
Josh Kupershmidt
M doc/src/sgml/high-availability.sgml
Use SET TRANSACTION READ ONLY in pg_dump, if server supports it.
commit : 26d905a12dda783783c60cec04decb00cd2e67f4
author : Tom Lane <[email protected]>
date : Sat, 19 Jan 2013 17:56:40 -0500
committer: Tom Lane <[email protected]>
date : Sat, 19 Jan 2013 17:56:40 -0500
This currently does little except serve as documentation. (The one case
where it has a performance benefit, SERIALIZABLE mode in 9.1 and up, was
already using READ ONLY mode.) However, it's possible that it might have
performance benefits in future, and in any case it seems like good
practice since it would catch any accidentally non-read-only operations.
Pavan Deolasee
M src/bin/pg_dump/pg_dump.c
Modernize string literal syntax in tutorial example.
commit : 4b94cfb5647c97a80368346ee0a17f40d301cb63
author : Tom Lane <[email protected]>
date : Sat, 19 Jan 2013 17:20:32 -0500
committer: Tom Lane <[email protected]>
date : Sat, 19 Jan 2013 17:20:32 -0500
Un-double the backslashes in the LIKE patterns, since
standard_conforming_strings is now the default. Just to be sure, include
a command to set standard_conforming_strings to ON in the example.
Back-patch to 9.1, where standard_conforming_strings became the default.
Josh Kupershmidt, reviewed by Jeff Janes
M src/tutorial/syscat.source
Make pgxs build executables with the right suffix.
commit : 9f10f7dc573401b1eb7cdf1e3cf4f1967bbbccce
author : Andrew Dunstan <[email protected]>
date : Sat, 19 Jan 2013 14:54:29 -0500
committer: Andrew Dunstan <[email protected]>
date : Sat, 19 Jan 2013 14:54:29 -0500
Complaint and patch from Zoltán Böszörményi.
When cross-compiling, the native make doesn't know
about the Windows .exe suffix, so it only builds with
it when explicitly told to do so.
The native make will not see the link between the target
name and the built executable, and might this do unnecesary
work, but that's a bigger problem than this one, if in fact
we consider it a problem at all.
Back-patch to all live branches.
M src/makefiles/pgxs.mk
libpq doc: Clarify what commands return PGRES_TUPLES_OK
commit : fb197290c1f25d8b7f35bc2bc7144eeaf603687c
author : Peter Eisentraut <[email protected]>
date : Fri, 18 Jan 2013 22:36:54 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 18 Jan 2013 22:36:54 -0500
The old text claimed that INSERT and UPDATE always return
PGRES_COMMAND_OK, but INSERT/UPDATE with RETURNING return
PGRES_TUPLES_OK.
Josh Kupershmidt
M doc/src/sgml/libpq.sgml
Protect against SnapshotNow race conditions in pg_tablespace scans.
commit : c2a14bc7c994065edcc48183913a1fae2af27990
author : Tom Lane <[email protected]>
date : Fri, 18 Jan 2013 18:06:20 -0500
committer: Tom Lane <[email protected]>
date : Fri, 18 Jan 2013 18:06:20 -0500
Use of SnapshotNow is known to expose us to race conditions if the tuple(s)
being sought could be updated by concurrently-committing transactions.
CREATE DATABASE and DROP DATABASE are particularly exposed because they do
heavyweight filesystem operations during their scans of pg_tablespace,
so that the scans run for a very long time compared to most. Furthermore,
the potential consequences of a missed or twice-visited row are nastier
than average:
* createdb() could fail with a bogus "file already exists" error, or
silently fail to copy one or more tablespace's worth of files into the
new database.
* remove_dbtablespaces() could miss one or more tablespaces, thus failing
to free filesystem space for the dropped database.
* check_db_file_conflict() could likewise miss a tablespace, leading to an
OID conflict that could result in data loss either immediately or in
future operations. (This seems of very low probability, though, since a
duplicate database OID would be unlikely to start with.)
Hence, it seems worth fixing these three places to use MVCC snapshots, even
though this will someday be superseded by a generic solution to SnapshotNow
race conditions.
Back-patch to all active branches.
Stephen Frost and Tom Lane
M src/backend/commands/dbcommands.c
Rename new latex longtable function name, for consistency
commit : 530bbfac57c8c5df9d38754759d95f1588c427f7
author : Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 14:02:53 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 14:02:53 -0500
M src/bin/psql/print.c
Unbreak lock conflict detection for Hot Standby.
commit : d8c3896626e9fa48c9ebadc31850d54a791a08e3
author : Robert Haas <[email protected]>
date : Fri, 18 Jan 2013 11:49:52 -0500
committer: Robert Haas <[email protected]>
date : Fri, 18 Jan 2013 11:49:52 -0500
This got broken in the original fast-path locking patch, because
I failed to account for the fact that Hot Standby startup process
might take a strong relation lock on a relation in a database to
which it is not bound, and confused MyDatabaseId with the database
ID of the relation being locked.
Report and diagnosis by Andres Freund. Final form of patch by me.
M src/backend/storage/lmgr/lock.c
Improve pg_upgrade error report
commit : 600250d0ed8848391ceb8fb382c299d085856dbc
author : Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 09:26:18 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 09:26:18 -0500
If the cluster alignments don't match, output this suggestion:
Likely one cluster is a 32-bit install, the other 64-bit
M contrib/pg_upgrade/controldata.c
Fix off-by-one bug in xlog reading logic
commit : 8c17144c7555dbe3ed255c3556ca4f91f81c024f
author : Alvaro Herrera <[email protected]>
date : Fri, 18 Jan 2013 11:17:18 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 18 Jan 2013 11:17:18 -0300
Bug reported by Michael Paquier
Author: Andres Freund
M src/backend/access/transam/xlog.c
psql latex fixes
commit : 74a82bafe434adbf80872ddd17f3e8c7a0eadc71
author : Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 08:30:31 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 18 Jan 2013 08:30:31 -0500
Remove extra line at bottom of table for new 'latex' mode border=3.
Also update 'latex'-longtable 'tableattr' docs to say
'whitespace-separated' instead of 'space'.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/print.c
Now that START_REPLICATION returns the next timeline's ID after reaching end of timeline, take advantage of that in walreceiver.
commit : 6f7cddc7ae27a42ac2af72b675b9c08138a0c439
author : Heikki Linnakangas <[email protected]>
date : Fri, 18 Jan 2013 11:48:29 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 18 Jan 2013 11:48:29 +0200
Startup process is still in control of choosign the target timeline, by
scanning the timeline history files present in pg_xlog, but walreceiver now
uses the next timeline's ID to fetch its history file immediately after it
has finished streaming the old timeline. Before, the standby would first try
to restart streaming on the old timeline, which fetches the missing timeline
history file as a side-effect, and only then restart from the new timeline.
This patch eliminates the extra iteration, which speeds up the timeline
switch and reduces the noise in the log caused by the extra restart on the
old timeline.
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/walreceiver.c
M src/include/replication/walreceiver.h
Use the right timeline when beginning to stream from master.
commit : 2ff65553131d8ad2ddbbfe298fffc378f127b15e
author : Heikki Linnakangas <[email protected]>
date : Fri, 18 Jan 2013 11:41:36 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 18 Jan 2013 11:41:36 +0200
The xlogreader refactoring broke the logic to decide which timeline to start
streaming from. XLogPageRead() uses the timeline history to check which
timeline the requested WAL position falls into. However, after the
refactoring, XLogPageRead() is always first called with the first page in
the segment, to verify the segment header, and only then with the actual WAL
position we're interested in. That first read of the segment's header made
XLogPageRead() to always start streaming from the old timeline containing
the segment header, not the timeline containing the actual record, if there
was a timeline switch within the segment.
I thought I fixed this yesterday, but that fix was too narrow and only fixed
this for the corner-case that the timeline switch happened in the first page
of the segment. To fix this more robustly, pass explicitly the position of
the record we're actually interested in to XLogPageRead, and use that to
decide which timeline to read from, rather than deduce it from the page and
offset.
Per report from Fujii Masao.
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogreader.c
M src/include/access/xlogreader.h
When xlogreader asks the callback function to read a page, make sure we get a large enough part of the page to include the beginning of the next record we're interested in. The XLogPageRead callback uses the requested length to decide which timeline to stream WAL from, and if the first call is short, and the page contains a timeline switch, we'll repeatedly try to stream that page from the old timeline, and never get across the timeline switch.
commit : 88228e6f1d26619756281c508212498f1de1eff5
author : Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 23:45:37 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 23:45:37 +0200
M src/backend/access/transam/xlogreader.c
I added a result set to START_STREAMING command, but neglected walreceiver.
commit : 3684a534efbd2ffd72e2c4cbd21f9752be3efaf1
author : Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 23:12:30 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 23:12:30 +0200
The patch to allow pg_receivexlog to switch timeline added a result set
after copy has ended in START_STREAMING command, to return the next
timeline's ID to the client. But walreceived didn't get the memo, and threw
an error on the unexpected result set. Fix.
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/walreceiver.c
Accelerate end-of-transaction dropping of relations
commit : 279628a0a7cf582f7dfb68e25b7b76183dd8ff2f
author : Alvaro Herrera <[email protected]>
date : Thu, 17 Jan 2013 15:55:10 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 17 Jan 2013 15:55:10 -0300
When relations are dropped, at end of transaction we need to remove the
files and clean the buffer pool of buffers containing pages of those
relations. Previously we would scan the buffer pool once per relation
to clean up buffers. When there are many relations to drop, the
repeated scans make this process slow; so we now instead pass a list of
relations to drop and scan the pool once, checking each buffer against
the passed list. When the number of relations is larger than a
threshold (which as of this patch is being set to 20 relations) we sort
the array before starting, and bsearch the array; when it's smaller, we
simply scan the array linearly each time, because that's faster. The
exact optimal threshold value depends on many factors, but the
difference is not likely to be significant enough to justify making it
user-settable.
This has been measured to be a significant win (a 15x win when dropping
100,000 relations; an extreme case, but reportedly a real one).
Author: Tomas Vondra, some tweaks by me
Reviewed by: Robert Haas, Shigeru Hanada, Andres Freund, Álvaro Herrera
M src/backend/catalog/storage.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/bufmgr.h
M src/include/storage/smgr.h
Make pg_receivexlog and pg_basebackup -X stream work across timeline switches.
commit : 0b6329130e8e4576e97ff763f0e773347e1a88af
author : Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 20:23:00 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 20:23:00 +0200
This mirrors the changes done earlier to the server in standby mode. When
receivelog reaches the end of a timeline, as reported by the server, it
fetches the timeline history file of the next timeline, and restarts
streaming from the new timeline by issuing a new START_STREAMING command.
When pg_receivexlog crosses a timeline, it leaves the .partial suffix on the
last segment on the old timeline. This helps you to tell apart a partial
segment left in the directory because of a timeline switch, and a completed
segment. If you just follow a single server, it won't make a difference, but
it can be significant in more complicated scenarios where new WAL is still
generated on the old timeline.
This includes two small changes to the streaming replication protocol:
First, when you reach the end of timeline while streaming, the server now
sends the TLI of the next timeline in the server's history to the client.
pg_receivexlog uses that as the next timeline, so that it doesn't need to
parse the timeline history file like a standby server does. Second, when
BASE_BACKUP command sends the begin and end WAL positions, it now also sends
the timeline IDs corresponding the positions.
M doc/src/sgml/protocol.sgml
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/replication/basebackup.c
M src/backend/replication/walsender.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/receivelog.h
M src/include/access/timeline.h
M src/include/access/xlog.h
Improve memory space management in tuplesort and tuplestore.
commit : 8ae35e91807508872cabd3b0e8db35fc78e194ac
author : Tom Lane <[email protected]>
date : Thu, 17 Jan 2013 13:12:14 -0500
committer: Tom Lane <[email protected]>
date : Thu, 17 Jan 2013 13:12:14 -0500
The code originally just doubled the size of the tuple-pointer array so
long as that would fit in allowedMem. This could result in failing to use
as much as half of allowedMem, if (as is typical) the last doubling attempt
didn't quite fit. Worse, we might double the array size but be unable to
use most of the added slots, because there was no room left within the
allowedMem limit for tuples the slots should point to. To fix, double only
so long as we've used less than half of allowedMem in total. Then do one
more array enlargement, but scale it based on total memory consumption so
far. This will work nicely as long as the average tuple size is reasonably
stable, and in any case should be better than the old method.
This change will result in large sort operations consuming a larger
fraction of work_mem than they typically did in the past. The release
notes should mention that users may want to revisit their work_mem
settings, if they'd tuned those settings based on the old behavior of
sorting.
Jeff Janes, reviewed by Peter Geoghegan and Robert Haas
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/sort/tuplestore.c
Fix a couple of error-handling bugs in the xlogreader patch.
commit : 1296d5c53cad26c775993d6c29e1311919202638
author : Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 19:05:19 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 19:05:19 +0200
XLogReadRecord should reset its state on every error, to make sure it
re-reads the page on next call. It was inconsistent in that some errors did
that, but some did not.
In ReadRecord(), don't give up on an error if we're in standby mode. The
loop was set up to retry, but the checks within the loop broke out of the
loop on any error.
Andres Freund, with some tweaking by me.
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogreader.c
Add a latex-longtable output format to psql
commit : b14f81bc9a65993129e93052634e358b310b8554
author : Bruce Momjian <[email protected]>
date : Thu, 17 Jan 2013 11:39:38 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 17 Jan 2013 11:39:38 -0500
latex longtable is more powerful than the 'tabular' output format
'latex' uses. Also add border=3 support to 'latex'.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/print.c
M src/bin/psql/print.h
Silence compiler warnings
commit : 8ef6961685b380b493a6e4b4e2e833de239c120e
author : Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 16:10:16 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 16:10:16 +0100
M src/bin/pg_basebackup/pg_basebackup.c
Make GiST indexes on-disk compatible with 9.2 again.
commit : 9ee4d06f3fdde37b063b8a0f0fa0a2113ac12303
author : Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 16:35:46 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 17 Jan 2013 16:35:46 +0200
The patch that turned XLogRecPtr into a uint64 inadvertently changed the
on-disk format of GiST indexes, because the NSN field in the GiST page
opaque is an XLogRecPtr. That breaks pg_upgrade. Revert the format of that
field back to the two-field struct that XLogRecPtr was before. This is the
same we did to LSNs in the page header to avoid changing on-disk format.
Bump catversion, as this invalidates any existing GiST indexes built on
9.3devel.
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/include/access/gist.h
M src/include/catalog/catversion.h
M src/include/storage/bufpage.h
Base the default SSL ciphers on DEFAULT instead of ALL
commit : bba486f372ffa28d6a0b70a6b0ad7065429213d0
author : Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 15:04:44 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 15:04:44 +0100
It's better to start from what the OpenSSL people consider a good
default and then remove insecure things (low encryption, exportable
encryption and md5 at this point) from that, instead of starting
from everything that exists and remove from that. We trust the
OpenSSL people to make good choices about what the default is.
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
Make size-output fixed length in pg_basebackup verbose mode
commit : 4eebf1309f07ada30b0338991cea848ed827ed64
author : Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 14:43:33 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 14:43:33 +0100
This way the line doesn't shift right as the amount of data processed
increases.
M src/bin/pg_basebackup/pg_basebackup.c
Truncate filenames in the leadning end in pg_basebackup verbose output
commit : d7e9ca7ff7efac8b15d4348fd9480c12ed560ae7
author : Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 14:38:49 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 14:38:49 +0100
When truncating at the end, like before, the output would often end up
just showing the path instead of the filename.
Also increase the length of the filename by 5, which still keeps us at
less than 80 characters in most outputs.
M src/bin/pg_basebackup/pg_basebackup.c
Support multiple -t/--table arguments for more commands
commit : f3af53441ed0b306692a1cc31003a84d1b5b3cf7
author : Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 11:24:47 +0100
committer: Magnus Hagander <[email protected]>
date : Thu, 17 Jan 2013 11:24:47 +0100
On top of the previous support in pg_dump, add support to specify
multiple tables (by using the -t option multiple times) to
pg_restore, clsuterdb, reindexdb and vacuumdb.
Josh Kupershmidt, reviewed by Karl O. Pinc
M doc/src/sgml/ref/clusterdb.sgml
M doc/src/sgml/ref/pg_restore.sgml
M doc/src/sgml/ref/reindexdb.sgml
M doc/src/sgml/ref/vacuumdb.sgml
M src/bin/pg_dump/common.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/pg_backup.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_restore.c
M src/bin/scripts/Makefile
M src/bin/scripts/clusterdb.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
Get rid of pg_dump's README
commit : 36bdfa52a0780d2fcbb48665ab7ca98a13593fdf
author : Peter Eisentraut <[email protected]>
date : Wed, 16 Jan 2013 23:49:54 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 16 Jan 2013 23:49:54 -0500
It was largely full of outdated and incorrect information. Move the few
notes which were still relevant into header comments of pg_backup_tar.c
and pg_dumpall.c.
Josh Kupershmidt
D src/bin/pg_dump/README
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dumpall.c
Split out XLog reading as an independent facility
commit : 7fcbf6a405ffc12a4546a25b98592ee6733783fc
author : Alvaro Herrera <[email protected]>
date : Wed, 16 Jan 2013 16:12:53 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 16 Jan 2013 16:12:53 -0300
This new facility can not only be used by xlog.c to carry out crash
recovery, but also by external programs. By supplying a function to
read XLog pages from somewhere, all the WAL reading can be used for
completely different purposes.
For the standard backend use, the behavior should be pretty much the
same as previously. As for non-backend programs, an hypothetical
pg_xlogdump program is now closer to reality, but some more backend
support is still necessary.
This patch was originally submitted by Andres Freund in a different
form, but Heikki Linnakangas opted for and authored another design of
the concept. Andres has advanced the patch since Heikki's initial
version. Review and some (mostly cosmetics) changes by me.
M src/backend/access/transam/Makefile
M src/backend/access/transam/xlog.c
A src/backend/access/transam/xlogreader.c
M src/backend/nls.mk
A src/include/access/xlogreader.h
Make \? help message more clear when not connected.
commit : 8606dd81905a004eda74f0bfa0a9c9c18a488725
author : Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 22:21:03 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 22:21:03 +0200
On second thought, "none" could mislead to think that you're connected a
database with that name. Duplicate the whole string, so that it can be
more easily translated. In back-branches, thought, just use an empty string
in place of the database name, to avoid adding a translatable string.
M src/bin/psql/help.c
Don't pass NULL to fprintf, if not currently connected to a database.
commit : b04ce529fd38b1d00492d03acf896f9293b6fb28
author : Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 18:54:03 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 18:54:03 +0200
Backpatch all the way to 8.3. Fixes bug #7811, per report and diagnosis by
Meng Qingzhong.
M src/bin/psql/help.c
Rework order of checks in ALTER / SET SCHEMA
commit : 7ac5760fa283bc090c25e4ea495a0d2bb41db7b5
author : Alvaro Herrera <[email protected]>
date : Tue, 15 Jan 2013 13:23:43 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 15 Jan 2013 13:23:43 -0300
When attempting to move an object into the schema in which it already
was, for most objects classes we were correctly complaining about
exactly that ("object is already in schema"); but for some other object
classes, such as functions, we were instead complaining of a name
collision ("object already exists in schema"). The latter is wrong and
misleading, per complaint from Robert Haas in
CA+TgmoZ0+gNf7RDKRc3u5rHXffP=QjqPZKGxb4BsPz65k7qnHQ@mail.gmail.com
To fix, refactor the way these checks are done. As a bonus, the
resulting code is smaller and can also share some code with Rename
cases.
While at it, remove use of getObjectDescriptionOids() in error messages.
These are normally disallowed because of translatability considerations,
but this one had slipped through since 9.1. (Not sure that this is
worth backpatching, though, as it would create some untranslated
messages in back branches.)
This is loosely based on a patch by KaiGai Kohei, heavily reworked by
me.
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/functioncmds.c
M src/include/commands/alter.h
M src/include/commands/collationcmds.h
M src/include/commands/defrem.h
M src/test/regress/expected/alter_generic.out
Give a proper error message if connecting to incompatible server.
commit : ffda05977a93f9b3f8a6b05657ba2f16decb6b23
author : Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 15:45:52 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 15:45:52 +0200
The WAL streaming message format changed in 9.3, so 9.3 pg_basebackup or
pg_receivelog won't work against older servers.
M src/bin/pg_basebackup/receivelog.c
Fix hash_update_hash_key() to handle same-bucket case correctly.
commit : 1b794d3f3286036eec1d09d5cbea989162657331
author : Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 21:57:15 -0500
committer: Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 21:57:15 -0500
Original coding would corrupt the hashtable if the item being updated was
at the end of its bucket chain and the new hash key hashed to that same
bucket. Diagnosis and fix by Heikki Linnakangas.
M src/backend/utils/hash/dynahash.c
Return value of lseek() can be negative on failure.
commit : 3f4b1749a8168893558f70021be4f40c650bbada
author : Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 00:42:37 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 15 Jan 2013 00:42:37 +0200
Because the return value of lseek() was assigned to an unsigned size_t
variable, we'd fail to notice an error return code -1. Compiler gave a
warning about this.
Andres Freund
M src/backend/replication/walsender.c
Fix obsolete SQL syntax in comment.
commit : 325c54b69cbddc03445ca6c3198d2998c5d5818f
author : Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 15:48:12 -0500
committer: Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 15:48:12 -0500
This was legal back in the days of add_missing_from, though perhaps
never good style. It's not legal anymore ...
Jan Urbański
M src/backend/executor/execProcnode.c
Reject out-of-range dates in to_date().
commit : 5c4eb9166ed35dedc010ec973a55ff1a244cf87a
author : Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 15:19:48 -0500
committer: Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 15:19:48 -0500
Dates outside the supported range could be entered, but would not print
reasonably, and operations such as conversion to timestamp wouldn't behave
sanely either. Since this has the potential to result in undumpable table
data, it seems worth back-patching.
Hitoshi Harada
M src/backend/utils/adt/formatting.c
Add new timezone abbrevation "FET".
commit : 7127293a5d9f655ce3ec7e009f18bac8d3d0bc1c
author : Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 14:45:40 -0500
committer: Tom Lane <[email protected]>
date : Mon, 14 Jan 2013 14:45:40 -0500
This seems to have been invented in 2011 to represent GMT+3, non daylight
savings rules, as now used in Europe/Kaliningrad and Europe/Minsk.
There are no conflicts so might as well add it to the Default list.
Per bug #7804 from Ruslan Izmaylov.
M src/timezone/tznames/Default
M src/timezone/tznames/Europe.txt
Remove spurious space
commit : 692079e5dcb3316a51d4cadc2eb2fc184b33518d
author : Alvaro Herrera <[email protected]>
date : Fri, 11 Jan 2013 12:21:13 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 11 Jan 2013 12:21:13 -0300
Andres Freund
M src/backend/access/rmgrdesc/standbydesc.c
Prevent very-low-probability PANIC during PREPARE TRANSACTION.
commit : 2065dd2834e832eb820f1fbcd16746d6af1f6037
author : Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 22:19:47 -0500
committer: Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 22:19:47 -0500
The code in PostPrepare_Locks supposed that it could reassign locks to
the prepared transaction's dummy PGPROC by deleting the PROCLOCK table
entries and immediately creating new ones. This was safe when that code
was written, but since we invented partitioning of the shared lock table,
it's not safe --- another process could steal away the PROCLOCK entry in
the short interval when it's on the freelist. Then, if we were otherwise
out of shared memory, PostPrepare_Locks would have to PANIC, since it's
too late to back out of the PREPARE at that point.
Fix by inventing a dynahash.c function to atomically update a hashtable
entry's key. (This might possibly have other uses in future.)
This is an ancient bug that in principle we ought to back-patch, but the
odds of someone hitting it in the field seem really tiny, because (a) the
risk window is small, and (b) nobody runs servers with maxed-out lock
tables for long, because they'll be getting non-PANIC out-of-memory errors
anyway. So fixing it in HEAD seems sufficient, at least until the new
code has gotten some testing.
M src/backend/storage/lmgr/lock.c
M src/backend/utils/hash/dynahash.c
M src/include/utils/hsearch.h
Make spelling more uniform
commit : 9d2cd99a60cfb62951c9ec21f9d12c36c8cfa607
author : Peter Eisentraut <[email protected]>
date : Sun, 13 Jan 2013 21:42:03 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 13 Jan 2013 21:42:03 -0500
M src/backend/utils/adt/rangetypes.c
Update comments for elog_start().
commit : 24dd0502a106102d81782de4966c476fd0ab2efa
author : Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 18:50:48 -0500
committer: Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 18:50:48 -0500
Forgot I was going to do this as part of the previous patch ...
M src/backend/utils/error/elog.c
Improve handling of ereport(ERROR) and elog(ERROR).
commit : b853eb97182079dcd30b4f52576bd5d6c275ee71
author : Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 18:39:20 -0500
committer: Tom Lane <[email protected]>
date : Sun, 13 Jan 2013 18:39:20 -0500
In commit 71450d7fd6c7cf7b3e38ac56e363bff6a681973c, we added code to inform
suitably-intelligent compilers that ereport() doesn't return if the elevel
is ERROR or higher. This patch extends that to elog(), and also fixes a
double-evaluation hazard that the previous commit created in ereport(),
as well as reducing the emitted code size.
The elog() improvement requires the compiler to support __VA_ARGS__, which
should be available in just about anything nowadays since it's required by
C99. But our minimum language baseline is still C89, so add a configure
test for that.
The previous commit assumed that ereport's elevel could be evaluated twice,
which isn't terribly safe --- there are already counterexamples in xlog.c.
On compilers that have __builtin_constant_p, we can use that to protect the
second test, since there's no possible optimization gain if the compiler
doesn't know the value of elevel. Otherwise, use a local variable inside
the macros to prevent double evaluation. The local-variable solution is
inferior because (a) it leads to useless code being emitted when elevel
isn't constant, and (b) it increases the optimization level needed for the
compiler to recognize that subsequent code is unreachable. But it seems
better than not teaching non-gcc compilers about unreachability at all.
Lastly, if the compiler has __builtin_unreachable(), we can use that
instead of abort(), resulting in a noticeable code savings since no
function call is actually emitted. However, it seems wise to do this only
in non-assert builds. In an assert build, continue to use abort(), so that
the behavior will be predictable and debuggable if the "impossible"
happens.
These changes involve making the ereport and elog macros emit do-while
statement blocks not just expressions, which forces small changes in
a few call sites.
Andres Freund, Tom Lane, Heikki Linnakangas
M config/c-compiler.m4
M configure
M configure.in
M contrib/cube/cubescan.l
M contrib/seg/segscan.l
M src/backend/bootstrap/bootscanner.l
M src/backend/parser/scan.l
M src/backend/replication/repl_scanner.l
M src/include/c.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
M src/include/utils/elog.h
Extend and improve use of EXTRA_REGRESS_OPTS.
commit : 4ae5ee6c9b4dd7cd7e4471a44d371b228a9621c3
author : Andrew Dunstan <[email protected]>
date : Sat, 12 Jan 2013 08:28:58 -0500
committer: Andrew Dunstan <[email protected]>
date : Sat, 12 Jan 2013 08:28:58 -0500
This is now used by ecpg tests, and not clobbered by pg_upgrade
tests. This change won't affect anything that doesn't set this
environment variable, but will enable the buildfarm to control
exactly what port regression test installs will be running on,
and thus to detect possible rogue postmasters more easily.
Backpatch to release 9.2 where EXTRA_REGRESS_OPTS was first used.
M contrib/pg_upgrade/test.sh
M src/interfaces/ecpg/test/Makefile
Redesign the planner's handling of index-descent cost estimation.
commit : 31f38f28b00cbe2b9267205359e3cf7bafa1cb97
author : Tom Lane <[email protected]>
date : Fri, 11 Jan 2013 12:56:58 -0500
committer: Tom Lane <[email protected]>
date : Fri, 11 Jan 2013 12:56:58 -0500
Historically we've used a couple of very ad-hoc fudge factors to try to
get the right results when indexes of different sizes would satisfy a
query with the same number of index leaf tuples being visited. In
commit 21a39de5809cd3050a37d2554323cc1d0cbeed9d I tweaked one of these
fudge factors, with results that proved disastrous for larger indexes.
Commit bf01e34b556ff37982ba2d882db424aa484c0d07 fudged it some more,
but still with not a lot of principle behind it.
What seems like a better way to address these issues is to explicitly model
index-descent costs, since that's what's really at stake when considering
diferent indexes with similar leaf-page-level costs. We tried that once
long ago, and found that charging random_page_cost per page descended
through was way too much, because upper btree levels tend to stay in cache
in real-world workloads. However, there's still CPU costs to think about,
and the previous fudge factors can be seen as a crude attempt to account
for those costs. So this patch replaces those fudge factors with explicit
charges for the number of tuple comparisons needed to descend the index
tree, plus a small charge per page touched in the descent. The cost
multipliers are chosen so that the resulting charges are in the vicinity of
the historical (pre-9.2) fudge factors for indexes of up to about a million
tuples, while not ballooning unreasonably beyond that, as the old fudge
factor did (even more so in 9.2).
To make this work accurately for btree indexes, add some code that allows
extraction of the known root-page height from a btree. There's no
equivalent number readily available for other index types, but we can use
the log of the number of index pages as an approximate substitute.
This seems like too much of a behavioral change to risk back-patching,
but it should improve matters going forward. In 9.2 I'll just revert
the fudge-factor change.
M src/backend/access/nbtree/nbtpage.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/access/nbtree.h
M src/include/nodes/relation.h
Last-gasp attempt to save libperl.so configure probe.
commit : e1b735ae35f225927c95746babafaa84e39c3325
author : Tom Lane <[email protected]>
date : Thu, 10 Jan 2013 22:16:22 -0500
committer: Tom Lane <[email protected]>
date : Thu, 10 Jan 2013 22:16:22 -0500
I notice that plperl's makefile adds the -I for $perl_archlibexp/CORE
at the end of CPPFLAGS not the beginning. It seems somewhat unlikely
that the include search order has anything to do with why buildfarm
member okapi is failing, but I'm about out of other ideas.
M configure
M configure.in
Test linking libperl.so using only Perl's required libraries.
commit : 9d5a160ca3af8f9488d2556fb28b9941d4926ff7
author : Tom Lane <[email protected]>
date : Wed, 9 Jan 2013 23:46:44 -0500
committer: Tom Lane <[email protected]>
date : Wed, 9 Jan 2013 23:46:44 -0500
It appears that perl_embed_ldflags should already mention all the libraries
that are required by libperl.so itself. So let's try the test link with
just those and not the other LIBS we've found up to now. This should
more nearly reproduce what will happen when plperl is linked, and perhaps
will fix buildfarm member okapi's problem.
M configure
M configure.in
Add explicit configure-time checks for perl.h and libperl.so.
commit : 1f3ed51f8e197e9bbf18737a1aa1148ed730f7d8
author : Tom Lane <[email protected]>
date : Wed, 9 Jan 2013 19:41:37 -0500
committer: Tom Lane <[email protected]>
date : Wed, 9 Jan 2013 19:41:37 -0500
Although most platforms seem to package Perl in such a way that these files
are present even in basic Perl installations, Debian does not. Hence, make
an effort to fail during configure rather than build if --with-perl was
given and these files are lacking. Per gripe from Josh Berkus.
M configure
M configure.in
Detect Windows perl linkage parameters in configure script.
commit : 7fb97ecd137a879831ec6e3dce14c9f2e2a3d6b5
author : Andrew Dunstan <[email protected]>
date : Wed, 9 Jan 2013 17:49:23 -0500
committer: Andrew Dunstan <[email protected]>
date : Wed, 9 Jan 2013 17:49:23 -0500
This means we can now construct a configure test for the library
presence. Previously these parameters were only figured out at
build time in plperl's GnuMakefile.
M config/perl.m4
M configure
M src/pl/plperl/GNUmakefile
Properly install ecpg_compat and pgtypes libraries on msvc
commit : 6e650a55cda9291bbeebd6b1aa6aedbd3d15e622
author : Magnus Hagander <[email protected]>
date : Wed, 9 Jan 2013 17:29:59 +0100
committer: Magnus Hagander <[email protected]>
date : Wed, 9 Jan 2013 17:29:59 +0100
JiangGuiqing
M src/tools/msvc/Install.pm
Don't attempt to write recovery.conf when -R is not specified
commit : b5ed1376c61b341939ef3f54996a5c5af3408a06
author : Magnus Hagander <[email protected]>
date : Wed, 9 Jan 2013 16:57:32 +0100
committer: Magnus Hagander <[email protected]>
date : Wed, 9 Jan 2013 16:57:32 +0100
Fixes segmentation fault during regular use.
Fujii Masao
M src/bin/pg_basebackup/pg_basebackup.c
Allow parallel copy/link in pg_upgrade
commit : a89c46f9bc314ed549245d888da09b8c5cace104
author : Bruce Momjian <[email protected]>
date : Wed, 9 Jan 2013 08:57:47 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 9 Jan 2013 08:57:47 -0500
This patch implements parallel copying/linking of files by tablespace
using the --jobs option in pg_upgrade.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/tablespace.c
M doc/src/sgml/pgupgrade.sgml
Fix potential corruption of lock table in CREATE/DROP INDEX CONCURRENTLY.
commit : c00dc337b8752ec959e27bfdc58e13f3d305154a
author : Tom Lane <[email protected]>
date : Tue, 8 Jan 2013 18:25:58 -0500
committer: Tom Lane <[email protected]>
date : Tue, 8 Jan 2013 18:25:58 -0500
If VirtualXactLock() has to wait for a transaction that holds its VXID lock
as a fast-path lock, it must first convert the fast-path lock to a regular
lock. It failed to take the required "partition" lock on the main
shared-memory lock table while doing so. This is the direct cause of the
assert failure in GetLockStatusData() recently observed in the buildfarm,
but more worryingly it could result in arbitrary corruption of the shared
lock table if some other process were concurrently engaged in modifying the
same partition of the lock table. Fortunately, VirtualXactLock() is only
used by CREATE INDEX CONCURRENTLY and DROP INDEX CONCURRENTLY, so the
opportunities for failure are fewer than they might have been.
In passing, improve some comments and be a bit more consistent about
order of operations.
M src/backend/storage/lmgr/lock.c
Fix typo
commit : f31d5baff6cda85554731926bd63268a3c0afa1c
author : Peter Eisentraut <[email protected]>
date : Mon, 7 Jan 2013 21:34:30 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 7 Jan 2013 21:34:30 -0500
M src/pl/plpython/plpy_resultobject.c
Fix a logic bug in pgindent.
commit : 74570db99c5fc1071762c12e220de2e65593368f
author : Andrew Dunstan <[email protected]>
date : Mon, 7 Jan 2013 12:26:27 -0500
committer: Andrew Dunstan <[email protected]>
date : Mon, 7 Jan 2013 12:26:27 -0500
M src/tools/pgindent/pgindent
Fix incorrect error message when schema-CREATE permission is absent.
commit : a0dc23f2058b3b2a3ab8c131914aba40f96db19f
author : Robert Haas <[email protected]>
date : Mon, 7 Jan 2013 11:54:59 -0500
committer: Robert Haas <[email protected]>
date : Mon, 7 Jan 2013 11:54:59 -0500
Report by me. Fix by KaiGai Kohei.
M src/backend/commands/alter.c
Add new "-q" logging option (quiet mode) while in initialize mode (-i), producing only one progress message per 5 seconds along with elapsed time and estimated remaining time. Also add elapsed time and estimated remaining time to the default logging(prints one message each 100000 rows). Patch contributed by Tomas Vondra, reviewed by Jeevan Chalke and Tatsuo Ishii.
commit : cf03ff6c4e6f3e6627ddc1cc0986b940828bcf98
author : Tatsuo Ishii <[email protected]>
date : Mon, 7 Jan 2013 11:13:44 +0900
committer: Tatsuo Ishii <[email protected]>
date : Mon, 7 Jan 2013 11:13:44 +0900
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Fix plpython build on older versions of OS X.
commit : 5aec9ccafe3b2b31b95ac69990704f260b8e1a63
author : Tom Lane <[email protected]>
date : Sun, 6 Jan 2013 15:49:53 -0500
committer: Tom Lane <[email protected]>
date : Sun, 6 Jan 2013 15:49:53 -0500
Pre-Lion versions of Apple's linker don't allow space between -F and its
argument. (Snow Leopard is nice enough to tell you that in so many words,
but older versions just fail with very obscure link errors, as seen on
buildfarm member locust for instance.) Oversight in commit
fc8745070a53469a43ecbf999dc5692a36a649cc.
M config/python.m4
M configure
Add support for generating minimal recovery.conf when doing base backups
commit : 915a29a10cdabfbe301dc7201299841339b9798f
author : Magnus Hagander <[email protected]>
date : Sat, 5 Jan 2013 16:54:06 +0100
committer: Magnus Hagander <[email protected]>
date : Sat, 5 Jan 2013 16:54:06 +0100
Adds commandline option -R to pg_basebackup that creates a recovery.conf which
enables standby mode using the same parameters that pg_basebackup used to
connect to the master, and writes it into the output directory (or injects it
in the tar file when tar format is used).
Zoltan Boszormenyi, modified by Magnus Hagander, reviewed by Amit Kapila & Fujii Masao
M doc/src/sgml/ref/pg_basebackup.sgml
M src/bin/pg_basebackup/pg_basebackup.c
Centralize single quote escaping in src/port/quotes.c
commit : 940d1366614a59713cdfd48daccd2ff9d26a4612
author : Magnus Hagander <[email protected]>
date : Sat, 5 Jan 2013 15:40:19 +0100
committer: Magnus Hagander <[email protected]>
date : Sat, 5 Jan 2013 15:40:19 +0100
For code-reuse in upcoming functionality in pg_basebackup.
Zoltan Boszormenyi
M src/bin/initdb/initdb.c
M src/include/port.h
M src/port/Makefile
A src/port/quotes.c
M src/tools/msvc/Mkvcbuild.pm
PL/Python: Make build on OS X more flexible
commit : fc8745070a53469a43ecbf999dc5692a36a649cc
author : Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:56:14 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:56:14 -0500
The PL/Python build on OS X was previously hardcoded to use the system
installation of Python, ignoring whatever was specified to configure.
Except that it would use the header files from configure, which could
lead to mismatches. It was not possible to build against a custom
Python installation.
Now, we check in configure how the specified Python installation was
built and use that, supporting framework and non-framework builds.
M config/python.m4
M configure
M src/Makefile.global.in
M src/pl/plpython/Makefile
Revert "PL/Python: Remove workaround for returning booleans in Python <2.3"
commit : 7e938e3c56590899bcfa587ad0220869cb9be951
author : Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:49:19 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:49:19 -0500
This reverts commit be0dfbad3671ed2503a2a661e70b48c5b364e069.
The previous information that Py_RETURN_TRUE and Py_RETURN_FALSE are
supported in Python 2.3 is wrong. They require Python 2.4. Update the
comment about that.
M src/pl/plpython/plpy_typeio.c
doc: Update CREATE FUNCTION compatibility information
commit : 9e6df606197395a5fea6efb13f6f443f420e7b39
author : Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:29:18 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:29:18 -0500
Parameter defaults are actually in the SQL standard, while it was
previously claimed they were not.
M doc/src/sgml/ref/create_function.sgml
Make some spelling more consistent
commit : 49e7a26d677b8ce92399542d96287b107ffe80d7
author : Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:25:21 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 5 Jan 2013 08:25:21 -0500
M src/backend/commands/typecmds.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_expr.c
M src/backend/utils/adt/rangetypes.c
Invent a "one-shot" variant of CachedPlans for better performance.
commit : 94afbd5831fbc1926f1c367ac14a45ccc29d313d
author : Tom Lane <[email protected]>
date : Fri, 4 Jan 2013 17:42:19 -0500
committer: Tom Lane <[email protected]>
date : Fri, 4 Jan 2013 17:42:19 -0500
SPI_execute() and related functions create a CachedPlan, execute it once,
and immediately discard it, so that the functionality offered by
plancache.c is of no value in this code path. And performance measurements
show that the extra data copying and invalidation checking done by
plancache.c slows down simple queries by 10% or more compared to 9.1.
However, enough of the SPI code is shared with functions that do need plan
caching that it seems impractical to bypass plancache.c altogether.
Instead, let's invent a variant version of cached plans that preserves
99% of the API but doesn't offer any of the actual functionality, nor the
overhead. This puts SPI_execute() performance back on par, or maybe even
slightly better, than it was before. This change should resolve recent
complaints of performance degradation from Dong Ye, Pavel Stehule, and
others.
By avoiding data copying, this change also reduces the amount of memory
needed to execute many-statement SPI_execute() strings, as for instance in
a recent complaint from Tomas Vondra.
An additional benefit of this change is that multi-statement SPI_execute()
query strings are now processed fully serially, that is we complete
execution of earlier statements before running parse analysis and planning
on following ones. This eliminates a long-standing POLA violation, in that
DDL that affects the behavior of a later statement will now behave as
expected.
Back-patch to 9.2, since this was a performance regression compared to 9.1.
(In 9.2, place the added struct fields so as to avoid changing the offsets
of existing fields.)
Heikki Linnakangas and Tom Lane
M doc/src/sgml/spi.sgml
M src/backend/executor/spi.c
M src/backend/utils/cache/plancache.c
M src/include/executor/spi_priv.h
M src/include/utils/plancache.h
Prevent creation of postmaster's TCP socket during pg_upgrade testing.
commit : 78a5e738e97b4dda89e1bfea60675bcf15f25994
author : Tom Lane <[email protected]>
date : Thu, 3 Jan 2013 18:34:51 -0500
committer: Tom Lane <[email protected]>
date : Thu, 3 Jan 2013 18:34:51 -0500
On non-Windows machines, we use the Unix socket for connections to test
postmasters, so there is no need to create a TCP socket. Furthermore,
doing so causes failures due to port conflicts if two builds are carried
out concurrently on one machine. (If the builds are done in different
chroots, which is standard practice at least in Red Hat distros, there
is no risk of conflict on the Unix socket.) Suppressing the TCP socket
by setting listen_addresses to empty has long been standard practice
for pg_regress, and pg_upgrade knows about this too ... but pg_upgrade's
test.sh didn't get the memo.
Back-patch to 9.2, and also sync the 9.2 version of the script with HEAD
as much as practical.
M contrib/pg_upgrade/test.sh
Tolerate timeline switches while "pg_basebackup -X fetch" is running.
commit : b0daba57bb50ca8bfb9d3ec886c5f86f7b3c006b
author : Heikki Linnakangas <[email protected]>
date : Thu, 3 Jan 2013 19:51:00 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 3 Jan 2013 19:51:00 +0200
If you take a base backup from a standby server with "pg_basebackup -X
fetch", and the timeline switches while the backup is being taken, the
backup used to fail with an error "requested WAL segment %s has already
been removed". This is because the server-side code that sends over the
required WAL files would not construct the WAL filename with the correct
timeline after a switch.
Fix that by using readdir() to scan pg_xlog for all the WAL segments in the
range, regardless of timeline.
Also, include all timeline history files in the backup, if taken with
"-X fetch". That fixes another related bug: If a timeline switch happened
just before the backup was initiated in a standby, the WAL segment
containing the initial checkpoint record contains WAL from the older
timeline too. Recovery will not accept that without a timeline history file
that lists the older timeline.
Backpatch to 9.2. Versions prior to that were not affected as you could not
take a base backup from a standby before 9.2.
M src/backend/access/transam/xlog.c
M src/backend/replication/basebackup.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
Delay reading timeline history file until it's fetched from master.
commit : ee994272ca50f70b53074f0febaec97e28f83c4e
author : Heikki Linnakangas <[email protected]>
date : Thu, 3 Jan 2013 10:41:58 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 3 Jan 2013 10:41:58 +0200
Streaming replication can fetch any missing timeline history files from the
master, but recovery would read the timeline history file for the target
timeline before reading the checkpoint record, and before walreceiver has
had a chance to fetch it from the master. Delay reading it, and the sanity
checks involving timeline history, until after reading the checkpoint
record.
There is at least one scenario where this makes a difference: if you take
a base backup from a standby server right after a timeline switch, the
WAL segment containing the initial checkpoint record will begin with an
older timeline ID. Without the timeline history file, recovering that file
will fail as the older timeline ID is not recognized to be an ancestor of
the target timeline. If you try to recover from such a backup, using only
streaming replication to fetch the WAL, this patch is required for that to
work.
M src/backend/access/transam/xlog.c
M src/backend/replication/walreceiver.c
Adjust a few pg_upgrade functions to return void.
commit : bcbe99244f41950dcfb7be9d9badc3b31e596867
author : Bruce Momjian <[email protected]>
date : Wed, 2 Jan 2013 21:20:13 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 2 Jan 2013 21:20:13 -0500
Adjust pg_upgrade page conversion functions (which are not used) to
return void so transfer_all_new_dbs can return void.
M contrib/pg_upgrade/page.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Fix IsUnderPostmaster/EXEC_BACKEND confusion
commit : 84f6fb81b8cb69c8da479d74e5b8078f6a1395c3
author : Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 18:39:20 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 18:39:20 -0300
M src/backend/bootstrap/bootstrap.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/postinit.c
Set MaxBackends only on bootstrap and standalone modes
commit : 15658911d9947cda031a42bcbc3e2b745dff8f49
author : Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 17:49:06 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 17:49:06 -0300
... not on auxiliary processes. I managed to overlook the fact that I
had disabled assertions on my HEAD checkout long ago.
Hopefully this will turn the buildfarm green again, and put an end to
today's silliness.
M src/backend/tcop/postgres.c
M src/backend/utils/init/postinit.c
Move tar function headers to pgtar.h
commit : 794397ae1d1c6d33d11a9b0951a420c2082bcd6c
author : Magnus Hagander <[email protected]>
date : Wed, 2 Jan 2013 20:34:08 +0100
committer: Magnus Hagander <[email protected]>
date : Wed, 2 Jan 2013 20:34:08 +0100
This makes it possible to include them only where they are used, so
we can avoid the conflict of the uid_t and gid_t datatypes that happened
in plperl (since plperl doesn't need the tar functions)
M src/backend/replication/basebackup.c
M src/bin/pg_dump/pg_backup_tar.c
A src/include/pgtar.h
M src/include/port.h
M src/port/tar.c
Make sure MaxBackends is always set
commit : dfbba2c86cc8f09cf3ffca3d305b4ce54a7fb49a
author : Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 14:39:11 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 14:39:11 -0300
Auxiliary and bootstrap processes weren't getting it, causing initdb to
fail completely.
M src/backend/postmaster/postmaster.c
M src/backend/utils/init/postinit.c
M src/include/miscadmin.h
Fix background workers for EXEC_BACKEND
commit : cdbc0ca48ca96e5c787b1605ed2d6cf7407a5acf
author : Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 12:01:14 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 2 Jan 2013 12:01:14 -0300
Commit da07a1e8 was broken for EXEC_BACKEND because I failed to realize
that the MaxBackends recomputation needed to be duplicated by
subprocesses in SubPostmasterMain. However, instead of having the value
be recomputed at all, it's better to assign the correct value at
postmaster initialization time, and have it be propagated to exec'ed
backends via BackendParameters.
MaxBackends stays as zero until after modules in
shared_preload_libraries have had a chance to register bgworkers, since
the value is going to be untrustworthy till that's finished.
Heikki Linnakangas and Álvaro Herrera
M src/backend/postmaster/postmaster.c
M src/backend/utils/init/globals.c
M src/backend/utils/misc/guc.c
M src/include/postmaster/postmaster.h
Fix bug in streaming replication over multiple tli switches.
commit : d194d7a52630d855f43edbf0129e131099af6c14
author : Heikki Linnakangas <[email protected]>
date : Wed, 2 Jan 2013 14:35:15 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 2 Jan 2013 14:35:15 +0200
After receiving some WAL over streaming replication, try to open the file
from the timeline we're currently recieving, not recoveryTargetTLI. They
are usually the same, which is why wasn't noticed before, but you'd get
an error if there have been more than one timeline switch between the
current point in WAL and the recovery target.
M src/backend/access/transam/xlog.c
Fix silly typo in code, which broke the check for reaching consistency.
commit : 4ffd589f44b8687cee1714c5c63f03487b2ae570
author : Heikki Linnakangas <[email protected]>
date : Wed, 2 Jan 2013 13:42:15 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 2 Jan 2013 13:42:15 +0200
M src/backend/access/transam/xlog.c
Update copyrights for 2013
commit : bd61a623ace3f3db8da1c7936416706968ae6ec2
author : Bruce Momjian <[email protected]>
date : Tue, 1 Jan 2013 17:15:01 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 1 Jan 2013 17:15:01 -0500
Fully update git head, and update back branches in ./COPYRIGHT and
legal.sgml files.
M COPYRIGHT
M configure
M configure.in
M contrib/adminpack/adminpack.c
M contrib/auto_explain/auto_explain.c
M contrib/dblink/dblink.c
M contrib/dblink/dblink.h
M contrib/dict_int/dict_int.c
M contrib/dict_xsyn/dict_xsyn.c
M contrib/dummy_seclabel/dummy_seclabel.c
M contrib/file_fdw/file_fdw.c
M contrib/fuzzystrmatch/fuzzystrmatch.c
M contrib/fuzzystrmatch/levenshtein.c
M contrib/isn/isn.c
M contrib/isn/isn.h
M contrib/pageinspect/fsmfuncs.c
M contrib/pageinspect/heapfuncs.c
M contrib/pageinspect/rawpage.c
M contrib/passwordcheck/passwordcheck.c
M contrib/pg_stat_statements/pg_stat_statements.c
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/function.c
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/page.c
M contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/server.c
M contrib/pg_upgrade/tablespace.c
M contrib/pg_upgrade/test.sh
M contrib/pg_upgrade/util.c
M contrib/pg_upgrade/version.c
M contrib/pg_upgrade/version_old_8_3.c
M contrib/pg_upgrade_support/pg_upgrade_support.c
M contrib/pgbench/pgbench.c
M contrib/sepgsql/database.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/launcher
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/uavc.c
M contrib/tablefunc/tablefunc.c
M contrib/tablefunc/tablefunc.h
M contrib/tcn/tcn.c
M contrib/test_parser/test_parser.c
M contrib/tsearch2/tsearch2.c
M contrib/unaccent/unaccent.c
M contrib/uuid-ossp/uuid-ossp.c
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/generate-errcodes-table.pl
M doc/src/sgml/legal.sgml
M src/backend/Makefile
M src/backend/access/common/heaptuple.c
M src/backend/access/common/indextuple.c
M src/backend/access/common/printtup.c
M src/backend/access/common/reloptions.c
M src/backend/access/common/scankey.c
M src/backend/access/common/tupconvert.c
M src/backend/access/common/tupdesc.c
M src/backend/access/gin/ginarrayproc.c
M src/backend/access/gin/ginbtree.c
M src/backend/access/gin/ginbulk.c
M src/backend/access/gin/gindatapage.c
M src/backend/access/gin/ginentrypage.c
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/ginget.c
M src/backend/access/gin/gininsert.c
M src/backend/access/gin/ginscan.c
M src/backend/access/gin/ginutil.c
M src/backend/access/gin/ginvacuum.c
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistproc.c
M src/backend/access/gist/gistscan.c
M src/backend/access/gist/gistsplit.c
M src/backend/access/gist/gistutil.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hash.c
M src/backend/access/hash/hashfunc.c
M src/backend/access/hash/hashinsert.c
M src/backend/access/hash/hashovfl.c
M src/backend/access/hash/hashpage.c
M src/backend/access/hash/hashscan.c
M src/backend/access/hash/hashsearch.c
M src/backend/access/hash/hashsort.c
M src/backend/access/hash/hashutil.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/heap/syncscan.c
M src/backend/access/heap/tuptoaster.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/index/genam.c
M src/backend/access/index/indexam.c
M src/backend/access/nbtree/nbtcompare.c
M src/backend/access/nbtree/nbtinsert.c
M src/backend/access/nbtree/nbtpage.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsearch.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtutils.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/rmgrdesc/clogdesc.c
M src/backend/access/rmgrdesc/dbasedesc.c
M src/backend/access/rmgrdesc/gindesc.c
M src/backend/access/rmgrdesc/gistdesc.c
M src/backend/access/rmgrdesc/hashdesc.c
M src/backend/access/rmgrdesc/heapdesc.c
M src/backend/access/rmgrdesc/mxactdesc.c
M src/backend/access/rmgrdesc/nbtdesc.c
M src/backend/access/rmgrdesc/relmapdesc.c
M src/backend/access/rmgrdesc/seqdesc.c
M src/backend/access/rmgrdesc/smgrdesc.c
M src/backend/access/rmgrdesc/spgdesc.c
M src/backend/access/rmgrdesc/standbydesc.c
M src/backend/access/rmgrdesc/tblspcdesc.c
M src/backend/access/rmgrdesc/xactdesc.c
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/spgist/spgkdtreeproc.c
M src/backend/access/spgist/spgquadtreeproc.c
M src/backend/access/spgist/spgscan.c
M src/backend/access/spgist/spgtextproc.c
M src/backend/access/spgist/spgutils.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/subtrans.c
M src/backend/access/transam/timeline.c
M src/backend/access/transam/transam.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/twophase_rmgr.c
M src/backend/access/transam/varsup.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogarchive.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/access/transam/xlogutils.c
M src/backend/bootstrap/bootparse.y
M src/backend/bootstrap/bootscanner.l
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/Catalog.pm
M src/backend/catalog/aclchk.c
M src/backend/catalog/catalog.c
M src/backend/catalog/dependency.c
M src/backend/catalog/genbki.pl
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/indexing.c
M src/backend/catalog/information_schema.sql
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_db_role_setting.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_inherits.c
M src/backend/catalog/pg_largeobject.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_range.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/pg_type.c
M src/backend/catalog/storage.c
M src/backend/catalog/system_views.sql
M src/backend/catalog/toasting.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/analyze.c
M src/backend/commands/async.c
M src/backend/commands/cluster.c
M src/backend/commands/collationcmds.c
M src/backend/commands/comment.c
M src/backend/commands/constraint.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/copy.c
M src/backend/commands/createas.c
M src/backend/commands/dbcommands.c
M src/backend/commands/define.c
M src/backend/commands/discard.c
M src/backend/commands/dropcmds.c
M src/backend/commands/event_trigger.c
M src/backend/commands/explain.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/lockcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/proclang.c
M src/backend/commands/schemacmds.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/variable.c
M src/backend/commands/view.c
M src/backend/executor/execAmi.c
M src/backend/executor/execCurrent.c
M src/backend/executor/execGrouping.c
M src/backend/executor/execJunk.c
M src/backend/executor/execMain.c
M src/backend/executor/execProcnode.c
M src/backend/executor/execQual.c
M src/backend/executor/execScan.c
M src/backend/executor/execTuples.c
M src/backend/executor/execUtils.c
M src/backend/executor/functions.c
M src/backend/executor/instrument.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeAppend.c
M src/backend/executor/nodeBitmapAnd.c
M src/backend/executor/nodeBitmapHeapscan.c
M src/backend/executor/nodeBitmapIndexscan.c
M src/backend/executor/nodeBitmapOr.c
M src/backend/executor/nodeCtescan.c
M src/backend/executor/nodeForeignscan.c
M src/backend/executor/nodeFunctionscan.c
M src/backend/executor/nodeGroup.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeIndexonlyscan.c
M src/backend/executor/nodeIndexscan.c
M src/backend/executor/nodeLimit.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeMaterial.c
M src/backend/executor/nodeMergeAppend.c
M src/backend/executor/nodeMergejoin.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeNestloop.c
M src/backend/executor/nodeRecursiveunion.c
M src/backend/executor/nodeResult.c
M src/backend/executor/nodeSeqscan.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/nodeSort.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeSubqueryscan.c
M src/backend/executor/nodeTidscan.c
M src/backend/executor/nodeUnique.c
M src/backend/executor/nodeValuesscan.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/executor/nodeWorktablescan.c
M src/backend/executor/spi.c
M src/backend/executor/tstoreReceiver.c
M src/backend/foreign/foreign.c
M src/backend/lib/binaryheap.c
M src/backend/lib/ilist.c
M src/backend/lib/stringinfo.c
M src/backend/libpq/auth.c
M src/backend/libpq/be-fsstubs.c
M src/backend/libpq/be-secure.c
M src/backend/libpq/crypt.c
M src/backend/libpq/hba.c
M src/backend/libpq/ip.c
M src/backend/libpq/md5.c
M src/backend/libpq/pqcomm.c
M src/backend/libpq/pqformat.c
M src/backend/libpq/pqsignal.c
M src/backend/main/main.c
M src/backend/nodes/bitmapset.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/list.c
M src/backend/nodes/makefuncs.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/nodes.c
M src/backend/nodes/outfuncs.c
M src/backend/nodes/params.c
M src/backend/nodes/print.c
M src/backend/nodes/read.c
M src/backend/nodes/readfuncs.c
M src/backend/nodes/tidbitmap.c
M src/backend/nodes/value.c
M src/backend/optimizer/geqo/geqo_copy.c
M src/backend/optimizer/geqo/geqo_eval.c
M src/backend/optimizer/geqo/geqo_main.c
M src/backend/optimizer/geqo/geqo_misc.c
M src/backend/optimizer/geqo/geqo_pool.c
M src/backend/optimizer/geqo/geqo_random.c
M src/backend/optimizer/geqo/geqo_selection.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/clausesel.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/orindxpath.c
M src/backend/optimizer/path/pathkeys.c
M src/backend/optimizer/path/tidpath.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/plan/setrefs.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepqual.c
M src/backend/optimizer/prep/preptlist.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/joininfo.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/plancat.c
M src/backend/optimizer/util/predtest.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/restrictinfo.c
M src/backend/optimizer/util/tlist.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/check_keywords.pl
M src/backend/parser/gram.y
M src/backend/parser/keywords.c
M src/backend/parser/kwlookup.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_collate.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_param.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_type.c
M src/backend/parser/parse_utilcmd.c
M src/backend/parser/parser.c
M src/backend/parser/scan.l
M src/backend/parser/scansup.c
M src/backend/port/dynloader/aix.h
M src/backend/port/dynloader/cygwin.h
M src/backend/port/dynloader/freebsd.c
M src/backend/port/dynloader/freebsd.h
M src/backend/port/dynloader/hpux.c
M src/backend/port/dynloader/hpux.h
M src/backend/port/dynloader/irix.h
M src/backend/port/dynloader/linux.c
M src/backend/port/dynloader/linux.h
M src/backend/port/dynloader/netbsd.c
M src/backend/port/dynloader/netbsd.h
M src/backend/port/dynloader/openbsd.c
M src/backend/port/dynloader/openbsd.h
M src/backend/port/dynloader/osf.h
M src/backend/port/dynloader/sco.h
M src/backend/port/dynloader/solaris.h
M src/backend/port/dynloader/unixware.h
M src/backend/port/ipc_test.c
M src/backend/port/posix_sema.c
M src/backend/port/sysv_sema.c
M src/backend/port/sysv_shmem.c
M src/backend/port/tas/sunstudio_sparc.s
M src/backend/port/tas/sunstudio_x86.s
M src/backend/port/unix_latch.c
M src/backend/port/win32/crashdump.c
M src/backend/port/win32/mingwcompat.c
M src/backend/port/win32/security.c
M src/backend/port/win32/signal.c
M src/backend/port/win32/socket.c
M src/backend/port/win32/timer.c
M src/backend/port/win32_latch.c
M src/backend/port/win32_sema.c
M src/backend/port/win32_shmem.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/fork_process.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/startup.c
M src/backend/postmaster/syslogger.c
M src/backend/postmaster/walwriter.c
M src/backend/regex/regc_pg_locale.c
M src/backend/regex/regprefix.c
M src/backend/replication/basebackup.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/repl_gram.y
M src/backend/replication/repl_scanner.l
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteManip.c
M src/backend/rewrite/rewriteRemove.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/snowball/dict_snowball.c
M src/backend/storage/buffer/buf_init.c
M src/backend/storage/buffer/buf_table.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/freelist.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/file/buffile.c
M src/backend/storage/file/copydir.c
M src/backend/storage/file/fd.c
M src/backend/storage/file/reinit.c
M src/backend/storage/freespace/freespace.c
M src/backend/storage/freespace/fsmpage.c
M src/backend/storage/freespace/indexfsm.c
M src/backend/storage/ipc/ipc.c
M src/backend/storage/ipc/ipci.c
M src/backend/storage/ipc/pmsignal.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/ipc/shmem.c
M src/backend/storage/ipc/shmqueue.c
M src/backend/storage/ipc/sinval.c
M src/backend/storage/ipc/sinvaladt.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/large_object/inv_api.c
M src/backend/storage/lmgr/deadlock.c
M src/backend/storage/lmgr/lmgr.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/lmgr/proc.c
M src/backend/storage/lmgr/s_lock.c
M src/backend/storage/lmgr/spin.c
M src/backend/storage/page/bufpage.c
M src/backend/storage/page/itemptr.c
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
M src/backend/storage/smgr/smgrtype.c
M src/backend/tcop/dest.c
M src/backend/tcop/fastpath.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/backend/tsearch/Makefile
M src/backend/tsearch/dict.c
M src/backend/tsearch/dict_ispell.c
M src/backend/tsearch/dict_simple.c
M src/backend/tsearch/dict_synonym.c
M src/backend/tsearch/dict_thesaurus.c
M src/backend/tsearch/regis.c
M src/backend/tsearch/spell.c
M src/backend/tsearch/to_tsany.c
M src/backend/tsearch/ts_locale.c
M src/backend/tsearch/ts_parse.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/tsearch/ts_typanalyze.c
M src/backend/tsearch/ts_utils.c
M src/backend/tsearch/wparser.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/Gen_dummy_probes.sed
M src/backend/utils/Gen_fmgrtab.pl
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/array_selfuncs.c
M src/backend/utils/adt/array_typanalyze.c
M src/backend/utils/adt/array_userfuncs.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/arrayutils.c
M src/backend/utils/adt/ascii.c
M src/backend/utils/adt/bool.c
M src/backend/utils/adt/char.c
M src/backend/utils/adt/date.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/datum.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/domains.c
M src/backend/utils/adt/encode.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/float.c
M src/backend/utils/adt/format_type.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/geo_ops.c
M src/backend/utils/adt/geo_selfuncs.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c
M src/backend/utils/adt/json.c
M src/backend/utils/adt/like.c
M src/backend/utils/adt/like_match.c
M src/backend/utils/adt/lockfuncs.c
M src/backend/utils/adt/misc.c
M src/backend/utils/adt/nabstime.c
M src/backend/utils/adt/name.c
M src/backend/utils/adt/numeric.c
M src/backend/utils/adt/numutils.c
M src/backend/utils/adt/oid.c
M src/backend/utils/adt/oracle_compat.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pg_lzcompress.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/pseudotypes.c
M src/backend/utils/adt/quote.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/backend/utils/adt/rangetypes_selfuncs.c
M src/backend/utils/adt/rangetypes_spgist.c
M src/backend/utils/adt/rangetypes_typanalyze.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/rowtypes.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/tid.c
M src/backend/utils/adt/timestamp.c
M src/backend/utils/adt/trigfuncs.c
M src/backend/utils/adt/tsginidx.c
M src/backend/utils/adt/tsgistidx.c
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsquery_cleanup.c
M src/backend/utils/adt/tsquery_gist.c
M src/backend/utils/adt/tsquery_op.c
M src/backend/utils/adt/tsquery_rewrite.c
M src/backend/utils/adt/tsquery_util.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/tsvector.c
M src/backend/utils/adt/tsvector_op.c
M src/backend/utils/adt/tsvector_parser.c
M src/backend/utils/adt/txid.c
M src/backend/utils/adt/uuid.c
M src/backend/utils/adt/varbit.c
M src/backend/utils/adt/varchar.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/adt/version.c
M src/backend/utils/adt/windowfuncs.c
M src/backend/utils/adt/xid.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/attoptcache.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/evtcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/relmapper.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/errcodes.txt
M src/backend/utils/error/assert.c
M src/backend/utils/error/elog.c
M src/backend/utils/fmgr/dfmgr.c
M src/backend/utils/fmgr/fmgr.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/generate-errcodes.pl
M src/backend/utils/hash/dynahash.c
M src/backend/utils/hash/hashfn.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/mb/Unicode/Makefile
M src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
M src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
M src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
M src/backend/utils/mb/Unicode/UCS_to_most.pl
M src/backend/utils/mb/Unicode/ucs2utf.pl
M src/backend/utils/mb/conv.c
M src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c
M src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c
M src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
M src/backend/utils/mb/conversion_procs/euc_cn_and_mic/euc_cn_and_mic.c
M src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c
M src/backend/utils/mb/conversion_procs/euc_kr_and_mic/euc_kr_and_mic.c
M src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
M src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c
M src/backend/utils/mb/conversion_procs/latin_and_mic/latin_and_mic.c
M src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c
M src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c
M src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c
M src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c
M src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c
M src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c
M src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
M src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c
M src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c
M src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c
M src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c
M src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c
M src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/help_config.c
M src/backend/utils/misc/pg_rusage.c
M src/backend/utils/misc/ps_status.c
M src/backend/utils/misc/rbtree.c
M src/backend/utils/misc/superuser.c
M src/backend/utils/misc/timeout.c
M src/backend/utils/misc/tzparser.c
M src/backend/utils/mmgr/aset.c
M src/backend/utils/mmgr/mcxt.c
M src/backend/utils/mmgr/portalmem.c
M src/backend/utils/probes.d
M src/backend/utils/resowner/resowner.c
M src/backend/utils/sort/logtape.c
M src/backend/utils/sort/sortsupport.c
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/sort/tuplestore.c
M src/backend/utils/time/combocid.c
M src/backend/utils/time/snapmgr.c
M src/backend/utils/time/tqual.c
M src/bin/Makefile
M src/bin/initdb/Makefile
M src/bin/initdb/findtimezone.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/Makefile
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_config/Makefile
M src/bin/pg_config/pg_config.c
M src/bin/pg_controldata/Makefile
M src/bin/pg_ctl/Makefile
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/Makefile
M src/bin/pg_dump/common.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/compress_io.h
M src/bin/pg_dump/dumpmem.c
M src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/dumputils.h
M src/bin/pg_dump/keywords.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_resetxlog/Makefile
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/pgevent/Makefile
M src/bin/psql/Makefile
M src/bin/psql/command.c
M src/bin/psql/command.h
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/psql/copy.c
M src/bin/psql/copy.h
M src/bin/psql/create_help.pl
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
M src/bin/psql/help.h
M src/bin/psql/input.c
M src/bin/psql/input.h
M src/bin/psql/large_obj.c
M src/bin/psql/large_obj.h
M src/bin/psql/mainloop.c
M src/bin/psql/mainloop.h
M src/bin/psql/mbprint.c
M src/bin/psql/print.c
M src/bin/psql/print.h
M src/bin/psql/prompt.c
M src/bin/psql/prompt.h
M src/bin/psql/psqlscan.h
M src/bin/psql/psqlscan.l
M src/bin/psql/settings.h
M src/bin/psql/startup.c
M src/bin/psql/stringutils.c
M src/bin/psql/stringutils.h
M src/bin/psql/tab-complete.c
M src/bin/psql/tab-complete.h
M src/bin/psql/variables.c
M src/bin/psql/variables.h
M src/bin/scripts/Makefile
M src/bin/scripts/clusterdb.c
M src/bin/scripts/common.c
M src/bin/scripts/common.h
M src/bin/scripts/createdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/createuser.c
M src/bin/scripts/dropdb.c
M src/bin/scripts/droplang.c
M src/bin/scripts/dropuser.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
M src/include/access/attnum.h
M src/include/access/clog.h
M src/include/access/genam.h
M src/include/access/gin.h
M src/include/access/gin_private.h
M src/include/access/gist.h
M src/include/access/gist_private.h
M src/include/access/gistscan.h
M src/include/access/hash.h
M src/include/access/heapam.h
M src/include/access/heapam_xlog.h
M src/include/access/hio.h
M src/include/access/htup.h
M src/include/access/htup_details.h
M src/include/access/itup.h
M src/include/access/multixact.h
M src/include/access/nbtree.h
M src/include/access/printtup.h
M src/include/access/reloptions.h
M src/include/access/relscan.h
M src/include/access/rewriteheap.h
M src/include/access/sdir.h
M src/include/access/skey.h
M src/include/access/slru.h
M src/include/access/spgist.h
M src/include/access/spgist_private.h
M src/include/access/subtrans.h
M src/include/access/sysattr.h
M src/include/access/timeline.h
M src/include/access/transam.h
M src/include/access/tupconvert.h
M src/include/access/tupdesc.h
M src/include/access/tupmacs.h
M src/include/access/tuptoaster.h
M src/include/access/twophase.h
M src/include/access/twophase_rmgr.h
M src/include/access/valid.h
M src/include/access/visibilitymap.h
M src/include/access/xact.h
M src/include/access/xlog.h
M src/include/access/xlog_fn.h
M src/include/access/xlog_internal.h
M src/include/access/xlogdefs.h
M src/include/access/xlogutils.h
M src/include/bootstrap/bootstrap.h
M src/include/c.h
M src/include/catalog/catalog.h
M src/include/catalog/catversion.h
M src/include/catalog/dependency.h
M src/include/catalog/genbki.h
M src/include/catalog/heap.h
M src/include/catalog/index.h
M src/include/catalog/indexing.h
M src/include/catalog/namespace.h
M src/include/catalog/objectaccess.h
M src/include/catalog/objectaddress.h
M src/include/catalog/pg_aggregate.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_attrdef.h
M src/include/catalog/pg_attribute.h
M src/include/catalog/pg_auth_members.h
M src/include/catalog/pg_authid.h
M src/include/catalog/pg_cast.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_collation.h
M src/include/catalog/pg_collation_fn.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_control.h
M src/include/catalog/pg_conversion.h
M src/include/catalog/pg_conversion_fn.h
M src/include/catalog/pg_database.h
M src/include/catalog/pg_db_role_setting.h
M src/include/catalog/pg_default_acl.h
M src/include/catalog/pg_depend.h
M src/include/catalog/pg_description.h
M src/include/catalog/pg_enum.h
M src/include/catalog/pg_event_trigger.h
M src/include/catalog/pg_extension.h
M src/include/catalog/pg_foreign_data_wrapper.h
M src/include/catalog/pg_foreign_server.h
M src/include/catalog/pg_foreign_table.h
M src/include/catalog/pg_index.h
M src/include/catalog/pg_inherits.h
M src/include/catalog/pg_inherits_fn.h
M src/include/catalog/pg_language.h
M src/include/catalog/pg_largeobject.h
M src/include/catalog/pg_largeobject_metadata.h
M src/include/catalog/pg_namespace.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_opfamily.h
M src/include/catalog/pg_pltemplate.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_proc_fn.h
M src/include/catalog/pg_range.h
M src/include/catalog/pg_rewrite.h
M src/include/catalog/pg_seclabel.h
M src/include/catalog/pg_shdepend.h
M src/include/catalog/pg_shdescription.h
M src/include/catalog/pg_shseclabel.h
M src/include/catalog/pg_statistic.h
M src/include/catalog/pg_tablespace.h
M src/include/catalog/pg_trigger.h
M src/include/catalog/pg_ts_config.h
M src/include/catalog/pg_ts_config_map.h
M src/include/catalog/pg_ts_dict.h
M src/include/catalog/pg_ts_parser.h
M src/include/catalog/pg_ts_template.h
M src/include/catalog/pg_type.h
M src/include/catalog/pg_type_fn.h
M src/include/catalog/pg_user_mapping.h
M src/include/catalog/storage.h
M src/include/catalog/storage_xlog.h
M src/include/catalog/toasting.h
M src/include/commands/alter.h
M src/include/commands/async.h
M src/include/commands/cluster.h
M src/include/commands/collationcmds.h
M src/include/commands/comment.h
M src/include/commands/conversioncmds.h
M src/include/commands/copy.h
M src/include/commands/createas.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/discard.h
M src/include/commands/event_trigger.h
M src/include/commands/explain.h
M src/include/commands/extension.h
M src/include/commands/lockcmds.h
M src/include/commands/portalcmds.h
M src/include/commands/prepare.h
M src/include/commands/schemacmds.h
M src/include/commands/seclabel.h
M src/include/commands/sequence.h
M src/include/commands/tablecmds.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/commands/typecmds.h
M src/include/commands/vacuum.h
M src/include/commands/variable.h
M src/include/commands/view.h
M src/include/datatype/timestamp.h
M src/include/executor/execdebug.h
M src/include/executor/execdesc.h
M src/include/executor/executor.h
M src/include/executor/functions.h
M src/include/executor/hashjoin.h
M src/include/executor/instrument.h
M src/include/executor/nodeAgg.h
M src/include/executor/nodeAppend.h
M src/include/executor/nodeBitmapAnd.h
M src/include/executor/nodeBitmapHeapscan.h
M src/include/executor/nodeBitmapIndexscan.h
M src/include/executor/nodeBitmapOr.h
M src/include/executor/nodeCtescan.h
M src/include/executor/nodeForeignscan.h
M src/include/executor/nodeFunctionscan.h
M src/include/executor/nodeGroup.h
M src/include/executor/nodeHash.h
M src/include/executor/nodeHashjoin.h
M src/include/executor/nodeIndexonlyscan.h
M src/include/executor/nodeIndexscan.h
M src/include/executor/nodeLimit.h
M src/include/executor/nodeLockRows.h
M src/include/executor/nodeMaterial.h
M src/include/executor/nodeMergeAppend.h
M src/include/executor/nodeMergejoin.h
M src/include/executor/nodeModifyTable.h
M src/include/executor/nodeNestloop.h
M src/include/executor/nodeRecursiveunion.h
M src/include/executor/nodeResult.h
M src/include/executor/nodeSeqscan.h
M src/include/executor/nodeSetOp.h
M src/include/executor/nodeSort.h
M src/include/executor/nodeSubplan.h
M src/include/executor/nodeSubqueryscan.h
M src/include/executor/nodeTidscan.h
M src/include/executor/nodeUnique.h
M src/include/executor/nodeValuesscan.h
M src/include/executor/nodeWindowAgg.h
M src/include/executor/nodeWorktablescan.h
M src/include/executor/spi.h
M src/include/executor/spi_priv.h
M src/include/executor/tstoreReceiver.h
M src/include/executor/tuptable.h
M src/include/fmgr.h
M src/include/foreign/fdwapi.h
M src/include/foreign/foreign.h
M src/include/funcapi.h
M src/include/getaddrinfo.h
M src/include/getopt_long.h
M src/include/lib/binaryheap.h
M src/include/lib/ilist.h
M src/include/lib/stringinfo.h
M src/include/libpq/auth.h
M src/include/libpq/be-fsstubs.h
M src/include/libpq/crypt.h
M src/include/libpq/ip.h
M src/include/libpq/libpq-be.h
M src/include/libpq/libpq-fs.h
M src/include/libpq/libpq.h
M src/include/libpq/md5.h
M src/include/libpq/pqcomm.h
M src/include/libpq/pqformat.h
M src/include/libpq/pqsignal.h
M src/include/mb/pg_wchar.h
M src/include/miscadmin.h
M src/include/nodes/bitmapset.h
M src/include/nodes/execnodes.h
M src/include/nodes/makefuncs.h
M src/include/nodes/memnodes.h
M src/include/nodes/nodeFuncs.h
M src/include/nodes/nodes.h
M src/include/nodes/params.h
M src/include/nodes/parsenodes.h
M src/include/nodes/pg_list.h
M src/include/nodes/plannodes.h
M src/include/nodes/primnodes.h
M src/include/nodes/print.h
M src/include/nodes/readfuncs.h
M src/include/nodes/relation.h
M src/include/nodes/replnodes.h
M src/include/nodes/tidbitmap.h
M src/include/nodes/value.h
M src/include/optimizer/clauses.h
M src/include/optimizer/cost.h
M src/include/optimizer/geqo.h
M src/include/optimizer/geqo_copy.h
M src/include/optimizer/geqo_gene.h
M src/include/optimizer/geqo_misc.h
M src/include/optimizer/geqo_mutation.h
M src/include/optimizer/geqo_pool.h
M src/include/optimizer/geqo_random.h
M src/include/optimizer/geqo_recombination.h
M src/include/optimizer/geqo_selection.h
M src/include/optimizer/joininfo.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/paths.h
M src/include/optimizer/placeholder.h
M src/include/optimizer/plancat.h
M src/include/optimizer/planmain.h
M src/include/optimizer/planner.h
M src/include/optimizer/predtest.h
M src/include/optimizer/prep.h
M src/include/optimizer/restrictinfo.h
M src/include/optimizer/subselect.h
M src/include/optimizer/tlist.h
M src/include/optimizer/var.h
M src/include/parser/analyze.h
M src/include/parser/gramparse.h
M src/include/parser/keywords.h
M src/include/parser/kwlist.h
M src/include/parser/parse_agg.h
M src/include/parser/parse_clause.h
M src/include/parser/parse_coerce.h
M src/include/parser/parse_collate.h
M src/include/parser/parse_cte.h
M src/include/parser/parse_expr.h
M src/include/parser/parse_func.h
M src/include/parser/parse_node.h
M src/include/parser/parse_oper.h
M src/include/parser/parse_param.h
M src/include/parser/parse_relation.h
M src/include/parser/parse_target.h
M src/include/parser/parse_type.h
M src/include/parser/parse_utilcmd.h
M src/include/parser/parser.h
M src/include/parser/parsetree.h
M src/include/parser/scanner.h
M src/include/parser/scansup.h
M src/include/pg_config_manual.h
M src/include/pg_trace.h
M src/include/pgstat.h
M src/include/pgtime.h
M src/include/port.h
M src/include/portability/instr_time.h
M src/include/postgres.h
M src/include/postgres_fe.h
M src/include/postmaster/autovacuum.h
M src/include/postmaster/bgworker.h
M src/include/postmaster/bgwriter.h
M src/include/postmaster/fork_process.h
M src/include/postmaster/pgarch.h
M src/include/postmaster/postmaster.h
M src/include/postmaster/startup.h
M src/include/postmaster/syslogger.h
M src/include/postmaster/walwriter.h
M src/include/replication/basebackup.h
M src/include/replication/syncrep.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/replication/walsender_private.h
M src/include/rewrite/prs2lock.h
M src/include/rewrite/rewriteDefine.h
M src/include/rewrite/rewriteHandler.h
M src/include/rewrite/rewriteManip.h
M src/include/rewrite/rewriteRemove.h
M src/include/rewrite/rewriteSupport.h
M src/include/rusagestub.h
M src/include/snowball/header.h
M src/include/storage/backendid.h
M src/include/storage/barrier.h
M src/include/storage/block.h
M src/include/storage/buf.h
M src/include/storage/buf_internals.h
M src/include/storage/buffile.h
M src/include/storage/bufmgr.h
M src/include/storage/bufpage.h
M src/include/storage/copydir.h
M src/include/storage/fd.h
M src/include/storage/freespace.h
M src/include/storage/fsm_internals.h
M src/include/storage/indexfsm.h
M src/include/storage/ipc.h
M src/include/storage/item.h
M src/include/storage/itemid.h
M src/include/storage/itemptr.h
M src/include/storage/large_object.h
M src/include/storage/latch.h
M src/include/storage/lmgr.h
M src/include/storage/lock.h
M src/include/storage/lwlock.h
M src/include/storage/off.h
M src/include/storage/pg_sema.h
M src/include/storage/pg_shmem.h
M src/include/storage/pmsignal.h
M src/include/storage/pos.h
M src/include/storage/predicate.h
M src/include/storage/predicate_internals.h
M src/include/storage/proc.h
M src/include/storage/procarray.h
M src/include/storage/procsignal.h
M src/include/storage/reinit.h
M src/include/storage/relfilenode.h
M src/include/storage/s_lock.h
M src/include/storage/shmem.h
M src/include/storage/sinval.h
M src/include/storage/sinvaladt.h
M src/include/storage/smgr.h
M src/include/storage/spin.h
M src/include/storage/standby.h
M src/include/tcop/dest.h
M src/include/tcop/fastpath.h
M src/include/tcop/pquery.h
M src/include/tcop/tcopdebug.h
M src/include/tcop/tcopprot.h
M src/include/tcop/utility.h
M src/include/tsearch/dicts/regis.h
M src/include/tsearch/dicts/spell.h
M src/include/tsearch/ts_cache.h
M src/include/tsearch/ts_locale.h
M src/include/tsearch/ts_public.h
M src/include/tsearch/ts_type.h
M src/include/tsearch/ts_utils.h
M src/include/utils/acl.h
M src/include/utils/array.h
M src/include/utils/ascii.h
M src/include/utils/attoptcache.h
M src/include/utils/builtins.h
M src/include/utils/bytea.h
M src/include/utils/catcache.h
M src/include/utils/combocid.h
M src/include/utils/date.h
M src/include/utils/datetime.h
M src/include/utils/datum.h
M src/include/utils/dynahash.h
M src/include/utils/dynamic_loader.h
M src/include/utils/elog.h
M src/include/utils/evtcache.h
M src/include/utils/fmgrtab.h
M src/include/utils/formatting.h
M src/include/utils/geo_decls.h
M src/include/utils/guc.h
M src/include/utils/guc_tables.h
M src/include/utils/help_config.h
M src/include/utils/hsearch.h
M src/include/utils/inet.h
M src/include/utils/int8.h
M src/include/utils/inval.h
M src/include/utils/json.h
M src/include/utils/logtape.h
M src/include/utils/lsyscache.h
M src/include/utils/memutils.h
M src/include/utils/nabstime.h
M src/include/utils/numeric.h
M src/include/utils/palloc.h
M src/include/utils/pg_crc.h
M src/include/utils/pg_crc_tables.h
M src/include/utils/pg_locale.h
M src/include/utils/pg_rusage.h
M src/include/utils/plancache.h
M src/include/utils/portal.h
M src/include/utils/rangetypes.h
M src/include/utils/rbtree.h
M src/include/utils/rel.h
M src/include/utils/relcache.h
M src/include/utils/relmapper.h
M src/include/utils/reltrigger.h
M src/include/utils/resowner.h
M src/include/utils/resowner_private.h
M src/include/utils/selfuncs.h
M src/include/utils/snapmgr.h
M src/include/utils/snapshot.h
M src/include/utils/sortsupport.h
M src/include/utils/spccache.h
M src/include/utils/syscache.h
M src/include/utils/timeout.h
M src/include/utils/timestamp.h
M src/include/utils/tqual.h
M src/include/utils/tuplesort.h
M src/include/utils/tuplestore.h
M src/include/utils/typcache.h
M src/include/utils/tzparser.h
M src/include/utils/uuid.h
M src/include/utils/varbit.h
M src/include/utils/xml.h
M src/include/windowapi.h
M src/interfaces/ecpg/compatlib/Makefile
M src/interfaces/ecpg/ecpglib/Makefile
M src/interfaces/ecpg/ecpglib/pg_type.h
M src/interfaces/ecpg/pgtypeslib/Makefile
M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/ecpg/preproc/check_rules.pl
M src/interfaces/ecpg/preproc/ecpg.c
M src/interfaces/ecpg/preproc/keywords.c
M src/interfaces/ecpg/preproc/parse.pl
M src/interfaces/ecpg/preproc/parser.c
M src/interfaces/ecpg/preproc/pgc.l
M src/interfaces/ecpg/test/pg_regress_ecpg.c
M src/interfaces/libpq/Makefile
M src/interfaces/libpq/fe-auth.c
M src/interfaces/libpq/fe-auth.h
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-lobj.c
M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-print.c
M src/interfaces/libpq/fe-protocol2.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/fe-secure.c
M src/interfaces/libpq/libpq-events.c
M src/interfaces/libpq/libpq-events.h
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/interfaces/libpq/libpq.rc.in
M src/interfaces/libpq/pqexpbuffer.c
M src/interfaces/libpq/pqexpbuffer.h
M src/interfaces/libpq/pqsignal.c
M src/interfaces/libpq/pqsignal.h
M src/interfaces/libpq/pthread-win32.c
M src/interfaces/libpq/test/uri-regress.c
M src/interfaces/libpq/win32.c
M src/pl/plperl/plperl.h
M src/pl/plpgsql/src/generate-plerrcodes.pl
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_funcs.c
M src/pl/plpgsql/src/pl_gram.y
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/pl/plpython/generate-spiexceptions.pl
M src/pl/plpython/plpython.h
M src/port/chklocale.c
M src/port/dirent.c
M src/port/dirmod.c
M src/port/exec.c
M src/port/fls.c
M src/port/fseeko.c
M src/port/getaddrinfo.c
M src/port/gethostname.c
M src/port/getpeereid.c
M src/port/getrusage.c
M src/port/isinf.c
M src/port/kill.c
M src/port/memcmp.c
M src/port/noblock.c
M src/port/open.c
M src/port/path.c
M src/port/pg_crc.c
M src/port/pgcheckdir.c
M src/port/pgsleep.c
M src/port/pgstrcasecmp.c
M src/port/random.c
M src/port/sprompt.c
M src/port/srandom.c
M src/port/strlcpy.c
M src/port/thread.c
M src/port/unsetenv.c
M src/port/win32env.c
M src/port/win32error.c
M src/port/win32setlocale.c
M src/port/win32ver.rc
M src/test/examples/testlo.c
M src/test/examples/testlo64.c
M src/test/isolation/isolation_main.c
M src/test/isolation/isolationtester.h
M src/test/isolation/specparse.y
M src/test/isolation/specscanner.l
M src/test/regress/GNUmakefile
M src/test/regress/pg_regress.c
M src/test/regress/pg_regress.h
M src/test/regress/pg_regress_main.c
M src/test/thread/Makefile
M src/test/thread/thread_test.c
M src/timezone/pgtz.c
M src/timezone/pgtz.h
M src/tools/check_bison_recursion.pl
M src/tools/copyright.pl
M src/tools/findoidjoins/Makefile
M src/tools/findoidjoins/findoidjoins.c
M src/tools/ifaddrs/Makefile
M src/tools/version_stamp.pl
M src/tools/win32tzlist.pl
M src/tutorial/complex.source
M src/tutorial/syscat.source
Add new file to MSVC build system as well
commit : b10e9ae9f3ae4f1910085673eab159ff9c8e1080
author : Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 18:29:48 +0100
committer: Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 18:29:48 +0100
M src/tools/msvc/Mkvcbuild.pm
Unify some tar functionality across different parts
commit : f5d4bdd3a5c1b7987a257b2a64e977501338af0d
author : Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 18:15:57 +0100
committer: Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 18:15:57 +0100
Move some of the tar functionality that existed mostly duplicated
in both pg_dump and the walsender basebackup functionality into
port/tar.c instead, so it can be used from both. It will also be
used by pg_basebackup in the future, which would've caused a third
copy of it around.
Zoltan Boszormenyi and Magnus Hagander
M src/backend/replication/basebackup.c
M src/bin/pg_dump/pg_backup_tar.c
M src/include/port.h
M src/port/Makefile
A src/port/tar.c
Winflex binary on FTP site doesn't work on 64-bit Windows, update docs.
commit : a266f7dd93bcac8d8543df46efa2968226ddc81f
author : Heikki Linnakangas <[email protected]>
date : Tue, 1 Jan 2013 18:09:31 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 1 Jan 2013 18:09:31 +0200
Plus some other minor clarifications to Windows build instructions.
Craig Ringer, with minor editorialization by me.
M doc/src/sgml/install-windows.sgml
Fix descrition of pg_resetxlog -l parameter
commit : f1abee6bc6bc2f382412d1188c88d96c138591f4
author : Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 16:16:20 +0100
committer: Magnus Hagander <[email protected]>
date : Tue, 1 Jan 2013 16:16:20 +0100
This was changed in commit 038f3a05092365eca070bdc588554520dfd5ffb9, including
the description in the docs, but the reference was missed.
Fujii Masao
M doc/src/sgml/ref/pg_resetxlog.sgml
Fix ruleutils to cope with conflicts from adding/dropping/renaming columns.
commit : 2ffa740be9d96a3743ecb7e42391c53d0760c65a
author : Tom Lane <[email protected]>
date : Mon, 31 Dec 2012 15:13:26 -0500
committer: Tom Lane <[email protected]>
date : Mon, 31 Dec 2012 15:13:26 -0500
In commit 11e131854f8231a21613f834c40fe9d046926387, we improved the
rule/view dumping code so that it would produce valid query representations
even if some of the tables involved in a query had been renamed since the
query was parsed. This patch extends that idea to fix problems that occur
when individual columns are renamed, or added or dropped. As before, the
core of the fix is to assign unique new aliases when a name conflict has
been created. This is complicated by the JOIN USING feature, which
requires the same column alias to be used in both input relations, but we
can handle that with a sufficiently complex approach to assigning aliases.
A fortiori, this patch takes care of situations where the query didn't have
unique column names to begin with, such as in a recent complaint from Bryan
Nuse. (Because of expansion of "SELECT *", re-parsing a dumped query can
require column name uniqueness even though the original text did not.)
M src/backend/commands/explain.c
M src/backend/commands/typecmds.c
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/create_view.out
M src/test/regress/sql/create_view.sql
doc: Correct description of ldapurl
commit : 7eb559a86d773e0105ae5823e0c776c3af3c3fe2
author : Peter Eisentraut <[email protected]>
date : Mon, 31 Dec 2012 00:24:16 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 31 Dec 2012 00:24:16 -0500
The ldapurl option doesn't actually support specifying a user name and
password.
Albe Laurenz
M doc/src/sgml/client-auth.sgml
Fix compiler warning about uninitialized variable
commit : 0e690209eec61f8b70c57f8feeab0a3cd853103b
author : Peter Eisentraut <[email protected]>
date : Mon, 31 Dec 2012 00:13:40 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 31 Dec 2012 00:13:40 -0500
M src/backend/commands/copy.c
Keep timeline history files restored from archive in pg_xlog.
commit : 60df192aea0e6458f20301546e11f7673c102101
author : Heikki Linnakangas <[email protected]>
date : Sun, 30 Dec 2012 14:26:47 +0200
committer: Heikki Linnakangas <[email protected]>
date : Sun, 30 Dec 2012 14:26:47 +0200
The cascading standby patch in 9.2 changed the way WAL files are treated
when restored from the archive. Before, they were restored under a temporary
filename, and not kept in pg_xlog, but after the patch, they were copied
under pg_xlog. This is necessary for a cascading standby to find them, but
it also means that if the archive goes offline and a standby is restarted,
it can recover back to where it was using the files in pg_xlog. It also
means that if you take an offline backup from a standby server, it includes
all the required WAL files in pg_xlog.
However, the same change was not made to timeline history files, so if the
WAL segment containing the checkpoint record contains a timeline switch, you
will still get an error if you try to restart recovery without the archive,
or recover from an offline backup taken from the standby.
With this patch, timeline history files restored from archive are copied
into pg_xlog like WAL files are, so that pg_xlog contains all the files
required to recover. This is a corner-case pre-existing issue in 9.2, but
even more important in master where it's possible for a standby to follow a
timeline switch through streaming replication. To make that possible, the
timeline history files must be present in pg_xlog.
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogarchive.c
M src/include/access/xlog_internal.h
doc: Correct description of LDAP authentication
commit : 103cc89362accb04cf37a9063e51eac04d489e89
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Dec 2012 22:58:07 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Dec 2012 22:58:07 -0500
Parts of the description had claimed incorrect pg_hba.conf option names
for LDAP authentication.
Albe Laurenz
M doc/src/sgml/client-auth.sgml
Adjust more backend functions to return OID rather than void.
commit : 82b1b213cad3a69cf5f3dfaa81687c14366960fc
author : Robert Haas <[email protected]>
date : Sat, 29 Dec 2012 07:55:37 -0500
committer: Robert Haas <[email protected]>
date : Sat, 29 Dec 2012 07:55:37 -0500
This is again intended to support extensions to the event trigger
functionality. This may go a bit further than we need for that
purpose, but there's some value in being consistent, and the OID
may be useful for other purposes also.
Dimitri Fontaine
M src/backend/commands/comment.c
M src/backend/commands/copy.c
M src/backend/commands/dbcommands.c
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/proclang.c
M src/backend/commands/seclabel.c
M src/backend/commands/tablespace.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/tcop/utility.c
M src/include/commands/comment.h
M src/include/commands/copy.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/event_trigger.h
M src/include/commands/extension.h
M src/include/commands/proclang.h
M src/include/commands/seclabel.h
M src/include/commands/tablespace.h
M src/include/commands/typecmds.h
M src/include/commands/user.h
M src/include/rewrite/rewriteDefine.h
Remove obsolete XLogRecPtr macros
commit : 5ab3af46ddd2f2c2b248f1ffdb688b394d4bb387
author : Alvaro Herrera <[email protected]>
date : Fri, 28 Dec 2012 13:06:15 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 28 Dec 2012 13:06:15 -0300
This gets rid of XLByteLT, XLByteLE, XLByteEQ and XLByteAdvance.
These were useful for brevity when XLogRecPtrs were split in
xlogid/xrecoff; but now that they are simple uint64's, they are just
clutter. The only downside to making this change would be ease of
backporting patches, but that has been negated by other substantive
changes to the involved code anyway. The clarity of simpler expressions
makes the change worthwhile.
Most of the changes are mechanical, but in a couple of places, the patch
author chose to invert the operator sense, making the code flow more
logical (and more in line with preceding comments).
Author: Andres Freund
Eyeballed by Dimitri Fontaine and Alvaro Herrera
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistget.c
M src/backend/access/gist/gistvacuum.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/heap/heapam.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/slru.c
M src/backend/access/transam/timeline.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xlog.c
M src/backend/commands/sequence.c
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/bin/pg_basebackup/receivelog.c
M src/include/access/xlogdefs.h
Assign InvalidXLogRecPtr instead of MemSet(0)
commit : 24eca7977ed208de33791af8890975ffcf086598
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Dec 2012 18:33:03 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Dec 2012 18:33:03 -0300
For consistency.
Author: Andres Freund
M src/backend/access/transam/xlog.c
M src/backend/replication/walsender.c
Remove unused NextLogPage macro
commit : eaa1f7220ae83997b56adcae1fbb7b2e92bfc050
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Dec 2012 18:23:23 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Dec 2012 18:23:23 -0300
Commit 061e7efb1b did away with its last caller, but neglected to remove
the actual definition.
Author: Andres Freund
M src/include/access/xlog_internal.h
doc: Replace "NOTE" with proper markup
commit : 925ce77c0359eff9310f7954294f257dafb0c2db
author : Peter Eisentraut <[email protected]>
date : Wed, 26 Dec 2012 23:48:35 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 26 Dec 2012 23:48:35 -0500
M doc/src/sgml/pgfreespacemap.sgml
Add pg_upgrade --jobs parameter
commit : 6f1b9e4efd94fc644f5de5377829d42e48c3c758
author : Bruce Momjian <[email protected]>
date : Wed, 26 Dec 2012 19:26:30 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 26 Dec 2012 19:26:30 -0500
Add pg_upgrade --jobs, which allows parallel dump/restore of databases,
which improves performance.
M contrib/pg_upgrade/Makefile
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/option.c
A contrib/pg_upgrade/parallel.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M doc/src/sgml/pgupgrade.sgml
Fix some minor issues in view pretty-printing.
commit : 3f88b080030682adf359248c9cb7f8b2068a539e
author : Tom Lane <[email protected]>
date : Mon, 24 Dec 2012 17:52:19 -0500
committer: Tom Lane <[email protected]>
date : Mon, 24 Dec 2012 17:52:19 -0500
Code review for commit 2f582f76b1945929ff07116cd4639747ce9bb8a1: don't use
a static variable for what ought to be a deparse_context field, fix
non-multibyte-safe test for spaces, avoid useless and potentially O(N^2)
(though admittedly with a very small constant) calculations of wrap
positions when we aren't going to wrap.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/ruleutils.c
Update comments on rd_newRelfilenodeSubid. Ensure comments accurately reflect state of code given new understanding, and recent changes. Include example code from Noah Misch to illustrate how rd_newRelfilenodeSubid can be reset deterministically. No code changes.
commit : c2b32180649fe9105e784ad0519fe243605f78a3
author : Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 17:07:06 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 17:07:06 +0000
M src/backend/commands/copy.c
M src/include/utils/rel.h
Keep rd_newRelfilenodeSubid across overflow. Teach RelationCacheInvalidate() to keep rd_newRelfilenodeSubid across rel cache message overflows, so that behaviour is now fully deterministic.
commit : ae9aba69a8608c6e5df01ee4f20c4799f5d2850c
author : Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 16:43:22 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 16:43:22 +0000
Noah Misch
M src/backend/utils/cache/relcache.c
Fix more weird compiler messages caused by unmatched function prototypes.
commit : 42fa810c144cb76c911cc664244bc369911eb840
author : Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 16:25:26 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 16:25:26 +0000
Andres Freund
M src/include/commands/event_trigger.h
M src/include/commands/tablecmds.h
Add function prototype from previous commit.
commit : 2dcb2ebee2ec830fbe547459b2176238efc2a3e0
author : Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 09:18:42 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 24 Dec 2012 09:18:42 +0000
M src/include/catalog/pg_aggregate.h
Adjust many backend functions to return OID rather than void.
commit : c504513f83a9ee8dce4a719746ca73102cae9f13
author : Robert Haas <[email protected]>
date : Sun, 23 Dec 2012 18:25:03 -0500
committer: Robert Haas <[email protected]>
date : Sun, 23 Dec 2012 18:25:03 -0500
Extracted from a larger patch by Dimitri Fontaine. It is hoped that
this will provide infrastructure for enriching the new event trigger
functionality, but it seems possibly useful for other purposes as
well.
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_operator.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/dbcommands.c
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/proclang.c
M src/backend/commands/schemacmds.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/view.c
M src/include/catalog/pg_operator.h
M src/include/commands/alter.h
M src/include/commands/collationcmds.h
M src/include/commands/conversioncmds.h
M src/include/commands/dbcommands.h
M src/include/commands/defrem.h
M src/include/commands/extension.h
M src/include/commands/proclang.h
M src/include/commands/schemacmds.h
M src/include/commands/sequence.h
M src/include/commands/tablecmds.h
M src/include/commands/tablespace.h
M src/include/commands/trigger.h
M src/include/commands/typecmds.h
M src/include/commands/user.h
M src/include/commands/view.h
Prevent failure when RowExpr or XmlExpr is parse-analyzed twice.
commit : 31bc839724439440b2e94ea616b28ce5be94e19c
author : Tom Lane <[email protected]>
date : Sun, 23 Dec 2012 14:07:24 -0500
committer: Tom Lane <[email protected]>
date : Sun, 23 Dec 2012 14:07:24 -0500
transformExpr() is required to cope with already-transformed expression
trees, for various ugly-but-not-quite-worth-cleaning-up reasons. However,
some of its newer subroutines hadn't gotten the memo. This accounts for
bug #7763 from Norbert Buchmuller: transformRowExpr() was overwriting the
previously determined type of a RowExpr during CREATE TABLE LIKE INCLUDING
INDEXES. Additional investigation showed that transformXmlExpr had the
same kind of problem, but all the other cases seem to be safe.
Andres Freund and Tom Lane
M src/backend/parser/gram.y
M src/backend/parser/parse_expr.c
M src/include/nodes/primnodes.h
Fix documentation typo.
commit : eb035068121532ed7db47081e71655746d31cd16
author : Tom Lane <[email protected]>
date : Sat, 22 Dec 2012 15:01:29 -0500
committer: Tom Lane <[email protected]>
date : Sat, 22 Dec 2012 15:01:29 -0500
"GetForeignTableColumnOptions" should be "GetForeignColumnOptions".
Noted by Metin Döşlü.
M doc/src/sgml/fdwhandler.sgml
Fix sloppiness in the timeline switch over streaming replication patch.
commit : 1ff92eea140ccf0503b7399549031976e5c6642e
author : Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 20:04:11 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 20:04:11 +0200
Here's another attempt at fixing the logic that decides how far the WAL can
be streamed, which was still broken if the timeline changed while streaming.
You would get an assertion failure. The way the logic is now written is more
readable, too.
Thom Brown reported the assertion failure.
M src/backend/replication/walsender.c
Fix race condition if a file is removed while pg_basebackup is running.
commit : 36e4456d78b6a27cdaf82280b98998fc3bf3e9c7
author : Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 15:29:49 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 15:29:49 +0200
If a relation file was removed when the server-side counterpart of
pg_basebackup was just about to open it to send it to the client, you'd
get a "could not open file" error. Fix that.
Backpatch to 9.1, this goes back to when pg_basebackup was introduced.
M src/backend/replication/basebackup.c
Forgot to remove extern declaration of GetRecoveryTargetTLI()
commit : d57a97343ecec89ecb7d932c21c886058ad64e6b
author : Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 09:27:37 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 21 Dec 2012 09:27:37 +0200
Fujii Masao
M src/include/access/xlog.h
Make some messages more consistent in style
commit : 740ee42da5fc07e5b1be5c358673224d99cb2aae
author : Peter Eisentraut <[email protected]>
date : Thu, 20 Dec 2012 23:39:33 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 20 Dec 2012 23:39:33 -0500
M src/backend/catalog/pg_proc.c
M src/backend/commands/vacuumlazy.c
M src/backend/parser/parse_coerce.c
M src/test/regress/expected/rangetypes.out
Fix grammatical mistake in error message
commit : a0bfb7b36e0795a1c69c86b4184ee952dbb650d1
author : Peter Eisentraut <[email protected]>
date : Thu, 20 Dec 2012 23:36:13 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 20 Dec 2012 23:36:13 -0500
M src/backend/access/transam/xlog.c
Fix pg_extension_config_dump() to handle update cases more sanely.
commit : 343c2a865bc6c0a03358709df854ce1eac52ca45
author : Tom Lane <[email protected]>
date : Thu, 20 Dec 2012 16:30:59 -0500
committer: Tom Lane <[email protected]>
date : Thu, 20 Dec 2012 16:30:59 -0500
If pg_extension_config_dump() is executed again for a table already listed
in the extension's extconfig, the code was blindly making a new array entry.
This does not seem useful. Fix it to replace the existing array entry
instead, so that it's possible for extension update scripts to alter the
filter conditions for configuration tables.
In addition, teach ALTER EXTENSION DROP TABLE to check for an extconfig
entry for the target table, and remove it if present. This is not a 100%
solution because it's allowed for an extension update script to just
summarily DROP a member table, and that code path doesn't go through
ExecAlterExtensionContentsStmt. We could probably make that case clean
things up if we had to, but it would involve sticking a very ugly wart
somewhere in the guts of dependency.c. Since on the whole it seems quite
unlikely that extension updates would want to remove pre-existing
configuration tables, making the case possible with an explicit command
seems sufficient.
Per bug #7756 from Regina Obe. Back-patch to 9.1 where extensions were
introduced.
M doc/src/sgml/extend.sgml
M src/backend/commands/extension.c
Fix recycling of WAL segments after switching timeline during recovery.
commit : 343ee00b730e9c422082160718b9785f0cb7f8f6
author : Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 22:00:34 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 22:00:34 +0200
This was broken before, we would recycle old WAL segments on wrong timeline
after the recovery target timeline had changed, but my recent commit to
not initialize ThisTimeLineID at all in a standby's checkpointer process
broke this completely.
The problem is that when installing a recycled WAL segment as a future one,
ThisTimeLineID is used to construct the filename. To fix, always update
ThisTimeLineID to the current timeline being recovered, before recycling
WAL segments at a restartpoint.
This still leaves a small window where we might install WAL segments under
wrong timeline ID, if the timeline is changed just as we're about to start
recycling. Also, even if we're replaying timeline X at the momnent, there's
no guarantee that we'll need as many WAL segments on that timeline as we
recycle. We might be just about to reach the point where we switch to next
timeline, so might only need one more WAL segment on the current timeline.
We'll live with the waste in that situation.
Bug pointed out by Fujii Masao. 9.1 and 9.2 had the same issue, when
recovery target timeline was changed, but I committed a slightly different
version of this patch on those branches.
M src/backend/access/transam/xlog.c
Avoid using NAMEDATALEN in pg_upgrade
commit : dc9896a2457f0d72458f1ff45935362521f0f99c
author : Bruce Momjian <[email protected]>
date : Thu, 20 Dec 2012 13:56:24 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 20 Dec 2012 13:56:24 -0500
Because the client encoding might not match the server encoding,
pg_upgrade can't allocate NAMEDATALEN bytes for storage of database,
relation, and namespace identifiers. Instead pg_strdup() the memory and
free it.
Also add C comment in initdb.c about safe NAMEDATALEN usage.
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.h
M src/bin/initdb/initdb.c
Follow TLI of last replayed record, not recovery target TLI, in walsenders.
commit : af275a12dfeecd621ed9899a9382f26a68310263
author : Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 14:23:31 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 14:23:31 +0200
Most of the time, the last replayed record comes from the recovery target
timeline, but there is a corner case where it makes a difference. When
the startup process scans for a new timeline, and decides to change recovery
target timeline, there is a window where the recovery target TLI has already
been bumped, but there are no WAL segments from the new timeline in pg_xlog
yet. For example, if we have just replayed up to point 0/30002D8, on
timeline 1, there is a WAL file called 000000010000000000000003 in pg_xlog
that contains the WAL up to that point. When recovery switches recovery
target timeline to 2, a walsender can immediately try to read WAL from
0/30002D8, from timeline 2, so it will try to open WAL file
000000020000000000000003. However, that doesn't exist yet - the startup
process hasn't copied that file from the archive yet nor has the walreceiver
streamed it yet, so walsender fails with error "requested WAL segment
000000020000000000000003 has already been removed". That's harmless, in that
the standby will try to reconnect later and by that time the segment is
already created, but error messages that should be ignored are not good.
To fix that, have walsender track the TLI of the last replayed record,
instead of the recovery target timeline. That way walsender will not try to
read anything from timeline 2, until the WAL segment has been created and at
least one record has been replayed from it. The recovery target timeline is
now xlog.c's internal affair, it doesn't need to be exposed in shared memory
anymore.
This fixes the error reported by Thom Brown. depesz the same error message,
but I'm not sure if this fixes his scenario.
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
Don't set ThisTimeLineID in checkpointer & bgwriter during recovery.
commit : 1a11d4609efaae39d9b7472fb965bca1c0aeda01
author : Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 14:01:50 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 20 Dec 2012 14:01:50 +0200
We used to set it to the current recovery target timeline, but the recovery
target timeline can change during recovery, leaving ThisTimeLineID at an
old value. That seems worse than always leaving it at zero to begin with.
AFAICS there was no good reason to set it in the first place. ThisTimeLineID
is not needed in checkpointer or bgwriter process, until it's time to write
the end-of-recovery checkpoint, and at that point ThisTimeLineID is updated
anyway.
M src/backend/access/transam/xlog.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
Add pg_upgrade comment about mismatch error
commit : 345fb82f1616b4d44d8a67a6c10e964400d29c09
author : Bruce Momjian <[email protected]>
date : Thu, 20 Dec 2012 07:37:27 -0500
committer: Bruce Momjian <[email protected]>
date : Thu, 20 Dec 2012 07:37:27 -0500
Add comment stating that constraint and index names must match.
M contrib/pg_upgrade/info.c
Check if we've reached end-of-backup point also if no redo is required.
commit : e43f947bf32f3ea4caa5b895ca7c7659b17192ae
author : Heikki Linnakangas <[email protected]>
date : Wed, 19 Dec 2012 14:13:23 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 19 Dec 2012 14:13:23 +0200
If you restored from a backup taken from a standby, and the last record in
the backup is the checkpoint record, ie. there is no redo required except
for the checkpoint record, we would fail to notice that we've reached the
end-of-backup point, and the database is consistent. The result was an
error "WAL ends before end of online backup". To fix, move the
have-we-reached-end-of-backup check into CheckRecoveryConsistency(), which
is already responsible for similar checks with minRecoveryPoint, and is
called in the right places.
Backpatch to 9.2, this check and bug did not exist before that.
M src/backend/access/transam/xlog.c
Rename SQL feature S403 to ARRAY_MAX_CARDINALITY
commit : f2b88080db43fbadaef990a1b240bd634d1d4275
author : Peter Eisentraut <[email protected]>
date : Wed, 19 Dec 2012 07:14:27 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 19 Dec 2012 07:14:27 -0500
In an earlier version of the standard, this was called just
"MAX_CARDINALITY".
M src/backend/catalog/sql_features.txt
pg_basebackup: Small message punctuation improvements
commit : 6925e38dadca0e64e8528316ccee7591fe88331f
author : Peter Eisentraut <[email protected]>
date : Wed, 19 Dec 2012 07:01:11 -0500
committer: Peter Eisentraut <[email protected]>
date : Wed, 19 Dec 2012 07:01:11 -0500
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
Don't include postgres.h in postgres_fe.h for cpluspluscheck.
commit : 9ac749ceb5ad040dc2aa834d9f698a3da2425a96
author : Andrew Dunstan <[email protected]>
date : Tue, 18 Dec 2012 16:30:14 -0500
committer: Andrew Dunstan <[email protected]>
date : Tue, 18 Dec 2012 16:30:14 -0500
Error exposed by recent Assert changes.
Complaint from Peter Eisentraut.
M src/tools/pginclude/cpluspluscheck
Ignore libedit/libreadline while probing for standard functions.
commit : 2666a6d0b934b19d4a691b93a64c7d3208acad43
author : Tom Lane <[email protected]>
date : Tue, 18 Dec 2012 16:22:13 -0500
committer: Tom Lane <[email protected]>
date : Tue, 18 Dec 2012 16:22:13 -0500
Some versions of libedit expose bogus definitions of setproctitle(),
optreset, and perhaps other symbols that we don't want configure to pick up
on. There was a previous report of similar problems with strlcpy(), which
we addressed in commit 59cf88da91bc88978b05275ebd94ac2d980c4047, but the
problem has evidently grown in scope since then. In hopes of not having to
deal with it again in future, rearrange configure's tests for supplied
functions so that we ignore libedit/libreadline except when probing
specifically for functions we expect them to provide.
Per report from Christoph Berg, though this is slightly more aggressive
than his proposed patch.
M configure
M configure.in
Remove allow_nonpic_in_shlib
commit : 1a5f04dd7eed0ac27cc5da9520ef55e16531bca6
author : Peter Eisentraut <[email protected]>
date : Tue, 18 Dec 2012 01:13:59 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 18 Dec 2012 01:13:59 -0500
This was used in a time when a shared libperl or libpython was difficult
to come by. That is obsolete, and the idea behind the flag was never
fully portable anyway and will likely fail on more modern CPU
architectures.
M src/makefiles/Makefile.freebsd
M src/makefiles/Makefile.linux
M src/pl/plperl/GNUmakefile
M src/pl/plpython/Makefile
doc: Put PL/pgSQL RAISE USING keywords into a list
commit : 8d2e9a9dbd56aabb9273fbc30ca6c03d6f24b996
author : Peter Eisentraut <[email protected]>
date : Mon, 17 Dec 2012 22:45:20 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 17 Dec 2012 22:45:20 -0500
Karl O. Pinc
M doc/src/sgml/plpgsql.sgml
Fix failure to ignore leftover temp tables after a server crash.
commit : 6919b7e3294702adc39effd16634b2715d04f012
author : Tom Lane <[email protected]>
date : Mon, 17 Dec 2012 20:15:32 -0500
committer: Tom Lane <[email protected]>
date : Mon, 17 Dec 2012 20:15:32 -0500
During crash recovery, we remove disk files belonging to temporary tables,
but the system catalog entries for such tables are intentionally not
cleaned up right away. Instead, the first backend that uses a temp schema
is expected to clean out any leftover objects therein. This approach
requires that we be careful to ignore leftover temp tables (since any
actual access attempt would fail), *even if their BackendId matches our
session*, if we have not yet established use of the session's corresponding
temp schema. That worked fine in the past, but was broken by commit
debcec7dc31a992703911a9953e299c8d730c778 which incorrectly removed the
rd_islocaltemp relcache flag. Put it back, and undo various changes
that substituted tests like "rel->rd_backend == MyBackendId" for use
of a state-aware flag. Per trouble report from Heikki Linnakangas.
Back-patch to 9.1 where the erroneous change was made. In the back
branches, be careful to add rd_islocaltemp in a spot in the struct that
was alignment padding before, so as not to break existing add-on code.
M src/backend/catalog/toasting.c
M src/backend/commands/copy.c
M src/backend/commands/sequence.c
M src/backend/commands/tablecmds.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/cache/relcache.c
M src/include/utils/rel.h
Fix filling of postmaster.pid in bootstrap/standalone mode.
commit : c299477229559d4ee7db68720d86d3fb391db761
author : Tom Lane <[email protected]>
date : Sun, 16 Dec 2012 15:01:55 -0500
committer: Tom Lane <[email protected]>
date : Sun, 16 Dec 2012 15:01:55 -0500
We failed to ever fill the sixth line (LISTEN_ADDR), which caused the
attempt to fill the seventh line (SHMEM_KEY) to fail, so that the shared
memory key never got added to the file in standalone mode. This has been
broken since we added more content to our lock files in 9.1.
To fix, tweak the logic in CreateLockFile to add an empty LISTEN_ADDR
line in standalone mode. This is a tad grotty, but since that function
already knows almost everything there is to know about the contents of
lock files, it doesn't seem that it's any better to hack it elsewhere.
It's not clear how significant this bug really is, since a standalone
backend should never have any children and thus it seems not critical
to be able to check the nattch count of the shmem segment externally.
But I'm going to back-patch the fix anyway.
This problem had escaped notice because of an ancient (and in hindsight
pretty dubious) decision to suppress LOG-level messages by default in
standalone mode; so that the elog(LOG) complaint in AddToDataDirLockFile
that should have warned of the problem didn't do anything. Fixing that
is material for a separate patch though.
M src/backend/utils/init/miscinit.c
Tidy up from frontend Assert change.
commit : 3717f0837b79bc37947896d9068ccff0825e916d
author : Andrew Dunstan <[email protected]>
date : Sun, 16 Dec 2012 12:22:57 -0500
committer: Andrew Dunstan <[email protected]>
date : Sun, 16 Dec 2012 12:22:57 -0500
Quiet compiler warnings noted by Peter Eisentraut.
M src/backend/utils/mb/encnames.c
M src/backend/utils/mb/wchar.c
Properly copy fmgroids.h after clean on Win32
commit : c1f856a17fc52a15cd6169146b66664291b0ca5f
author : Magnus Hagander <[email protected]>
date : Sun, 16 Dec 2012 14:56:51 +0100
committer: Magnus Hagander <[email protected]>
date : Sun, 16 Dec 2012 14:56:51 +0100
Craig Ringer
M src/tools/msvc/Solution.pm
doc: Remove extra table column
commit : c2e32d5a6c7c01a1b8e69ca39465a31d2ab0c6e9
author : Peter Eisentraut <[email protected]>
date : Sun, 16 Dec 2012 03:51:05 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 16 Dec 2012 03:51:05 -0500
Not all system catalog description tables have the same number of
columns, and the patch to add oid columns did one bit too much
copy-and-pasting.
M doc/src/sgml/catalogs.sgml
doc: Add oid columns to system catalog documentation
commit : 160701f6a935d5b0440751c3cb3f70bb59cf5eb1
author : Peter Eisentraut <[email protected]>
date : Sat, 15 Dec 2012 00:42:47 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 15 Dec 2012 00:42:47 -0500
Karl O. Pinc and Jeff Davis
M doc/src/sgml/catalogs.sgml
doc: Add pg_stat_reset and related functions to index
commit : 79a457dca7a8b35709a0faad723ddffa25caed57
author : Peter Eisentraut <[email protected]>
date : Sat, 15 Dec 2012 00:30:53 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 15 Dec 2012 00:30:53 -0500
M doc/src/sgml/monitoring.sgml
Provide Assert() for frontend code.
commit : 1c382655ad90b7cd224230452f7056040337facf
author : Andrew Dunstan <[email protected]>
date : Fri, 14 Dec 2012 18:03:07 -0500
committer: Andrew Dunstan <[email protected]>
date : Fri, 14 Dec 2012 18:03:07 -0500
Per discussion on-hackers. psql is converted to use the new code.
Follows a suggestion from Heikki Linnakangas.
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/psql/psqlscan.l
M src/bin/psql/stringutils.c
M src/bin/psql/tab-complete.c
M src/include/postgres_fe.h
Update comment in heapgetpage() regarding PD_ALL_VISIBLE vs. Hot Standby.
commit : 75758a6ff01156e163779f5f7386fa36720fb38f
author : Robert Haas <[email protected]>
date : Fri, 14 Dec 2012 15:44:38 -0500
committer: Robert Haas <[email protected]>
date : Fri, 14 Dec 2012 15:44:38 -0500
Pavan Deolasee, slightly modified by me
M src/backend/access/heap/heapam.c
NLS: Use msgmerge --previous option
commit : fdb67eb2b69fe035339c7461c6323dc69010db18
author : Peter Eisentraut <[email protected]>
date : Thu, 13 Dec 2012 23:12:12 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 13 Dec 2012 23:12:12 -0500
It provides some additional help to translators.
M src/nls-global.mk
doc: Improve search_path mentions in index
commit : a301eb99c9537186f7dd46ba418e84d755227a94
author : Peter Eisentraut <[email protected]>
date : Thu, 13 Dec 2012 23:00:42 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 13 Dec 2012 23:00:42 -0500
Karl O. Pinc
M doc/src/sgml/ddl.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/ref/create_function.sgml
Allow a streaming replication standby to follow a timeline switch.
commit : abfd192b1b5ba5216ac4b1f31dcd553106304b19
author : Heikki Linnakangas <[email protected]>
date : Thu, 13 Dec 2012 19:00:00 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 13 Dec 2012 19:00:00 +0200
Before this patch, streaming replication would refuse to start replicating
if the timeline in the primary doesn't exactly match the standby. The
situation where it doesn't match is when you have a master, and two
standbys, and you promote one of the standbys to become new master.
Promoting bumps up the timeline ID, and after that bump, the other standby
would refuse to continue.
There's significantly more timeline related logic in streaming replication
now. First of all, when a standby connects to primary, it will ask the
primary for any timeline history files that are missing from the standby.
The missing files are sent using a new replication command TIMELINE_HISTORY,
and stored in standby's pg_xlog directory. Using the timeline history files,
the standby can follow the latest timeline present in the primary
(recovery_target_timeline='latest'), just as it can follow new timelines
appearing in an archive directory.
START_REPLICATION now takes a TIMELINE parameter, to specify exactly which
timeline to stream WAL from. This allows the standby to request the primary
to send over WAL that precedes the promotion. The replication protocol is
changed slightly (in a backwards-compatible way although there's little hope
of streaming replication working across major versions anyway), to allow
replication to stop when the end of timeline reached, putting the walsender
back into accepting a replication command.
Many thanks to Amit Kapila for testing and reviewing various versions of
this patch.
M doc/src/sgml/high-availability.sgml
M doc/src/sgml/protocol.sgml
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/startup.c
M src/backend/replication/basebackup.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/repl_gram.y
M src/backend/replication/repl_scanner.l
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/include/access/timeline.h
M src/include/access/xlog.h
M src/include/nodes/nodes.h
M src/include/nodes/replnodes.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/replication/walsender_private.h
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-protocol3.c
Make xlog_internal.h includable in frontend context.
commit : 527668717a660e67c2a6cfd4e85f7a513f99f6f2
author : Heikki Linnakangas <[email protected]>
date : Thu, 13 Dec 2012 14:59:13 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 13 Dec 2012 14:59:13 +0200
This makes unnecessary the ugly hack used to #include postgres.h in
pg_basebackup.
Based on Alvaro Herrera's patch
M src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/transam/xlogarchive.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/pgarch.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
A src/include/access/xlog_fn.h
M src/include/access/xlog_internal.h
In multi-insert, don't go into infinite loop on a huge tuple and fillfactor.
commit : 6264cd3d69b519b6e6f2470e3c23ad1ef1ddff66
author : Heikki Linnakangas <[email protected]>
date : Wed, 12 Dec 2012 13:34:03 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 12 Dec 2012 13:34:03 +0200
If a tuple is larger than page size minus space reserved for fillfactor,
heap_multi_insert would never find a page that it fits in and repeatedly ask
for a new page from RelationGetBufferForTuple. If a tuple is too large to
fit on any page, taking fillfactor into account, RelationGetBufferForTuple
will always expand the relation. In a normal insert, heap_insert will accept
that and put the tuple on the new page. heap_multi_insert, however, does a
fillfactor check of its own, and doesn't accept the newly-extended page
RelationGetBufferForTuple returns, even though there is no other choice to
make the tuple fit.
Fix that by making the logic in heap_multi_insert more like the heap_insert
logic. The first tuple is always put on the page RelationGetBufferForTuple
gives us, and the fillfactor check is only applied to the subsequent tuples.
Report from David Gould, although I didn't use his patch.
M src/backend/access/heap/heapam.c
Add defenses against integer overflow in dynahash numbuckets calculations.
commit : 691c5ebf79bb011648fad0e6b234b94a28177e3c
author : Tom Lane <[email protected]>
date : Tue, 11 Dec 2012 22:09:05 -0500
committer: Tom Lane <[email protected]>
date : Tue, 11 Dec 2012 22:09:05 -0500
The dynahash code requires the number of buckets in a hash table to fit
in an int; but since we calculate the desired hash table size dynamically,
there are various scenarios where we might calculate too large a value.
The resulting overflow can lead to infinite loops, division-by-zero
crashes, etc. I (tgl) had previously installed some defenses against that
in commit 299d1716525c659f0e02840e31fbe4dea3, but that covered only one
call path. Moreover it worked by limiting the request size to work_mem,
but in a 64-bit machine it's possible to set work_mem high enough that the
problem appears anyway. So let's fix the problem at the root by installing
limits in the dynahash.c functions themselves.
Trouble report and patch by Jeff Davis.
M src/backend/executor/nodeHash.c
M src/backend/utils/hash/dynahash.c
Disable event triggers in standalone mode.
commit : cd3413ec3683918c9cb9cfb39ae5b2c32f231e8b
author : Tom Lane <[email protected]>
date : Tue, 11 Dec 2012 19:28:31 -0500
committer: Tom Lane <[email protected]>
date : Tue, 11 Dec 2012 19:28:31 -0500
Per discussion, this seems necessary to allow recovery from broken event
triggers, or broken indexes on pg_event_trigger.
Dimitri Fontaine
M doc/src/sgml/ref/create_event_trigger.sgml
M src/backend/commands/event_trigger.c
Fix performance problems with autovacuum truncation in busy workloads.
commit : b19e4250b45e91c9cbdd18d35ea6391ab5961c8d
author : Kevin Grittner <[email protected]>
date : Tue, 11 Dec 2012 14:33:08 -0600
committer: Kevin Grittner <[email protected]>
date : Tue, 11 Dec 2012 14:33:08 -0600
In situations where there are over 8MB of empty pages at the end of
a table, the truncation work for trailing empty pages takes longer
than deadlock_timeout, and there is frequent access to the table by
processes other than autovacuum, there was a problem with the
autovacuum worker process being canceled by the deadlock checking
code. The truncation work done by autovacuum up that point was
lost, and the attempt tried again by a later autovacuum worker. The
attempts could continue indefinitely without making progress,
consuming resources and blocking other processes for up to
deadlock_timeout each time.
This patch has the autovacuum worker checking whether it is
blocking any other thread at 20ms intervals. If such a condition
develops, the autovacuum worker will persist the work it has done
so far, release its lock on the table, and sleep in 50ms intervals
for up to 5 seconds, hoping to be able to re-acquire the lock and
try again. If it is unable to get the lock in that time, it moves
on and a worker will try to continue later from the point this one
left off.
While this patch doesn't change the rules about when and what to
truncate, it does cause the truncation to occur sooner, with less
blocking, and with the consumption of fewer resources when there is
contention for the table's lock.
The only user-visible change other than improved performance is
that the table size during truncation may change incrementally
instead of just once.
This problem exists in all supported versions but is infrequently
reported, although some reports of performance problems when
autovacuum runs might be caused by this. Initial commit is just the
master branch, but this should probably be backpatched once the
build farm and general developer usage confirm that there are no
surprising effects.
Jan Wieck
M src/backend/commands/vacuumlazy.c
M src/backend/storage/lmgr/lmgr.c
M src/backend/storage/lmgr/lock.c
M src/include/storage/lmgr.h
M src/include/storage/lock.h
Fix pg_upgrade for invalid indexes
commit : e95c4bd1133acf7fc58a52212253129ef2dc9d12
author : Bruce Momjian <[email protected]>
date : Tue, 11 Dec 2012 15:09:22 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 11 Dec 2012 15:09:22 -0500
All versions of pg_upgrade upgraded invalid indexes caused by CREATE
INDEX CONCURRENTLY failures and marked them as valid. The patch adds a
check to all pg_upgrade versions and throws an error during upgrade or
--check.
Backpatch to 9.2, 9.1, 9.0. Patch slightly adjusted.
M contrib/pg_upgrade/check.c
Consistency check should compare last record replayed, not last record read.
commit : 970fb12de121941939e777764d6e0446c974bba3
author : Heikki Linnakangas <[email protected]>
date : Tue, 11 Dec 2012 15:57:24 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 11 Dec 2012 15:57:24 +0200
EndRecPtr is the last record that we've read, but not necessarily yet
replayed. CheckRecoveryConsistency should compare minRecoveryPoint with the
last replayed record instead. This caused recovery to think it's reached
consistency too early.
Now that we do the check in CheckRecoveryConsistency correctly, we have to
move the call of that function to after redoing a record. The current place,
after reading a record but before replaying it, is wrong. In particular, if
there are no more records after the one ending at minRecoveryPoint, we don't
enter hot standby until one extra record is generated and read by the
standby, and CheckRecoveryConsistency is called. These two bugs conspired
to make the code appear to work correctly, except for the small window
between reading the last record that reaches minRecoveryPoint, and
replaying it.
In the passing, rename recoveryLastRecPtr, which is the last record
replayed, to lastReplayedEndRecPtr. This makes it slightly less confusing
with replayEndRecPtr, which is the last record read that we're about to
replay.
Original report from Kyotaro HORIGUCHI, further diagnosis by Fujii Masao.
Backpatch to 9.0, where Hot Standby subtly changed the test from
"minRecoveryPoint < EndRecPtr" to "minRecoveryPoint <= EndRecPtr". The
former works because where the test is performed, we have always read one
more record than we've replayed.
M src/backend/access/transam/xlog.c
Add mode where contrib installcheck runs each module in a separately named database.
commit : ad69bd052f8ac1edfd579ed0e32da1c33a775f78
author : Andrew Dunstan <[email protected]>
date : Tue, 11 Dec 2012 11:52:45 -0500
committer: Andrew Dunstan <[email protected]>
date : Tue, 11 Dec 2012 11:52:45 -0500
Normally each module is tested in a database named contrib_regression,
which is dropped and recreated at the beginhning of each pg_regress run.
This new mode, enabled by adding USE_MODULE_DB=1 to the make command
line, runs most modules in a database with the module name embedded in
it.
This will make testing pg_upgrade on clusters with the contrib modules
a lot easier.
Second attempt at this, this time accomodating make versions older
than 3.82.
Still to be done: adapt to the MSVC build system.
Backpatch to 9.0, which is the earliest version it is reasonably
possible to test upgrading from.
M contrib/dblink/Makefile
M src/Makefile.global.in
M src/makefiles/pgxs.mk
Fix pg_upgrade -O/-o options
commit : acdb8c225955bbf582bb050e6217f79493f031eb
author : Bruce Momjian <[email protected]>
date : Mon, 10 Dec 2012 23:03:17 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 10 Dec 2012 23:03:17 -0500
Fix previous commit that added synchronous_commit=off, but broke -O/-o
due to missing space in argument passing.
Backpatch to 9.2.
M contrib/pg_upgrade/server.c
doc: Remove blastwave.org link
commit : 8e48d77cab8483fb381db9051225b46a0e4c2bc2
author : Peter Eisentraut <[email protected]>
date : Mon, 10 Dec 2012 22:37:19 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 10 Dec 2012 22:37:19 -0500
Apparently, this service has been dead since 2008.
M doc/src/sgml/installation.sgml
Update minimum recovery point on truncation.
commit : 7bffc9b7bf9e09ddeddc65117e49829f758e500d
author : Heikki Linnakangas <[email protected]>
date : Mon, 10 Dec 2012 15:54:42 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 10 Dec 2012 15:54:42 +0200
If a file is truncated, we must update minRecoveryPoint. Once a file is
truncated, there's no going back; it would not be safe to stop recovery
at a point earlier than that anymore.
Per report from Kyotaro HORIGUCHI. Backpatch to 8.4. Before that,
minRecoveryPoint was not updated during recovery at all.
M src/backend/access/transam/xact.c
M src/backend/catalog/storage.c
Fix the tracking of min recovery point timeline.
commit : 6be799664aa89a473c15af7a015f4c2b2794da2e
author : Heikki Linnakangas <[email protected]>
date : Fri, 7 Dec 2012 16:29:39 +0200
committer: Heikki Linnakangas <[email protected]>
date : Fri, 7 Dec 2012 16:29:39 +0200
Forgot to update it at the right place. Also, consider checkpoint record
that switches to new timelne to be on the new timeline.
This fixes erroneous "requested timeline 2 does not contain minimum recovery
point" errors, pointed out by Amit Kapila while testing another patch.
M src/backend/access/transam/xlog.c
Fix assorted bugs in privileges-for-types patch.
commit : b46c92112bf5afb2476d951b9817ebd8daa7b753
author : Tom Lane <[email protected]>
date : Sun, 9 Dec 2012 00:08:23 -0500
committer: Tom Lane <[email protected]>
date : Sun, 9 Dec 2012 00:08:23 -0500
Commit 729205571e81b4767efc42ad7beb53663e08d1ff added privileges on data
types, but there were a number of oversights. The implementation of
default privileges for types missed a few places, and pg_dump was
utterly innocent of the whole concept. Per bug #7741 from Nathan Alden,
and subsequent wider investigation.
M doc/src/sgml/catalogs.sgml
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/psql/describe.c
Support automatically-updatable views.
commit : a99c42f291421572aef2b0a9360294c7d89b8bc7
author : Tom Lane <[email protected]>
date : Sat, 8 Dec 2012 18:25:48 -0500
committer: Tom Lane <[email protected]>
date : Sat, 8 Dec 2012 18:25:48 -0500
This patch makes "simple" views automatically updatable, without the need
to create either INSTEAD OF triggers or INSTEAD rules. "Simple" views
are those classified as updatable according to SQL-92 rules. The rewriter
transforms INSERT/UPDATE/DELETE commands on such views directly into an
equivalent command on the underlying table, which will generally have
noticeably better performance than is possible with either triggers or
user-written rules. A view that has INSTEAD OF triggers or INSTEAD rules
continues to operate the same as before.
For the moment, security_barrier views are not considered simple.
Also, we do not support WITH CHECK OPTION. These features may be
added in future.
Dean Rasheed, reviewed by Amit Kapila
M doc/src/sgml/intro.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/create_view.sgml
M doc/src/sgml/rules.sgml
M src/backend/catalog/information_schema.sql
M src/backend/executor/execMain.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/utils/adt/misc.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/rewrite/rewriteHandler.h
M src/include/utils/builtins.h
M src/test/regress/expected/triggers.out
A src/test/regress/expected/updatable_views.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
M src/test/regress/sql/triggers.sql
A src/test/regress/sql/updatable_views.sql
Update iso.org page link
commit : d12d9f595e1c6bc6e62b7b423762fc03ad923899
author : Peter Eisentraut <[email protected]>
date : Sat, 8 Dec 2012 07:36:25 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 8 Dec 2012 07:36:25 -0500
The old one is responding with 404.
M doc/src/sgml/nls.sgml
Improve pg_upgrade's status display
commit : 6dd9584507199a6222ff2d6a40028bba69c9175e
author : Bruce Momjian <[email protected]>
date : Fri, 7 Dec 2012 12:26:13 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 7 Dec 2012 12:26:13 -0500
Pg_upgrade displays file names during copy and database names during
dump/restore. Andrew Dunstan identified three bugs:
* long file names were being truncated to 60 _leading_ characters, which
often do not change for long file names
* file names were truncated to 60 characters in log files
* carriage returns were being output to log files
This commit fixes these --- it prints 60 _trailing_ characters to the
status display, and full path names without carriage returns to log
files. It also suppresses status output to the log file unless verbose
mode is used.
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/util.c
Correct xmax test for COPY FREEZE
commit : ef754fb51b8a40c3b3dc0f3cc42f62eff77649db
author : Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 14:18:47 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 14:18:47 +0000
M src/test/regress/expected/copy2.out
Optimize COPY FREEZE with CREATE TABLE also.
commit : 1f023f929702efc9fd4230267b0f0e8d72ba5067
author : Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 13:26:52 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 13:26:52 +0000
Jeff Davis, additional test by me
M src/backend/commands/copy.c
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
Clarify that COPY FREEZE is not a hard rule. Remove message when FREEZE not honoured, clarify reasons in comments and docs.
commit : 1eb6cee499d19fc9204e059ba37fc2dac32e2f25
author : Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 12:59:05 +0000
committer: Simon Riggs <[email protected]>
date : Fri, 7 Dec 2012 12:59:05 +0000
M doc/src/sgml/ref/copy.sgml
M src/backend/commands/copy.c
Improve pl/pgsql to support composite-type expressions in RETURN.
commit : 31a891857a128828d47d93c63e041f3b69cbab70
author : Tom Lane <[email protected]>
date : Thu, 6 Dec 2012 23:09:52 -0500
committer: Tom Lane <[email protected]>
date : Thu, 6 Dec 2012 23:09:52 -0500
For some reason lost in the mists of prehistory, RETURN was only coded to
allow a simple reference to a composite variable when the function's return
type is composite. Allow an expression instead, while preserving the
efficiency of the original code path in the case where the expression is
indeed just a composite variable's name. Likewise for RETURN NEXT.
As is true in various other places, the supplied expression must yield
exactly the number and data types of the required columns. There was some
discussion of relaxing that for pl/pgsql, but no consensus yet, so this
patch doesn't address that.
Asif Rehman, reviewed by Pavel Stehule
M doc/src/sgml/plpgsql.sgml
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
M src/test/regress/expected/plpgsql.out
M src/test/regress/sql/plpgsql.sql
Background worker processes
commit : da07a1e856511dca59cbb1357616e26baa64428e
author : Alvaro Herrera <[email protected]>
date : Thu, 6 Dec 2012 14:57:52 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 6 Dec 2012 14:57:52 -0300
Background workers are postmaster subprocesses that run arbitrary
user-specified code. They can request shared memory access as well as
backend database connections; or they can just use plain libpq frontend
database connections.
Modules listed in shared_preload_libraries can register background
workers in their _PG_init() function; this is early enough that it's not
necessary to provide an extra GUC option, because the necessary extra
resources can be allocated early on. Modules can install more than one
bgworker, if necessary.
Care is taken that these extra processes do not interfere with other
postmaster tasks: only one such process is started on each ServerLoop
iteration. This means a large number of them could be waiting to be
started up and postmaster is still able to quickly service external
connection requests. Also, shutdown sequence should not be impacted by
a worker process that's reasonably well behaved (i.e. promptly responds
to termination signals.)
The current implementation lets worker processes specify their start
time, i.e. at what point in the server startup process they are to be
started: right after postmaster start (in which case they mustn't ask
for shared memory access), when consistent state has been reached
(useful during recovery in a HOT standby server), or when recovery has
terminated (i.e. when normal backends are allowed).
In case of a bgworker crash, actions to take depend on registration
data: if shared memory was requested, then all other connections are
taken down (as well as other bgworkers), just like it were a regular
backend crashing. The bgworker itself is restarted, too, within a
configurable timeframe (which can be configured to be never).
More features to add to this framework can be imagined without much
effort, and have been discussed, but this seems good enough as a useful
unit already.
An elementary sample module is supplied.
Author: Álvaro Herrera
This patch is loosely based on prior patches submitted by KaiGai Kohei,
and unsubmitted code by Simon Riggs.
Reviewed by: KaiGai Kohei, Markus Wanner, Andres Freund,
Heikki Linnakangas, Simon Riggs, Amit Kapila
M contrib/Makefile
A contrib/worker_spi/Makefile
A contrib/worker_spi/worker_spi.c
A doc/src/sgml/bgworker.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/postgres.sgml
M src/backend/postmaster/postmaster.c
M src/backend/storage/lmgr/proc.c
M src/backend/utils/init/globals.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/guc.c
M src/include/miscadmin.h
A src/include/postmaster/bgworker.h
M src/include/postmaster/postmaster.h
M src/include/storage/proc.h
Fix intermittent crash in DROP INDEX CONCURRENTLY.
commit : e31d524867130d3c54b8d5f4c5ed59e2fcd07867
author : Tom Lane <[email protected]>
date : Wed, 5 Dec 2012 23:42:51 -0500
committer: Tom Lane <[email protected]>
date : Wed, 5 Dec 2012 23:42:51 -0500
When deleteOneObject closes and reopens the pg_depend relation,
we must see to it that the relcache pointer held by the calling function
(typically performMultipleDeletions) is updated. Usually the relcache
entry is retained so that the pointer value doesn't change, which is why
the problem had escaped notice ... but after a cache flush event there's
no guarantee that the same memory will be reassigned. To fix, change
the recursive functions' APIs so that we pass around a "Relation *"
not just "Relation".
Per investigation of occasional buildfarm failures. This is trivial
to reproduce with -DCLOBBER_CACHE_ALWAYS, which points up the sad
lack of any buildfarm member running that way on a regular basis.
M src/backend/catalog/dependency.c
Update comment at top of index_create
commit : 5e15cdb2ae7da5c1f9d8ca2ad970b98ca1cc4947
author : Alvaro Herrera <[email protected]>
date : Wed, 5 Dec 2012 23:09:46 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 5 Dec 2012 23:09:46 -0300
I neglected to update it in commit f4c4335.
Michael Paquier
M src/backend/catalog/index.c
Ensure recovery pause feature doesn't pause unless users can connect.
commit : af4aba2f05de46d8f619b75582f8741dc0afbbe0
author : Tom Lane <[email protected]>
date : Wed, 5 Dec 2012 18:27:50 -0500
committer: Tom Lane <[email protected]>
date : Wed, 5 Dec 2012 18:27:50 -0500
If we're not in hot standby mode, then there's no way for users to connect
to reset the recoveryPause flag, so we shouldn't pause. The code was aware
of this but the test to see if pausing was safe was seriously inadequate:
it wasn't paying attention to reachedConsistency, and besides what it was
testing was that we could legally enter hot standby, not that we have
done so. Get rid of that in favor of checking LocalHotStandbyActive,
which because of the coding in CheckRecoveryConsistency is tantamount to
checking that we have told the postmaster to enter hot standby.
Also, move the recoveryPausesHere() call that reacts to asynchronous
recoveryPause requests so that it's not in the middle of application of a
WAL record. I put it next to the recoveryStopsHere() call --- in future
those are going to need to interact significantly, so this seems like a
good waystation.
Also, don't bother trying to read another WAL record if we've already
decided not to continue recovery. This was no big deal when the code was
written originally, but now that reading a record might entail actions like
fetching an archive file, it seems a bit silly to do it like that.
Per report from Jeff Janes and subsequent discussion. The pause feature
needs quite a lot more work, but this gets rid of some indisputable bugs,
and seems safe enough to back-patch.
M src/backend/access/transam/xlog.c
Oops, meant to change the comment in writeTimeLineHistory.
commit : d67b06fe3e2811f8c2270b8b2b266bf1480152bc
author : Heikki Linnakangas <[email protected]>
date : Wed, 5 Dec 2012 21:00:59 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 5 Dec 2012 21:00:59 +0200
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
Must not reach consistency before XLOG_BACKUP_RECORD When waiting for an XLOG_BACKUP_RECORD the minRecoveryPoint will be incorrect, so we must not declare recovery as consistent before we have seen the record. Major bug allowing recovery to end too early in some cases, allowing people to see inconsistent db. This patch to HEAD and 9.2, other fix required for 9.1 and 9.0
commit : 6aa2e49a878d28fbbbe8efe53c3a729a51a01090
author : Simon Riggs <[email protected]>
date : Wed, 5 Dec 2012 13:28:03 +0000
committer: Simon Riggs <[email protected]>
date : Wed, 5 Dec 2012 13:28:03 +0000
Simon Riggs and Andres Freund, bug report by Jeff Janes
M src/backend/access/transam/xlog.c
Add pgstatginindex() function to get the size of the GIN pending list.
commit : 357cbaaeae5bc1f385828be97345e7ea24235f92
author : Heikki Linnakangas <[email protected]>
date : Wed, 5 Dec 2012 09:58:03 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 5 Dec 2012 09:58:03 +0200
Fujii Masao, reviewed by Kyotaro Horiguchi.
M contrib/pgstattuple/Makefile
M contrib/pgstattuple/expected/pgstattuple.out
M contrib/pgstattuple/pgstatindex.c
A contrib/pgstattuple/pgstattuple–1.0–1.1.sql
R087 contrib/pgstattuple/pgstattuple–1.0.sql contrib/pgstattuple/pgstattuple–1.1.sql
M contrib/pgstattuple/pgstattuple.control
M contrib/pgstattuple/sql/pgstattuple.sql
M doc/src/sgml/pgstattuple.sgml
Attempt to un-break Windows builds with USE_LDAP.
commit : cdf498c5d76915954cb5d5c6097eb67eb94560c8
author : Tom Lane <[email protected]>
date : Tue, 4 Dec 2012 17:25:51 -0500
committer: Tom Lane <[email protected]>
date : Tue, 4 Dec 2012 17:25:51 -0500
The buildfarm shows this case is entirely broken, and I'm betting the
reason is lack of any include file.
M src/backend/libpq/hba.c
Include isinf.o in libecpg if isinf() is not available on the system.
commit : ac99ca68d76947f438fb7e4b98d7c4ef32b1a4af
author : Michael Meskes <[email protected]>
date : Tue, 4 Dec 2012 16:35:18 +0100
committer: Michael Meskes <[email protected]>
date : Tue, 4 Dec 2012 16:35:18 +0100
Patch done by Jiang Guiqing <[email protected]>.
M src/interfaces/ecpg/ecpglib/Makefile
Downgrade a status message from LOG to DEBUG2.
commit : 90991c40ebb4f05800a7a3e4da2df7732a1ebe62
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 17:29:44 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 17:29:44 +0200
I never intended this to be anything other than a debugging aid, but forgot
to change the level before committing.
M src/backend/access/transam/xlog.c
Write exact xlog position of timeline switch in the timeline history file.
commit : 32f4de0adfb2037f1402e40b54a5c4043227363f
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 15:28:58 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 15:28:58 +0200
This allows us to do some more rigorous sanity checking for various
incorrect point-in-time recovery scenarios, and provides more information
for debugging purposes. It will also come handy in the upcoming patch to
allow timeline switches to be replicated by streaming replication.
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/include/access/timeline.h
In initdb.c, move auth warning code into main() from secondary function.
commit : a84c30dda57a177487336785927503064c6bd529
author : Bruce Momjian <[email protected]>
date : Tue, 4 Dec 2012 09:52:00 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 4 Dec 2012 09:52:00 -0500
M src/bin/initdb/initdb.c
In pg_upgrade testing script, turn off command echo at the end so status report is clearer.
commit : c47d261c07c77d1261c048e5cc1236000188ce86
author : Bruce Momjian <[email protected]>
date : Tue, 4 Dec 2012 08:17:45 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 4 Dec 2012 08:17:45 -0500
M contrib/pg_upgrade/test.sh
Fix build of LDAP URL feature
commit : ec8d1e32dd0a9801e62b8217b9305b6bc2119119
author : Peter Eisentraut <[email protected]>
date : Tue, 4 Dec 2012 06:41:21 -0500
committer: Peter Eisentraut <[email protected]>
date : Tue, 4 Dec 2012 06:41:21 -0500
Some code was not ifdef'ed out for non-LDAP builds.
patch from Bruce Momjian
M src/backend/libpq/hba.c
Track the timeline associated with minRecoveryPoint, for more sanity checks.
commit : 5ce108bf320d23070c53d3437fd3dc799a97310c
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 11:24:28 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Dec 2012 11:24:28 +0200
This allows recovery to notice certain incorrect recovery scenarios.
If a server has recovered to point X on timeline 5, and you restart
recovery, it better be on timeline 5 when it reaches point X again, not on
some timeline with a higher ID. This can happen e.g if you a standby server
is shut down, a new timeline appears in the WAL archive, and the standby
server is restarted. It will try to follow the new timeline, which is wrong
because some WAL on the old timeline was already replayed before shutdown.
Requires an initdb (or at least pg_resetxlog), because this adds a field to
the control file.
M src/backend/access/transam/xlog.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/catalog/pg_control.h
Restore set -x in pg_upgrade/test.sh, so the user can see what is being executed.
commit : 2f227656076aded21673fe4b5a831fe28e76c785
author : Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 23:44:18 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 23:44:18 -0500
M contrib/pg_upgrade/test.sh
Add support for LDAP URLs
commit : aa2fec0a18e4d23272c78916ef318078c920611a
author : Peter Eisentraut <[email protected]>
date : Mon, 3 Dec 2012 23:29:56 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 3 Dec 2012 23:29:56 -0500
Allow specifying LDAP authentication parameters as RFC 4516 LDAP URLs.
M doc/src/sgml/client-auth.sgml
M src/backend/libpq/auth.c
M src/backend/libpq/hba.c
M src/include/libpq/hba.h
In initdb.c, rename some newly created functions, and move the directory creation and xlog symlink creation to separate functions.
commit : 26374f2a0fc02b76a91b7565e908dbae99a3b5f9
author : Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 23:22:56 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 23:22:56 -0500
Per suggestions from Andrew Dunstan.
M src/bin/initdb/initdb.c
Add initdb --sync-only option to sync the data directory to durable storage.
commit : 630cd14426dc1daf85163ad417f3a224eb4ac7b0
author : Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 22:47:59 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 22:47:59 -0500
Have pg_upgrade use it, and enable server options fsync=off and
full_page_writes=off.
Document that users turning fsync from off to on should run initdb
--sync-only.
[ Previous commit was incorrectly applied as a git merge. ]
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/server.c
M doc/src/sgml/config.sgml
M doc/src/sgml/ref/initdb.sgml
M src/bin/initdb/initdb.c
Revert initdb --sync-only patch that had incorrect commit messages.
commit : 25d1ed04a2c4d176f6428b9eed57344e50f44d77
author : Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 22:46:51 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 22:46:51 -0500
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/server.c
M doc/src/sgml/config.sgml
M doc/src/sgml/ref/initdb.sgml
M src/bin/initdb/initdb.c
dummy commit
commit : 4d88bc8f2b2c094aa157f217afde1116739f2403
author : Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 09:18:21 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 09:18:21 -0500
M contrib/pg_upgrade/server.c
dummy commit
commit : 2da3005a185acdb703f4e2e2317445e6d1cf26bb
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:18:00 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:18:00 -0500
M doc/src/sgml/config.sgml
dummy commit
commit : d854c7dc6c59874ea6086f7bee29edd45394d0ae
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:14:17 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:14:17 -0500
M doc/src/sgml/config.sgml
dummy commit
commit : cd7569a5462cc083f59209ca5b0055ce883dbedd
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 17:51:53 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 17:51:53 -0500
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/server.c
M doc/src/sgml/ref/initdb.sgml
M src/bin/initdb/initdb.c
In pg_upgrade, fix bug where no users were dumped in pg_dumpall binary-upgrade mode; instead only skip dumping the current user.
commit : db00d837c17cebf3769fd3b6655812e2d3776f5d
author : Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 19:43:02 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Dec 2012 19:43:02 -0500
This bug was introduced in during the removal of split_old_dump(). Bug
discovered during local testing.
M src/bin/pg_dump/pg_dumpall.c
Update release notes for 9.2.2, 9.1.7, 9.0.11, 8.4.15, 8.3.22.
commit : 7510bec607741a6d9de1ff7ecb0b34c7d3f2815f
author : Tom Lane <[email protected]>
date : Mon, 3 Dec 2012 15:09:59 -0500
committer: Tom Lane <[email protected]>
date : Mon, 3 Dec 2012 15:09:59 -0500
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Revert "Add mode where contrib installcheck runs each module in a separately named database."
commit : fc5c1bbbeb3e00699f87407eebf2933595e9d93b
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Dec 2012 15:00:51 -0500
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Dec 2012 15:00:51 -0500
This reverts commit e2b3c21b05c78c3a726b189242e41d4aa4422bf1.
M contrib/dblink/Makefile
M src/Makefile.global.in
M src/makefiles/pgxs.mk
Avoid holding vmbuffer pin after VACUUM. During VACUUM if we pause to perform a cycle of index cleanup we drop the vmbuffer pin, so we should do the same thing when heap scan completes. This avoids holding vmbuffer pin across the main index cleanup in VACUUM, which could be minutes or hours longer than necessary for correctness.
commit : 62656617dbe49cca140f3da588a5e311b3fc35ea
author : Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 18:53:31 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 18:53:31 +0000
Bug report and suggested fix from Pavan Deolasee
M src/backend/commands/vacuumlazy.c
Fix documentation of path(polygon) function.
commit : bdd5d410b7926cd135e3fa8ce31b3849e133ebe1
author : Tom Lane <[email protected]>
date : Mon, 3 Dec 2012 11:08:50 -0500
committer: Tom Lane <[email protected]>
date : Mon, 3 Dec 2012 11:08:50 -0500
Obviously, this returns type "path", but somebody made a copy-and-pasteo
long ago.
Dagfinn Ilmari Mannsåker
M doc/src/sgml/func.sgml
Attempt to unbreak MSVC builds broken by f21bb9cfb5646e1793dcc9c0ea697bab99afa523.
commit : d5652e50d5669a8a4d8a282845ea6e26197ae10b
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Dec 2012 10:23:22 -0500
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Dec 2012 10:23:22 -0500
We can't use type uint, so use uint32.
M src/backend/access/transam/xlog.c
Refactor inCommit flag into generic delayChkpt flag. Rename PGXACT->inCommit flag into delayChkpt flag, and generalise comments to allow use in other situations, such as the forthcoming potential use in checksum patch. Replace wait loop to look for VXIDs with delayChkpt set. No user visible changes, not behaviour changes at present.
commit : f21bb9cfb5646e1793dcc9c0ea697bab99afa523
author : Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 13:13:53 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 13:13:53 +0000
Simon Riggs, reviewed and rebased by Jeff Davis
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/proc.h
M src/include/storage/procarray.h
Clarify locking for PageGetLSN() in XLogCheckBuffer()
commit : 7a764990d8c07c5f8f6c7ff3e8605d482b6778e0
author : Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 12:20:31 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 12:20:31 +0000
M src/backend/access/transam/xlog.c
Clarify when to use PageSetLSN/PageGetLSN(). Update README to explain prerequisites for correct access to LSN fields of a page. Independent chunk removed from checksums patch to reduce size of patch.
commit : 1c563a2ae1c800c93fe5f41d0427e36bef874ba7
author : Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 11:59:25 +0000
committer: Simon Riggs <[email protected]>
date : Mon, 3 Dec 2012 11:59:25 +0000
M src/backend/access/transam/README
Refactor the code implementing standby-mode logic.
commit : a068c391ab0c3f2d3487fd3090a769cc5cb19ba9
author : Heikki Linnakangas <[email protected]>
date : Mon, 3 Dec 2012 12:32:44 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 3 Dec 2012 12:32:44 +0200
It is now easier to see that it's a state machine, making the code easier
to understand overall.
M src/backend/access/transam/xlog.c
Add mode where contrib installcheck runs each module in a separately named database.
commit : e2b3c21b05c78c3a726b189242e41d4aa4422bf1
author : Andrew Dunstan <[email protected]>
date : Sun, 2 Dec 2012 17:20:38 -0500
committer: Andrew Dunstan <[email protected]>
date : Sun, 2 Dec 2012 17:20:38 -0500
Normally each module is tested in aq database named contrib_regression,
which is dropped and recreated at the beginhning of each pg_regress run.
This mode, enabled by adding USE_MODULE_DB=1 to the make command line,
runs most modules in a database with the module name embedded in it.
This will make testing pg_upgrade on clusters with the contrib modules
a lot easier.
Still to be done: adapt to the MSVC build system.
Backpatch to 9.0, which is the earliest version it is reasonably possible
to test upgrading from.
M contrib/dblink/Makefile
M src/Makefile.global.in
M src/makefiles/pgxs.mk
Update time zone data files to tzdata release 2012j.
commit : fc75d4f81c1b2f27d1954c4b9aac29370c00a0c8
author : Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 16:35:23 -0500
committer: Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 16:35:23 -0500
DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa,
and portions of Brazil.
M src/timezone/data/africa
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/europe
M src/timezone/data/northamerica
M src/timezone/data/southamerica
Recommend triggers, not rules, in the CREATE VIEW reference page.
commit : d8262b6c9b9dabee397b30f9af3c01d17e8eced8
author : Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 16:17:53 -0500
committer: Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 16:17:53 -0500
We've generally recommended use of INSTEAD triggers over rules since that
feature was added; but this old text in the CREATE VIEW reference page
didn't get the memo. Noted by Thomas Kellerer.
M doc/src/sgml/ref/create_view.sgml
Reduce scope of changes for COPY FREEZE. Allow support only for freezing tuples by explicit command. Previous coding mistakenly extended slightly beyond what was agreed as correct on -hackers. So essentially a partial revoke of earlier work, leaving just the COPY FREEZE command.
commit : 5457a130d3a66db807d1e0ee2b8e829321809b83
author : Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 20:52:52 +0000
committer: Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 20:52:52 +0000
M src/backend/access/heap/heapam.c
M src/backend/commands/copy.c
M src/include/access/heapam.h
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
Don't advance checkPoint.nextXid near the end of a checkpoint sequence.
commit : 3114cb60a1a3f482724adaed4ca17572c5e6bde7
author : Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 15:19:57 -0500
committer: Tom Lane <[email protected]>
date : Sun, 2 Dec 2012 15:19:57 -0500
This reverts commit c11130690d6dca64267201a169cfb38c1adec5ef in favor of
actually fixing the problem: namely, that we should never have been
modifying the checkpoint record's nextXid at this point to begin with.
The nextXid should match the state as of the checkpoint's logical WAL
position (ie the redo point), not the state as of its physical position.
It's especially bogus to advance it in some wal_levels and not others.
In any case there is no need for the checkpoint record to carry the
same nextXid shown in the XLOG_RUNNING_XACTS record just emitted by
LogStandbySnapshot, as any replay operation will already have adopted
that value as current.
This fixes bug #7710 from Tarvi Pillessaar, and probably also explains bug
#6291 from Daniel Farina, in that if a checkpoint were in progress at the
instant of XID wraparound, the epoch bump would be lost as reported.
(And, of course, these days there's at least a 50-50 chance of a checkpoint
being in progress at any given instant.)
Diagnosed by me and independently by Andres Freund. Back-patch to all
branches supporting hot standby.
M src/backend/access/transam/xlog.c
M src/backend/storage/ipc/standby.c
M src/include/storage/standby.h
Rearrange storage of data in xl_running_xacts. Previously we stored all xids mixed together. Now we store top-level xids first, followed by all subxids. Also skip logging any subxids if the snapshot is suboverflowed, since there are potentially large numbers of them and they are not useful in that case anyway. Has value in the envisaged design for decoding of WAL. No planned effect on Hot Standby.
commit : 5c11725867ac3cb06db065f7940143114280649c
author : Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 19:39:37 +0000
committer: Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 19:39:37 +0000
Andres Freund, reviewed by me
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/standby.h
XidEpoch++ if wraparound during checkpoint. If wal_level = hot_standby we update the checkpoint nextxid, though in the case where a wraparound occurred half-way through a checkpoint we would neglect updating the epoch also. Updating the nextxid is arguably the wrong thing to do, but changing that may introduce subtle bugs into hot standby startup, while updating the value doesn't cause any known bugs yet. Minimal fix now to HEAD and backbranches, wider fix later in HEAD.
commit : c11130690d6dca64267201a169cfb38c1adec5ef
author : Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 14:57:44 +0000
committer: Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 14:57:44 +0000
Bug reported in #6291 by Daniel Farina and slightly differently in
Cause analysis and recommended fixes from Tom Lane and Andres Freund.
Applied patch is minimal version of Andres Freund's work.
M src/backend/access/transam/xlog.c
Clarify operation of online checkpoints. Previous comments left, but were too obscure for such an important aspect of the system.
commit : 9f98704b8229f75fb6ec6e379c23cfea51a8f1e4
author : Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 13:09:55 +0000
committer: Simon Riggs <[email protected]>
date : Sun, 2 Dec 2012 13:09:55 +0000
M src/backend/access/transam/xlog.c
Fix psql crash while parsing SQL file whose encoding is different from client encoding and the client encoding is not *safe* one. Such an example is, file encoding is UTF-8 and client encoding SJIS. Patch contributed by Jiang Guiqing.
commit : 53edb8dc0274e0d05eb0371ce84b7fb14cb5eb5a
author : Tatsuo Ishii <[email protected]>
date : Sun, 2 Dec 2012 21:11:15 +0900
committer: Tatsuo Ishii <[email protected]>
date : Sun, 2 Dec 2012 21:11:15 +0900
M src/bin/psql/psqlscan.l
Prevent passing gmake's environment variables down through pg_regress.
commit : c35fea102628fedf9e62c6a440073257676a873b
author : Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 17:23:49 -0500
committer: Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 17:23:49 -0500
When we do "make install" to create a temp installation, we don't want
that instance of make to try to communicate with any instance of make
that might be calling us. This is known to cause problems if the
upper make has a -jN flag, and in principle could cause problems even
without that. Unset the relevant environment variables to prevent such
issues.
Andres Freund
M src/test/regress/pg_regress.c
Make sure sharedir/extension/ directory is created when needed.
commit : b1346822f3048ede254647f3a46186e4c0ec68d6
author : Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 16:04:39 -0500
committer: Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 16:04:39 -0500
The previous coding worked as long as MODULEDIR wasn't set explicitly,
because we create sharedir/$(datamoduledir) and the default value of
that is "extension". But if some other value is specified for MODULEDIR
then the installation directory needed for the control file wasn't made.
Cédric Villemain
M src/makefiles/pgxs.mk
Allow adding values to an enum type created in the current transaction.
commit : 7b90469b71761d240bf5efe3ad5bbd228429278e
author : Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 14:27:30 -0500
committer: Tom Lane <[email protected]>
date : Sat, 1 Dec 2012 14:27:30 -0500
Normally it is unsafe to allow ALTER TYPE ADD VALUE in a transaction block,
because instances of the value could be added to indexes later in the same
transaction, and then they would still be accessible even if the
transaction rolls back. However, we can allow this if the enum type itself
was created in the current transaction, because then any such indexes would
have to go away entirely on rollback.
The reason for allowing this is to support pg_upgrade's new usage of
pg_restore --single-transaction: in --binary-upgrade mode, pg_dump emits
enum types as a succession of ALTER TYPE ADD VALUE commands so that it can
preserve the values' OIDs. The support is a bit limited, so we'll leave
it undocumented.
Andres Freund
M src/backend/commands/typecmds.c
M src/backend/tcop/utility.c
M src/include/commands/typecmds.h
M src/test/regress/expected/enum.out
M src/test/regress/sql/enum.sql
In pg_upgrade, remove 'set -x' from test script.
commit : 452739df82f3cf8f061520a0bdd0af892423652f
author : Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 12:07:14 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 12:07:14 -0500
M contrib/pg_upgrade/test.sh
Revert:
commit : 1c59e376652bc86d72126cafd6d9831d8a188f79
author : Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 10:21:45 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 10:21:45 -0500
In pg_upgrade, remove pg_restore's --single-transaction option,
as it throws errors in certain cases.
M contrib/pg_upgrade/pg_upgrade.c
Remove pg_restore's --single-transaction option, as it throws errors in certain cases.
commit : 209772350b69f816e291b14b072f6e3862a0b4e0
author : Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 09:57:55 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 1 Dec 2012 09:57:55 -0500
M contrib/pg_upgrade/pg_upgrade.c
Second tweak of COPY FREEZE
commit : 02aea36414ecfac8d1e90fba6d4642d8d67d7aaa
author : Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 14:55:35 +0000
committer: Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 14:55:35 +0000
M src/test/regress/expected/copy2.out
Tweak tests in COPY FREEZE
commit : ddf509eb4a163aacd59a7bbd44ba2ca9ba691da2
author : Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 13:46:41 +0000
committer: Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 13:46:41 +0000
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
COPY FREEZE and mark committed on fresh tables. When a relfilenode is created in this subtransaction or a committed child transaction and it cannot otherwise be seen by our own process, mark tuples committed ahead of transaction commit for all COPY commands in same transaction. If FREEZE specified on COPY and pre-conditions met then rows will also be frozen. Both options designed to avoid revisiting rows after commit, increasing performance of subsequent commands after data load and upgrade. pg_restore changes later.
commit : 8de72b66a2edcf12c812de0a73bd50b6b7d81d62
author : Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 12:54:20 +0000
committer: Simon Riggs <[email protected]>
date : Sat, 1 Dec 2012 12:54:20 +0000
Simon Riggs, review comments from Heikki Linnakangas, Noah Misch and design
input from Tom Lane, Robert Haas and Kevin Grittner
M doc/src/sgml/ref/copy.sgml
M src/backend/access/heap/heapam.c
M src/backend/commands/copy.c
M src/backend/parser/gram.y
M src/backend/utils/mmgr/portalmem.c
M src/backend/utils/time/snapmgr.c
M src/include/access/heapam.h
M src/include/utils/portal.h
M src/include/utils/snapmgr.h
M src/test/regress/expected/copy2.out
M src/test/regress/sql/copy2.sql
doc: Fix broken links to DocBook wiki
commit : 44c03efee3d15a1db3d64bc5a2da91c145a91873
author : Peter Eisentraut <[email protected]>
date : Sat, 1 Dec 2012 01:52:23 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 1 Dec 2012 01:52:23 -0500
M doc/src/sgml/docguide.sgml
In pg_upgrade, improve status wording now that we have per-database status output for dump/restore.
commit : 5eeab9c85cfd7d7ddda4d72ea8a4f03aa2a74969
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:32:19 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 22:32:19 -0500
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/pg_upgrade.c
Change test ExceptionalCondition to return void
commit : 113d25c4e6b1111113aa249640af0682f09c781a
author : Alvaro Herrera <[email protected]>
date : Fri, 30 Nov 2012 19:20:15 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 30 Nov 2012 19:20:15 -0300
Commit 81107282a changed it in assert.c, but overlooked this other file.
M src/backend/port/ipc_test.c
Take buffer lock while inspecting btree index pages in contrib/pageinspect.
commit : d54a94b806825a119be86d5f73232b06dd9e9a16
author : Tom Lane <[email protected]>
date : Fri, 30 Nov 2012 17:02:29 -0500
committer: Tom Lane <[email protected]>
date : Fri, 30 Nov 2012 17:02:29 -0500
It's not safe to examine a shared buffer without any lock.
M contrib/pageinspect/btreefuncs.c
Split initdb.c main() code into multiple functions, for easier maintenance.
commit : b86327c1c53aab732e21666e8c8a97b11cded804
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 16:45:08 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 16:45:08 -0500
M src/bin/initdb/initdb.c
In pg_upgrade, dump each database separately and use --single-transaction to restore each database schema. This yields performance improvements for databases with many tables. Also, remove split_old_dump() as it is no longer needed.
commit : 12ee6ec71f8754ff3573711032b9b4d5a764ba84
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 16:30:13 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 16:30:13 -0500
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/util.c
M src/bin/pg_dump/pg_dumpall.c
Move long_options structures to the top of main() functions, for consistency.
commit : bd9c8e741b5724e31b2a3d8da9f0218f7b3b44e5
author : Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 14:49:55 -0500
committer: Bruce Momjian <[email protected]>
date : Fri, 30 Nov 2012 14:49:55 -0500
Per suggestion from Tom.
M contrib/pg_test_fsync/pg_test_fsync.c
M contrib/pg_test_timing/pg_test_timing.c
M contrib/pgbench/pgbench.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_dump/pg_dumpall.c
M src/test/regress/pg_regress.c
Add missing buffer lock acquisition in GetTupleForTrigger().
commit : da63fec7dbb0c459aa0f8753a3d30a3a6cd3d73f
author : Tom Lane <[email protected]>
date : Fri, 30 Nov 2012 13:55:55 -0500
committer: Tom Lane <[email protected]>
date : Fri, 30 Nov 2012 13:55:55 -0500
If we had not been holding buffer pin continuously since the tuple was
initially fetched by the UPDATE or DELETE query, it would be possible for
VACUUM or a page-prune operation to move the tuple while we're trying to
copy it. This would result in a garbage "old" tuple value being passed to
an AFTER ROW UPDATE or AFTER ROW DELETE trigger. The preconditions for
this are somewhat improbable, and the timing constraints are very tight;
so it's not so surprising that this hasn't been reported from the field,
even though the bug has been there a long time.
Problem found by Andres Freund. Back-patch to all active branches.
M src/backend/commands/trigger.c
Clean environment for pg_upgrade test.
commit : abece8af179f18af3b877220d83f743127ee1aa6
author : Andrew Dunstan <[email protected]>
date : Fri, 30 Nov 2012 07:54:24 -0500
committer: Andrew Dunstan <[email protected]>
date : Fri, 30 Nov 2012 07:54:24 -0500
This removes exisiting PG settings from the environment for
pg_upgrade tests, just like pg_regress does.
M contrib/pg_upgrade/test.sh
Add libpq function PQconninfo()
commit : 65c3bf19fd3e1f6a591618e92eb4c54d0b217564
author : Magnus Hagander <[email protected]>
date : Fri, 30 Nov 2012 15:09:18 +0900
committer: Magnus Hagander <[email protected]>
date : Fri, 30 Nov 2012 15:09:18 +0900
This allows a caller to get back the exact conninfo array that was
used to create a connection, including parameters read from the
environment.
In doing this, restructure how options are copied from the conninfo
to the actual connection.
Zoltan Boszormenyi and Magnus Hagander
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/exports.txt
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/libpq-fe.h
Produce a more useful error message for over-length Unix socket paths.
commit : 4af446e7cd0b37bb5d7fa9b73193c68e14239499
author : Tom Lane <[email protected]>
date : Thu, 29 Nov 2012 19:57:01 -0500
committer: Tom Lane <[email protected]>
date : Thu, 29 Nov 2012 19:57:01 -0500
The length of a socket path name is constrained by the size of struct
sockaddr_un, and there's not a lot we can do about it since that is a
kernel API. However, it would be a good thing if we produced an
intelligible error message when the user specifies a socket path that's too
long --- and getaddrinfo's standard API is too impoverished to do this in
the natural way. So insert explicit tests at the places where we construct
a socket path name. Now you'll get an error that makes sense and even
tells you what the limit is, rather than something generic like
"Non-recoverable failure in name resolution".
Per trouble report from Jeremy Drake and a fix idea from Andrew Dunstan.
M src/backend/libpq/pqcomm.c
M src/include/libpq/pqcomm.h
M src/interfaces/libpq/fe-connect.c
Correctly init fast path fields on PGPROC
commit : d3fe59939c142f2adad2a9cca03e0e0d27c162a4
author : Simon Riggs <[email protected]>
date : Thu, 29 Nov 2012 22:15:52 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 29 Nov 2012 22:15:52 +0000
M src/backend/storage/lmgr/proc.c
Cleanup VirtualXact at end of Hot Standby.
commit : f1e57a4ec9c0ce875683d556909a28a5549da455
author : Simon Riggs <[email protected]>
date : Thu, 29 Nov 2012 21:59:11 +0000
committer: Simon Riggs <[email protected]>
date : Thu, 29 Nov 2012 21:59:11 +0000
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/lock.c
M src/include/storage/lock.h
Basic binary heap implementation.
commit : 7a2fe9bd0371b819aacc97a007ec1d955237d207
author : Robert Haas <[email protected]>
date : Thu, 29 Nov 2012 11:13:08 -0500
committer: Robert Haas <[email protected]>
date : Thu, 29 Nov 2012 11:13:08 -0500
There are probably other places where this can be used, but for now,
this just makes MergeAppend use it, so that this code will have test
coverage. There is other work in the queue that will use this, as
well.
Abhijit Menon-Sen, reviewed by Andres Freund, Robert Haas, Álvaro
Herrera, Tom Lane, and others.
M src/backend/executor/nodeMergeAppend.c
M src/backend/lib/Makefile
A src/backend/lib/binaryheap.c
A src/include/lib/binaryheap.h
M src/include/nodes/execnodes.h
When processing nested structure pointer variables ecpg always expected an array datatype which of course is wrong.
commit : 086cf1458c6000a01e6c9ff44cc5da30cd65d145
author : Michael Meskes <[email protected]>
date : Thu, 29 Nov 2012 17:12:00 +0100
committer: Michael Meskes <[email protected]>
date : Thu, 29 Nov 2012 17:12:00 +0100
Applied patch by Muhammad Usama <[email protected]> to fix this.
M src/interfaces/ecpg/preproc/variable.c
Suppress parallel build in interfaces/ecpg/preproc/.
commit : 1fc698cf14d17a3a8ad018cf9ec100198a339447
author : Tom Lane <[email protected]>
date : Wed, 28 Nov 2012 22:19:46 -0500
committer: Tom Lane <[email protected]>
date : Wed, 28 Nov 2012 22:19:46 -0500
This is to see if it will stop intermittent build failures on buildfarm
member okapi. We know that gmake 3.82 has some problems with sometimes
not honoring dependencies in parallel builds, and it seems likely that
this is more of the same. Since the vast bulk of the work in the preproc
directory is associated with creating preproc.c and then preproc.o,
parallelism buys us hardly anything here anyway.
Also, make both this .NOTPARALLEL and the one previously added in
interfaces/ecpg/Makefile be conditional on "ifeq ($(MAKE_VERSION),3.82)".
The known bug in gmake is fixed upstream and should not be present in
3.83 and up, and there's no reason to think it affects older releases.
M src/interfaces/ecpg/Makefile
M src/interfaces/ecpg/preproc/Makefile
Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY.
commit : 3c84046490bed3c22e0873dc6ba492e02b8b9051
author : Tom Lane <[email protected]>
date : Wed, 28 Nov 2012 21:25:27 -0500
committer: Tom Lane <[email protected]>
date : Wed, 28 Nov 2012 21:25:27 -0500
Commit 8cb53654dbdb4c386369eb988062d0bbb6de725e, which introduced DROP
INDEX CONCURRENTLY, managed to break CREATE INDEX CONCURRENTLY via a poor
choice of catalog state representation. The pg_index state for an index
that's reached the final pre-drop stage was the same as the state for an
index just created by CREATE INDEX CONCURRENTLY. This meant that the
(necessary) change to make RelationGetIndexList ignore about-to-die indexes
also made it ignore freshly-created indexes; which is catastrophic because
the latter do need to be considered in HOT-safety decisions. Failure to
do so leads to incorrect index entries and subsequently wrong results from
queries depending on the concurrently-created index.
To fix, add an additional boolean column "indislive" to pg_index, so that
the freshly-created and about-to-die states can be distinguished. (This
change obviously is only possible in HEAD. This patch will need to be
back-patched, but in 9.2 we'll use a kluge consisting of overloading the
formerly-impossible state of indisvalid = true and indisready = false.)
In addition, change CREATE/DROP INDEX CONCURRENTLY so that the pg_index
flag changes they make without exclusive lock on the index are made via
heap_inplace_update() rather than a normal transactional update. The
latter is not very safe because moving the pg_index tuple could result in
concurrent SnapshotNow scans finding it twice or not at all, thus possibly
resulting in index corruption. This is a pre-existing bug in CREATE INDEX
CONCURRENTLY, which was copied into the DROP code.
In addition, fix various places in the code that ought to check to make
sure that the indexes they are manipulating are valid and/or ready as
appropriate. These represent bugs that have existed since 8.2, since
a failed CREATE INDEX CONCURRENTLY could leave a corrupt or invalid
index behind, and we ought not try to do anything that might fail with
such an index.
Also fix RelationReloadIndexInfo to ensure it copies all the pg_index
columns that are allowed to change after initial creation. Previously we
could have been left with stale values of some fields in an index relcache
entry. It's not clear whether this actually had any user-visible
consequences, but it's at least a bug waiting to happen.
In addition, do some code and docs review for DROP INDEX CONCURRENTLY;
some cosmetic code cleanup but mostly addition and revision of comments.
This will need to be back-patched, but in a noticeably different form,
so I'm committing it to HEAD before working on the back-patch.
Problem reported by Amit Kapila, diagnosis by Pavan Deolassee,
fix by Tom Lane and Andres Freund.
M contrib/tcn/tcn.c
M doc/src/sgml/catalogs.sgml
M doc/src/sgml/ref/drop_index.sgml
M src/backend/access/heap/README.HOT
M src/backend/catalog/dependency.c
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/backend/commands/vacuum.c
M src/backend/executor/execUtils.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/parse_utilcmd.c
M src/backend/utils/cache/relcache.c
M src/include/catalog/catversion.h
M src/include/catalog/index.h
M src/include/catalog/pg_index.h
Split out rmgr rm_desc functions into their own files
commit : 1577b46b7c81e490cf5c8f0e90d0e5d0c09b5414
author : Alvaro Herrera <[email protected]>
date : Wed, 28 Nov 2012 12:35:01 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 28 Nov 2012 12:35:01 -0300
This is necessary (but not sufficient) to have them compilable outside
of a backend environment.
M src/backend/access/Makefile
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/hash/hash.c
M src/backend/access/heap/heapam.c
M src/backend/access/nbtree/nbtxlog.c
A src/backend/access/rmgrdesc/Makefile
A src/backend/access/rmgrdesc/clogdesc.c
A src/backend/access/rmgrdesc/dbasedesc.c
A src/backend/access/rmgrdesc/gindesc.c
A src/backend/access/rmgrdesc/gistdesc.c
A src/backend/access/rmgrdesc/hashdesc.c
A src/backend/access/rmgrdesc/heapdesc.c
A src/backend/access/rmgrdesc/mxactdesc.c
A src/backend/access/rmgrdesc/nbtdesc.c
A src/backend/access/rmgrdesc/relmapdesc.c
A src/backend/access/rmgrdesc/seqdesc.c
A src/backend/access/rmgrdesc/smgrdesc.c
A src/backend/access/rmgrdesc/spgdesc.c
A src/backend/access/rmgrdesc/standbydesc.c
A src/backend/access/rmgrdesc/tblspcdesc.c
A src/backend/access/rmgrdesc/xactdesc.c
A src/backend/access/rmgrdesc/xlogdesc.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/clog.c
M src/backend/access/transam/multixact.c
M src/backend/access/transam/rmgr.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/catalog/heap.c
M src/backend/catalog/storage.c
M src/backend/commands/dbcommands.c
M src/backend/commands/sequence.c
M src/backend/commands/tablespace.c
M src/backend/storage/ipc/standby.c
M src/backend/utils/cache/relmapper.c
M src/include/access/xlog_internal.h
M src/include/catalog/storage.h
A src/include/catalog/storage_xlog.h
If we don't have a backup-end-location, don't claim we've reached it.
commit : dd7353dde82ad451bf681b37175be128995330fe
author : Heikki Linnakangas <[email protected]>
date : Wed, 28 Nov 2012 11:45:30 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 28 Nov 2012 11:45:30 +0200
This was apparently a typo, which caused recovery to think that it
immediately reached the end of backup, and allowed the database to start
up too early.
Reported by Jeff Janes. Backpatch to 9.2, where this code was introduced.
M src/backend/access/transam/xlog.c
Add explicit casts in ilist.h's inline functions.
commit : e78d288c895bd296e3cb1ca29c7fe2431eef3fcd
author : Tom Lane <[email protected]>
date : Tue, 27 Nov 2012 10:58:37 -0500
committer: Tom Lane <[email protected]>
date : Tue, 27 Nov 2012 10:58:37 -0500
Needed to silence C++ errors, per report from Peter Eisentraut.
Andres Freund
M src/include/lib/ilist.h
Add OpenTransientFile, with automatic cleanup at end-of-xact.
commit : 1f67078ea324d492a366a24abb2ac313c629314f
author : Heikki Linnakangas <[email protected]>
date : Tue, 27 Nov 2012 10:25:50 +0200
committer: Heikki Linnakangas <[email protected]>
date : Tue, 27 Nov 2012 10:25:50 +0200
Files opened with BasicOpenFile or PathNameOpenFile are not automatically
cleaned up on error. That puts unnecessary burden on callers that only want
to keep the file open for a short time. There is AllocateFile, but that
returns a buffered FILE * stream, which in many cases is not the nicest API
to work with. So add function called OpenTransientFile, which returns a
unbuffered fd that's cleaned up like the FILE* returned by AllocateFile().
This plugs a few rare fd leaks in error cases:
1. copy_file() - fixed by by using OpenTransientFile instead of BasicOpenFile
2. XLogFileInit() - fixed by adding close() calls to the error cases. Can't
use OpenTransientFile here because the fd is supposed to persist over
transaction boundaries.
3. lo_import/lo_export - fixed by using OpenTransientFile instead of
PathNameOpenFile.
In addition to plugging those leaks, this replaces many BasicOpenFile() calls
with OpenTransientFile() that were not leaking, because the code meticulously
closed the file on error. That wasn't strictly necessary, but IMHO it's good
for robustness.
The same leaks exist in older versions, but given the rarity of the issues,
I'm not backpatching this. Not yet, anyway - it might be good to backpatch
later, after this mechanism has had some more testing in master branch.
M src/backend/access/transam/slru.c
M src/backend/access/transam/timeline.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xlog.c
M src/backend/libpq/be-fsstubs.c
M src/backend/storage/file/copydir.c
M src/backend/storage/file/fd.c
M src/backend/storage/smgr/md.c
M src/backend/utils/cache/relmapper.c
M src/include/storage/fd.h
Revert patch for taking fewer snapshots.
commit : 532994299e2ff208a58376134fab75f5ae471e41
author : Tom Lane <[email protected]>
date : Mon, 26 Nov 2012 15:55:43 -0500
committer: Tom Lane <[email protected]>
date : Mon, 26 Nov 2012 15:55:43 -0500
This reverts commit d573e239f03506920938bf0be56c868d9c3416da, "Take fewer
snapshots". While that seemed like a good idea at the time, it caused
execution to use a snapshot that had been acquired before locking any of
the tables mentioned in the query. This created user-visible anomalies
that were not present in any prior release of Postgres, as reported by
Tomas Vondra. While this whole area could do with a redesign (since there
are related cases that have anomalies anyway), it doesn't seem likely that
any future patch would be reasonably back-patchable; and we don't want 9.2
to exhibit a behavior that's subtly unlike either past or future releases.
Hence, revert to prior code while we rethink the problem.
M doc/src/sgml/release-9.2.sgml
M src/backend/commands/portalcmds.c
M src/backend/commands/prepare.c
M src/backend/executor/spi.c
M src/backend/tcop/postgres.c
M src/backend/tcop/pquery.c
M src/include/tcop/pquery.h
Fix SELECT DISTINCT with index-optimized MIN/MAX on inheritance trees.
commit : d3237e04ca380d6c08f6133fde97a9d956e3161a
author : Tom Lane <[email protected]>
date : Mon, 26 Nov 2012 12:57:17 -0500
committer: Tom Lane <[email protected]>
date : Mon, 26 Nov 2012 12:57:17 -0500
In a query such as "SELECT DISTINCT min(x) FROM tab", the DISTINCT is
pretty useless (there being only one output row), but nonetheless it
shouldn't fail. But it could fail if "tab" is an inheritance parent,
because planagg.c's code for fixing up equivalence classes after making the
index-optimized MIN/MAX transformation wasn't prepared to find child-table
versions of the aggregate expression. The least ugly fix seems to be
to add an option to mutate_eclass_expressions() to skip child-table
equivalence class members, which aren't used anymore at this stage of
planning so it's not really necessary to fix them. Since child members
are ignored in many cases already, it seems plausible for
mutate_eclass_expressions() to have an option to ignore them too.
Per bug #7703 from Maxim Boguk.
Back-patch to 9.1. Although the same code exists before that, it cannot
encounter child-table aggregates AFAICS, because the index optimization
transformation cannot succeed on inheritance trees before 9.1 (for lack
of MergeAppend).
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/planagg.c
M src/include/optimizer/paths.h
M src/test/regress/expected/aggregates.out
M src/test/regress/sql/aggregates.sql
In pg_upgrade, simplify function copy_file() by using pg_malloc() and centralizing error/shutdown code.
commit : 6b711cf37c228749b6a8cef50e16e3c587d18dd4
author : Bruce Momjian <[email protected]>
date : Sat, 24 Nov 2012 22:39:03 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 24 Nov 2012 22:39:03 -0500
M contrib/pg_upgrade/file.c
In pg_upgrade, fix a few place that used maloc/free rather than pg_malloc/pg_free.
commit : 16e1ae77f9eb64ba7d292fd5f71e289a0fcaa854
author : Bruce Momjian <[email protected]>
date : Sat, 24 Nov 2012 22:12:39 -0500
committer: Bruce Momjian <[email protected]>
date : Sat, 24 Nov 2012 22:12:39 -0500
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/file.c
Remove -Wlogical-op from standard compiler flags
commit : bc5430aa95ac672a82bedb88e3f5081a8fdadb1c
author : Peter Eisentraut <[email protected]>
date : Fri, 23 Nov 2012 16:24:24 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 23 Nov 2012 16:24:24 -0500
It creates too many warnings with GCC 4.3 and 4.4.
M configure
M configure.in
Applied patch by Chen Huajun <[email protected]> to make ecpg able to cope with very long structs.
commit : c50b8a4637bcaab2f0e1fb69c39fdcec7e535874
author : Michael Meskes <[email protected]>
date : Fri, 23 Nov 2012 14:39:27 +0100
committer: Michael Meskes <[email protected]>
date : Fri, 23 Nov 2012 14:39:27 +0100
M src/interfaces/ecpg/preproc/type.c
Fix pg_resetxlog to use correct path to postmaster.pid.
commit : 455b8887cf79dc4d4b5fea0cf65f56f316baaaa2
author : Tom Lane <[email protected]>
date : Thu, 22 Nov 2012 11:23:24 -0500
committer: Tom Lane <[email protected]>
date : Thu, 22 Nov 2012 11:23:24 -0500
Since we've already chdir'd into the data directory, the file should
be referenced as just "postmaster.pid", without prefixing the directory
path. This is harmless in the normal case where an absolute PGDATA path
is used, but quite dangerous if a relative path is specified, since the
program might then fail to notice an active postmaster.
Reported by Hari Babu. This got broken in my commit
eb5949d190e80360386113fde0f05854f0c9824d, so patch all active versions.
M src/bin/pg_resetxlog/pg_resetxlog.c
Avoid bogus "out-of-sequence timeline ID" errors in standby-mode.
commit : 24c19e6bf96d556b3a9517ce42f54b5756ca0384
author : Heikki Linnakangas <[email protected]>
date : Thu, 22 Nov 2012 11:23:46 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 22 Nov 2012 11:23:46 +0200
When startup process opens a WAL segment after replaying part of it, it
validates the first page on the WAL segment, even though the page it's
really interested in later in the file. As part of the validation, it checks
that the TLI on the page header is >= the TLI it saw on the last page it
read. If the segment contains a timeline switch, and we have already
replayed it, and then re-open the WAL segment (because of streaming
replication got disconnected and reconnected, for example), the TLI check
will fail when the first page is validated. Fix that by relaxing the TLI
check when re-opening a WAL segment.
Backpatch to 9.0. Earlier versions had the same code, but before standby
mode was introduced in 9.0, recovery never tried to re-read a segment after
partially replaying it.
Reported by Amit Kapila, while testing a new feature.
M src/backend/access/transam/xlog.c
Don't launch new child processes after we've been told to shut down.
commit : 27b2c6a1ef8ab5993e2aed4366d2c49c8989381a
author : Tom Lane <[email protected]>
date : Wed, 21 Nov 2012 15:18:38 -0500
committer: Tom Lane <[email protected]>
date : Wed, 21 Nov 2012 15:18:38 -0500
Once we've received a shutdown signal (SIGINT or SIGTERM), we should not
launch any more child processes, even if we get signals requesting such.
The normal code path for spawning backends has always understood that,
but the postmaster's infrastructure for hot standby and autovacuum didn't
get the memo. As reported by Hari Babu in bug #7643, this could lead to
failure to shut down at all in some cases, such as when SIGINT is received
just before the startup process sends PMSIGNAL_RECOVERY_STARTED: we'd
launch a bgwriter and checkpointer, and then those processes would have no
idea that they ought to quit. Similarly, launching a new autovacuum worker
would result in waiting till it finished before shutting down.
Also, switch the order of the code blocks in reaper() that detect startup
process crash versus shutdown termination. Once we've sent it a signal,
we should not consider that exit(1) is surprising. This is just a cosmetic
fix since shutdown occurs correctly anyway, but better not to log a phony
complaint about startup process crash.
Back-patch to 9.0. Some parts of this might be applicable before that,
but given the lack of prior complaints I'm not going to worry too much
about older branches.
M src/backend/postmaster/postmaster.c
Speed up operations on numeric, mostly by avoiding palloc() overhead.
commit : 5cb0e335976befdcedd069c59dd3858fb3e649b3
author : Heikki Linnakangas <[email protected]>
date : Wed, 21 Nov 2012 15:53:35 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 21 Nov 2012 15:53:35 +0200
In many functions, a NumericVar was initialized from an input Numeric, to be
passed as input to a calculation function. When the NumericVar is not
modified, the digits array of the NumericVar can point directly to the digits
array in the original Numeric, and we can avoid a palloc() and memcpy(). Add
init_var_from_num() function to initialize a var like that.
Remove dscale argument from get_str_from_var(), as all the callers just
passed the dscale of the variable. That means that the rounding it used to
do was not actually necessary, and get_str_from_var() no longer scribbles on
its input. That makes it safer in general, and allows us to use the new
init_var_from_num() function in e.g numeric_out().
Also modified numericvar_to_int8() to no scribble on its input either. It
creates a temporary copy to avoid that. To compensate, the callers no longer
need to create a temporary copy, so the net # of pallocs is the same, but this
is nicer.
In the passing, use a constant for the number 10 in get_str_from_var_sci(),
when calculating 10^exponent. Saves a palloc() and some cycles to convert
integer 10 to numeric.
Original patch by Kyotaro HORIGUCHI, with further changes by me. Reviewed
by Pavel Stehule.
M src/backend/utils/adt/numeric.c
In pg_upgrade, report errno string if file existence check returns an error and errno != ENOENT.
commit : b55743a5df13711b8143cd3f53c8abc3416ee520
author : Bruce Momjian <[email protected]>
date : Mon, 19 Nov 2012 16:41:58 -0500
committer: Bruce Momjian <[email protected]>
date : Mon, 19 Nov 2012 16:41:58 -0500
M contrib/pg_upgrade/relfilenode.c
Improve handling of INT_MIN / -1 and related cases.
commit : 1f7cb5c30983752ff8de833de30afcaee63536d0
author : Tom Lane <[email protected]>
date : Mon, 19 Nov 2012 12:24:25 -0500
committer: Tom Lane <[email protected]>
date : Mon, 19 Nov 2012 12:24:25 -0500
Some platforms throw an exception for this division, rather than returning
a necessarily-overflowed result. Since we were testing for overflow after
the fact, an exception isn't nice. We can avoid the problem by treating
division by -1 as negation.
Add some regression tests so that we'll find out if any compilers try to
optimize away the overflow check conditions.
This ought to be back-patched, but I'm going to see what the buildfarm
reports about the regression tests first.
Per discussion with Xi Wang, though this is different from the patch he
submitted.
M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c
M src/test/regress/expected/int2.out
M src/test/regress/expected/int4.out
M src/test/regress/expected/int8-exp-three-digits.out
M src/test/regress/expected/int8.out
M src/test/regress/sql/int2.sql
M src/test/regress/sql/int4.sql
M src/test/regress/sql/int8.sql
Fix archive_cleanup_command.
commit : 644a0a6379afc00803dd89ffe8416514f5dfc217
author : Heikki Linnakangas <[email protected]>
date : Mon, 19 Nov 2012 10:02:25 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 19 Nov 2012 10:02:25 +0200
When I moved ExecuteRecoveryCommand() from xlog.c to xlogarchive.c, I didn't
realize that it's called from the checkpoint process, not the startup
process. I tried to use InRedo variable to decide whether or not to attempt
cleaning up the archive (must not do so before we have read the initial
checkpoint record), but that variable is only valid within the startup
process.
Instead, let ExecuteRecoveryCommand() always clean up the archive, and add
an explicit argument to RestoreArchivedFile() to say whether that's allowed
or not. The caller knows better.
Reported by Erik Rijkers, diagnosis by Fujii Masao. Only 9.3devel is
affected.
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogarchive.c
M src/include/access/xlog_internal.h
Limit values of archive_timeout, post_auth_delay, auth_delay.milliseconds.
commit : b6e3798f3aa2747db145f25e03a8d34f2e5ec8c8
author : Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 17:15:06 -0500
committer: Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 17:15:06 -0500
The previous definitions of these GUC variables allowed them to range
up to INT_MAX, but in point of fact the underlying code would suffer
overflows or other errors with large values. Reduce the maximum values
to something that won't misbehave. There's no apparent value in working
harder than this, since very large delays aren't sensible for any of
these. (Note: the risk with archive_timeout is that if we're late
checking the state, the timestamp difference it's being compared to
might overflow. So we need some amount of slop; the choice of INT_MAX/2
is arbitrary.)
Per followup investigation of bug #7670. Although this isn't a very
significant fix, might as well back-patch.
M contrib/auth_delay/auth_delay.c
M src/backend/utils/misc/guc.c
Fix syslogger to not fail when log_rotation_age exceeds 2^31 milliseconds.
commit : d038966ddb918872700f9f21affbc84d6bc2c029
author : Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 16:16:39 -0500
committer: Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 16:16:39 -0500
We need to avoid calling WaitLatch with timeouts exceeding INT_MAX.
Fortunately a simple clamp will do the trick, since no harm is done if
the wait times out before it's really time to rotate the log file.
Per bug #7670 (probably bug #7545 is the same thing, too).
In passing, fix bogus definition of log_rotation_age's maximum value in
guc.c --- it was numerically right, but only because MINS_PER_HOUR and
SECS_PER_MINUTE have the same value.
Back-patch to 9.2. Before that, syslogger wasn't using WaitLatch.
M src/backend/postmaster/syslogger.c
M src/backend/utils/misc/guc.c
Assert that WaitLatch's timeout is not more than INT_MAX milliseconds.
commit : 14ddff44c22cb358775d5aad6953f0ce0fdb64cf
author : Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 15:39:51 -0500
committer: Tom Lane <[email protected]>
date : Sun, 18 Nov 2012 15:39:51 -0500
The behavior with larger values is unspecified by the Single Unix Spec.
It appears that BSD-derived kernels report EINVAL, although Linux does not.
If waiting for longer intervals is desired, the calling code has to do
something to limit the delay; we can't portably fix it here since "long"
may not be any wider than "int" in the first place.
Part of response to bug #7670, though this change doesn't fix that
(in fact, it converts the problem from an ERROR into an Assert failure).
No back-patch since it's just an assertion addition.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
doc: Put pg_temp into documentation index
commit : 6b6633ad6cf663c81b5e0bc0c40709bf9d8d0299
author : Peter Eisentraut <[email protected]>
date : Sat, 17 Nov 2012 18:08:13 -0500
committer: Peter Eisentraut <[email protected]>
date : Sat, 17 Nov 2012 18:08:13 -0500
Karl O. Pinc
M doc/src/sgml/config.sgml
M doc/src/sgml/ref/create_function.sgml
Add -Wlogical-op to standard compiler flags, if supported
commit : 67c03c6f3ca3726fd99488b497432dea21ab8e2a
author : Peter Eisentraut <[email protected]>
date : Fri, 16 Nov 2012 00:35:06 -0500
committer: Peter Eisentraut <[email protected]>
date : Fri, 16 Nov 2012 00:35:06 -0500
M configure
M configure.in
Improve check_partial_indexes() to consider join clauses in proof attempts.
commit : 1746ba92565d130c3b5c6fc285ac57f00cf6bf75
author : Tom Lane <[email protected]>
date : Thu, 15 Nov 2012 19:29:05 -0500
committer: Tom Lane <[email protected]>
date : Thu, 15 Nov 2012 19:29:05 -0500
Traditionally check_partial_indexes() has only looked at restriction
clauses while trying to prove partial indexes usable in queries. However,
join clauses can also be used in some cases; mainly, that a strict operator
on "x" proves an "x IS NOT NULL" index predicate, even if the operator is
in a join clause rather than a restriction clause. Adding this code fixes
a regression in 9.2, because previously we would take join clauses into
account when considering whether a partial index could be used in a
nestloop inner indexscan path. 9.2 doesn't handle nestloop inner
indexscans in the same way, and this consideration was overlooked in the
rewrite. Moving the work to check_partial_indexes() is a better solution
anyway, since the proof applies whether or not we actually use the index
in that particular way, and we don't have to do it over again for each
possible outer relation. Per report from Dave Cramer.
M src/backend/optimizer/path/indxpath.c
doc: Put commas in the right place on pg_restore reference page
commit : 817c186ea31ca4e304a1b55540433a1287f9fb7a
author : Peter Eisentraut <[email protected]>
date : Thu, 15 Nov 2012 00:04:23 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 15 Nov 2012 00:04:23 -0500
Karl O. Pinc
M doc/src/sgml/ref/pg_restore.sgml
In pg_upgrade, add third meaningless parameter to open().
commit : 546d65d55fd67c40e6f31d16cc8fa6e9afd3a403
author : Bruce Momjian <[email protected]>
date : Wed, 14 Nov 2012 19:01:29 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 14 Nov 2012 19:01:29 -0500
M contrib/pg_upgrade/relfilenode.c
In pg_upgrade, copy fsm, vm, and extent files by checking for file existence via open(), rather than collecting a directory listing and looking up matching relfilenode files with sequential scans of the array. This speeds up pg_upgrade by 2x for a large number of tables, e.g. 16k.
commit : 29add0de4920e4f448a30bfc35798b939c211d97
author : Bruce Momjian <[email protected]>
date : Wed, 14 Nov 2012 17:32:04 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 14 Nov 2012 17:32:04 -0500
Per observation by Ants Aasma.
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Fix the int8 and int2 cases of (minimum possible integer) % (-1).
commit : a235b85a0ba06666dbbfdb9249a65dbfa9b42ebd
author : Tom Lane <[email protected]>
date : Wed, 14 Nov 2012 17:30:00 -0500
committer: Tom Lane <[email protected]>
date : Wed, 14 Nov 2012 17:30:00 -0500
The correct answer for this (or any other case with arg2 = -1) is zero,
but some machines throw a floating-point exception instead of behaving
sanely. Commit f9ac414c35ea084ff70c564ab2c32adb06d5296f dealt with this
in int4mod, but overlooked the fact that it also happens in int8mod
(at least on my Linux x86_64 machine). Protect int2mod as well; it's
not clear whether any machines fail there (mine does not) but since the
test is so cheap it seems better safe than sorry. While at it, simplify
the original guard in int4mod: we need only check for arg2 == -1, we
don't need to check arg1 explicitly.
Xi Wang, with some editing by me.
M src/backend/utils/adt/int.c
M src/backend/utils/adt/int8.c
Mark pg_upgrade's free_db_and_rel_infos() as a static function.
commit : dec10ba4c5dc3ce09de12a799712313b9d854d6c
author : Bruce Momjian <[email protected]>
date : Tue, 13 Nov 2012 21:10:40 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 13 Nov 2012 21:10:40 -0500
M contrib/pg_upgrade/info.c
M contrib/pg_upgrade/pg_upgrade.h
Adjust find_status for newer Linux 'nm' output format.
commit : 3bdfd9cb9e3731a5c27f31db5330b81f170a5db6
author : Bruce Momjian <[email protected]>
date : Tue, 13 Nov 2012 21:08:07 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 13 Nov 2012 21:08:07 -0500
M src/tools/find_static
Fix memory leaks in record_out() and record_send().
commit : 273986bf0d39e5166eb15ba42ebff4803e23a688
author : Tom Lane <[email protected]>
date : Tue, 13 Nov 2012 14:44:28 -0500
committer: Tom Lane <[email protected]>
date : Tue, 13 Nov 2012 14:44:28 -0500
record_out() leaks memory: it fails to free the strings returned by the
per-column output functions, and also is careless about detoasted values.
This results in a query-lifespan memory leakage when returning composite
values to the client, because printtup() runs the output functions in the
query-lifespan memory context. Fix it to handle these issues the same way
printtup() does. Also fix a similar leakage in record_send().
(At some point we might want to try to run output functions in
shorter-lived memory contexts, so that we don't need a zero-leakage policy
for them. But that would be a significantly more invasive patch, which
doesn't seem like material for back-patching.)
In passing, use appendStringInfoCharMacro instead of appendStringInfoChar
in the innermost data-copying loop of record_out, to try to shave a few
cycles from this function's runtime.
Per trouble report from Carlos Henrique Reimer. Back-patch to all
supported versions.
M src/backend/utils/adt/rowtypes.c
Skip searching for subxact locks at commit. At commit all standby locks are released for the top-level transaction, so searching for locks for each subtransaction is both pointless and costly (N^2) in the presence of many AccessExclusiveLocks.
commit : d9fad1076da4f3686b16e7c9f137118a3156a43a
author : Simon Riggs <[email protected]>
date : Tue, 13 Nov 2012 16:00:19 -0300
committer: Simon Riggs <[email protected]>
date : Tue, 13 Nov 2012 16:00:19 -0300
M src/backend/access/transam/xact.c
Clarify docs on hot standby lock release
commit : 68f7fe140bebc2b9bd2953934539cedb603fd01b
author : Simon Riggs <[email protected]>
date : Tue, 13 Nov 2012 15:54:01 -0300
committer: Simon Riggs <[email protected]>
date : Tue, 13 Nov 2012 15:54:01 -0300
Andres Freund and Simon Riggs
M src/backend/storage/ipc/procarray.c
M src/backend/storage/ipc/standby.c
doc: Add link to CREATE TABLE AS on CREATE TABLE reference page
commit : 8f40ad1f4e75d3def4e86b665c8048a4c9676427
author : Peter Eisentraut <[email protected]>
date : Mon, 12 Nov 2012 22:22:47 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 12 Nov 2012 22:22:47 -0500
Karl O. Pinc
M doc/src/sgml/ref/create_table.sgml
Fix multiple problems in WAL replay.
commit : 3bbf668de9f1bc172371681e80a4e769b6d014c8
author : Tom Lane <[email protected]>
date : Mon, 12 Nov 2012 22:05:08 -0500
committer: Tom Lane <[email protected]>
date : Mon, 12 Nov 2012 22:05:08 -0500
Most of the replay functions for WAL record types that modify more than
one page failed to ensure that those pages were locked correctly to ensure
that concurrent queries could not see inconsistent page states. This is
a hangover from coding decisions made long before Hot Standby was added,
when it was hardly necessary to acquire buffer locks during WAL replay
at all, let alone hold them for carefully-chosen periods.
The key problem was that RestoreBkpBlocks was written to hold lock on each
page restored from a full-page image for only as long as it took to update
that page. This was guaranteed to break any WAL replay function in which
there was any update-ordering constraint between pages, because even if the
nominal order of the pages is the right one, any mixture of full-page and
non-full-page updates in the same record would result in out-of-order
updates. Moreover, it wouldn't work for situations where there's a
requirement to maintain lock on one page while updating another. Failure
to honor an update ordering constraint in this way is thought to be the
cause of bug #7648 from Daniel Farina: what seems to have happened there
is that a btree page being split was rewritten from a full-page image
before the new right sibling page was written, and because lock on the
original page was not maintained it was possible for hot standby queries to
try to traverse the page's right-link to the not-yet-existing sibling page.
To fix, get rid of RestoreBkpBlocks as such, and instead create a new
function RestoreBackupBlock that restores just one full-page image at a
time. This function can be invoked by WAL replay functions at the points
where they would otherwise perform non-full-page updates; in this way, the
physical order of page updates remains the same no matter which pages are
replaced by full-page images. We can then further adjust the logic in
individual replay functions if it is necessary to hold buffer locks
for overlapping periods. A side benefit is that we can simplify the
handling of concurrency conflict resolution by moving that code into the
record-type-specfic functions; there's no more need to contort the code
layout to keep conflict resolution in front of the RestoreBkpBlocks call.
In connection with that, standardize on zero-based numbering rather than
one-based numbering for referencing the full-page images. In HEAD, I
removed the macros XLR_BKP_BLOCK_1 through XLR_BKP_BLOCK_4. They are
still there in the header files in previous branches, but are no longer
used by the code.
In addition, fix some other bugs identified in the course of making these
changes:
spgRedoAddNode could fail to update the parent downlink at all, if the
parent tuple is in the same page as either the old or new split tuple and
we're not doing a full-page image: it would get fooled by the LSN having
been advanced already. This would result in permanent index corruption,
not just transient failure of concurrent queries.
Also, ginHeapTupleFastInsert's "merge lists" case failed to mark the old
tail page as a candidate for a full-page image; in the worst case this
could result in torn-page corruption.
heap_xlog_freeze() was inconsistent about using a cleanup lock or plain
exclusive lock: it did the former in the normal path but the latter for a
full-page image. A plain exclusive lock seems sufficient, so change to
that.
Also, remove gistRedoPageDeleteRecord(), which has been dead code since
VACUUM FULL was rewritten.
Back-patch to 9.0, where hot standby was introduced. Note however that 9.0
had a significantly different WAL-logging scheme for GIST index updates,
and it doesn't appear possible to make that scheme safe for concurrent hot
standby queries, because it can leave inconsistent states in the index even
between WAL records. Given the lack of complaints from the field, we won't
work too hard on fixing that branch.
M src/backend/access/gin/ginfast.c
M src/backend/access/gin/ginxlog.c
M src/backend/access/gist/gistxlog.c
M src/backend/access/heap/heapam.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/spgist/spgxlog.c
M src/backend/access/transam/README
M src/backend/access/transam/xlog.c
M src/include/access/gist_private.h
M src/include/access/xlog.h
Use a stamp file for the XSLT HTML doc build
commit : 9b3ac49e5afb54c222095dcaf6a73b634ab2c072
author : Peter Eisentraut <[email protected]>
date : Mon, 12 Nov 2012 21:42:25 -0500
committer: Peter Eisentraut <[email protected]>
date : Mon, 12 Nov 2012 21:42:25 -0500
This way it works more like the DSSSL build, and dependencies are
tracked better by make.
Also copy the CSS stylesheet to the html directory. This was forgotten
when the output directory was changed.
M doc/src/sgml/Makefile
Oops, have to rename local variables called 'errcontext' in contrib, too.
commit : d092d116ed047ebb923ada112235a8866571731c
author : Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 18:30:51 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 18:30:51 +0200
As pointed out by Alvaro.
M contrib/file_fdw/file_fdw.c
Use correct text domain for translating errcontext() messages.
commit : dbdf9679d7d61b03a3bf73af9b095831b7010eb5
author : Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 15:10:24 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 15:10:24 +0200
errcontext() is typically used in an error context callback function, not
within an ereport() invocation like e.g errmsg and errdetail are. That means
that the message domain that the TEXTDOMAIN magic in ereport() determines
is not the right one for the errcontext() calls. The message domain needs to
be determined by the C file containing the errcontext() call, not the file
containing the ereport() call.
Fix by turning errcontext() into a macro that passes the TEXTDOMAIN to use
for the errcontext message. "errcontext" was used in a few places as a
variable or struct field name, I had to rename those out of the way, now
that errcontext is a macro.
We've had this problem all along, but this isn't doesn't seem worth
backporting. It's a fairly minor issue, and turning errcontext from a
function to a macro requires at least a recompile of any external code that
calls errcontext().
M src/backend/access/transam/xlog.c
M src/backend/commands/copy.c
M src/backend/parser/parse_node.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/utils/error/elog.c
M src/include/parser/parse_node.h
M src/include/utils/elog.h
Silence "expression result unused" warnings in AssertVariableIsOfTypeMacro
commit : c9d44a75d48ed8a9b9275b95be1fadaa562f3826
author : Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 15:02:40 +0200
committer: Heikki Linnakangas <[email protected]>
date : Mon, 12 Nov 2012 15:02:40 +0200
At least clang 3.1 generates those warnings. Prepend (void) to avoid them,
like we have in AssertMacro.
M src/include/c.h
doc: "only relevant" -> "relevant only"
commit : 42218f29af41c430b94e0d074f404816de4ba278
author : Peter Eisentraut <[email protected]>
date : Sun, 11 Nov 2012 22:50:24 -0500
committer: Peter Eisentraut <[email protected]>
date : Sun, 11 Nov 2012 22:50:24 -0500
Karl O. Pinc
M doc/src/sgml/datatype.sgml
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_dumpall.sgml
M doc/src/sgml/ref/pg_restore.sgml
Check for stack overflow in transformSetOperationTree().
commit : 34f3b396a6554903007031b0541781b7ecdd6e4d
author : Tom Lane <[email protected]>
date : Sun, 11 Nov 2012 19:56:10 -0500
committer: Tom Lane <[email protected]>
date : Sun, 11 Nov 2012 19:56:10 -0500
Since transformSetOperationTree() recurses, it can be driven to stack
overflow with enough UNION/INTERSECT/EXCEPT clauses in a query. Add a
check to ensure it fails cleanly instead of crashing. Per report from
Matthew Gerber (though it's not clear whether this is the only thing
going wrong for him).
Historical note: I think the reasoning behind not putting a check here in
the beginning was that the check in transformExpr() ought to be sufficient
to guard the whole parser. However, because transformSetOperationTree()
recurses all the way to the bottom of the set-operation tree before doing
any analysis of the statement's expressions, that check doesn't save it.
M src/backend/parser/analyze.c
Remove leftover LWLockRelease() call
commit : fa12cb7f0241c767a072c980d75780c9ec036e01
author : Alvaro Herrera <[email protected]>
date : Fri, 9 Nov 2012 10:12:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Fri, 9 Nov 2012 10:12:09 -0300
This code was refactored in d5497b95 but an extra LWLockRelease call was
left behind.
Per report from Erik Rijkers
M src/backend/access/transam/xlogarchive.c
XSLT stylesheet: Add slash to directory name
commit : 732740e7d440baac832fbce9a000193a55a35d43
author : Peter Eisentraut <[email protected]>
date : Thu, 8 Nov 2012 23:55:36 -0500
committer: Peter Eisentraut <[email protected]>
date : Thu, 8 Nov 2012 23:55:36 -0500
Some versions of the XSLT stylesheets don't handle the missing slash
correctly (they concatenate directory and file name without the slash).
This might never have worked correctly.
M doc/src/sgml/stylesheet.xsl
Fix WaitLatch() to return promptly when the requested timeout expires.
commit : 3e7fdcffd6f77187b72b0496d61d782932973af6
author : Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 20:04:48 -0500
committer: Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 20:04:48 -0500
If the sleep is interrupted by a signal, we must recompute the remaining
time to wait; otherwise, a steady stream of non-wait-terminating interrupts
could delay return from WaitLatch indefinitely. This has been shown to be
a problem for the autovacuum launcher, and there may well be other places
now or in the future with similar issues. So we'd better make the function
robust, even though this'll add at least one gettimeofday call per wait.
Back-patch to 9.2. We might eventually need to fix 9.1 as well, but the
code is quite different there, and the usage of WaitLatch in 9.1 is so
limited that it's not clearly important to do so.
Reported and diagnosed by Jeff Janes, though I rewrote his patch rather
heavily.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/include/storage/latch.h
Rename ResolveNew() to ReplaceVarsFromTargetList(), and tweak its API.
commit : dcc55dd21aa2ba18b28ba9fa441885ef9c99d3c6
author : Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 16:52:49 -0500
committer: Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 16:52:49 -0500
This function currently lacks the option to throw error if the provided
targetlist doesn't have any matching entry for a Var to be replaced.
Two of the four existing call sites would be better off with an error,
as would the usage in the pending auto-updatable-views patch, so it seems
past time to extend the API to support that. To do so, replace the "event"
parameter (historically of type CmdType, though it was declared plain int)
with a special-purpose enum type.
It's unclear whether this function might be called by third-party code.
Since many C compilers wouldn't warn about a call site continuing to use
the old calling convention, rename the function to forcibly break any
such code that hasn't been updated. The old name was none too well chosen
anyhow.
M src/backend/optimizer/path/allpaths.c
M src/backend/rewrite/rewriteHandler.c
M src/backend/rewrite/rewriteManip.c
M src/include/rewrite/rewriteManip.h
Don't trash input list structure in does_not_exist_skipping().
commit : 75af5ae9c017d70531bd49178adfd3103cd40a76
author : Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 11:34:32 -0500
committer: Tom Lane <[email protected]>
date : Thu, 8 Nov 2012 11:34:32 -0500
The trigger and rule cases need to split up the input name list, but
they mustn't corrupt the passed-in data structure, since it could be part
of a cached utility-statement parsetree. Per bug #7641.
M src/backend/commands/dropcmds.c
Teach pg_basebackup and pg_receivexlog to reply to server keepalives.
commit : a9dad56441e4bc5d20c34bd56daf8e72df1b22d3
author : Heikki Linnakangas <[email protected]>
date : Thu, 8 Nov 2012 10:25:58 +0200
committer: Heikki Linnakangas <[email protected]>
date : Thu, 8 Nov 2012 10:25:58 +0200
Without this, the connection will be killed after timeout if
wal_sender_timeout is set in the server.
Original patch by Amit Kapila, modified by me to fit recent changes in the
code.
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/receivelog.c
Fix missing inclusions.
commit : 9e45e03886c75dd049bcc1b063e0bf34e46a3a62
author : Tom Lane <[email protected]>
date : Wed, 7 Nov 2012 18:05:43 -0500
committer: Tom Lane <[email protected]>
date : Wed, 7 Nov 2012 18:05:43 -0500
Some platforms require including <netinet/in.h> and/or <arpa/inet.h> to
use htonl() and ntohl(). Per build failure locally.
M src/bin/pg_basebackup/receivelog.c
Add URLs to document why DLLIMPORT is needed on Windows.
commit : aa69670e4296321b51251d34e9bd2c4bc17aab75
author : Bruce Momjian <[email protected]>
date : Wed, 7 Nov 2012 15:01:18 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 7 Nov 2012 15:01:18 -0500
Per email from Craig Ringer
M src/include/port/win32.h
Don't try to use a unopened relation
commit : 4ee5c40b06f098910ed0fc5fd72fb2744776ccbb
author : Alvaro Herrera <[email protected]>
date : Wed, 7 Nov 2012 16:23:39 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 7 Nov 2012 16:23:39 -0300
Commit 4c9d0901 mistakenly introduced a call to
TransferPredicateLocksToHeapRelation() on an index relation that had
been closed a few lines above. Moving up an index_open() call that's
below is enough to fix the problem.
Discovered by me while testing an unrelated patch.
M src/backend/catalog/index.c
In pg_upgrade docs, mention using base backup as part of rsync for logical replication upgrades.
commit : c90dcd6d2c76402ce307b0d44958c6ca274f2c39
author : Bruce Momjian <[email protected]>
date : Wed, 7 Nov 2012 13:36:08 -0500
committer: Bruce Momjian <[email protected]>
date : Wed, 7 Nov 2012 13:36:08 -0500
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Make the streaming replication protocol messages architecture-independent.
commit : add6c3179a4d4fa3e62dd3e86a00f23303336bac
author : Heikki Linnakangas <[email protected]>
date : Wed, 7 Nov 2012 18:59:12 +0200
committer: Heikki Linnakangas <[email protected]>
date : Wed, 7 Nov 2012 18:59:12 +0200
We used to send structs wrapped in CopyData messages, which works as long as
the client and server agree on things like endianess, timestamp format and
alignment. That's good enough for running a standby server, which has to run
on the same platform anyway, but it's useful for tools like pg_receivexlog
to work across platforms.
This breaks protocol compatibility of streaming replication, but we never
promised that to be compatible across versions, anyway.
M doc/src/sgml/protocol.sgml
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/utils/adt/timestamp.c
M src/bin/pg_basebackup/receivelog.c
D src/include/replication/walprotocol.h
M src/include/utils/timestamp.h
In pg_upgrade, set synchronous_commit=off for the new cluster, to improve performance when restoring the schema from the old cluster.
commit : ed5699dd1b883e193930448b7ad532e233de0bd7
author : Bruce Momjian <[email protected]>
date : Tue, 6 Nov 2012 14:28:48 -0500
committer: Bruce Momjian <[email protected]>
date : Tue, 6 Nov 2012 14:28:48 -0500
Backpatch to 9.2.
M contrib/pg_upgrade/server.c
Fix handling of inherited check constraints in ALTER COLUMN TYPE.
commit : 5ed6546cf75623ba426942a3b71659a66cf7ed68
author : Tom Lane <[email protected]>
date : Mon, 5 Nov 2012 13:36:16 -0500
committer: Tom Lane <[email protected]>
date : Mon, 5 Nov 2012 13:36:16 -0500
This case got broken in 8.4 by the addition of an error check that
complains if ALTER TABLE ONLY is used on a table that has children.
We do use ONLY for this situation, but it's okay because the necessary
recursion occurs at a higher level. So we need to have a separate
flag to suppress recursion without making the error check.
Reported and patched by Pavan Deolasee, with some editorial adjustments by
me. Back-patch to 8.4, since this is a regression of functionality that
worked in earlier branches.
M src/backend/commands/tablecmds.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/alter_table.out
M src/test/regress/sql/alter_table.sql
Fix typo
commit : 4bb106ef4f6924312a67768571292c6f247122de
author : Peter Eisentraut <[email protected]>
date : Thu, 1 Nov 2012 22:58:36 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 1 Nov 2012 22:58:36 -0400
M doc/src/sgml/client-auth.sgml
Fix bogus handling of $(X) (i.e., ".exe") in isolationtester Makefile.
commit : ef28e05ac50a557b6c1214171c93b576a6709802
author : Tom Lane <[email protected]>
date : Thu, 1 Nov 2012 19:48:53 -0400
committer: Tom Lane <[email protected]>
date : Thu, 1 Nov 2012 19:48:53 -0400
I'm not sure why commit 1eb1dde049ccfffc42c80c2bcec14155c58bcc1f seems
to have made this start to fail on Cygwin when it never did before ---
but nonetheless, the coding was pretty bogus, and unlike the way we
handle $(X) anywhere else. Per buildfarm.
M src/test/isolation/Makefile
Limit the number of rel sets considered in consider_index_join_outer_rels.
commit : 19e36477b383c62009361b2221cb51e9f63132d9
author : Tom Lane <[email protected]>
date : Thu, 1 Nov 2012 14:08:42 -0400
committer: Tom Lane <[email protected]>
date : Thu, 1 Nov 2012 14:08:42 -0400
In bug #7626, Brian Dunavant exposes a performance problem created by
commit 3b8968f25232ad09001bf35ab4cc59f5a501193e: that commit attempted to
consider *all* possible combinations of indexable join clauses, but if said
clauses join to enough different relations, there's an exponential increase
in the number of outer-relation sets considered.
In Brian's example, all the clauses come from the same equivalence class,
which means it's redundant to use more than one of them in an indexscan
anyway. So we can prevent the problem in this class of cases (which is
probably the majority of real examples) by rejecting combinations that
would only serve to add a known-redundant clause.
But that still leaves us exposed to exponential growth of planning time
when the query has a lot of non-equivalence join clauses that are usable
with the same index. I chose to prevent such cases by setting an upper
limit on the number of relation sets considered, equal to ten times the
number of index clauses considered so far. (This sliding limit still
allows new relsets to be added on as we move to additional index columns,
which is probably more important than considering even more combinations of
clauses for the previous column.) This should keep the amount of work done
roughly linear rather than exponential in the apparent query complexity.
This part of the fix is pretty ad-hoc; but without a clearer idea of
real-world cases for which this would result in markedly inferior plans,
it's hard to see how to do better.
M src/backend/optimizer/path/indxpath.c
Have make never delete intermediate files automatically
commit : 1eb1dde049ccfffc42c80c2bcec14155c58bcc1f
author : Peter Eisentraut <[email protected]>
date : Wed, 31 Oct 2012 23:33:35 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 31 Oct 2012 23:33:35 -0400
Several hacks in certain modes already thought this was a bad idea, so
just disable it globally.
M src/Makefile.global.in
Fix erroneous choice of timeline variable, too
commit : 2f1692d213a90d7441fd2940f2c43d100b90c607
author : Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 16:50:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 16:50:09 -0300
M src/backend/access/transam/xlog.c
Document that TCP keepalive settings read as 0 on Unix-socket connections.
commit : e774b7649ca6b459f10e7748835eb15a096a4587
author : Tom Lane <[email protected]>
date : Wed, 31 Oct 2012 14:26:20 -0400
committer: Tom Lane <[email protected]>
date : Wed, 31 Oct 2012 14:26:20 -0400
Per bug #7631 from Rob Johnson. The code is operating as designed, but the
docs didn't explain it.
M doc/src/sgml/config.sgml
Fix erroneous choices of segNo variables
commit : 9b8dd7e8aa19e6145a996cfc881b5617f497632d
author : Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 11:05:28 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 11:05:28 -0300
Commit dfda6eba (which changed segment numbers to use a single 64 bit
variable instead of log/seg) introduced a couple of bogus choices of
exactly which log segment number variable to use in each case.
This is currently pretty harmless; in one place, the bogus number was
only being used in an error message for a pretty unlikely condition
(failure to fsync a WAL segment file). In the other, it was using a
global variable instead of the local variable; but all callsites were
passing the value of the global variable anyway.
No need to backpatch because that commit is not on earlier branches.
M src/backend/access/transam/xlog.c
Fix ALTER EXTENSION / SET SCHEMA
commit : 04f28bdb8477ad48c7f9987950595764eae3218e
author : Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 10:52:55 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 31 Oct 2012 10:52:55 -0300
In its original conception, it was leaving some objects into the old
schema, but without their proper pg_depend entries; this meant that the
old schema could be dropped, causing future pg_dump calls to fail on the
affected database. This was originally reported by Jeff Frost as #6704;
there have been other complaints elsewhere that can probably be traced
to this bug.
To fix, be more consistent about altering a table's subsidiary objects
along the table itself; this requires some restructuring in how tables
are relocated when altering an extension -- hence the new
AlterTableNamespaceInternal routine which encapsulates it for both the
ALTER TABLE and the ALTER EXTENSION cases.
There was another bug lurking here, which was unmasked after fixing the
previous one: certain objects would be reached twice via the dependency
graph, and the second attempt to move them would cause the entire
operation to fail. Per discussion, it seems the best fix for this is to
do more careful tracking of objects already moved: we now maintain a
list of moved objects, to avoid attempting to do it twice for the same
object.
Authors: Alvaro Herrera, Dimitri Fontaine
Reviewed by Tom Lane
M src/backend/catalog/pg_constraint.c
M src/backend/commands/alter.c
M src/backend/commands/extension.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/include/catalog/pg_constraint.h
M src/include/commands/alter.h
M src/include/commands/tablecmds.h
M src/include/commands/typecmds.h
Preserve intermediate .c files in coverage mode
commit : 4af3dda13601d859a20425e3554533fde0549056
author : Peter Eisentraut <[email protected]>
date : Sun, 28 Oct 2012 10:35:46 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 28 Oct 2012 10:35:46 -0400
The introduction of the .y -> .c pattern rule causes some .c files such
as bootparse.c to be considered intermediate files in the .y -> .c -> .o
rule chain, which make would automatically delete. But in coverage
mode, the processing tools such as genhtml need those files, so mark
them as "precious" so that make preserves them.
M src/Makefile.global.in
Throw error if expiring tuple is again updated or deleted.
commit : 6868ed7491b7ea7f0af6133bb66566a2f5fe5a75
author : Kevin Grittner <[email protected]>
date : Fri, 26 Oct 2012 14:55:36 -0500
committer: Kevin Grittner <[email protected]>
date : Fri, 26 Oct 2012 14:55:36 -0500
This prevents surprising behavior when a FOR EACH ROW trigger
BEFORE UPDATE or BEFORE DELETE directly or indirectly updates or
deletes the the old row. Prior to this patch the requested action
on the row could be silently ignored while all triggered actions
based on the occurence of the requested action could be committed.
One example of how this could happen is if the BEFORE DELETE
trigger for a "parent" row deleted "children" which had trigger
functions to update summary or status data on the parent.
This also prevents similar surprising problems if the query has a
volatile function which updates a target row while it is already
being updated.
There are related issues present in FOR UPDATE cursors and READ
COMMITTED queries which are not handled by this patch. These
issues need further evalution to determine what change, if any, is
needed.
Where the new error messages are generated, in most cases the best
fix will be to move code from the BEFORE trigger to an AFTER
trigger. Where this is not feasible, the trigger can avoid the
error by re-issuing the triggering statement and returning NULL.
Documentation changes will be submitted in a separate patch.
Kevin Grittner and Tom Lane with input from Florian Pflug and
Robert Haas, based on problems encountered during conversion of
Wisconsin Circuit Court trigger logic to plpgsql triggers.
M src/backend/access/heap/heapam.c
M src/backend/commands/trigger.c
M src/backend/executor/execMain.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeModifyTable.c
M src/include/access/heapam.h
M src/test/regress/expected/triggers.out
M src/test/regress/sql/triggers.sql
Prefer actual constants to pseudo-constants in equivalence class machinery.
commit : 17804fa71b4a4e7a099f780616a7b53ea591774d
author : Tom Lane <[email protected]>
date : Fri, 26 Oct 2012 14:19:34 -0400
committer: Tom Lane <[email protected]>
date : Fri, 26 Oct 2012 14:19:34 -0400
generate_base_implied_equalities_const() should prefer plain Consts over
other em_is_const eclass members when choosing the "pivot" value that
all the other members will be equated to. This makes it more likely that
the generated equalities will be useful in constraint-exclusion proofs.
Per report from Rushabh Lathia.
M src/backend/optimizer/path/equivclass.c
In pg_dump, dump SEQUENCE SET items in the data not pre-data section.
commit : 5a39114fe7d19280f6477ce1eb0d88beafda13a4
author : Tom Lane <[email protected]>
date : Fri, 26 Oct 2012 12:12:42 -0400
committer: Tom Lane <[email protected]>
date : Fri, 26 Oct 2012 12:12:42 -0400
Represent a sequence's current value as a separate TableDataInfo dumpable
object, so that it can be dumped within the data section of the archive
rather than in pre-data. This fixes an undesirable inconsistency between
the meanings of "--data-only" and "--section=data", and also fixes dumping
of sequences that are marked as extension configuration tables, as per a
report from Marko Kreen back in July. The main cost is that we do one more
SQL query per sequence, but that's probably not very meaningful in most
databases.
Back-patch to 9.1, since it has the extension configuration issue even
though not the --section switch.
M doc/src/sgml/ref/pg_dump.sgml
M src/bin/pg_dump/pg_dump.c
Tweak genericcostestimate's fudge factor for index size.
commit : bf01e34b556ff37982ba2d882db424aa484c0d07
author : Tom Lane <[email protected]>
date : Wed, 24 Oct 2012 16:25:40 -0400
committer: Tom Lane <[email protected]>
date : Wed, 24 Oct 2012 16:25:40 -0400
To provide some bias against using a large index when a small one would do
as well, genericcostestimate adds a "fudge factor", which for a long time
was random_page_cost * index_pages/10000. However, this can grow to be the
dominant term in indexscan cost estimates when the index involved is large
enough, a behavior that was never intended. Change to a ln(1 + n/10000)
formulation, which has nearly the same behavior up to a few hundred pages
but tails off significantly thereafter. (A log curve seems correct on
first principles, since what we're trying to account for here is index
descent costs, which are typically logarithmic.) Per bug #7619 from Niko
Kiirala.
Possibly this change should get back-patched, but I'm hesitant to mess with
cost estimates in stable branches.
M src/backend/utils/adt/selfuncs.c
When converting a table to a view, remove its system columns.
commit : a4e8680a6c337955c021177457147f4b4d9a5df5
author : Tom Lane <[email protected]>
date : Wed, 24 Oct 2012 13:39:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 24 Oct 2012 13:39:37 -0400
Views should not have any pg_attribute entries for system columns.
However, we forgot to remove such entries when converting a table to a
view. This could lead to crashes later on, if someone attempted to
reference such a column, as reported by Kohei KaiGai.
Patch in HEAD only. This bug has been there forever, but in the back
branches we will have to defend against existing mis-converted views,
so it doesn't seem worthwhile to change the conversion code too.
M src/backend/catalog/heap.c
M src/backend/rewrite/rewriteDefine.c
M src/include/catalog/heap.h
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Add context info to OAT_POST_CREATE security hook
commit : f4c4335a4aaf5f2ee6e741cdf4f5c8e338d86a2f
author : Alvaro Herrera <[email protected]>
date : Tue, 23 Oct 2012 18:07:26 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 23 Oct 2012 18:07:26 -0300
... and have sepgsql use it to determine whether to check permissions
during certain operations. Indexes that are being created as a result
of REINDEX, for instance, do not need to have their permissions checked;
they were already checked when the index was created.
Author: KaiGai Kohei, slightly revised by me
M contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/hooks.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/sql/ddl.sql
M doc/src/sgml/sepgsql.sgml
M src/backend/bootstrap/bootparse.y
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/toasting.c
M src/backend/commands/cluster.c
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/include/catalog/heap.h
M src/include/catalog/index.h
M src/include/catalog/objectaccess.h
Correct predicate locking for DROP INDEX CONCURRENTLY.
commit : 4c9d0901f135d724a9f3cfa4140a5afd44b10f08
author : Kevin Grittner <[email protected]>
date : Sun, 21 Oct 2012 16:35:42 -0500
committer: Kevin Grittner <[email protected]>
date : Sun, 21 Oct 2012 16:35:42 -0500
For the non-concurrent case there is an AccessExclusiveLock lock
on both the index and the heap at a time during which no other
process is using either, before which the index is maintained and
used for scans, and after which the index is no longer used or
maintained. Predicate locks can safely be moved from the index to
the related heap relation under the protection of these locks.
This was done prior to the introductin of DROP INDEX CONCURRENTLY
and continues to be done for non-concurrent index drops.
For concurrent index drops, the predicate locks must be moved when
there are no index scans in progress on that index and no more can
subsequently start, and before heap inserts stop maintaining the
index. As long as these conditions are guaranteed when the
TransferPredicateLocksToHeapRelation() function is called,
stronger locks are not needed for correctness.
Kevin Grittner based on questions by Tom Lane in reviewing the
DROP INDEX CONCURRENTLY patch and in cooperation with Andres
Freund and Simon Riggs.
M src/backend/catalog/index.c
Fix pg_dump's handling of DROP DATABASE commands in --clean mode.
commit : edef20f6e1e7a02c65163f1054ce71db4d719aad
author : Tom Lane <[email protected]>
date : Sat, 20 Oct 2012 16:58:32 -0400
committer: Tom Lane <[email protected]>
date : Sat, 20 Oct 2012 16:58:32 -0400
In commit 4317e0246c645f60c39e6572644cff1cb03b4c65, I accidentally broke
this behavior while rearranging code to ensure that --create wouldn't
affect whether a DATABASE entry gets put into archive-format output.
Thus, 9.2 would issue a DROP DATABASE command in --clean mode, which is
either useless or dangerous depending on the usage scenario.
It should not do that, and no longer does.
A bright spot is that this refactoring makes it easy to allow the
combination of --clean and --create to work sensibly, ie, emit DROP
DATABASE then CREATE DATABASE before reconnecting. Ordinarily we'd
consider that a feature addition and not back-patch it, but it seems
silly to not include the extra couple of lines required in the 9.2
version of the code.
Per report from Guillaume Lelarge, though this is slightly more extensive
than his proposed patch.
M doc/src/sgml/ref/pg_dump.sgml
M doc/src/sgml/ref/pg_restore.sgml
M src/bin/pg_dump/pg_backup_archiver.c
Prevent overflow in pgbench's percent-done display.
commit : ca0b960eb502db429d9134b0ddf24b9e12f45257
author : Tom Lane <[email protected]>
date : Sat, 20 Oct 2012 12:44:18 -0400
committer: Tom Lane <[email protected]>
date : Sat, 20 Oct 2012 12:44:18 -0400
Per Thom Brown.
M contrib/pgbench/pgbench.c
Fix UtilityContainsQuery() to handle CREATE TABLE AS EXECUTE correctly.
commit : 5d1abe64e62f2bb3c1a8a4181974f0b17b8bc21d
author : Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 18:33:45 -0400
committer: Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 18:33:45 -0400
The code seems to have been written to handle the pre-parse-analysis
representation, where an ExecuteStmt would appear directly under
CreateTableAsStmt. But in reality the function is only run on
already-parse-analyzed statements, so there will be a Query node in
between. We'd not noticed the bug because the function is generally
not used at all except in extended query protocol.
Per report from Robert Haas and Rushabh Lathia.
M src/backend/tcop/utility.c
Fix hash_search to avoid corruption of the hash table on out-of-memory.
commit : 4e32f8cd14fa6c66400e8af188bea78b22cf5f56
author : Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 15:24:03 -0400
committer: Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 15:24:03 -0400
An out-of-memory error during expand_table() on a palloc-based hash table
would leave a partially-initialized entry in the table. This would not be
harmful for transient hash tables, since they'd get thrown away anyway at
transaction abort. But for long-lived hash tables, such as the relcache
hash, this would effectively corrupt the table, leading to crash or other
misbehavior later.
To fix, rearrange the order of operations so that table enlargement is
attempted before we insert a new entry, rather than after adding it
to the hash table.
Problem discovered by Hitoshi Harada, though this is a bit different
from his proposed patch.
M src/backend/utils/hash/dynahash.c
Fix ruleutils to print "INSERT INTO foo DEFAULT VALUES" correctly.
commit : 0d6895051a2e53026ad0daae0ebc3cb901acc521
author : Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 13:39:51 -0400
committer: Tom Lane <[email protected]>
date : Fri, 19 Oct 2012 13:39:51 -0400
Per bug #7615 from Marko Tiikkaja. Apparently nobody ever tried this
case before ...
M src/backend/utils/adt/ruleutils.c
Fix orphan on cancel of drop index concurrently. Canceling DROP INDEX CONCURRENTLY during wait could allow an orphaned index to be left behind which could not be dropped.
commit : da85727565818d95ee9cb16ca1c4c4e570c6e2cd
author : Simon Riggs <[email protected]>
date : Fri, 19 Oct 2012 09:56:29 +0100
committer: Simon Riggs <[email protected]>
date : Fri, 19 Oct 2012 09:56:29 +0100
Backpatch to 9.2
Andres Freund, tested by Abhijit Menon-Sen
M src/backend/catalog/dependency.c
Further cleanup of catcache.c ilist changes.
commit : 002191a1a39c8dba8d0331c123a6c82724af6d87
author : Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 19:30:43 -0400
committer: Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 19:30:43 -0400
Remove useless duplicate initialization of bucket headers, don't use a
dlist_mutable_iter in a performance-critical path that doesn't need it,
make some other cosmetic changes for consistency's sake.
M src/backend/utils/cache/catcache.c
Remove unnecessary "head" arguments from some dlist/slist functions.
commit : dc5aeca168629183e64087b1147d3c2645e49ddc
author : Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 19:04:20 -0400
committer: Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 19:04:20 -0400
dlist_delete, dlist_insert_after, dlist_insert_before, slist_insert_after
do not need access to the list header, and indeed insisting on that negates
one of the main advantages of a doubly-linked list.
In consequence, revert addition of "cache_bucket" field to CatCTup.
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/cache/catcache.c
M src/include/lib/ilist.h
M src/include/utils/catcache.h
Code review for inline-list patch.
commit : 8f8d74647880ef53fc674498827b8b8e6c80d125
author : Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 16:47:07 -0400
committer: Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 16:47:07 -0400
Make foreach macros less syntactically dangerous, and fix some typos in
evidently-never-tested ones. Add missing slist_next_node and
slist_head_node functions. Fix broken dlist_check code. Assorted comment
improvements.
M src/backend/lib/ilist.c
M src/include/lib/ilist.h
Use a more portable platform test.
commit : 2f2be7473ba28d1e5c96a0a52b30c831d1c0d203
author : Andrew Dunstan <[email protected]>
date : Thu, 18 Oct 2012 16:14:11 -0400
committer: Andrew Dunstan <[email protected]>
date : Thu, 18 Oct 2012 16:14:11 -0400
M contrib/pg_upgrade/test.sh
Further tweaking of the readfile() function in pg_ctl.
commit : 2a49585e2b2ee43618e9f1107e21781c5f71f6c1
author : Heikki Linnakangas <[email protected]>
date : Thu, 18 Oct 2012 22:26:26 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 18 Oct 2012 22:26:26 +0300
Don't leak a file descriptor if the file is empty or we can't read its size.
Expect there to be a newline at the end of the last line, too. If there
isn't, ignore anything after the last newline. This makes it a tiny bit
more robust in case the file is appended to concurrently, so that we don't
return the last line if it hasn't been fully written yet. And this makes
the code a bit less obscure, anyway. Per Tom Lane's suggestion.
Backpatch to all supported branches.
M src/bin/pg_ctl/pg_ctl.c
Isolation test for DROP INDEX CONCURRENTLY for recent concurrent changes.
commit : 160984c8c84afb1406acd7ab71982bcae26b07fe
author : Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 19:41:40 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 19:41:40 +0100
Abhijit Menon-Sen
A src/test/isolation/expected/drop-index-concurrently-1.out
M src/test/isolation/isolation_schedule
A src/test/isolation/specs/drop-index-concurrently-1.spec
Re-think guts of DROP INDEX CONCURRENTLY. Concurrent behaviour was flawed when using a two-step process, so add an additional phase of processing to ensure concurrency for both SELECTs and INSERT/UPDATE/DELETEs.
commit : 2f0e480d02cde469e64d03dc8ca198cbfd597640
author : Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 18:58:30 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 18:58:30 +0100
Backpatch to 9.2
Andres Freund, tweaked by me
M src/backend/catalog/index.c
Fix planning of non-strict equivalence clauses above outer joins.
commit : 72a4231f0c80f213a4fa75356dc3c6b7c7419059
author : Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 12:28:45 -0400
committer: Tom Lane <[email protected]>
date : Thu, 18 Oct 2012 12:28:45 -0400
If a potential equivalence clause references a variable from the nullable
side of an outer join, the planner needs to take care that derived clauses
are not pushed to below the outer join; else they may use the wrong value
for the variable. (The problem arises only with non-strict clauses, since
if an upper clause can be proven strict then the outer join will get
simplified to a plain join.) The planner attempted to prevent this type
of error by checking that potential equivalence clauses aren't
outerjoin-delayed as a whole, but actually we have to check each side
separately, since the two sides of the clause will get moved around
separately if it's treated as an equivalence. Bugs of this type can be
demonstrated as far back as 7.4, even though releases before 8.3 had only
a very ad-hoc notion of equivalence clauses.
In addition, we neglected to account for the possibility that such clauses
might have nonempty nullable_relids even when not outerjoin-delayed; so the
equivalence-class machinery lacked logic to compute correct nullable_relids
values for clauses it constructs. This oversight was harmless before 9.2
because we were only using RestrictInfo.nullable_relids for OR clauses;
but as of 9.2 it could result in pushing constructed equivalence clauses
to incorrect places. (This accounts for bug #7604 from Bill MacArthur.)
Fix the first problem by adding a new test check_equivalence_delay() in
distribute_qual_to_rels, and fix the second one by adding code in
equivclass.c and called functions to set correct nullable_relids for
generated clauses. Although I believe the second part of this is not
currently necessary before 9.2, I chose to back-patch it anyway, partly to
keep the logic similar across branches and partly because it seems possible
we might find other reasons why we need valid values of nullable_relids in
the older branches.
Add regression tests illustrating these problems. In 9.0 and up, also
add test cases checking that we can push constants through outer joins,
since we've broken that optimization before and I nearly broke it again
with an overly simplistic patch for this problem.
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/plan/initsplan.c
M src/include/nodes/relation.h
M src/include/optimizer/planmain.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
pg_dump: Output functions deterministically sorted
commit : 7b583b20b1c95acb621c71251150beef958bb603
author : Alvaro Herrera <[email protected]>
date : Wed, 17 Oct 2012 18:31:42 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 17 Oct 2012 18:31:42 -0300
Implementation idea from Tom Lane
Author: Joel Jacobson
Reviewed by Joachim Wieland
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
Revert tests for drop index concurrently.
commit : 5ad72cee7ed3ac0016c716f0408811274d822f14
author : Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 15:27:12 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 15:27:12 +0100
D src/test/isolation/expected/drop-index-concurrently-1.out
D src/test/isolation/expected/drop-index-concurrently-2.out
M src/test/isolation/isolation_schedule
D src/test/isolation/specs/drop-index-concurrently-1.spec
D src/test/isolation/specs/drop-index-concurrently-2.spec
Add isolation tests for DROP INDEX CONCURRENTLY. Backpatch to 9.2 to ensure bugs are fixed.
commit : 4e206744dc4bb21f583ff35893cf826a04f6c64b
author : Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 13:37:09 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 18 Oct 2012 13:37:09 +0100
Abhijit Menon-Sen
A src/test/isolation/expected/drop-index-concurrently-1.out
A src/test/isolation/expected/drop-index-concurrently-2.out
M src/test/isolation/isolation_schedule
A src/test/isolation/specs/drop-index-concurrently-1.spec
A src/test/isolation/specs/drop-index-concurrently-2.spec
Close un-owned SMgrRelations at transaction end.
commit : ff3f9c8de5846be7709b7a87654631b4c309a68b
author : Tom Lane <[email protected]>
date : Wed, 17 Oct 2012 12:38:21 -0400
committer: Tom Lane <[email protected]>
date : Wed, 17 Oct 2012 12:38:21 -0400
If an SMgrRelation is not "owned" by a relcache entry, don't allow it to
live past transaction end. This design allows the same SMgrRelation to be
used for blind writes of multiple blocks during a transaction, but ensures
that we don't hold onto such an SMgrRelation indefinitely. Because an
SMgrRelation typically corresponds to open file descriptors at the fd.c
level, leaving it open when there's no corresponding relcache entry can
mean that we prevent the kernel from reclaiming deleted disk space.
(While CacheInvalidateSmgr messages usually fix that, there are cases
where they're not issued, such as DROP DATABASE. We might want to add
some more sinval messaging for that, but I'd be inclined to keep this
type of logic anyway, since allowing VFDs to accumulate indefinitely
for blind-written relations doesn't seem like a good idea.)
This code replaces a previous attempt towards the same goal that proved
to be unreliable. Back-patch to 9.1 where the previous patch was added.
M src/backend/access/transam/xact.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/walwriter.c
M src/backend/storage/smgr/smgr.c
M src/include/storage/smgr.h
Revert "Use "transient" files for blind writes, take 2".
commit : 9bacf0e3734f0b5dc821abf7cb312377876e22d3
author : Tom Lane <[email protected]>
date : Wed, 17 Oct 2012 12:37:08 -0400
committer: Tom Lane <[email protected]>
date : Wed, 17 Oct 2012 12:37:08 -0400
This reverts commit fba105b1099f4f5fa7283bb17cba6fed2baa8d0c.
That approach had problems with the smgr-level state not tracking what
we really want to happen, and with the VFD-level state not tracking the
smgr-level state very well either. In consequence, it was still possible
to hold kernel file descriptors open for long-gone tables (as in recent
report from Tore Halset), and yet there were also cases of FDs being closed
undesirably soon. A replacement implementation will follow.
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
Embedded list interface
commit : a66ee69add6e129c7674a59f8c3ba010ed4c9386
author : Alvaro Herrera <[email protected]>
date : Tue, 16 Oct 2012 17:36:30 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 16 Oct 2012 17:36:30 -0300
Provide a common implementation of embedded singly-linked and
doubly-linked lists. "Embedded" in the sense that the nodes'
next/previous pointers exist within some larger struct; this design
choice reduces memory allocation overhead.
Most of the implementation uses inlineable functions (where supported),
for performance.
Some existing uses of both types of lists have been converted to the new
code, for demonstration purposes. Other uses can (and probably will) be
converted in the future. Since dllist.c is unused after this conversion,
it has been removed.
Author: Andres Freund
Some tweaks by me
Reviewed by Tom Lane, Peter Geoghegan
M src/backend/lib/Makefile
D src/backend/lib/dllist.c
A src/backend/lib/ilist.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/cache/catcache.c
D src/include/lib/dllist.h
A src/include/lib/ilist.h
M src/include/utils/catcache.h
Fix typo in previous commit
commit : f862a326efa3087440bc86cbfe58ea11c977068a
author : Simon Riggs <[email protected]>
date : Wed, 17 Oct 2012 10:29:30 +0100
committer: Simon Riggs <[email protected]>
date : Wed, 17 Oct 2012 10:29:30 +0100
M doc/src/sgml/indices.sgml
M doc/src/sgml/ref/create_index.sgml
Clarify hash index caution and copy to CREATE INDEX docs
commit : 9f9695a0cde67e76a28cde5e695e88e4b4e29137
author : Simon Riggs <[email protected]>
date : Wed, 17 Oct 2012 08:14:29 +0100
committer: Simon Riggs <[email protected]>
date : Wed, 17 Oct 2012 08:14:29 +0100
M doc/src/sgml/indices.sgml
M doc/src/sgml/ref/create_index.sgml
When outputting the session id in log_line_prefix (%c) or in CSV log output mode, cause the hex digits after the period to always be at least four hex digits, with zero-padding.
commit : 22cc3b35f4d614aff83606a443da475215c6dd84
author : Bruce Momjian <[email protected]>
date : Tue, 16 Oct 2012 12:37:59 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 16 Oct 2012 12:37:59 -0400
M src/backend/utils/error/elog.c
alter_generic regression test cannot run concurrently with privileges test.
commit : b72bd3d1c65886c21a961830325f11a3f7a41799
author : Tom Lane <[email protected]>
date : Mon, 15 Oct 2012 12:18:52 -0400
committer: Tom Lane <[email protected]>
date : Mon, 15 Oct 2012 12:18:52 -0400
... because the latter plays games with the privileges for language SQL.
It looks like running alter_generic in parallel with "misc" is OK though.
Also, adjust serial_schedule to maintain the same test ordering (up to
parallelism) as parallel_schedule.
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
Fix typo in comment.
commit : 7d3ed5ae78df0f7b85f57b3cee9b70c7bd415645
author : Heikki Linnakangas <[email protected]>
date : Mon, 15 Oct 2012 13:01:31 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 15 Oct 2012 13:01:31 +0300
Fujii Masao
M src/backend/replication/walreceiver.c
Remove comment that is no longer true.
commit : ff6c78c48009d667bf1eb66105b0c2e05dcd2fa2
author : Heikki Linnakangas <[email protected]>
date : Mon, 15 Oct 2012 11:02:02 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 15 Oct 2012 11:02:02 +0300
AddToDataDirLockFile() supports out-of-order updates of the lockfile
nowadays.
M src/include/miscadmin.h
Fix race condition in pg_ctl reading postmaster.pid.
commit : 5c89684e08cda82727bd8bdad155b9235fb7246e
author : Heikki Linnakangas <[email protected]>
date : Sat, 13 Oct 2012 12:48:14 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sat, 13 Oct 2012 12:48:14 +0300
If postmaster changed postmaster.pid while pg_ctl was reading it, pg_ctl
could overrun the buffer it allocated for the file. Fix by reading the
whole file to memory with one read() call.
initdb contains an identical copy of the readfile() function, but the files
that initdb reads are static, not modified concurrently. Nevertheless, add
a simple bounds-check there, if only to silence static analysis tools.
Per report from Dave Vitek. Backpatch to all supported branches.
M src/bin/initdb/initdb.c
M src/bin/pg_ctl/pg_ctl.c
Split up process latch initialization for more-fail-soft behavior.
commit : e81e8f9342b037246b284bad15e42e21b1929301
author : Tom Lane <[email protected]>
date : Sun, 14 Oct 2012 22:59:56 -0400
committer: Tom Lane <[email protected]>
date : Sun, 14 Oct 2012 22:59:56 -0400
In the previous coding, new backend processes would attempt to create their
self-pipe during the OwnLatch call in InitProcess. However, pipe creation
could fail if the kernel is short of resources; and the system does not
recover gracefully from a FATAL error right there, since we have armed the
dead-man switch for this process and not yet set up the on_shmem_exit
callback that would disarm it. The postmaster then forces an unnecessary
database-wide crash and restart, as reported by Sean Chittenden.
There are various ways we could rearrange the code to fix this, but the
simplest and sanest seems to be to split out creation of the self-pipe into
a new function InitializeLatchSupport, which must be called from a place
where failure is allowed. For most processes that gets called in
InitProcess or InitAuxiliaryProcess, but processes that don't call either
but still use latches need their own calls.
Back-patch to 9.1, which has only a part of the latch logic that 9.2 and
HEAD have, but nonetheless includes this bug.
M src/backend/port/unix_latch.c
M src/backend/port/win32_latch.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/syslogger.c
M src/backend/storage/lmgr/proc.c
M src/include/storage/latch.h
Fix oversight in new code for printing rangetable aliases.
commit : 8b728e5c6e0ce6b6d6f54b92b390f14aa1aca6db
author : Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 16:14:11 -0400
committer: Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 16:14:11 -0400
In commit 11e131854f8231a21613f834c40fe9d046926387, I missed the case of
a CTE RTE that doesn't have a user-defined alias, but does have an
alias assigned by set_rtable_names(). Per report from Peter Eisentraut.
While at it, refactor slightly to reduce code duplication.
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
In our source code, make a copy of getopt's 'optarg' string arguments, rather than just storing a pointer.
commit : 49ec613201b2e9debdf9e9ad9a2ad7c6c8083729
author : Bruce Momjian <[email protected]>
date : Fri, 12 Oct 2012 13:35:40 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 12 Oct 2012 13:35:40 -0400
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
M contrib/pgbench/pgbench.c
M src/backend/bootstrap/bootstrap.c
M src/backend/postmaster/postmaster.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/bin/psql/startup.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/createdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/createuser.c
M src/bin/scripts/dropdb.c
M src/bin/scripts/droplang.c
M src/bin/scripts/dropuser.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
M src/interfaces/ecpg/preproc/ecpg.c
M src/timezone/zic.c
Get rid of COERCE_DONTCARE.
commit : a29f7ed5544ef583747c0dcc3fc2afac1fb191ef
author : Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 13:35:00 -0400
committer: Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 13:35:00 -0400
We don't need this hack any more.
M src/backend/executor/functions.c
M src/backend/nodes/nodeFuncs.c
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/parser/parse_agg.c
M src/include/nodes/primnodes.h
Fix unportable format string.
commit : 427fd88552c5ee6e239b776dfa763489251809bc
author : Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 13:22:11 -0400
committer: Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 13:22:11 -0400
Per compiler warning.
M contrib/pg_test_fsync/pg_test_fsync.c
Make equal() ignore CoercionForm fields for better planning with casts.
commit : 71e58dcfb9ee47064a3ccfeba66a5bdf026380b5
author : Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 12:10:49 -0400
committer: Tom Lane <[email protected]>
date : Fri, 12 Oct 2012 12:10:49 -0400
This change ensures that the planner will see implicit and explicit casts
as equivalent for all purposes, except in the minority of cases where
there's actually a semantic difference (as reflected by having a 3-argument
cast function). In particular, this fixes cases where the EquivalenceClass
machinery failed to consider two references to a varchar column as
equivalent if one was implicitly cast to text but the other was explicitly
cast to text, as seen in bug #7598 from Vaclav Juza. We have had similar
bugs before in other parts of the planner, so I think it's time to fix this
problem at the core instead of continuing to band-aid around it.
Remove set_coercionform_dontcare(), which represents the band-aid
previously in use for allowing matching of index and constraint expressions
with inconsistent cast labeling. (We can probably get rid of
COERCE_DONTCARE altogether, but I don't think removing that enum value in
back branches would be wise; it's possible there's third party code
referring to it.)
Back-patch to 9.2. We could go back further, and might want to once this
has been tested more; but for the moment I won't risk destabilizing plan
choices in long-since-stable branches.
M src/backend/nodes/equalfuncs.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/cache/relcache.c
M src/include/nodes/primnodes.h
M src/include/optimizer/clauses.h
Unbreak MSVC builds after recent Makefile refactoring.
commit : e583ffe947de7a6e3be49a0f267234616f390485
author : Andrew Dunstan <[email protected]>
date : Thu, 11 Oct 2012 12:36:42 -0400
committer: Andrew Dunstan <[email protected]>
date : Thu, 11 Oct 2012 12:36:42 -0400
Based on a suggestion by Peter Eisentraut.
M src/tools/msvc/pgbison.pl
M src/tools/msvc/pgflex.pl
Fix cross-type case in partial row matching for hashed subplans.
commit : 4816d2ea3250b0f1e43d8b5521b9bf951821a945
author : Tom Lane <[email protected]>
date : Thu, 11 Oct 2012 12:20:56 -0400
committer: Tom Lane <[email protected]>
date : Thu, 11 Oct 2012 12:20:56 -0400
When hashing a subplan like "WHERE (a, b) NOT IN (SELECT x, y FROM ...)",
findPartialMatch() attempted to match rows using the hashtable's internal
equality operators, which of course are for x and y's datatypes. What we
need to use are the potentially cross-type operators for a=x, b=y, etc.
Failure to do that leads to wrong answers or even crashes. The scope for
problems is limited to cases where we have different types with compatible
hash functions (else we'd not be using a hashed subplan), but for example
int4 vs int8 can cause the problem.
Per bug #7597 from Bo Jensen. This has been wrong since the hashed-subplan
code was written, so patch all the way back.
M src/backend/executor/nodeSubplan.c
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
Improve replication connection timeouts.
commit : 6f60fdd7015b032bf49273c99f80913d57eac284
author : Heikki Linnakangas <[email protected]>
date : Thu, 11 Oct 2012 17:39:52 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 11 Oct 2012 17:39:52 +0300
Rename replication_timeout to wal_sender_timeout, and add a new setting
called wal_receiver_timeout that does the same at the walreceiver side.
There was previously no timeout in walreceiver, so if the network went down,
for example, the walreceiver could take a long time to notice that the
connection was lost. Now with the two settings, both sides of a replication
connection will detect a broken connection similarly.
It is no longer necessary to manually set wal_receiver_status_interval to
a value smaller than the timeout. Both wal sender and receiver now
automatically send a "ping" message if more than 1/2 of the configured
timeout has elapsed, and it hasn't received any messages from the other end.
Amit Kapila, heavily edited by me.
M doc/src/sgml/config.sgml
M doc/src/sgml/release-9.1.sgml
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/include/replication/walprotocol.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/replication/walsender_private.h
Refactor flex and bison make rules
commit : 8521d131941be5a177270bc428fa8e684cd645b5
author : Peter Eisentraut <[email protected]>
date : Thu, 11 Oct 2012 06:57:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 11 Oct 2012 06:57:04 -0400
Numerous flex and bison make rules have appeared in the source tree
over time, and they are all virtually identical, so we can replace
them by pattern rules with some variables for customization.
Users of pgxs will also be able to benefit from this.
M contrib/cube/Makefile
M contrib/seg/Makefile
M src/Makefile.global.in
M src/backend/bootstrap/Makefile
M src/backend/parser/Makefile
M src/backend/replication/Makefile
M src/backend/utils/misc/Makefile
M src/bin/psql/Makefile
M src/interfaces/ecpg/preproc/Makefile
M src/pl/plpgsql/src/Makefile
M src/test/isolation/Makefile
Remove _FORTIFY_SOURCE
commit : ab112068b657a2bd30a7f953c732e2ee75a606f5
author : Peter Eisentraut <[email protected]>
date : Wed, 10 Oct 2012 21:42:38 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 10 Oct 2012 21:42:38 -0400
Apparently, on some glibc versions this causes warnings when
optimization is not enabled.
Altogether, there appear to be too many incompatibilities surrounding
this.
M src/template/linux
Remove configure-option-dependent test cases from dblink tests.
commit : c3bf3ea2b61c312cc813edd9bb43aa338ae9288c
author : Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 20:14:26 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 20:14:26 -0400
The HINTs generated for these error cases vary across builds. We
could try to work around that, but the test cases aren't really useful
enough to justify taking any trouble.
Per buildfarm.
M contrib/dblink/expected/dblink.out
M contrib/dblink/sql/dblink.sql
Update obsolete comment.
commit : 864db11683df44dae51f8f9fc8a4c124e100d2f3
author : Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 17:04:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 17:04:37 -0400
We no longer use GetNewOidWithIndex on pg_largeobject; rather,
pg_largeobject_metadata's regular OID column is considered the repository
of OIDs for large objects. The special functionality is still needed for
TOAST tables however.
M src/backend/catalog/catalog.c
Create an improved FDW option validator function for contrib/dblink.
commit : 8255566f9d479fdfeea09da3141d26afdbb5abe2
author : Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 16:53:08 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 16:53:08 -0400
dblink now has its own validator function dblink_fdw_validator(), which is
better than the core function postgresql_fdw_validator() because it gets
the list of legal options from libpq instead of having a hard-wired list.
Make the dblink extension module provide a standard foreign data wrapper
dblink_fdw that encapsulates use of this validator, and recommend use of
that wrapper instead of making up wrappers on the fly.
Unfortunately, because ad-hoc wrappers *were* recommended practice
previously, it's not clear when we can get rid of postgresql_fdw_validator
without causing upgrade problems. But this is a step in the right
direction.
Shigeru Hanada, reviewed by KaiGai Kohei
M contrib/dblink/Makefile
A contrib/dblink/dblink–1.0–1.1.sql
R094 contrib/dblink/dblink–1.0.sql contrib/dblink/dblink–1.1.sql
M contrib/dblink/dblink.c
M contrib/dblink/dblink.control
M contrib/dblink/dblink.h
M contrib/dblink/expected/dblink.out
M contrib/dblink/sql/dblink.sql
M doc/src/sgml/dblink.sgml
Update obsolete text in fdwhandler.sgml.
commit : 392b2e5010ddce24bcb1a9d38adb1d06f01fb543
author : Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 13:54:38 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 13:54:38 -0400
Etsuro Fujita, with some wording adjustment by me.
M doc/src/sgml/fdwhandler.sgml
In pg_upgrade, issue proper error message when we can't open PG_VERSION.
commit : a9701a1d7df8c7a088ed7c37316fe4118a507015
author : Bruce Momjian <[email protected]>
date : Wed, 10 Oct 2012 13:53:00 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 10 Oct 2012 13:53:00 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/server.c
Set procost to 10 for each of the pg_foo_is_visible() functions.
commit : a80889a7359e720107b881bcd3e8fd47f3874e36
author : Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 12:19:25 -0400
committer: Tom Lane <[email protected]>
date : Wed, 10 Oct 2012 12:19:25 -0400
The idea here is to make sure the planner will evaluate these functions
last not first among the filter conditions in psql pattern search and
tab-completion queries. We've discussed this several times, and there
was consensus to do it back in August, but we didn't want to do it just
before a release. Now seems like a safer time.
No catversion bump, since this catalog change doesn't create a backend
incompatibility nor any regression test result changes.
M src/include/catalog/pg_proc.h
Fix PGXS support for building loadable modules on AIX.
commit : 3f88fa971aafcf5204052d1dd114c739a0e751c2
author : Tom Lane <[email protected]>
date : Tue, 9 Oct 2012 21:04:06 -0400
committer: Tom Lane <[email protected]>
date : Tue, 9 Oct 2012 21:04:06 -0400
Building a shlib on AIX requires use of the mkldexport.sh script, but we
failed to install that, preventing its use from non-source-tree contexts.
Also, Makefile.aix had the wrong idea about where to find the installed
copy of the postgres.imp symbol file used by AIX.
Per report from John Pierce. Patch all the way back, since this has been
broken since the beginning of PGXS.
M src/backend/Makefile
M src/makefiles/Makefile.aix
Remove unnecessary overhead in backend's large-object operations.
commit : 7e0cce0265921dca2e8ea9485c194465a7e19703
author : Tom Lane <[email protected]>
date : Tue, 9 Oct 2012 16:38:00 -0400
committer: Tom Lane <[email protected]>
date : Tue, 9 Oct 2012 16:38:00 -0400
Do read/write permissions checks at most once per large object descriptor,
not once per lo_read or lo_write call as before. The repeated tests were
quite useless in the read case since the snapshot-based tests were
guaranteed to produce the same answer every time. In the write case,
the extra tests could in principle detect revocation of write privileges
after a series of writes has started --- but there's a race condition there
anyway, since we'd check privileges before performing and certainly before
committing the write. So there's no real advantage to checking every
single time, and we might as well redefine it as "only check the first
time".
On the same reasoning, remove the LargeObjectExists checks in inv_write
and inv_truncate. We already checked existence when the descriptor was
opened, and checking again doesn't provide any real increment of safety
that would justify the cost.
M src/backend/libpq/be-fsstubs.c
M src/backend/storage/large_object/inv_api.c
M src/include/storage/large_object.h
Fix silly bug in previous refactoring.
commit : 2d8c81ac867d919b7d11120b01a6a327fef6a2ef
author : Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 19:33:12 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 19:33:12 +0300
I extracted the refactoring patch from a larger patch that contained other
changes too, but missed one unintentional change and didn't test enough...
M src/backend/access/transam/xlog.c
Put the logic to wait for WAL in standby mode to a separate function.
commit : ff8f160bf4322c4294deaa0e64ed26467283d525
author : Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 19:20:17 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 19:20:17 +0300
This is just refactoring with no user-visible effect, to make the code more
readable.
M src/backend/access/transam/xlog.c
restore permission bits
commit : f7491616a93e02856a44d4bd3b026610fe58704e
author : Alvaro Herrera <[email protected]>
date : Tue, 9 Oct 2012 12:08:13 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 9 Oct 2012 12:08:13 -0300
M configure
Rename USE_INLINE to PG_USE_INLINE
commit : f46baf601d889b374ba5e5f4b8280fee5aa19a7f
author : Alvaro Herrera <[email protected]>
date : Tue, 9 Oct 2012 11:10:10 -0300
committer: Alvaro Herrera <[email protected]>
date : Tue, 9 Oct 2012 11:10:10 -0300
The former name was too likely to conflict with symbols from external
headers; and, as seen in recent buildfarm failures in member spoonbill,
it has now happened at least in plpython.
M config/c-compiler.m4
M configure
M src/include/c.h
M src/include/nodes/pg_list.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
M src/include/utils/palloc.h
M src/include/utils/sortsupport.h
Remove stray newline in comment.
commit : 0b77aebabfbe9155ea88ee9e11fa126315473b86
author : Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 13:05:59 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 9 Oct 2012 13:05:59 +0300
M src/backend/replication/walsender.c
Use tablespace_option consistently on doc page
commit : 2190377113cd24b0929b30a8c386433d4759fb50
author : Simon Riggs <[email protected]>
date : Tue, 9 Oct 2012 08:29:37 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 9 Oct 2012 08:29:37 +0100
Fujii Masao
M doc/src/sgml/ref/alter_tablespace.sgml
Add microsecs/op display to pg_test_fsync utility
commit : 82e429794b348cd80c1d1b011e21ffac98bc6e88
author : Simon Riggs <[email protected]>
date : Tue, 9 Oct 2012 08:15:23 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 9 Oct 2012 08:15:23 +0100
e.g. fsync 2103.613 ops/sec ( 475 microsecs/op)
Peter Geoghegan
M contrib/pg_test_fsync/pg_test_fsync.c
M doc/src/sgml/pgtestfsync.sgml
Fix lo_import and lo_export to return useful error messages more often.
commit : bc433317ae2b0494dea4526b89dc7bb90a65d79b
author : Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:52:34 -0400
committer: Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:52:34 -0400
I found that these functions tend to return -1 while leaving an empty error
message string in the PGconn, if they suffer some kind of I/O error on the
file. The reason is that lo_close, which thinks it's executed a perfectly
fine SQL command, clears the errorMessage. The minimum-change workaround
is to reorder operations here so that we don't fill the errorMessage until
after lo_close.
M src/interfaces/libpq/fe-lobj.c
Fix lo_export usage in example programs.
commit : f52c5165e1d067ba94f92e5f149c19109b6fed60
author : Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:18:46 -0400
committer: Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:18:46 -0400
lo_export returns -1, not zero, on failure.
M src/test/examples/testlo.c
M src/test/examples/testlo64.c
Fix lo_read, lo_write, lo_truncate to cope with "size_t" length parameters.
commit : 0e924c007dbb74f8f7dbdb75810c9b9a8ed6d3ec
author : Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:12:27 -0400
committer: Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 21:12:27 -0400
libpq defines these functions as accepting "size_t" lengths ... but the
underlying backend functions expect signed int32 length parameters, and so
will misinterpret any value exceeding INT_MAX. Fix the libpq side to throw
error rather than possibly doing something unexpected.
This is a bug of long standing, but I doubt it's worth back-patching. The
problem is really pretty academic anyway with lo_read/lo_write, since any
caller expecting sane behavior would have to have provided a multi-gigabyte
buffer. It's slightly more pressing with lo_truncate, but still we haven't
supported large objects over 2GB until now.
M doc/src/sgml/lobj.sgml
M src/interfaces/libpq/fe-lobj.c
Remove generation of repl_gram.h
commit : b6d45222969a82aff0e9f115842c87136d429479
author : Peter Eisentraut <[email protected]>
date : Mon, 8 Oct 2012 20:36:46 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 8 Oct 2012 20:36:46 -0400
It was apparently never necessary.
M src/backend/Makefile
M src/backend/replication/.gitignore
M src/backend/replication/Makefile
Code review for 64-bit-large-object patch.
commit : 26fe56481c0f7baa705f0b3265b5a0676f894a94
author : Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 18:24:06 -0400
committer: Tom Lane <[email protected]>
date : Mon, 8 Oct 2012 18:24:06 -0400
Fix broken-on-bigendian-machines byte-swapping functions, add missed update
of alternate regression expected file, improve error reporting, remove some
unnecessary code, sync testlo64.c with current testlo.c (it seems to have
been cloned from a very old copy of that), assorted cosmetic improvements.
M src/backend/libpq/be-fsstubs.c
M src/backend/storage/large_object/inv_api.c
M src/backend/utils/errcodes.txt
M src/include/catalog/pg_proc.h
M src/interfaces/libpq/fe-lobj.c
M src/test/examples/testlo64.c
M src/test/regress/input/largeobject.source
M src/test/regress/output/largeobject.source
M src/test/regress/output/largeobject_1.source
Fix thinko in previous commit
commit : 878daf2e72755feadbfb8d21aad26dafd8658086
author : Alvaro Herrera <[email protected]>
date : Mon, 8 Oct 2012 17:34:33 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 8 Oct 2012 17:34:33 -0300
Since postgres.h includes palloc.h, definitions that affect the latter
must be present before the former is included.
Per buildfarm results
M src/backend/utils/mmgr/mcxt.c
Add support for easily declaring static inline functions
commit : 976fa10d20ec9882229020fa16f4d74263066a40
author : Alvaro Herrera <[email protected]>
date : Mon, 8 Oct 2012 16:12:27 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 8 Oct 2012 16:12:27 -0300
We already had those, but they forced modules to spell out the function
bodies twice. Eliminate some duplicates we had already grown.
Extracted from a somewhat larger patch from Andres Freund.
M src/backend/nodes/list.c
M src/backend/utils/mmgr/mcxt.c
M src/backend/utils/sort/sortsupport.c
M src/include/c.h
M src/include/nodes/pg_list.h
M src/include/utils/palloc.h
M src/include/utils/sortsupport.h
Add #define for UUIDOID.
commit : 08c8058ce90cf4b2644cabfa7e5f66e9da8ddd7d
author : Robert Haas <[email protected]>
date : Mon, 8 Oct 2012 10:15:15 -0400
committer: Robert Haas <[email protected]>
date : Mon, 8 Oct 2012 10:15:15 -0400
Phil Sorber and Thom Brown. Reviewed by Albe Laurenz.
M src/include/catalog/pg_type.h
Say ANALYZE, not VACUUM, in error message on analyze in hot standby.
commit : b28cc92d7d7c9557aab5088666140330fce48b1d
author : Heikki Linnakangas <[email protected]>
date : Mon, 8 Oct 2012 14:17:27 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 8 Oct 2012 14:17:27 +0300
Tomonaru Katsumata
M src/backend/tcop/utility.c
Fix walsender handling of postmaster shutdown, to not go into endless loop.
commit : 9c0e2b918252e753ea648dd6a7c18a054bed951b
author : Heikki Linnakangas <[email protected]>
date : Mon, 8 Oct 2012 13:22:04 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 8 Oct 2012 13:22:04 +0300
This bug was introduced by my patch to use the regular die/quickdie signal
handlers in walsender processes. I tried to make walsender exit at next
CHECK_FOR_INTERRUPTS() by setting ProcDiePending, but that's not enough, you
need to set InterruptPending too. On second thoght, it was not a very good
way to make walsender exit anyway, so use proc_exit(0) instead.
Also, send a CommandComplete message before exiting; that's what we did
before, and you get a nicer error message in the standby that way.
Reported by Thom Brown.
M src/backend/replication/walsender.c
Autoconfiscate selection of 64-bit int type for 64-bit large object API.
commit : 95d035e66d8e4371d35830d81f39face03cd4c45
author : Tom Lane <[email protected]>
date : Sun, 7 Oct 2012 21:52:07 -0400
committer: Tom Lane <[email protected]>
date : Sun, 7 Oct 2012 21:52:07 -0400
Get rid of the fundamentally indefensible assumption that "long long int"
exists and is exactly 64 bits wide on every platform Postgres runs on.
Instead let the configure script select the type to use for "pg_int64".
This is a bit of a pain in the rear since we do not want to pollute client
namespace with all the random symbols that pg_config.h defines; instead
we have to create a separate generated header file, "pg_config_ext.h".
But now that the infrastructure is there, we might have the ability to
add some other stuff that's long been wanting in this area.
M configure
M configure.in
M src/Makefile.global.in
M src/bcc32.mak
M src/include/.gitignore
M src/include/Makefile
M src/include/c.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
A src/include/pg_config_ext.h.in
A src/include/pg_config_ext.h.win32
M src/include/postgres_ext.h
M src/include/storage/large_object.h
M src/interfaces/libpq/bcc32.mak
M src/interfaces/libpq/fe-lobj.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/interfaces/libpq/win32.mak
M src/tools/msvc/Install.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/clean.bat
M src/win32.mak
Fix typo in previous MSC commit.
commit : ea72bb8ae527d371ccaf53647540a33224df92a6
author : Andrew Dunstan <[email protected]>
date : Sun, 7 Oct 2012 19:56:26 -0400
committer: Andrew Dunstan <[email protected]>
date : Sun, 7 Oct 2012 19:56:26 -0400
M src/backend/optimizer/path/costsize.c
Improve documentation about large-object functions.
commit : 1503333f8f6fb5dcfdd4f84a9bfa7929c45aa2cc
author : Tom Lane <[email protected]>
date : Sun, 7 Oct 2012 19:16:28 -0400
committer: Tom Lane <[email protected]>
date : Sun, 7 Oct 2012 19:16:28 -0400
Copy-editing for previous patch, plus fixing some longstanding markup
issues and oversights (like not mentioning that failures will set the
PQerrorMessage string).
M doc/src/sgml/config.sgml
M doc/src/sgml/lobj.sgml
Quiet a few MSC compiler warnings.
commit : 33a7101281c6d5c3905b311ed690024ca6a673c6
author : Andrew Dunstan <[email protected]>
date : Sun, 7 Oct 2012 17:31:10 -0400
committer: Andrew Dunstan <[email protected]>
date : Sun, 7 Oct 2012 17:31:10 -0400
M src/backend/catalog/objectaddress.c
M src/backend/optimizer/path/costsize.c
M src/backend/utils/adt/array_selfuncs.c
M src/interfaces/ecpg/ecpglib/typename.c
Fix compiling errors on Windows platform. Fix wrong usage of INT64CONST macro. Fix lo_hton64 and lo_ntoh64 not to use int32_t and uint32_t.
commit : 7e2f8ed2b0dcff052b8f06069e2d69f02b774f04
author : Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 23:30:31 +0900
committer: Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 23:30:31 +0900
M src/include/storage/large_object.h
M src/interfaces/libpq/fe-lobj.c
Bump up catalog vesion due to 64-bit large object API functions addition.
commit : b51a65f5bf4b68bc91d33d88108837d13d29df98
author : Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 09:36:20 +0900
committer: Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 09:36:20 +0900
M src/include/catalog/catversion.h
Add API for 64-bit large object access. Now users can access up to 4TB large objects (standard 8KB BLCKSZ case). For this purpose new libpq API lo_lseek64, lo_tell64 and lo_truncate64 are added. Also corresponding new backend functions lo_lseek64, lo_tell64 and lo_truncate64 are added. inv_api.c is changed to handle 64-bit offsets.
commit : 461ef73f0977c95c9452680495bc161618db9227
author : Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 08:36:48 +0900
committer: Tatsuo Ishii <[email protected]>
date : Sun, 7 Oct 2012 08:36:48 +0900
Patch contributed by Nozomi Anzai (backend side) and Yugo Nagata
(frontend side, docs, regression tests and example program). Reviewed
by Kohei Kaigai. Committed by Tatsuo Ishii with minor editings.
M doc/src/sgml/lobj.sgml
M src/backend/libpq/be-fsstubs.c
M src/backend/storage/large_object/inv_api.c
M src/backend/utils/errcodes.txt
M src/include/catalog/pg_proc.h
M src/include/libpq/be-fsstubs.h
M src/include/postgres_ext.h
M src/include/storage/large_object.h
M src/interfaces/libpq/exports.txt
M src/interfaces/libpq/fe-lobj.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
M src/test/examples/Makefile
A src/test/examples/testlo64.c
M src/test/regress/input/largeobject.source
M src/test/regress/output/largeobject.source
Improve LDAP authentication documentation
commit : ae835c7d6e202e99796c58093ef781477e54c459
author : Peter Eisentraut <[email protected]>
date : Fri, 5 Oct 2012 21:20:06 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 5 Oct 2012 21:20:06 -0400
Use the terms "simple bind" and "search+bind" consistently do
distinguish the two modes (better than first mode and second mode in
any case). They were already used in some places, now it's just more
prominent.
Split up the list of options into one for common options and one for
each mode, for clarity.
Add configuration examples for either mode.
M doc/src/sgml/client-auth.sgml
Removed sentence about not being able to retrieve more than one row at a time, because it is not correct.
commit : 1045af95e7218e5713baabdbf6b960876fa3c9d2
author : Michael Meskes <[email protected]>
date : Fri, 5 Oct 2012 16:49:27 +0200
committer: Michael Meskes <[email protected]>
date : Fri, 5 Oct 2012 16:49:27 +0200
M doc/src/sgml/ecpg.sgml
Fixed test for array boundary.
commit : 6e41fa2e5cd84d0970f1ee1d9c9767dbc974952a
author : Michael Meskes <[email protected]>
date : Fri, 5 Oct 2012 16:37:45 +0200
committer: Michael Meskes <[email protected]>
date : Fri, 5 Oct 2012 16:37:45 +0200
Instead of continuing if the next character is not an array boundary get_data()
used to continue only on finding a boundary so it was not able to read any
element after the first.
M src/interfaces/ecpg/ecpglib/data.c
Use the regular main processing loop also in walsenders.
commit : fd5942c18f977a36fec66a8d1281092805f2a55e
author : Heikki Linnakangas <[email protected]>
date : Fri, 5 Oct 2012 17:13:07 +0300
committer: Heikki Linnakangas <[email protected]>
date : Fri, 5 Oct 2012 17:13:07 +0300
The regular backend's main loop handles signal handling and error recovery
better than the current WAL sender command loop does. For example, if the
client hangs and a SIGTERM is received before starting streaming, the
walsender will now terminate immediately, rather than hang until the
connection times out.
M src/backend/replication/basebackup.c
M src/backend/replication/walsender.c
M src/backend/tcop/postgres.c
M src/include/replication/walsender.h
getnameinfo_unix has to be taught not to insist on NI_NUMERIC flags, too.
commit : 1997f34db4687e671690ed054c8f30bb501b1168
author : Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 22:53:53 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 22:53:53 -0400
Per testing of previous patch.
M src/backend/libpq/ip.c
PL/pgSQL: rename gram.y to pl_gram.y
commit : 05346c131a14f29f327518778811cba26444822b
author : Peter Eisentraut <[email protected]>
date : Thu, 4 Oct 2012 22:40:33 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 4 Oct 2012 22:40:33 -0400
This makes the naming inside plpgsql consistent and distinguishes the
file from the backend's gram.y file. It will also allow easier
refactoring of the bison make rules later on.
M src/pl/plpgsql/src/Makefile
R099 src/pl/plpgsql/src/gram.y src/pl/plpgsql/src/pl_gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/tools/msvc/Mkvcbuild.pm
Remove redundant code for getnameinfo() replacement
commit : c424d0d1052cb4053c8712ac44123f9b9a9aa3f2
author : Peter Eisentraut <[email protected]>
date : Thu, 4 Oct 2012 21:45:14 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 4 Oct 2012 21:45:14 -0400
Our getnameinfo() replacement implementation in getaddrinfo.c failed
unless NI_NUMERICHOST and NI_NUMERICSERV were given as flags, because
it doesn't resolve host names, only numeric IPs. But per standard,
when those flags are not given, an implementation can still degrade to
not returning host names, so this restriction is unnecessary. When we
remove it, we can eliminate some code in postmaster.c that apparently
tried to work around that.
M src/backend/postmaster/postmaster.c
M src/port/getaddrinfo.c
Make CREATE AGGREGATE complain if the initcond is invalid for the datatype.
commit : e1e60694b4a69786dc5ff27e340afeaad7833eb9
author : Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 17:54:53 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 17:54:53 -0400
The initial transition value is stored as a text string and not fed to the
transition type's input function until runtime (so that values such as
"now" don't get frozen at creation time). Previously, CREATE AGGREGATE
didn't do anything with it but that, which meant that even erroneous values
would be accepted and not complained of until the aggregate is used. This
seems unhelpful, and it's confused at least one user, as in Rhys Stewart's
recent report. It seems worth taking a few more cycles to invoke the input
function and verify that the value is acceptable. We can't do this if the
transition type is polymorphic, but in normal aggregates we know the actual
transition type so we can call the right input function.
M src/backend/commands/aggregatecmds.c
Fix parse location tracking for lists that can be empty.
commit : 707263542e571c9906549e196728ad39ecc0ca84
author : Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 17:14:59 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 17:14:59 -0400
The previous coding of the YYLLOC_DEFAULT macro behaved strangely for empty
productions, assigning the previous nonterminal's location as the parse
location of the result. The usefulness of that was (at best) debatable
already, but the real problem is that in list-generating nonterminals like
OptFooList: /* EMPTY */ { ... } | OptFooList Foo { ... } ;
the initially-identified location would get copied up, so that even a
nonempty list would be given a bogus parse location. Document how to work
around that, and do so for OptSchemaEltList, so that the error condition
just added for CREATE SCHEMA IF NOT EXISTS produces a sane error cursor.
So far as I can tell, there are currently no other cases where the
situation arises, so we don't need other instances of this coding yet.
M src/backend/parser/gram.y
M src/test/regress/expected/namespace.out
Fix permissions explanations in CREATE DATABASE and CREATE SCHEMA docs.
commit : 7e389f73d1556fb21487cd28fe56cba1a91126e6
author : Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 13:41:01 -0400
committer: Tom Lane <[email protected]>
date : Thu, 4 Oct 2012 13:41:01 -0400
These reference pages still claimed that you have to be superuser to create
a database or schema owned by a different role. That was true before 8.1,
but it was changed in commits aa1110624c08298393dfce996f7b21809d98d3fd and
f91370cd2faf1fd35a1ac74d84652a85ed841919 to allow assignment of ownership
to any role you are a member of. However, at the time we were thinking of
that primarily as a change to the ALTER OWNER rules, so the need to touch
these two CREATE ref pages got missed.
M doc/src/sgml/ref/create_database.sgml
M doc/src/sgml/ref/create_schema.sgml
Fix typo in comment, and reword it slightly while we're at it.
commit : 1a956481baa2bb53d9510bb14cf64bb5faad29fb
author : Heikki Linnakangas <[email protected]>
date : Thu, 4 Oct 2012 10:34:40 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 4 Oct 2012 10:34:40 +0300
M src/backend/access/transam/xlog.c
Support CREATE SCHEMA IF NOT EXISTS.
commit : fb34e94d214d6767910df47aa7c605c452d11c57
author : Tom Lane <[email protected]>
date : Wed, 3 Oct 2012 19:47:11 -0400
committer: Tom Lane <[email protected]>
date : Wed, 3 Oct 2012 19:47:11 -0400
Per discussion, schema-element subcommands are not allowed together with
this option, since it's not very obvious what should happen to the element
objects.
Fabrízio de Royes Mello
M doc/src/sgml/ref/create_schema.sgml
M src/backend/commands/extension.c
M src/backend/commands/schemacmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/include/nodes/parsenodes.h
M src/test/regress/expected/namespace.out
M src/test/regress/sql/namespace.sql
refactor ALTER some-obj SET OWNER implementation
commit : 994c36e01d19dece2b0c76fb781e1d08a6e1c814
author : Alvaro Herrera <[email protected]>
date : Wed, 3 Oct 2012 18:02:38 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 3 Oct 2012 18:02:38 -0300
Remove duplicate implementation of catalog munging and miscellaneous
privilege and consistency checks. Instead rely on already existing data
in objectaddress.c to do the work.
Author: KaiGai Kohei
Tweaked by me
Reviewed by Robert Haas
M src/backend/catalog/pg_largeobject.c
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/extension.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/proclang.c
M src/backend/commands/tablespace.c
M src/backend/commands/tsearchcmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/include/catalog/pg_largeobject.h
M src/include/commands/alter.h
M src/include/commands/collationcmds.h
M src/include/commands/conversioncmds.h
M src/include/commands/defrem.h
M src/include/commands/proclang.h
M src/include/commands/tablespace.h
M src/include/nodes/parsenodes.h
Avoid planner crash/Assert failure with joins to unflattened subqueries.
commit : 1f91c8ca1d2edc66c688ee719eded79ecd0e8f1b
author : Tom Lane <[email protected]>
date : Wed, 3 Oct 2012 13:37:53 -0400
committer: Tom Lane <[email protected]>
date : Wed, 3 Oct 2012 13:37:53 -0400
examine_simple_variable supposed that any RTE_SUBQUERY rel it gets pointed
at must have been planned already. However, this isn't a safe assumption
because we must do selectivity estimation while generating indexscan paths,
and that code might look at join clauses involving a rel that the loop in
set_base_rel_sizes() hasn't reached yet. The simplest fix is to play dumb
in such a situation, that is give up trying to extract any stats for the
Var. This could possibly be improved by making a separate pass over the
RTE list to plan each unflattened subquery before we start the main
planning work --- but that would be pretty invasive and it doesn't seem
worth it, for now at least. (We couldn't just break set_base_rel_sizes()
into two loops: the prescan would need to handle all subquery rels in the
query, not only those in the current join subproblem.)
This bug was introduced in commit 1cb108efb0e60d87e4adec38e7636b6e8efbeb57,
although I think that subsequent changes may have exposed it more than it
was originally. Per bug #7580 from Maxim Boguk.
M src/backend/utils/adt/selfuncs.c
REASSIGN OWNED: consider grants on tablespaces, too
commit : fe3b5eb08a16c391478e305bd9ea40f4f5979689
author : Alvaro Herrera <[email protected]>
date : Wed, 3 Oct 2012 12:22:41 -0300
committer: Alvaro Herrera <[email protected]>
date : Wed, 3 Oct 2012 12:22:41 -0300
Apparently this was considered in the original code (see commit
cec3b0a9) but I failed to notice that such entries would always be
skipped by the database check at the start of the loop.
Per bugs #7578 by Nikolay, #6116 by [email protected].
M src/backend/catalog/pg_shdepend.c
Add --sampling-rate option to pgbench.
commit : e1be1df51facd3c25317c809fd72ecac8b93b4e7
author : Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 15:37:42 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 15:37:42 +0300
This allows logging only some fraction of transactions, greatly reducing
the amount of log generated.
Tomas Vondra, reviewed by Robert Haas and Jeff Janes.
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Return the number of rows processed when COPY is executed through SPI.
commit : 7ae1815961c635fd1a6fe72acb89fdef741a45a8
author : Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 14:32:01 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 14:32:01 +0300
You can now get the number of rows processed by a COPY statement in a
PL/pgSQL function with "GET DIAGNOSTICS x = ROW_COUNT".
Pavel Stehule, reviewed by Amit Kapila, with some editing by me.
M doc/src/sgml/spi.sgml
M src/backend/executor/spi.c
Fix two bugs introduced in the xlog.c split.
commit : bc1229c83238a0d71a3923cb48e53ea7ea37654c
author : Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 09:08:13 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 3 Oct 2012 09:08:13 +0300
The comment explaining the naming of timeline history files was wrong, and
the history file was not being arhived.
Pointed out by Fujii Masao.
M src/backend/access/transam/timeline.c
Improve some LDAP authentication error messages
commit : 6bd176095b59c1d7acfed3adf7648d04d7b2916f
author : Peter Eisentraut <[email protected]>
date : Tue, 2 Oct 2012 23:25:05 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 2 Oct 2012 23:25:05 -0400
M src/backend/libpq/auth.c
In pg_upgrade, use full path name for analyze_new_cluster.sh script.
commit : ce754579491bfcfc1c83b737fa5373c2e3fc4b39
author : Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 21:18:43 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 21:18:43 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
Work around unportable behavior of malloc(0) and realloc(NULL, 0).
commit : 09ac603c36d1c865df68e5abd9dab04bd0fa5e48
author : Tom Lane <[email protected]>
date : Tue, 2 Oct 2012 17:31:40 -0400
committer: Tom Lane <[email protected]>
date : Tue, 2 Oct 2012 17:31:40 -0400
On some platforms these functions return NULL, rather than the more common
practice of returning a pointer to a zero-sized block of memory. Hack our
various wrapper functions to hide the difference by substituting a size
request of 1. This is probably not so important for the callers, who
should never touch the block anyway if they asked for size 0 --- but it's
important for the wrapper functions themselves, which mistakenly treated
the NULL result as an out-of-memory failure. This broke at least pg_dump
for the case of no user-defined aggregates, as per report from
Matthew Carrington.
Back-patch to 9.2 to fix the pg_dump issue. Given the lack of previous
complaints, it seems likely that there is no live bug in previous releases,
even though some of these functions were in place before that.
M contrib/oid2name/oid2name.c
M contrib/pg_upgrade/util.c
M contrib/pgbench/pgbench.c
M src/backend/utils/misc/guc.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/dumpmem.c
M src/bin/psql/common.c
M src/bin/scripts/common.c
M src/port/dirmod.c
Refactor "ALTER some-obj SET SCHEMA" implementation
commit : 2164f9a1254980a02ef9ca99ee3bcb8c1298b219
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 18:13:09 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 18:13:09 -0300
Instead of having each object type implement the catalog munging
independently, centralize knowledge about how to do it and expand the
existing table in objectaddress.c with enough data about each object
type to support this operation.
Author: KaiGai Kohei
Tweaks by me
Reviewed by Robert Haas
M src/backend/catalog/objectaddress.c
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/dropcmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/tsearchcmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/include/catalog/objectaddress.h
M src/include/commands/alter.h
M src/include/commands/conversioncmds.h
M src/include/commands/defrem.h
M src/include/nodes/parsenodes.h
Standardize naming of malloc/realloc/strdup wrapper functions.
commit : a563d941803535dbd27d4191fe7729497b7fdf31
author : Tom Lane <[email protected]>
date : Tue, 2 Oct 2012 15:35:10 -0400
committer: Tom Lane <[email protected]>
date : Tue, 2 Oct 2012 15:35:10 -0400
We had a number of variants on the theme of "malloc or die", with the
majority named like "pg_malloc", but by no means all. Standardize on the
names pg_malloc, pg_malloc0, pg_realloc, pg_strdup. Get rid of pg_calloc
entirely in favor of using pg_malloc0.
This is an essentially cosmetic change, so no back-patch. (I did find
a couple of places where psql and pg_dump were using plain malloc or
strdup instead of the pg_ versions, but they don't look significant
enough to bother back-patching.)
M contrib/oid2name/oid2name.c
M contrib/pgbench/pgbench.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_basebackup/streamutil.h
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/dumpmem.c
M src/bin/pg_dump/dumpmem.h
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/common.h
M src/bin/psql/copy.c
M src/bin/psql/describe.c
M src/bin/psql/print.c
M src/bin/psql/psqlscan.l
M src/bin/psql/startup.c
M src/bin/scripts/common.c
M src/bin/scripts/common.h
Fix typo in previous warning-silencing patch.
commit : 779f80b75d448d61cf3388645505c9fd81000bb2
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 19:59:00 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 19:59:00 +0300
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
In pg_upgrade, improve error reporting when the number of relation objects does not match between the old and new clusters.
commit : 8a7598091a29ac13736ef8b70986921746648582
author : Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:53:45 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:53:45 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/info.c
Adjust pg_upgrade query so toast tables related to system catalog schema entries are not dumped. This fixes an error caused by droping/recreating the information_schema, but other failures were also possible.
commit : ac96b851ec44cbf63bf0b231e813c0ab4af08d6b
author : Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:46:08 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:46:08 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/info.c
In pg_upgrade, try to convert the locale names to canonical form before comparison; also report the old/new values if they don't match.
commit : b61837a49f4b4ea12e7ced8e3039ae98908c7c0b
author : Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:42:34 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 2 Oct 2012 11:42:34 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
Silence compiler warning about pointer type mismatch on some platforms.
commit : 2a4bbed7b80283200216244e98f7f004ad4d735a
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 17:37:41 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 17:37:41 +0300
timeval.t_sec is of type time_t, which is not always compatible with long.
I'm not sure if this was just harmless warning or a real bug, but this
fixes it, anyway.
M src/bin/pg_basebackup/receivelog.c
Allow a few seconds for Windows to catch up with a directory rename when checking pg_upgrade.
commit : 06623df63bc7debaad5b3239f2a4626b4c1d8855
author : Andrew Dunstan <[email protected]>
date : Tue, 2 Oct 2012 10:40:57 -0400
committer: Andrew Dunstan <[email protected]>
date : Tue, 2 Oct 2012 10:40:57 -0400
M src/tools/msvc/vcregress.pl
Add #includes needed on some platforms in the new files.
commit : 93b6d78cf07cc886cd14edacc7d621ef330c513d
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 17:19:52 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 17:19:52 +0300
Hopefully this makes the *BSD buildfarm animals happy.
M src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogarchive.c
Split off functions related to timeline history files and XLOG archiving.
commit : d5497b95f3ca2fc50c6eef46d3394ab6e6855956
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 13:37:19 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 13:37:19 +0300
This is just refactoring, to make the functions accessible outside xlog.c.
A followup patch will make use of that, to allow fetching timeline history
files over streaming replication.
M src/backend/access/transam/Makefile
A src/backend/access/transam/timeline.c
M src/backend/access/transam/xlog.c
A src/backend/access/transam/xlogarchive.c
A src/include/access/timeline.h
M src/include/access/xlog_internal.h
Fix access past end of string in date parsing.
commit : 0899556e92958712cc31953497b82657cc706f94
author : Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 10:43:48 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 2 Oct 2012 10:43:48 +0300
This affects date_in(), and a couple of other funcions that use DecodeDate().
Hitoshi Harada
M src/backend/utils/adt/datetime.c
Add C comment that IsBackendPid() is called by external modules, so we don't accidentally remove it.
commit : dbdb2172a0940cc18985a0c2b20cdb002fdf8466
author : Bruce Momjian <[email protected]>
date : Mon, 1 Oct 2012 10:14:35 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 1 Oct 2012 10:14:35 -0400
M src/backend/storage/ipc/procarray.c
Remove collations from generic ALTER test
commit : ece26987c20c679edde74775ef0c56bff32bd1bc
author : Alvaro Herrera <[email protected]>
date : Mon, 1 Oct 2012 10:42:03 -0300
committer: Alvaro Herrera <[email protected]>
date : Mon, 1 Oct 2012 10:42:03 -0300
The error messages they generate are not portable enough.
Also, since the only point of the alter_generic_1 expected file was to
cover platforms with no collation support, it's now useless, so remove
it.
M src/test/regress/expected/alter_generic.out
D src/test/regress/expected/alter_generic_1.out
M src/test/regress/sql/alter_generic.sql
The max shared_buffers value that initdb will choose was raised, update docs.
commit : 2ad881f054be165d617aa67cf62513dd1437caa6
author : Heikki Linnakangas <[email protected]>
date : Mon, 1 Oct 2012 09:23:06 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 1 Oct 2012 09:23:06 +0300
Jeff Janes
M doc/src/sgml/config.sgml
Provide some static-assertion functionality on all compilers.
commit : 0d0aa5d29175c539db1981be27dbbf059be6f3b1
author : Tom Lane <[email protected]>
date : Sun, 30 Sep 2012 22:46:29 -0400
committer: Tom Lane <[email protected]>
date : Sun, 30 Sep 2012 22:46:29 -0400
On reflection (especially after noticing how many buildfarm critters have
__builtin_types_compatible_p but not _Static_assert), it seems like we
ought to try a bit harder to make these macros do something everywhere.
The initial cut at it would have been no help to code that is compiled only
on platforms without _Static_assert, for instance; and in any case not all
our contributors do their initial coding on the latest gcc version.
Some googling about static assertions turns up quite a bit of prior art
for making it work in compilers that lack _Static_assert. The method
that seems closest to our needs involves defining a struct with a bit-field
that has negative width if the assertion condition fails. There seems no
reliable way to get the error message string to be output, but throwing a
compile error with a confusing message is better than missing the problem
altogether.
In the same spirit, if we don't have __builtin_types_compatible_p we can at
least insist that the variable have the same width as the type. This won't
catch errors such as "wrong pointer type", but it's far better than
nothing.
In addition to changing the macro definitions, adjust a
compile-time-constant Assert in contrib/hstore to use StaticAssertStmt,
so we can get some buildfarm coverage on whether that macro behaves sanely
or not. There's surely more places that could be converted, but this is
the first one I came across.
M contrib/hstore/hstore_compat.c
M src/include/c.h
Add infrastructure for compile-time assertions about variable types.
commit : ea473fb2dee7dfe61f8fbdfac9d9da87d84e564e
author : Tom Lane <[email protected]>
date : Sun, 30 Sep 2012 14:38:31 -0400
committer: Tom Lane <[email protected]>
date : Sun, 30 Sep 2012 14:38:31 -0400
Currently, the macros only work with fairly recent gcc versions, but there
is room to expand them to other compilers that have comparable features.
Heavily revised and autoconfiscated version of a patch by Andres Freund.
M config/c-compiler.m4
M configure
M configure.in
M src/include/c.h
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
psql: Mark table headers in \drds output for translation
commit : 26fd82ddf1273d5df20b892fc02c8ca756d2e2bc
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 20:47:05 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 20:47:05 -0400
M src/bin/psql/describe.c
Disable _FORTIFY_SOURCE with ICC
commit : 97ec9621572054be96b0447395f5fa2438a4d6cb
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 20:06:37 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 20:06:37 -0400
There are apparently some incompatibilities, per buildfarm.
M src/template/linux
Fix bugs in "restore.sql" script emitted in pg_dump tar output.
commit : ff75219e9f58f0cee1578e6d4175fe36b6bab3e3
author : Tom Lane <[email protected]>
date : Sat, 29 Sep 2012 17:56:37 -0400
committer: Tom Lane <[email protected]>
date : Sat, 29 Sep 2012 17:56:37 -0400
The tar output module did some very ugly and ultimately incorrect hacking
on COPY commands to try to get them to work in the context of restoring a
deconstructed tar archive. In particular, it would fail altogether for
table names containing any upper-case characters, since it smashed the
command string to lower-case before modifying it (and, just to add insult
to injury, did that in a way that would fail in multibyte encodings).
I don't see any particular value in being flexible about the case of the
command keywords, since the string will just have been created by
dumpTableData, so let's get rid of the whole case-folding thing.
Also, it doesn't seem to meet the POLA for the script to restore data only
in COPY mode, so add \i commands to make it have comparable behavior in
--inserts mode.
Noted while looking at the tar-output code in connection with Brian
Weaver's patch.
M src/bin/pg_dump/pg_backup_tar.c
Add _FORTIFY_SOURCE to default compiler options for linux template
commit : 997fa75d6b1522658d4464396cb91264f642634a
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 13:22:59 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 13:22:59 -0400
Many distributors use this, so we might as well see the warnings as
well.
M src/template/linux
PL/Python: Remove workaround for returning booleans in Python <2.3
commit : be0dfbad3671ed2503a2a661e70b48c5b364e069
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 12:55:42 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 12:55:42 -0400
Since Python 2.2 is no longer supported, we can now use Py_RETURN_TRUE
and Py_RETURN_FALSE instead of the old workaround.
M src/pl/plpython/plpy_typeio.c
PL/Python: Convert oid to long/int
commit : db0af74af28663e060e8c5d6f8dd0927bb572f25
author : Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 12:41:00 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 29 Sep 2012 12:41:00 -0400
oid is a numeric type, so transform it to the appropriate Python
numeric type like the other ones.
M doc/src/sgml/plpython.sgml
M src/pl/plpython/expected/plpython_types.out
M src/pl/plpython/expected/plpython_types_3.out
M src/pl/plpython/plpy_typeio.c
M src/pl/plpython/sql/plpython_types.sql
Add alternative expected output for alter_generic
commit : 811ca1300bf8eb50ff1a84082619ba770126cdc9
author : Alvaro Herrera <[email protected]>
date : Sat, 29 Sep 2012 00:32:57 -0300
committer: Alvaro Herrera <[email protected]>
date : Sat, 29 Sep 2012 00:32:57 -0300
The original only expected file failed to consider machines without
non-default collation support. Per buildfarm.
Also, move the test to another parallel group; the one it was originally
put in is already full according to comments in the schedule file. Per
note from Tom Lane.
A src/test/regress/expected/alter_generic_1.out
M src/test/regress/parallel_schedule
Remove checks for now long outdated compilers.
commit : 6e9876dc32495976af525fa29922648a02c8ef9b
author : Andrew Dunstan <[email protected]>
date : Fri, 28 Sep 2012 19:43:50 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 28 Sep 2012 19:43:50 -0400
M src/include/port/cygwin.h
M src/include/port/win32.h
Add alter_generic regression test
commit : ff7e5b4841eeedfb9cefec6226f4dca5b8840276
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 17:21:11 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 17:21:11 -0300
This makes refactoring of parts of the ALTER command safe(r) because we
ensure no change in functionality.
Author: KaiGai Kohei
A src/test/regress/expected/alter_generic.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/alter_generic.sql
Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant.
commit : 05b555d12bc2ad0d581f48a12b45174db41dc10d
author : Tom Lane <[email protected]>
date : Fri, 28 Sep 2012 15:19:15 -0400
committer: Tom Lane <[email protected]>
date : Fri, 28 Sep 2012 15:19:15 -0400
Both programs got the "magic" string wrong, causing standard-conforming tar
implementations to believe the output was just legacy tar format without
any POSIX extensions. This doesn't actually matter that much, especially
since pg_dump failed to fill the POSIX fields anyway, but still there is
little point in emitting tar format if we can't be compliant with the
standard. In addition, pg_dump failed to write the EOF marker correctly
(there should be 2 blocks of zeroes not just one), pg_basebackup put the
numeric group ID in the wrong place, and both programs had a pretty
brain-dead idea of how to compute the checksum. Fix all that and improve
the comments a bit.
pg_restore is modified to accept either the correct POSIX-compliant "magic"
string or the previous value. This part of the change will need to be
back-patched to avoid an unnecessary compatibility break when a previous
version tries to read tar-format output from 9.3 pg_dump.
Brian Weaver and Tom Lane
M doc/src/sgml/protocol.sgml
M src/backend/replication/basebackup.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_backup_tar.h
Produce textual error messages for LDAP issues instead of numeric codes
commit : edc9109c42299ea8d7d897647967cf65d638617c
author : Peter Eisentraut <[email protected]>
date : Thu, 27 Sep 2012 20:22:50 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 27 Sep 2012 20:22:50 -0400
M src/backend/libpq/auth.c
Fix btmarkpos/btrestrpos to handle array keys.
commit : 70bc5833195daf64a200ac7b4a8c9aff65cf966f
author : Tom Lane <[email protected]>
date : Thu, 27 Sep 2012 16:59:59 -0400
committer: Tom Lane <[email protected]>
date : Thu, 27 Sep 2012 16:59:59 -0400
This fixes another error in commit 9e8da0f75731aaa7605cf4656c21ea09e84d2eb1.
I neglected to make the mark/restore functionality save and restore the
current set of array key values, which led to strange behavior if an
IndexScan with ScalarArrayOpExpr quals was used as the inner side of a
mergejoin. Per bug #7570 from Melese Tesfaye.
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtutils.c
M src/include/access/nbtree.h
Have pg_terminate/cancel_backend not ERROR on non-existent processes
commit : ae90ffada4cb27c9194797c43d864a86ce88d72c
author : Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 12:15:03 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 27 Sep 2012 12:15:03 -0300
This worked fine for superusers, but not for ordinary users trying to
cancel their own processes. Tweak the order the checks are done in so
that we correctly return SIGNAL_BACKEND_ERROR (which current callers
know to ignore without erroring out) so that an ordinary user can loop
through a resultset without fearing that a process might exit in the
middle of said looping -- causing the remaining processes to go
unsignalled.
Incidentally, the last in-core caller of IsBackendPid() is now gone.
However, the function is exported and must remain in place, because
there are plenty of callers in external modules.
Author: Josh Kupershmidt
Reviewed by Noah Misch
M src/backend/utils/adt/misc.c
Run check_keywords.pl anytime gram.c is rebuilt.
commit : 55c1687a97c3c2b6cbf7c1b45830b49f03641908
author : Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 23:10:52 -0400
committer: Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 23:10:52 -0400
This script is a bit slow, but still it only takes a fraction of the time
the bison run does, so the overhead doesn't seem intolerable. And we
definitely need some mechanical aid here, because people keep missing
the need to add new keywords to the appropriate keyword-list production.
While at it, I moved check_keywords.pl from src/tools into
src/backend/parser where it's actually used, and did some very minor
cleanup on the script.
M src/backend/parser/Makefile
R081 src/tools/check_keywords.pl src/backend/parser/check_keywords.pl
pg_upgrade test: Disable fsync in initdb and postgres calls
commit : 10bfe81deeb8dc2af2204dbeebf3dda62f1ae263
author : Peter Eisentraut <[email protected]>
date : Wed, 26 Sep 2012 22:38:15 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 26 Sep 2012 22:38:15 -0400
This mirrors the behavior of pg_regress and makes the test run much
faster.
M contrib/pg_upgrade/test.sh
Make plpgsql's unreserved keywords more unreserved.
commit : bac95fd4740e3ac13baf5c2ad38b9c9dc26f9c9d
author : Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 22:27:36 -0400
committer: Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 22:27:36 -0400
There were assorted places where unreserved keywords were not treated the
same as T_WORD (that is, a random unrecognized identifier). Fix them.
It might not always be possible to allow this, but it is in all these
places, so I don't see any downside.
Per gripe from Jim Wilson. Arguably this is a bug fix, but given the lack
of other complaints and the ease of working around it (just quote the
word), I won't risk back-patching.
M src/pl/plpgsql/src/gram.y
M src/pl/plpgsql/src/pl_scanner.c
M src/pl/plpgsql/src/plpgsql.h
Add new EVENT keyword to unreserved_keyword production.
commit : fc68ac86b1c8b19ec6a2064c8a24e1c124f77f7f
author : Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 20:07:36 -0400
committer: Tom Lane <[email protected]>
date : Wed, 26 Sep 2012 20:07:36 -0400
Once again, somebody who ought to know better forgot this. We really
need some automated cross-check on the keyword-list productions, I think.
Per report from Brian Weaver.
M src/backend/parser/gram.y
Fix examples of how to use "su" while starting the server.
commit : 7d8cbeb0c3f48c6c204b742b6891a9e5e5031d15
author : Tom Lane <[email protected]>
date : Tue, 25 Sep 2012 13:52:53 -0400
committer: Tom Lane <[email protected]>
date : Tue, 25 Sep 2012 13:52:53 -0400
The syntax "su -c 'command' username" is not accepted by all versions of
su, for example not OpenBSD's. More portable is "su username -c
'command'". So change runtime.sgml to recommend that syntax. Also,
add a -D switch to the OpenBSD example script, for consistency with other
examples. Per Denis Lapshin and Gábor Hidvégi.
M doc/src/sgml/runtime.sgml
Add support for include_dir in config file.
commit : 2a0c81a12c7e6c5ac1557b0f1f4a581f23fd4ca7
author : Heikki Linnakangas <[email protected]>
date : Mon, 24 Sep 2012 17:55:53 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 24 Sep 2012 17:55:53 +0300
This allows easily splitting configuration into many files, deployed in a
directory.
Magnus Hagander, Greg Smith, Selena Deckelmann, reviewed by Noah Misch.
M doc/src/sgml/config.sgml
M src/backend/utils/misc/guc-file.l
M src/backend/utils/misc/postgresql.conf.sample
M src/include/utils/guc.h
Prevent emitting "ALTER VIEW foo SET ()".
commit : ce9eee39d18822902cd8cb05a4e16fc0683b49d6
author : Tom Lane <[email protected]>
date : Mon, 24 Sep 2012 00:18:07 -0400
committer: Tom Lane <[email protected]>
date : Mon, 24 Sep 2012 00:18:07 -0400
Small oversight in commit 0f524ea0cf388a149f362e48a33c01662eeddc04 ...
per report from Grazvydas Valeika.
M src/bin/pg_dump/pg_dump.c
RELEASE_NOTES: Fix typo
commit : ea7d504998cc26fd849b0ea89a7ffcd8f1f530f1
author : Alvaro Herrera <[email protected]>
date : Sun, 23 Sep 2012 16:28:44 -0300
committer: Alvaro Herrera <[email protected]>
date : Sun, 23 Sep 2012 16:28:44 -0300
Jan Urbański
M src/tools/RELEASE_CHANGES
Update translation updates instructions
commit : 8a32819a80b03deda7d7e06f2f964255e3842248
author : Peter Eisentraut <[email protected]>
date : Sat, 22 Sep 2012 22:14:38 -0400
committer: Peter Eisentraut <[email protected]>
date : Sat, 22 Sep 2012 22:14:38 -0400
M src/tools/RELEASE_CHANGES
Minor corrections for ALTER TYPE ADD VALUE IF NOT EXISTS patch.
commit : 31510194cc9d87b355cb56e7d88c18c985d7a32a
author : Tom Lane <[email protected]>
date : Sat, 22 Sep 2012 18:35:22 -0400
committer: Tom Lane <[email protected]>
date : Sat, 22 Sep 2012 18:35:22 -0400
Produce a NOTICE when the label already exists, for consistency with other
CREATE IF NOT EXISTS commands. Also, fix the code so it produces something
more user-friendly than an index violation when the label already exists.
This not incidentally enables making a regression test that the previous
patch didn't make for fear of exposing an unpredictable OID in the results.
Also some wordsmithing on the documentation.
M doc/src/sgml/ref/alter_type.sgml
M src/backend/catalog/pg_enum.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/enum.out
M src/test/regress/sql/enum.sql
Fix docs typo
commit : fcc1576687a122059db311791e45e2c5edc5d89b
author : Andrew Dunstan <[email protected]>
date : Sat, 22 Sep 2012 13:57:40 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 22 Sep 2012 13:57:40 -0400
M doc/src/sgml/ref/alter_type.sgml
Allow IF NOT EXISTS when add a new enum label.
commit : 6d12b68cd7a93e279c8c690749b334c9f59ac7fa
author : Andrew Dunstan <[email protected]>
date : Sat, 22 Sep 2012 12:53:31 -0400
committer: Andrew Dunstan <[email protected]>
date : Sat, 22 Sep 2012 12:53:31 -0400
If the label is already in the enum the statement becomes a no-op.
This will reduce the pain that comes from our not allowing this
operation inside a transaction block.
Andrew Dunstan, reviewed by Tom Lane and Magnus Hagander.
M doc/src/sgml/ref/alter_type.sgml
M src/backend/catalog/pg_enum.c
M src/backend/commands/typecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/include/catalog/pg_enum.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/enum.out
M src/test/regress/sql/enum.sql
Improve ruleutils.c's heuristics for dealing with rangetable aliases.
commit : 11e131854f8231a21613f834c40fe9d046926387
author : Tom Lane <[email protected]>
date : Fri, 21 Sep 2012 19:03:10 -0400
committer: Tom Lane <[email protected]>
date : Fri, 21 Sep 2012 19:03:10 -0400
The previous scheme had bugs in some corner cases involving tables that had
been renamed since a view was made. This could result in dumped views that
failed to reload or reloaded incorrectly, as seen in bug #7553 from Lloyd
Albin, as well as in some pgsql-hackers discussion back in January. Also,
its behavior for printing EXPLAIN plans was sometimes confusing because of
willingness to use the same alias for multiple RTEs (it was Ashutosh
Bapat's complaint about that aspect that started the January thread).
To fix, ensure that each RTE in the query has a unique unqualified alias,
by modifying the alias if necessary (we add "_" and digits as needed to
create a non-conflicting name). Then we can just print its variables with
that alias, avoiding the confusing and bug-prone scheme of sometimes
schema-qualifying variable names. In EXPLAIN, it proves to be expedient to
take the further step of only assigning such aliases to RTEs that are
actually referenced in the query, since the planner has a habit of
generating extra RTEs with the same alias in situations such as
inheritance-tree expansion.
Although this fixes a bug of very long standing, I'm hesitant to back-patch
such a noticeable behavioral change. My experiments while creating a
regression test convinced me that actually incorrect output (as opposed to
confusing output) occurs only in very narrow cases, which is backed up by
the lack of previous complaints from the field. So we may be better off
living with it in released branches; and in any case it'd be smart to let
this ripen awhile in HEAD before we consider back-patching it.
M src/backend/commands/explain.c
M src/backend/utils/adt/ruleutils.c
M src/include/commands/explain.h
M src/include/utils/builtins.h
M src/test/regress/expected/aggregates.out
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/create_view.out
M src/test/regress/expected/inherit.out
M src/test/regress/expected/select_views.out
M src/test/regress/expected/select_views_1.out
M src/test/regress/expected/with.out
M src/test/regress/sql/create_view.sql
Parse pg_ident.conf when it's loaded, keeping it in memory in parsed format.
commit : 7c45e3a3c682f855ecda7fd671969ee5e91929bf
author : Heikki Linnakangas <[email protected]>
date : Fri, 21 Sep 2012 17:41:22 +0300
committer: Heikki Linnakangas <[email protected]>
date : Fri, 21 Sep 2012 17:41:22 +0300
Similar changes were done to pg_hba.conf earlier already, this commit makes
pg_ident.conf to behave the same as pg_hba.conf.
This has two user-visible effects. First, if pg_ident.conf contains multiple
errors, the whole file is parsed at postmaster startup time and all the
errors are immediately reported. Before this patch, the file was parsed and
the errors were reported only when someone tries to connect using an
authentication method that uses the file, and the parsing stopped on first
error. Second, if you SIGHUP to reload the config files, and the new
pg_ident.conf file contains an error, the error is logged but the old file
stays in effect.
Also, regular expressions in pg_ident.conf are now compiled only once when
the file is loaded, rather than every time the a user is authenticated. That
should speed up authentication if you have a lot of regexps in the file.
Amit Kapila
M src/backend/libpq/hba.c
M src/backend/postmaster/postmaster.c
M src/backend/utils/init/postinit.c
M src/include/libpq/hba.h
Fix obsolete comment.
commit : 9d5e9730e5c2aa912778b9e8728c0b5ebd807d9a
author : Heikki Linnakangas <[email protected]>
date : Fri, 21 Sep 2012 15:21:31 +0300
committer: Heikki Linnakangas <[email protected]>
date : Fri, 21 Sep 2012 15:21:31 +0300
load_hba and load_ident load stuff in a separate memory context nowadays,
not in the current memory context.
M src/backend/utils/init/postinit.c
Remove execdesc.h inclusion from tcopprot.h
commit : 22c734fcdb5321212bacde9b502d36a4cf564b44
author : Alvaro Herrera <[email protected]>
date : Thu, 20 Sep 2012 11:03:04 -0300
committer: Alvaro Herrera <[email protected]>
date : Thu, 20 Sep 2012 11:03:04 -0300
M src/backend/commands/schemacmds.c
M src/backend/storage/ipc/procsignal.c
M src/include/tcop/tcopprot.h
Update release notes for 9.2.1, 9.1.6, 9.0.10, 8.4.14, 8.3.21.
commit : 4394fe3dcb105219fc10ff80e0b433659a540eff
author : Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 17:38:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 17:38:37 -0400
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
M doc/src/sgml/release-9.2.sgml
Put back AcceptInvalidationMessages calls in heap_openrv(_extended).
commit : 96cc18eef6489cccefe351baa193f32f12018551
author : Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 17:10:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 17:10:37 -0400
These calls were removed in commit 4240e429d0c2d889d0cda23c618f94e12c13ade7
as part of a general refactoring and improvement of DDL locking. However,
there's a problem not solved by the rewrite, which is that GRANT/REVOKE
update pg_class.relacl without taking any particular lock on the target
table as such. If another backend fails to do AcceptInvalidationMessages,
it won't notice a recently-committed change in ACLs. Bug #7557 from Piotr
Czachur demonstrates that there's at least one code path in 9.2.0 in which
a command fails to do any AcceptInvalidationMessages calls at all, if the
current transaction already holds all the locks it will need.
Since we're hard up against the release deadline for 9.2.1, fix this by
putting back the AcceptInvalidationMessages calls in heap_openrv and
heap_openrv_extended, thereby restoring the historical behavior in this
area. We ought to look for a more elegant and perhaps more bulletproof
solution, but there's no time for that right now.
M src/backend/access/heap/heapam.c
Update time zone data files to tzdata release 2012f.
commit : f1f722daccd4789522d7b16211089af6d92eecf0
author : Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 10:44:45 -0400
committer: Tom Lane <[email protected]>
date : Wed, 19 Sep 2012 10:44:45 -0400
DST law changes in Fiji.
M src/timezone/data/australasia
pg_upgrade: Remove check for pg_config
commit : 5cfd5bb15bb2a1220136bc130d81fa6d1474b23c
author : Peter Eisentraut <[email protected]>
date : Tue, 18 Sep 2012 21:53:34 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 18 Sep 2012 21:53:34 -0400
It is no longer used, but was still being checked for.
bug #7548 from Reinhard Max
M contrib/pg_upgrade/exec.c
Fix planning of btree index scans using ScalarArrayOpExpr quals.
commit : 807a40c551dd30c8dd5a0b3bd82f5bbb1e7fd285
author : Tom Lane <[email protected]>
date : Tue, 18 Sep 2012 12:20:34 -0400
committer: Tom Lane <[email protected]>
date : Tue, 18 Sep 2012 12:20:34 -0400
In commit 9e8da0f75731aaa7605cf4656c21ea09e84d2eb1, I improved btree
to handle ScalarArrayOpExpr quals natively, so that constructs like
"indexedcol IN (list)" could be supported by index-only scans. Using
such a qual results in multiple scans of the index, under-the-hood.
I went to some lengths to ensure that this still produces rows in index
order ... but I failed to recognize that if a higher-order index column
is lacking an equality constraint, rescans can produce out-of-order
data from that column. Tweak the planner to not expect sorted output
in that case. Per trouble report from Robert McGehee.
M src/backend/optimizer/path/indxpath.c
M src/test/regress/expected/create_index.out
M src/test/regress/sql/create_index.sql
Fix array_typanalyze to work for domains over arrays.
commit : 3f828fae6221d93cbef370f57ab3f234b590ca98
author : Tom Lane <[email protected]>
date : Tue, 18 Sep 2012 00:31:40 -0400
committer: Tom Lane <[email protected]>
date : Tue, 18 Sep 2012 00:31:40 -0400
Not sure how we missed this case, but we did. Per bug #7551 from
Diego de Lima.
M src/backend/utils/adt/array_typanalyze.c
libpq: Add missing directory to installdirs target
commit : bcf90cc18b5d8567f2cd4f789a047eb009fa15ec
author : Peter Eisentraut <[email protected]>
date : Mon, 17 Sep 2012 22:33:26 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 17 Sep 2012 22:33:26 -0400
It prevented the libpq directory from being installable by itself.
M src/interfaces/libpq/Makefile
Provide adequate documentation of the "table_name *" notation.
commit : 3c64342c861c77504df6c195c9db3e166d0c7491
author : Tom Lane <[email protected]>
date : Mon, 17 Sep 2012 14:59:31 -0400
committer: Tom Lane <[email protected]>
date : Mon, 17 Sep 2012 14:59:31 -0400
Somewhere along the line, somebody decided to remove all trace of this
notation from the documentation text. It was still in the command syntax
synopses, or at least some of them, but with no indication what it meant.
This will not do, as evidenced by the confusion apparent in bug #7543;
even if the notation is now unnecessary, people will find it in legacy
SQL code and need to know what it does.
M doc/src/sgml/config.sgml
M doc/src/sgml/ddl.sgml
M doc/src/sgml/queries.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/lock.sgml
M doc/src/sgml/ref/select.sgml
M doc/src/sgml/ref/truncate.sgml
M doc/src/sgml/ref/update.sgml
PL/Python: Improve Python 3 regression test setup
commit : b2e3bea3afe9618764a8f15cc7d6d95036b7638b
author : Peter Eisentraut <[email protected]>
date : Sun, 16 Sep 2012 22:26:33 -0400
committer: Peter Eisentraut <[email protected]>
date : Sun, 16 Sep 2012 22:26:33 -0400
Currently, we are making mangled copies of plpython/{expected,sql} to
plpython/python3/{expected,sql}, and run the tests in
plpython/python3. This has the disadvantage that the regression.diffs
file, if any, ends up in plpython/python3, which is not the normal
location. If we instead make the mangled copies in
plpython/{expected,sql}/python3/, we can run the tests from the normal
directory, regression.diffs ends up the normal place, and the
pg_regress invocation also becomes a lot simpler. It's also more
obvious at run time what's going on, because the tests end up being
named "python3/something" in the test output.
M src/pl/plpython/.gitignore
M src/pl/plpython/Makefile
Rethink heuristics for choosing index quals for parameterized paths.
commit : 3b8968f25232ad09001bf35ab4cc59f5a501193e
author : Tom Lane <[email protected]>
date : Sun, 16 Sep 2012 17:57:18 -0400
committer: Tom Lane <[email protected]>
date : Sun, 16 Sep 2012 17:57:18 -0400
Some experimentation with examples similar to bug #7539 has convinced me
that indxpath.c's original implementation of parameterized-path generation
was several bricks shy of a load. In general, if we are relying on a
particular outer rel or set of outer rels for a parameterized path, the
path should use every indexable join clause that's available from that rel
or rels. Any join clauses that get left out of the indexqual will end up
getting applied as plain filter quals (qpquals), and that's generally a
significant loser compared to having the index AM enforce them. (This is
particularly true with btree, which can skip the index scan entirely if
it can see that the given indexquals are mutually contradictory.) The
original heuristics failed to ensure this, though, and were overly
complicated anyway. Rewrite to make the code explicitly identify each
useful set of outer rels and then select all applicable join clauses for
each one. The one plan that changes in the regression tests is in fact
for the better according to the planner's cost estimates.
(Note: this is not a correctness issue but just a matter of plan quality.
I don't yet know what is going on in bug #7539, but I don't expect this
change to fix that.)
M src/backend/optimizer/path/indxpath.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Fix bufmgr so CHECKPOINT_END_OF_RECOVERY behaves as a shutdown checkpoint. Recovery code documents clearly that a shutdown checkpoint is executed at end of recovery - a shutdown checkpoint WAL record is written but the buffer manager had been altered to treat end of recovery as a normal checkpoint. This bug exacerbates the bufmgr relpersistence bug.
commit : 64e196b6efbd58893a4381013a35c84b167b4856
author : Simon Riggs <[email protected]>
date : Sun, 16 Sep 2012 19:53:34 +0100
committer: Simon Riggs <[email protected]>
date : Sun, 16 Sep 2012 19:53:34 +0100
Bug spotted by Andres Freund, patch by me.
M src/backend/storage/buffer/bufmgr.c
Fix documentation reference to maximum allowed for autovacuum_freeze_max_age.
commit : 327542645e698a4c85dde8229c21361f96688808
author : Kevin Grittner <[email protected]>
date : Sun, 16 Sep 2012 11:59:50 -0500
committer: Kevin Grittner <[email protected]>
date : Sun, 16 Sep 2012 11:59:50 -0500
The documentation mentioned setting autovacuum_freeze_max_age to
"its maximum allowed value of a little less than two billion".
This led to a post asking about the exact maximum allowed value,
which is precisely two billion, not "a little less".
Based on question by Radovan Jablonovsky. Backpatch to 8.3.
M doc/src/sgml/maintenance.sgml
Adjust largeobject_1.source per buildfarm.
commit : 2899e3d6e4729ffd386a07501ff6bdc3d074120f
author : Tom Lane <[email protected]>
date : Sat, 15 Sep 2012 12:17:51 -0400
committer: Tom Lane <[email protected]>
date : Sat, 15 Sep 2012 12:17:51 -0400
Looks like the correct size of DOS-ified tenk.data is 680800 not 680801.
(I got the latter from a version of unix2dos that appends a trailing ^Z,
which evidently is not git's practice.)
M src/test/regress/output/largeobject_1.source
psql: Add more constraint completion
commit : 05cf0ea8d1c94260cd11811b646ef7b16c148719
author : Peter Eisentraut <[email protected]>
date : Fri, 14 Sep 2012 22:11:17 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 14 Sep 2012 22:11:17 -0400
- ALTER DOMAIN ... DROP/RENAME/VALIDATE CONSTRAINT
- ALTER TABLE ... RENAME/VALIDATE CONSTRAINT
- COMMENT ON CONSTRAINT
- SET CONSTRAINTS
M src/bin/psql/tab-complete.c
Improve largeobject regression test to show size of object read from file.
commit : bd9b4f16894b98cffade9a77d87b910a939d10c5
author : Tom Lane <[email protected]>
date : Fri, 14 Sep 2012 18:24:53 -0400
committer: Tom Lane <[email protected]>
date : Fri, 14 Sep 2012 18:24:53 -0400
The idea here is to provide a more easily diagnosable failure diff when
the problem is that tenk.data has been DOS-ified, as I believe to be
happening currently on buildfarm member hamerkop. Per suggestion from
Magnus Hagander.
Also, sync output/largeobject_1.source with current regression test.
Failure to do that in commit 3a0e4d36ebd7f477822d5bae41ba121a40d22ccc
turns out to be the real reason that hamerkop has been complaining.
M src/test/regress/input/largeobject.source
M src/test/regress/output/largeobject.source
M src/test/regress/output/largeobject_1.source
Add a regression test case based on bug #7516.
commit : b8fbbcf37f22c5e8361da939ad0fc4be18a34ca9
author : Tom Lane <[email protected]>
date : Fri, 14 Sep 2012 11:05:53 -0400
committer: Tom Lane <[email protected]>
date : Fri, 14 Sep 2012 11:05:53 -0400
Given what we now know about the cause of this bug, it seems like it'd
be a real good idea to include it in the plperl regression tests, so as
to catch any platform-specific cases where the code gets misoptimized.
M src/pl/plperl/expected/plperl_elog.out
M src/pl/plperl/sql/plperl_elog.sql
Properly set relpersistence for fake relcache entries.
commit : beb850e1d873f8920a78b9b9ee27e9f87c95592f
author : Robert Haas <[email protected]>
date : Fri, 14 Sep 2012 09:35:07 -0400
committer: Robert Haas <[email protected]>
date : Fri, 14 Sep 2012 09:35:07 -0400
This can result in buffers failing to be properly flushed at
checkpoint time, leading to data loss.
Report, diagnosis, and patch by Jeff Davis.
M src/backend/access/transam/xlogutils.c
M src/backend/storage/buffer/bufmgr.c
Keep plperl's current_call_data record on the stack, instead of palloc'ing.
commit : 9afc6481117d2dd936e752da0424a2b6b05f6459
author : Tom Lane <[email protected]>
date : Thu, 13 Sep 2012 13:44:20 -0400
committer: Tom Lane <[email protected]>
date : Thu, 13 Sep 2012 13:44:20 -0400
This at least saves some palloc overhead, and should furthermore reduce
the risk of anything going wrong, eg somebody resetting the context the
current_call_data record was in.
M src/pl/plperl/plperl.c
Fix case of window function + aggregate + GROUP BY expression.
commit : a20993608a65b9896b4c05cb7061bc60d6f1840a
author : Tom Lane <[email protected]>
date : Thu, 13 Sep 2012 11:31:40 -0400
committer: Tom Lane <[email protected]>
date : Thu, 13 Sep 2012 11:31:40 -0400
In commit 1bc16a946008a7cbb33a9a06a7c6765a807d7f59 I added a minor
optimization to drop the component variables of a GROUP BY expression from
the target list computed at the aggregation level of a query, if those Vars
weren't referenced elsewhere in the tlist. However, I overlooked that the
window-function planning code would deconstruct such expressions and thus
need to have access to their component variables. Fix it to not do that.
While at it, I removed the distinction between volatile and nonvolatile
window partition/order expressions: the code now computes all of them
at the aggregation level. This saves a relatively expensive check for
volatility, and it's unclear that the resulting plan isn't better anyway.
Per bug #7535 from Louis-David Mitterrand. Back-patch to 9.2.
M src/backend/optimizer/plan/planner.c
M src/test/regress/expected/window.out
M src/test/regress/sql/window.sql
Fix typo in comment for pclose_check() function.
commit : 6b896f511f8dbeac9f09cc54c6cb62bdff25e501
author : Kevin Grittner <[email protected]>
date : Wed, 12 Sep 2012 22:33:10 -0500
committer: Kevin Grittner <[email protected]>
date : Wed, 12 Sep 2012 22:33:10 -0500
Backpatch to 9.2.
Etsuro Fujit
M src/port/exec.c
Fix a couple other leftover uses of 'conisonly' terminology.
commit : 9a93e7100866c717ca2f43af48dbd1c3755a9a62
author : Tom Lane <[email protected]>
date : Wed, 12 Sep 2012 15:12:24 -0400
committer: Tom Lane <[email protected]>
date : Wed, 12 Sep 2012 15:12:24 -0400
M src/backend/commands/typecmds.c
M src/include/catalog/pg_constraint.h
Fix catalog docs to reflect connoinherit change in 09ff76f.
commit : 7c328a9b0455f6bf8c0d8695c06e2da6925f73d3
author : Andrew Dunstan <[email protected]>
date : Wed, 12 Sep 2012 14:23:50 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 12 Sep 2012 14:23:50 -0400
Backpatch to 9.2.
M doc/src/sgml/catalogs.sgml
Fix logical errors in tsquery selectivity estimation for prefix queries.
commit : 1faf866acecaf354bc15a6948857ecd3000ba807
author : Tom Lane <[email protected]>
date : Tue, 11 Sep 2012 21:23:20 -0400
committer: Tom Lane <[email protected]>
date : Tue, 11 Sep 2012 21:23:20 -0400
I made multiple errors in commit 97532f7c29468010b87e40a04f8daa3eb097f654,
stemming mostly from failure to think about the available frequency data
as being element frequencies not value frequencies (so that occurrences of
different elements are not mutually exclusive). This led to sillinesses
such as estimating that "word" would match more rows than "word:*".
The choice to clamp to a minimum estimate of DEFAULT_TS_MATCH_SEL also
seems pretty ill-considered in hindsight, as it would frequently result in
an estimate much larger than the available data suggests. We do need some
sort of clamp, since a pattern not matching any of the MCELEMs probably
still needs a selectivity estimate of more than zero. I chose instead to
clamp to at least what a non-MCELEM word would be estimated as, preserving
the property that "word:*" doesn't get an estimate less than plain "word",
whether or not the word appears in MCELEM.
Per investigation of a gripe from Bill Martin, though I suspect that his
example case actually isn't even reaching the erroneous code.
Back-patch to 9.1 where this code was introduced.
M src/backend/tsearch/ts_selfuncs.c
Fix typo: lexemes misspelled in full text search docs.
commit : 4bc0d2e2cfa8ac523524dccf6f849989c6739083
author : Kevin Grittner <[email protected]>
date : Tue, 11 Sep 2012 19:46:17 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 11 Sep 2012 19:46:17 -0500
Dan Scott
M doc/src/sgml/textsearch.sgml
Add vcregress.pl target for checking pg_upgrade.
commit : a1d021e5d2f58170c7900c8766c4633e5f2328ee
author : Andrew Dunstan <[email protected]>
date : Mon, 10 Sep 2012 12:47:50 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 10 Sep 2012 12:47:50 -0400
This follows recent addition of Windows/Mingw testing.
Backpatch to Release 9.2 so we can get some buildfarm testing
going.
M src/tools/msvc/Install.pm
M src/tools/msvc/vcregress.pl
Make plperl safe against functions that are redefined while running.
commit : 59f23fe8d4eb0b95f029eaffdbcadc59d51f45cc
author : Tom Lane <[email protected]>
date : Sun, 9 Sep 2012 20:32:54 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Sep 2012 20:32:54 -0400
validate_plperl_function() supposed that it could free an old
plperl_proc_desc struct immediately upon detecting that it was stale.
However, if a plperl function is called recursively, this could result
in deleting the struct out from under an outer invocation, leading to
misbehavior or crashes. Add a simple reference-count mechanism to
ensure that such structs are freed only when the last reference goes
away.
Per investigation of bug #7516 from Marko Tiikkaja. I am not certain
that this error explains his report, because he says he didn't have
any recursive calls --- but it's hard to see how else it could have
crashed right there. In any case, this definitely fixes some problems
in the area.
Back-patch to all active branches.
M src/pl/plperl/expected/plperl.out
M src/pl/plperl/plperl.c
M src/pl/plperl/sql/plperl.sql
Use .NOTPARALLEL in ecpg/Makefile to avoid a gmake parallelism bug.
commit : 843363b8d59e685b57a2f88c864a7041d44ffc06
author : Tom Lane <[email protected]>
date : Sun, 9 Sep 2012 15:08:32 -0400
committer: Tom Lane <[email protected]>
date : Sun, 9 Sep 2012 15:08:32 -0400
Investigation shows that some intermittent build failures in ecpg are the
result of a gmake bug that was reported quite some time ago:
http://savannah.gnu.org/bugs/?30653
Preventing parallel builds of the ecpg subdirectories seems to dodge the
bug. Per yesterday's pgsql-hackers discussion, there are some other things
in the subdirectory makefiles that seem rather unsafe for parallel builds
too, but there's little point in fixing them as long as we have to work
around a make bug.
Back-patch to 9.1; parallel builds weren't very well supported before
that anyway.
M src/interfaces/ecpg/Makefile
Adjust PL/Python regression tests some more for Python 3.3.
commit : 45d1f1e024f99152fd0d06c62d0650f9ada33d5a
author : Tom Lane <[email protected]>
date : Sat, 8 Sep 2012 17:39:02 -0400
committer: Tom Lane <[email protected]>
date : Sat, 8 Sep 2012 17:39:02 -0400
Commit 2cfb1c6f77734db81b6e74bcae630f93b94f69be fixed some issues caused
by Python 3.3 choosing to iterate through dict entries in a different order
than before. But here's another one: the test cases adjusted here made two
bad entries in a dict and expected the one complained of would always be
the same.
Possibly this should be back-patched further than 9.2, but there seems
little point unless the earlier fix is too.
M src/pl/plpython/expected/plpython_trigger.out
M src/pl/plpython/sql/plpython_trigger.sql
Centralize libpq's low-level code for dropping a connection.
commit : 210eb9b743c0645df05e5c8be4490ba4f09fc871
author : Tom Lane <[email protected]>
date : Fri, 7 Sep 2012 16:02:23 -0400
committer: Tom Lane <[email protected]>
date : Fri, 7 Sep 2012 16:02:23 -0400
Create an internal function pqDropConnection that does the physical socket
close and cleans up closely-associated state. This removes a bunch of ad
hoc, not always consistent closure code. The ulterior motive is to have a
single place to wait for a spawned child backend to exit, but this seems
like good cleanup even if that never happens.
I went back and forth on whether to include "conn->status = CONNECTION_BAD"
in pqDropConnection's actions, but for the moment decided not to. Only a
minority of the call sites actually want that, and in any case it's
arguable that conn->status is slightly higher-level state, and thus not
part of this function's purview.
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-misc.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/libpq-int.h
Update syntax shown for \copy to match new syntax for COPY.
commit : dda589c96b89320446933108ca946e7e6b8eb9d2
author : Robert Haas <[email protected]>
date : Thu, 6 Sep 2012 17:00:03 -0400
committer: Robert Haas <[email protected]>
date : Thu, 6 Sep 2012 17:00:03 -0400
Etsuro Fujita
M doc/src/sgml/ref/psql-ref.sgml
Fix "too many arguments" messages not to index off the end of argv[].
commit : 0a1967a0ef01cd193d9aa212dcf54a1b1d56720e
author : Robert Haas <[email protected]>
date : Thu, 6 Sep 2012 15:43:46 -0400
committer: Robert Haas <[email protected]>
date : Thu, 6 Sep 2012 15:43:46 -0400
This affects initdb, clusterdb, reindexdb, and vacuumdb in master
and 9.2; in earlier branches, only initdb is affected.
M src/bin/initdb/initdb.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
Allow embedded spaces without quoting in unix_socket_directories entries.
commit : d2286a98ef3fb88bafb57381b4c20b8b878827f1
author : Tom Lane <[email protected]>
date : Thu, 6 Sep 2012 11:43:51 -0400
committer: Tom Lane <[email protected]>
date : Thu, 6 Sep 2012 11:43:51 -0400
This fix removes an unnecessary incompatibility with the old behavior of
the unix_socket_directory parameter. Since pathnames with embedded spaces
are fairly popular on some platforms, the incompatibility could be
significant in practice. We'll still strip unquoted leading/trailing
spaces, however.
No docs update since the documentation already implied that it worked
like this.
Per bug #7514 from Murray Cumming.
M src/backend/utils/adt/varlena.c
Fix typo in information_schema documentation.
commit : 25f4fe4e461072a0371dc6d6cedbf08a04477fcd
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 23:37:42 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 23:37:42 -0400
Shigeru Hanada
M doc/src/sgml/information_schema.sgml
In pg_upgrade, try a few times to open a log file.
commit : f8c81c5dde23a0be553e95728ffc11e76602fd24
author : Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 23:14:49 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 23:14:49 -0400
If we call pg_ctl stop, the server might continue and thus
hold a log file for a short time after it has deleted its pid file,
(which is when pg_ctl will exit), and so a subsequent attempt to
open the log file might fail.
We therefore try to open it a few times, sleeping one second between
tries, to give the server time to exit.
This corrects an error that was observed on the buildfarm.
Backpatched to 9.2,
M contrib/pg_upgrade/exec.c
pgbench: Show better progress when loading tuples
commit : 4c60b80094009c6f8ed9ccee365e445f07e609ab
author : Peter Eisentraut <[email protected]>
date : Wed, 5 Sep 2012 23:07:47 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 5 Sep 2012 23:07:47 -0400
Show target number of tuples and percentage in addition to current
number.
M contrib/pgbench/pgbench.c
Fix WAL file replacement during cascading replication on Windows.
commit : ab9a14e903347929d248ac4dabe2614de482350b
author : Heikki Linnakangas <[email protected]>
date : Wed, 5 Sep 2012 18:10:15 -0700
committer: Heikki Linnakangas <[email protected]>
date : Wed, 5 Sep 2012 18:10:15 -0700
When the startup process restores a WAL file from the archive, it deletes
any old file with the same name and renames the new file in its place. On
Windows, however, when a file is deleted, it still lingers as long as a
process holds a file handle open on it. With cascading replication, a
walsender process can hold the old file open, so the rename() in the startup
process would fail. To fix that, rename the old file to a temporary name, to
make the original file name available for reuse, before deleting the old
file.
M src/backend/access/transam/xlog.c
Fix inappropriate error messages for Hot Standby misconfiguration errors.
commit : 2e0cc1f031387fc304d11e55df0f9566d91698ff
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 21:49:08 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 21:49:08 -0400
Give the correct name of the GUC parameter being complained of.
Also, emit a more suitable SQLSTATE (INVALID_PARAMETER_VALUE,
not the default INTERNAL_ERROR).
Gurjeet Singh, errcode adjustment by me
M src/backend/access/transam/xlog.c
Make one last copy-editing pass over the 9.2 release notes.
commit : 185b744ee6115537e005b3d0d5e642c2146a12c1
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 21:28:23 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 21:28:23 -0400
Also, set the release date to 2012-09-10, since we're pretty well
committed to that now.
M doc/src/sgml/release-9.2.sgml
Fix pg_upgrade test script's line end handling on Windows.
commit : f8f5cf33a30a2f6eeeb839ce92cb6ee04b518c5a
author : Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 18:00:31 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 18:00:31 -0400
Call pg_dumpall using -f switch instead of redirection, to avoid
writing the output in text mode and generating spurious carriage
returns. Remove to carriage return ignoring hack introduced by
commit e442b0f0c6fd26738bafdeb5222511b586dfe4b9.
Backpatch to 9.2.
M contrib/pg_upgrade/test.sh
Fix line end mishandling in pg_upgrade on Windows.
commit : ea0b414a0d9caaad1b7f39acd57708895c4dd0f3
author : Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 17:41:43 -0400
committer: Andrew Dunstan <[email protected]>
date : Wed, 5 Sep 2012 17:41:43 -0400
pg_upgrade opened the output from pg_dumpall in text mode and
wrote the split files in text mode. This caused unwanted eating
of intended carriage returns on input and production of spurious
carriage returns on output. To avoid this, open all these files
in binary mode. On non-Windows platforms, this change has no
effect.
Backpatch to 9.0. On 9.0 and 9.1, we also switch from redirecting
pg_dumpall's output to using pg_dumpall's -f switch, for the same
reason.
M contrib/pg_upgrade/dump.c
Restore SIGFPE handler after initializing PL/Perl.
commit : 28ab4a5aabeec1db7e9d6fd14c26cc92ccb670a2
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 16:43:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 16:43:37 -0400
Perl, for some unaccountable reason, believes it's a good idea to reset
SIGFPE handling to SIG_IGN. Which wouldn't be a good idea even if it
worked; but on some platforms (Linux at least) it doesn't work at all,
instead resulting in forced process termination if the signal occurs.
Given the lack of other complaints, it seems safe to assume that Perl
never actually provokes SIGFPE and so there is no value in the setting
anyway. Hence, reset it to our normal handler after initializing Perl.
Report, analysis and patch by Andres Freund.
M src/pl/plperl/plperl.c
Silence -Wunused-result warning in contrib/pg_upgrade.
commit : b98fd52a5516365e4a90d523cfed906eb7b3e67a
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 14:36:47 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 14:36:47 -0400
This is just neatnik-ism, but since we do it for comparable code in elog.c,
we may as well do it here.
M contrib/pg_upgrade/util.c
sepgsql cleanups.
commit : aa2b237ce51ef12c213ac55d4d3aba509cb3133e
author : Robert Haas <[email protected]>
date : Wed, 5 Sep 2012 14:01:15 -0400
committer: Robert Haas <[email protected]>
date : Wed, 5 Sep 2012 14:01:15 -0400
This is needed to match recent changes elsewhere. Along the way, some
renaming for clarity.
KaiGai Kohei
M contrib/sepgsql/database.c
M contrib/sepgsql/dml.c
M contrib/sepgsql/hooks.c
M contrib/sepgsql/label.c
M contrib/sepgsql/proc.c
M contrib/sepgsql/relation.c
M contrib/sepgsql/schema.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/sepgsql.h
M contrib/sepgsql/uavc.c
Fix PARAM_EXEC assignment mechanism to be safe in the presence of WITH.
commit : 46c508fbcf98ac334f1e831d21021d731c882fbb
author : Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 12:54:03 -0400
committer: Tom Lane <[email protected]>
date : Wed, 5 Sep 2012 12:54:03 -0400
The planner previously assumed that parameter Vars having the same absolute
query level, varno, and varattno could safely be assigned the same runtime
PARAM_EXEC slot, even though they might be different Vars appearing in
different subqueries. This was (probably) safe before the introduction of
CTEs, but the lazy-evalution mechanism used for CTEs means that a CTE can
be executed during execution of some other subquery, causing the lifespan
of Params at the same syntactic nesting level as the CTE to overlap with
use of the same slots inside the CTE. In 9.1 we created additional hazards
by using the same parameter-assignment technology for nestloop inner scan
parameters, but it was broken before that, as illustrated by the added
regression test.
To fix, restructure the planner's management of PlannerParamItems so that
items having different semantic lifespans are kept rigorously separated.
This will probably result in complex queries using more runtime PARAM_EXEC
slots than before, but the slots are cheap enough that this hardly matters.
Also, stop generating PlannerParamItems containing Params for subquery
outputs: all we really need to do is reserve the PARAM_EXEC slot number,
and that now only takes incrementing a counter. The planning code is
simpler and probably faster than before, as well as being more correct.
Per report from Vik Reykja.
These changes will mostly also need to be made in the back branches, but
I'm going to hold off on that until after 9.2.0 wraps.
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/relnode.c
M src/include/nodes/relation.h
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Trim spgist_private.h inclusion
commit : e20a90e1887152f1e0c149a02c50d6bafb2596e5
author : Alvaro Herrera <[email protected]>
date : Fri, 31 Aug 2012 17:04:31 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 31 Aug 2012 17:04:31 -0400
It doesn't really need rel.h; relcache.h is enough.
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/spgist/spgscan.c
M src/include/access/spgist_private.h
Fix compiler warnings about unused variables, caused by my previous commit.
commit : 358ff99d70a7e75d5a95d1d83676fcdd193c845d
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Sep 2012 22:07:35 -0700
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Sep 2012 22:07:35 -0700
Reported by Peter Eisentraut.
M src/backend/access/transam/xlog.c
In pg_upgrade, document why we can't issue \n\n in the command logfile on Windows. Slightly cleanup log output on Windows given this restriction.
commit : 022cd22f0fa39f3446b7aa31a72170f160e1a905
author : Bruce Momjian <[email protected]>
date : Wed, 5 Sep 2012 00:01:13 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 5 Sep 2012 00:01:13 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.h
Fix bugs in cascading replication with recovery_target_timeline='latest'
commit : c4c227477bfe91ff4dabfe310d1f69cf7a05e939
author : Heikki Linnakangas <[email protected]>
date : Tue, 4 Sep 2012 18:47:03 -0700
committer: Heikki Linnakangas <[email protected]>
date : Tue, 4 Sep 2012 18:47:03 -0700
The cascading replication code assumed that the current RecoveryTargetTLI
never changes, but that's not true with recovery_target_timeline='latest'.
The obvious upshot of that is that RecoveryTargetTLI in shared memory needs
to be protected by a lock. A less obvious consequence is that when a
cascading standby is connected, and the standby switches to a new target
timeline after scanning the archive, it will continue to stream WAL to the
cascading standby, but from a wrong file, ie. the file of the previous
timeline. For example, if the standby is currently streaming from the middle
of file 000000010000000000000005, and the timeline changes, the standby
will continue to stream from that file. However, the WAL on the new
timeline is in file 000000020000000000000005, so the standby sends garbage
from 000000010000000000000005 to the cascading standby, instead of the
correct WAL from file 000000020000000000000005.
This also fixes a related bug where a partial WAL segment is restored from
the archive and streamed to a cascading standby. The code assumed that when
a WAL segment is copied from the archive, it can immediately be fully
streamed to a cascading standby. However, if the segment is only partially
filled, ie. has the right size, but only N first bytes contain valid WAL,
that's not safe. That can happen if a partial WAL segment is manually copied
to the archive, or if a partial WAL segment is archived because a server is
started up on a new timeline within that segment. The cascading standby will
get confused if the WAL it received is not valid, and will get stuck until
it's restarted. This patch fixes that problem by not allowing WAL restored
from the archive to be streamed to a cascading standby until it's been
replayed, and thus validated.
M src/backend/access/transam/xlog.c
M src/backend/replication/walsender.c
M src/include/access/xlog.h
Fix serializable mode with index-only scans.
commit : cdf91edba9f92306b49afcc6bfa6be0e56eb0688
author : Kevin Grittner <[email protected]>
date : Tue, 4 Sep 2012 21:13:11 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 4 Sep 2012 21:13:11 -0500
Serializable Snapshot Isolation used for serializable transactions
depends on acquiring SIRead locks on all heap relation tuples which
are used to generate the query result, so that a later delete or
update of any of the tuples can flag a read-write conflict between
transactions. This is normally handled in heapam.c, with tuple level
locking. Since an index-only scan avoids heap access in many cases,
building the result from the index tuple, the necessary predicate
locks were not being acquired for all tuples in an index-only scan.
To prevent problems with tuple IDs which are vacuumed and re-used
while the transaction still matters, the xmin of the tuple is part of
the tag for the tuple lock. Since xmin is not available to the
index-only scan for result rows generated from the index tuples, it
is not possible to acquire a tuple-level predicate lock in such
cases, in spite of having the tid. If we went to the heap to get the
xmin value, it would no longer be an index-only scan. Rather than
prohibit index-only scans under serializable transaction isolation,
we acquire an SIRead lock on the page containing the tuple, when it
was not necessary to visit the heap for other reasons.
Backpatch to 9.2.
Kevin Grittner and Tom Lane
M src/backend/executor/nodeIndexonlyscan.c
A src/test/isolation/expected/index-only-scan.out
M src/test/isolation/isolation_schedule
A src/test/isolation/specs/index-only-scan.spec
Allow isolation tests to specify multiple setup blocks.
commit : c63f309cca07c0570494a8f36092633635990db8
author : Kevin Grittner <[email protected]>
date : Tue, 4 Sep 2012 19:31:06 -0500
committer: Kevin Grittner <[email protected]>
date : Tue, 4 Sep 2012 19:31:06 -0500
Each setup block is run as a single PQexec submission, and some
statements such as VACUUM cannot be combined with others in such a
block.
Backpatch to 9.2.
Kevin Grittner and Tom Lane
M src/test/isolation/README
M src/test/isolation/isolationtester.c
M src/test/isolation/isolationtester.h
M src/test/isolation/specparse.y
Remove src/tool/backend, now that the content is on the web site and wiki.
commit : 63f1ccd838a19e4a0923221b2f90e4e014cabf74
author : Bruce Momjian <[email protected]>
date : Tue, 4 Sep 2012 12:38:33 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 4 Sep 2012 12:38:33 -0400
D src/tools/backend/README
D src/tools/backend/backend_dirs.html
D src/tools/backend/flow.fig
D src/tools/backend/flow.gif
D src/tools/backend/index.html
Fix transcription error.
commit : 2042185baf91187c8761e99ff7955bd8e52ec028
author : Andrew Dunstan <[email protected]>
date : Tue, 4 Sep 2012 09:39:49 -0400
committer: Andrew Dunstan <[email protected]>
date : Tue, 4 Sep 2012 09:39:49 -0400
M contrib/pg_upgrade/check.c
Document that pg_upgrade requires PGHOST be set for any pre-9.1 servers with a socket directory mismatch with the new server.
commit : 00a8eb61a254f620dbf4ba5de2f33831f159cdeb
author : Bruce Momjian <[email protected]>
date : Tue, 4 Sep 2012 09:17:19 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 4 Sep 2012 09:17:19 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Change "restoring" to "processing" in message from pg_dump
commit : d074805fd42d077e850d69ca46fafc0dddf42671
author : Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 15:00:04 +0200
committer: Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 15:00:04 +0200
The same message is used in both pg_restore and pg_dump, and it's
confusing to output "restoring data for table xyz" when the user
is just doing a pg_dump.
M src/bin/pg_dump/pg_backup_archiver.c
Mention basebackup-from-slave next to cascading replication
commit : 4effe7a589972d8cbd39529e2ea83b712b12ba6f
author : Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 14:37:14 +0200
committer: Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 14:37:14 +0200
M doc/src/sgml/release-9.2.sgml
Fix command echoing in pg_upgade's analyze script for Windows.
commit : 0829c7087e170a49d2cd3a15621c5c50fb5897fc
author : Andrew Dunstan <[email protected]>
date : Tue, 4 Sep 2012 05:49:22 -0400
committer: Andrew Dunstan <[email protected]>
date : Tue, 4 Sep 2012 05:49:22 -0400
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
Remove some useless trailing whitespace
commit : bd46b5219940be1801720fc7e760e4b4bcaef286
author : Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 09:17:14 +0200
committer: Magnus Hagander <[email protected]>
date : Tue, 4 Sep 2012 09:17:14 +0200
Michael Paquier
M src/backend/tcop/utility.c
Indent fix_path_separator() header properly.
commit : 2f0c7d585412e0c061cb1cd8c2c0a4b6aada4f74
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 22:59:19 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 22:59:19 -0400
M contrib/pg_upgrade/check.c
Fix to_date() and to_timestamp() to allow specification of the day of the week via ISO or Gregorian designations. The fix is to store the day-of-week consistently as 1-7, Sunday = 1.
commit : 015722fb364416b29fb1bb2c10631feb67ad61cd
author : Bruce Momjian <[email protected]>
date : Mon, 3 Sep 2012 22:52:34 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Sep 2012 22:52:34 -0400
Fixes bug reported by Marc Munro
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/timestamp.c
M src/include/utils/timestamp.h
Allow pg_upgrade "make check" to run on Windows/MSys.
commit : e442b0f0c6fd26738bafdeb5222511b586dfe4b9
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 22:32:17 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 22:32:17 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/test.sh
In pg_upgrade, pull the port number from postmaster.pid, like we do for socket location. Also, prevent putting the socket in the current directory for pre-9.1 servers in live check and non-live check mode, because pre-9.1 pg_ctl -w can't handle it.
commit : a80b8037cfc24a4fa75ba267b6d39cba105ad4d6
author : Bruce Momjian <[email protected]>
date : Mon, 3 Sep 2012 22:15:09 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 3 Sep 2012 22:15:09 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/option.c
M contrib/pg_upgrade/pg_upgrade.c
Use correct path separator for Windows builtin commands.
commit : 504aeea6926730f6fa9d3e0ec3a181b659c2f594
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 18:06:47 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 18:06:47 -0400
pg_upgrade produces a platform-specific script to remove the old
directory, but on Windows it has not been making sure that the
paths it writes as arguments for rmdir and del use the backslash
path separator, which will cause these scripts to fail.
The fix is backpatched to Release 9.0.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/pg_upgrade.h
Replace memcpy() calls in xlog.c critical sections with struct assignments.
commit : 2a2352e07df9ccc70689061b6453e226a56e7c79
author : Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 15:38:42 -0400
committer: Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 15:38:42 -0400
This gets rid of a dangerous-looking use of the not-volatile XLogCtl
pointer in a couple of spinlock-protected sections, where the normal
coding rule is that you should only access shared memory through a
pointer-to-volatile. I think the risk is only hypothetical not actual,
since for there to be a bug the compiler would have to move the spinlock
acquire or release across the memcpy() call, which one sincerely hopes
it will not. Still, it looks cleaner this way.
Per comment from Daniel Farina and subsequent discussion.
M src/backend/access/transam/xlog.c
Fix bugs in exec.c that prevented pg_upgrade working in Windows.
commit : 6259678f8f5443e9d396e20418448b247c6948dd
author : Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 15:31:26 -0400
committer: Andrew Dunstan <[email protected]>
date : Mon, 3 Sep 2012 15:31:26 -0400
Backpatch to 9.2 - code before that is quite different and should
not have these defects.
M contrib/pg_upgrade/exec.c
Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.
commit : f763b77193b04eba03a1f4ce46df34dc0348419e
author : Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 13:52:34 -0400
committer: Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 13:52:34 -0400
When starting either an old or new postmaster, force it to place its Unix
socket in the current directory. This makes it even harder for accidental
connections to occur during pg_upgrade, and also works around some
scenarios where the default socket location isn't usable. (For example,
if the default location is something other than "/tmp", it might not exist
during "make check".)
When checking an already-running old postmaster, find out its actual socket
directory location from postmaster.pid, if possible. This dodges problems
with an old postmaster having a configured location different from the
default built into pg_upgrade's libpq. We can't find that out if the old
postmaster is pre-9.1, so also document how to cope with such scenarios
manually.
In support of this, centralize handling of the connection-related command
line options passed to pg_upgrade's subsidiary programs, such as pg_dump.
This should make future changes easier.
Bruce Momjian and Tom Lane
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.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 doc/src/sgml/pgupgrade.sgml
Make psql's \d+ show reloptions for all relkinds.
commit : c1f3c045cdc97fc74e571d4e8705f7dbe7e1ec8b
author : Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 11:24:31 -0400
committer: Tom Lane <[email protected]>
date : Mon, 3 Sep 2012 11:24:31 -0400
Formerly it would only show them for relkinds 'r' and 'f' (plain tables
and foreign tables). However, as of 9.2, views can also have reloptions,
namely security_barrier. The relkind restriction seems pointless and
not at all future-proof, so just print reloptions whenever there are any.
In passing, make some cosmetic improvements to the code that pulls the
"tableinfo" fields out of the PGresult.
Noted and patched by Dean Rasheed, with adjustment for all relkinds by me.
M src/bin/psql/describe.c
Update URLs that pointed to sun.com; either repoint them or remove them.
commit : 7682c5947dff4368753890935522dedfb93e1c78
author : Bruce Momjian <[email protected]>
date : Sun, 2 Sep 2012 09:16:26 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 2 Sep 2012 09:16:26 -0400
M doc/src/sgml/client-auth.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/wal.sgml
Add small doc mention that libpq is named after POSTQUEL.
commit : 6c82a86c6f11815df371a310e3734030b1a635f4
author : Bruce Momjian <[email protected]>
date : Sun, 2 Sep 2012 08:41:51 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 2 Sep 2012 08:41:51 -0400
M doc/src/sgml/history.sgml
Drop cheap-startup-cost paths during add_path() if we don't need them.
commit : 6d2c8c0e2afa8cbaf99555a24336e93118fd181e
author : Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 18:16:24 -0400
committer: Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 18:16:24 -0400
We can detect whether the planner top level is going to care at all about
cheap startup cost (it will only do so if query_planner's tuple_fraction
argument is greater than zero). If it isn't, we might as well discard
paths immediately whose only advantage over others is cheap startup cost.
This turns out to get rid of quite a lot of paths in complex queries ---
I saw planner runtime reduction of more than a third on one large query.
Since add_path isn't currently passed the PlannerInfo "root", the easiest
way to tell it whether to do this was to add a bool flag to RelOptInfo.
That's a bit redundant, since all relations in a given query level will
have the same setting. But in the future it's possible that we'd refine
the control decision to work on a per-relation basis, so this seems like
a good arrangement anyway.
Per my suggestion of a few months ago.
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/relnode.c
M src/include/nodes/relation.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Fix mark_placeholder_maybe_needed to handle LATERAL references.
commit : 4da6439bd8553059766011e2a42c6e39df08717f
author : Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 13:56:14 -0400
committer: Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 13:56:14 -0400
If a PlaceHolderVar contains a pulled-up LATERAL reference, its minimum
possible evaluation level might be higher in the join tree than its
original syntactic location. That in turn affects the ph_needed level for
any contained PlaceHolderVars (that is, those PHVs had better propagate up
the join tree at least to the evaluation level of the outer PHV). We got
this mostly right, but mark_placeholder_maybe_needed() failed to account
for the effect, and in consequence could leave the inner PHVs with
ph_may_need less than what their ultimate ph_needed value will be. That's
bad because it could lead to failure to select a join order that will allow
evaluation of the inner PHV at a valid location. Fix that, and add an
Assert that checks that we don't ever set ph_needed to more than
ph_may_need.
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/util/placeholder.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Revert doc patch 305557984dd964ac397c6752e9d0f14646b60f15 as the values are sometimes signed, sometimes unsigned.
commit : 53fa0c6db8e9ebbef9a2806193797735998520c6
author : Bruce Momjian <[email protected]>
date : Sat, 1 Sep 2012 12:04:44 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 1 Sep 2012 12:04:44 -0400
M doc/src/sgml/protocol.sgml
Fix broken link in installation.sgml.
commit : b8a4093b5890aa774ae90bbf44515750aa0ae85c
author : Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 10:43:50 -0400
committer: Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 10:43:50 -0400
Linking to other parts of the manual doesn't work when building the
standalone INSTALL document.
M doc/src/sgml/installation.sgml
Cross-link to doc build requirements from install requirements.
commit : e8d6c98c2f082bead1202b23e9d70e0fbde49129
author : Robert Haas <[email protected]>
date : Sat, 1 Sep 2012 06:27:52 -0400
committer: Robert Haas <[email protected]>
date : Sat, 1 Sep 2012 06:27:52 -0400
Jeff Janes
M doc/src/sgml/installation.sgml
More documentation updates for LATERAL.
commit : 06310178ef54720bc4ed7bc85c887e6ebed24d83
author : Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 00:40:15 -0400
committer: Tom Lane <[email protected]>
date : Sat, 1 Sep 2012 00:40:15 -0400
Extend xfunc.sgml's discussion of set-returning functions to show an
example of using LATERAL, and recommend that over putting SRFs in the
targetlist.
In passing, reword func.sgml's section on set-returning functions so
that it doesn't claim that the functions listed therein are all the
built-in set-returning functions. That hasn't been true for a long
time, and trying to make it so doesn't seem like it would be an
improvement. (Perhaps we should rename that section?)
Both per suggestions from Merlin Moncure.
M doc/src/sgml/func.sgml
M doc/src/sgml/xfunc.sgml
psql: Reduce compatibility warning
commit : 5cad02452457d7f6f29404411dfe13e6fe8accb7
author : Peter Eisentraut <[email protected]>
date : Fri, 31 Aug 2012 23:28:14 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 31 Aug 2012 23:28:14 -0400
Only warn when connecting to a newer server, since connecting to older
servers works pretty well nowadays. Also update the documentation a
little about current psql/server compatibility expectations.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
Restore setting of _USE_32BIT_TIME_T to 32 bit MSVC builds.
commit : ef58b87df2afe91189e9ffb81b65c1127d53bc88
author : Andrew Dunstan <[email protected]>
date : Fri, 31 Aug 2012 20:38:37 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 31 Aug 2012 20:38:37 -0400
This was removed in commit cd004067742ee16ee63e55abfb4acbd5f09fbaab,
we're not quite sure why, but there have been reports of crashes due
to AS Perl being built with it when we are not, and it certainly
seems like the right thing to do. There is still some uncertainty
as to why it sometimes fails and sometimes doesn't.
Original patch from Owais Khani, substantially reworked and
extended by Andrew Dunstan.
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/VCBuildProject.pm
Partially restore qual scope checks in distribute_qual_to_rels().
commit : c97a547a4a0913e37e5dd1f026ac3c281326b215
author : Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 18:57:12 -0400
committer: Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 18:57:12 -0400
The LATERAL implementation is now basically complete, and I still don't
see a cost-effective way to make an exact qual scope cross-check in the
presence of LATERAL. However, I did add a PlannerInfo.hasLateralRTEs flag
along the way, so it's easy to make the check only when not hasLateralRTEs.
That seems to still be useful, and it beats having no check at all.
M src/backend/optimizer/plan/initsplan.c
Fix LATERAL references to join alias variables.
commit : da3df998702061b4b63d83d5354b148e812f21f8
author : Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 17:44:01 -0400
committer: Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 17:44:01 -0400
I had thought this case worked already, but perhaps I didn't re-test it
after adding extract_lateral_references() ...
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/var.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
In pg_upgade, document that the port numbers must be different when checking an old running server.
commit : f789909b59c59a33e34feac3bed2c86f18159122
author : Bruce Momjian <[email protected]>
date : Fri, 31 Aug 2012 16:55:49 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 31 Aug 2012 16:55:49 -0400
M doc/src/sgml/pgupgrade.sgml
Make configure probe for mbstowcs_l as well as wcstombs_l.
commit : 58a031f920c225b20fdb45c1e56fe41ed7568900
author : Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 14:17:56 -0400
committer: Tom Lane <[email protected]>
date : Fri, 31 Aug 2012 14:17:56 -0400
We previously supposed that any given platform would supply both or neither
of these functions, so that one configure test would be sufficient. It now
appears that at least on AIX this is not the case ... which is likely an
AIX bug, but nonetheless we need to cope with it. So use separate tests.
Per bug #6758; thanks to Andrew Hastie for doing the followup testing
needed to confirm what was happening.
Backpatch to 9.1, where we began using these functions.
M configure
M configure.in
M src/backend/utils/adt/pg_locale.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Fix typos in README.
commit : fe811ae8105a89ea60561dfae2fa7c3504a238a1
author : Heikki Linnakangas <[email protected]>
date : Fri, 31 Aug 2012 11:30:11 +0300
committer: Heikki Linnakangas <[email protected]>
date : Fri, 31 Aug 2012 11:30:11 +0300
M src/backend/replication/README
Improve coding of gistchoose and gistRelocateBuildBuffersOnSplit.
commit : e5db11c5582b469c04a11f217a0f32c827da5dd7
author : Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 22:52:43 -0400
committer: Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 22:52:43 -0400
This is mostly cosmetic, but it does eliminate a speculative portability
issue. The previous coding ignored the fact that sum_grow could easily
overflow (in fact, it could be summing multiple IEEE float infinities).
On a platform where that didn't guarantee to produce a positive result,
the code would misbehave. In any case, it was less than readable.
M src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistutil.c
Add Perl emacs formatting macros to src/tools/editors/emacs.samples.
commit : 5fcb58baca7a78e688b84275958c450670ba62a8
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 21:40:31 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 21:40:31 -0400
Peter Eisentraut
M src/tools/editors/emacs.samples
Clarify FreeBSD instructions in pg_test_timing.
commit : c36b06a70d303c738f092f264585f621b6b30b29
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 18:38:00 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 18:38:00 -0400
Josh Kupershmidt
M doc/src/sgml/pgtesttiming.sgml
Properly document that SIGTERM is OK for users to use on a postgres session, now that pg_terminate_backend() uses it.
commit : b5dc7612a5f66a08c6d46656d359fc1c69670f36
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:58:36 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:58:36 -0400
Josh Kupershmidt
M doc/src/sgml/ref/postgres-ref.sgml
Revert 1fbc30f1dca6624c01a9a6a9ff711a7036c68532 because the --enable-shared is about Plyton's configure, not ours.
commit : 39d0653d058b87b437be05fd295ceb5bb4e9e05c
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:05:51 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:05:51 -0400
M doc/src/sgml/installation.sgml
Remove doc mention of --enable-shared, per Tom.
commit : 1fbc30f1dca6624c01a9a6a9ff711a7036c68532
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:00:51 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 17:00:51 -0400
M doc/src/sgml/installation.sgml
Document that max_locks_per_transaction might need to be increased for queries on parent tables, per suggestion from Josh Berkus.
commit : 39b42ecb059e24bb39a62d91fe57ab7b9ca5a2f5
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 16:56:12 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 16:56:12 -0400
M doc/src/sgml/config.sgml
Split tuple struct defs from htup.h to htup_details.h
commit : c219d9b0a55bcdf81b00da6bad24ac2bf3e53d20
author : Alvaro Herrera <[email protected]>
date : Thu, 30 Aug 2012 16:15:44 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 30 Aug 2012 16:15:44 -0400
This reduces unnecessary exposure of other headers through htup.h, which
is very widely included by many files.
I have chosen to move the function prototypes to the new file as well,
because that means htup.h no longer needs to include tupdesc.h. In
itself this doesn't have much effect in indirect inclusion of tupdesc.h
throughout the tree, because it's also required by execnodes.h; but it's
something to explore in the future, and it seemed best to do the htup.h
change now while I'm busy with it.
M contrib/dblink/dblink.c
M contrib/file_fdw/file_fdw.c
M contrib/hstore/hstore_io.c
M contrib/hstore/hstore_op.c
M contrib/ltree/ltree_op.c
M contrib/pageinspect/heapfuncs.c
M contrib/pageinspect/rawpage.c
M contrib/pg_buffercache/pg_buffercache_pages.c
M contrib/tablefunc/tablefunc.c
M contrib/tcn/tcn.c
M contrib/xml2/xpath.c
M src/backend/access/common/reloptions.c
M src/backend/access/common/tupconvert.c
M src/backend/access/common/tupdesc.c
M src/backend/access/heap/hio.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/bootstrap/bootstrap.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/indexing.c
M src/backend/catalog/namespace.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_aggregate.c
M src/backend/catalog/pg_collation.c
M src/backend/catalog/pg_constraint.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_db_role_setting.c
M src/backend/catalog/pg_depend.c
M src/backend/catalog/pg_enum.c
M src/backend/catalog/pg_inherits.c
M src/backend/catalog/pg_largeobject.c
M src/backend/catalog/pg_namespace.c
M src/backend/catalog/pg_operator.c
M src/backend/catalog/pg_proc.c
M src/backend/catalog/pg_range.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/pg_type.c
M src/backend/commands/aggregatecmds.c
M src/backend/commands/alter.c
M src/backend/commands/collationcmds.c
M src/backend/commands/comment.c
M src/backend/commands/conversioncmds.c
M src/backend/commands/copy.c
M src/backend/commands/createas.c
M src/backend/commands/dbcommands.c
M src/backend/commands/dropcmds.c
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/foreigncmds.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/proclang.c
M src/backend/commands/schemacmds.c
M src/backend/commands/seclabel.c
M src/backend/commands/sequence.c
M src/backend/commands/tablespace.c
M src/backend/commands/trigger.c
M src/backend/commands/tsearchcmds.c
M src/backend/commands/typecmds.c
M src/backend/commands/user.c
M src/backend/commands/vacuum.c
M src/backend/commands/vacuumlazy.c
M src/backend/commands/variable.c
M src/backend/executor/execAmi.c
M src/backend/executor/execMain.c
M src/backend/executor/execQual.c
M src/backend/executor/execTuples.c
M src/backend/executor/functions.c
M src/backend/executor/nodeAgg.c
M src/backend/executor/nodeHash.c
M src/backend/executor/nodeHashjoin.c
M src/backend/executor/nodeLockRows.c
M src/backend/executor/nodeModifyTable.c
M src/backend/executor/nodeSetOp.c
M src/backend/executor/nodeSubplan.c
M src/backend/executor/nodeWindowAgg.c
M src/backend/executor/spi.c
M src/backend/foreign/foreign.c
M src/backend/nodes/tidbitmap.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/plan/subselect.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/parse_coerce.c
M src/backend/parser/parse_func.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_oper.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_type.c
M src/backend/parser/parse_utilcmd.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgstat.c
M src/backend/rewrite/rewriteDefine.c
M src/backend/rewrite/rewriteRemove.c
M src/backend/rewrite/rewriteSupport.c
M src/backend/storage/freespace/freespace.c
M src/backend/storage/lmgr/predicate.c
M src/backend/storage/page/bufpage.c
M src/backend/tcop/fastpath.c
M src/backend/tcop/utility.c
M src/backend/tsearch/ts_selfuncs.c
M src/backend/utils/adt/acl.c
M src/backend/utils/adt/array_selfuncs.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/datetime.c
M src/backend/utils/adt/dbsize.c
M src/backend/utils/adt/enum.c
M src/backend/utils/adt/format_type.c
M src/backend/utils/adt/genfile.c
M src/backend/utils/adt/json.c
M src/backend/utils/adt/lockfuncs.c
M src/backend/utils/adt/pg_locale.c
M src/backend/utils/adt/pgstatfuncs.c
M src/backend/utils/adt/rangetypes_selfuncs.c
M src/backend/utils/adt/regproc.c
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/rowtypes.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/selfuncs.c
M src/backend/utils/adt/trigfuncs.c
M src/backend/utils/adt/varbit.c
M src/backend/utils/adt/xml.c
M src/backend/utils/cache/evtcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/cache/ts_cache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/fmgr/funcapi.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/superuser.c
M src/backend/utils/sort/tuplesort.c
M src/backend/utils/sort/tuplestore.c
M src/backend/utils/time/combocid.c
M src/backend/utils/time/tqual.c
M src/include/access/heapam.h
M src/include/access/heapam_xlog.h
M src/include/access/htup.h
A src/include/access/htup_details.h
M src/include/access/reloptions.h
M src/include/access/relscan.h
M src/include/access/tupconvert.h
M src/include/access/tuptoaster.h
M src/include/executor/tuptable.h
M src/include/utils/inval.h
M src/include/utils/lsyscache.h
M src/pl/plperl/plperl.c
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpython/plpy_exec.c
M src/pl/plpython/plpy_main.c
M src/pl/plpython/plpy_procedure.c
M src/pl/plpython/plpy_spi.c
M src/pl/plpython/plpy_typeio.c
M src/pl/plpython/plpy_typeio.h
M src/pl/tcl/pltcl.c
Remove configure flag --disable-shared, as it is no longer used by any port. The last use was QNX, per Peter Eisentraut.
commit : 381a9ed66d8a601eb972be172e7251ca7f0e9d78
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 16:26:53 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 16:26:53 -0400
M configure
M configure.in
M src/Makefile.global.in
M src/Makefile.shlib
M src/backend/snowball/Makefile
M src/backend/utils/mb/conversion_procs/Makefile
Fix checkpoint_timeout documentation to reflect current behavior.
commit : 9bedfbd02b48096f435c5b111591d4e5b717e547
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 15:06:55 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 15:06:55 -0400
Jeff Janes
M doc/src/sgml/wal.sgml
Document that log_autovacuum_min_duration can be used to monitor autovacuum activity.
commit : 83fbfec383d7f7ef1331ba02db3d0fdf50abf112
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 14:44:36 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 14:44:36 -0400
Per report from Marc Mamin
M doc/src/sgml/maintenance.sgml
Suppress creation of backwardly-indexed paths for LATERAL join clauses.
commit : 77387f0ac859c099c6ab669db1e7a852524696c4
author : Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 14:32:22 -0400
committer: Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 14:32:22 -0400
Given a query such as
SELECT * FROM foo JOIN LATERAL (SELECT foo.var1) ss(x) ON ss.x = foo.var2
the existence of the join clause "ss.x = foo.var2" encourages indxpath.c to
build a parameterized path for foo using any index available for foo.var2.
This is completely useless activity, though, since foo has got to be on the
outside not the inside of any nestloop join with ss. It's reasonably
inexpensive to add tests that prevent creation of such paths, so let's do
that.
M src/backend/optimizer/path/equivclass.c
M src/backend/optimizer/path/indxpath.c
M src/include/optimizer/paths.h
Document how to prevent PostgreSQL itself from exhausting memory.
commit : 35738b5906bb80bc4bb77ce1adea7dfbd3f64274
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 14:14:22 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 14:14:22 -0400
The existing documentation in Linux Memory Overcommit seemed to
assume that PostgreSQL itself could never be the problem, or at
least it didn't tell you what to do about it.
Per discussion with Craig Ringer and Kevin Grittner.
M doc/src/sgml/runtime.sgml
Fix division by zero in the new range type histogram creation.
commit : 3e6eb0dd0a0982c61420a0d18d3e485bd2c2819c
author : Heikki Linnakangas <[email protected]>
date : Thu, 30 Aug 2012 20:27:19 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 30 Aug 2012 20:27:19 +0300
Report and analysis by Matthias.
M src/backend/utils/adt/rangetypes_typanalyze.c
Add missing period to detail message.
commit : a66fca3f0c8899ad360f0300d45cb1b7ac60a17f
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:26:45 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:26:45 -0400
Per note from Peter Eisentraut.
M src/backend/storage/lmgr/proc.c
Document that COPY OUT requires an absolute pathname.
commit : b9ea8d20fde981997425ba72de7aa23e319e753e
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:17:21 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:17:21 -0400
As suggested by Etsuro Fujita, but with somewhat different wording.
M doc/src/sgml/ref/copy.sgml
Remove old documentation warnings about the use of bigint.
commit : 48a9c7823e032fde54cb0658fbd488809a3fdc69
author : Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 13:13:35 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 30 Aug 2012 13:13:35 -0400
M doc/src/sgml/datatype.sgml
Fix logic bug in gistchoose and gistRelocateBuildBuffersOnSplit.
commit : c8ba697a4bdb934f0c51424c654e8db6133ea255
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:05:45 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 13:05:45 -0400
Every time the best-tuple-found-so-far changes, we need to reset all
the penalty values in which_grow[] to the penalties for the new best
tuple. The old code failed to do this, resulting in inferior index
quality.
The original patch from Alexander Korotkov was just two lines; I took
the liberty of fleshing that out by adding a bunch of comments that I
hope will make this logic easier for others to understand than it was
for me.
M src/backend/access/gist/gistbuildbuffers.c
M src/backend/access/gist/gistutil.c
Improve EXPLAIN's ability to cope with LATERAL references in plans.
commit : d1a4db8d25ec53fd17e99168bc5efa0b16ef6fed
author : Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 12:56:50 -0400
committer: Tom Lane <[email protected]>
date : Thu, 30 Aug 2012 12:56:50 -0400
push_child_plan/pop_child_plan didn't bother to adjust the "ancestors"
list of parent plan nodes when descending to a child plan node. I think
this was okay when it was written, but it's not okay in the presence of
LATERAL references, since a subplan node could easily be returning a
LATERAL value back up to the same nestloop node that provides the value.
Per changed regression test results, the omission led to failure to
interpret Param nodes that have perfectly good interpretations.
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/join.out
Comment fixes.
commit : e1a6375d8f3a11f3447bea10883a4cbe1c5d3ec9
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 10:42:28 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 10:42:28 -0400
Jeff Davis, somewhat edited by me
M src/backend/commands/tablecmds.c
M src/backend/storage/file/reinit.c
Document that xslt-related RPMs may be needed to build docs.
commit : 152525b5f3db9b7b58fa06e5d03725288f054b1d
author : Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 10:37:46 -0400
committer: Robert Haas <[email protected]>
date : Thu, 30 Aug 2012 10:37:46 -0400
M doc/src/sgml/docguide.sgml
Also check for Python platform-specific include directory
commit : 9cffb187d80d87399c5d2c4577b3f3ba775ef028
author : Peter Eisentraut <[email protected]>
date : Wed, 29 Aug 2012 22:44:59 -0400
committer: Peter Eisentraut <[email protected]>
date : Wed, 29 Aug 2012 22:44:59 -0400
Python can be built to have two separate include directories: one for
platform-independent files and one for platform-specific files. So
far, this has apparently never mattered for a PL/Python build. But
with the new multi-arch Python packages in Debian and Ubuntu, this is
becoming the standard configuration on these platforms, so we must
check these directories separately to be able to build there.
Also add a bit of reporting in configure to be able to see better what
is going on with this.
M config/python.m4
M configure
Adjust definition of cheapest_total_path to work better with LATERAL.
commit : e83bb10d6dcf05a666d4ada00d9788c7974ad378
author : Tom Lane <[email protected]>
date : Wed, 29 Aug 2012 22:05:27 -0400
committer: Tom Lane <[email protected]>
date : Wed, 29 Aug 2012 22:05:27 -0400
In the initial cut at LATERAL, I kept the rule that cheapest_total_path
was always unparameterized, which meant it had to be NULL if the relation
has no unparameterized paths. It turns out to work much more nicely if
we always have *some* path nominated as cheapest-total for each relation.
In particular, let's still say it's the cheapest unparameterized path if
there is one; if not, take the cheapest-total-cost path among those of
the minimum available parameterization. (The first rule is actually
a special case of the second.)
This allows reversion of some temporary lobotomizations I'd put in place.
In particular, the planner can now consider hash and merge joins for
joins below a parameter-supplying nestloop, even if there aren't any
unparameterized paths available. This should bring planning of
LATERAL-containing queries to the same level as queries not using that
feature.
Along the way, simplify management of parameterized paths in add_path()
and friends. In the original coding for parameterized paths in 9.2,
I tried to minimize the logic changes in add_path(), so it just treated
parameterization as yet another dimension of comparison for paths.
We later made it ignore pathkeys (sort ordering) of parameterized paths,
on the grounds that ordering isn't a useful property for the path on the
inside of a nestloop, so we might as well get rid of useless parameterized
paths as quickly as possible. But we didn't take that reasoning as far as
we should have. Startup cost isn't a useful property inside a nestloop
either, so add_path() ought to discount startup cost of parameterized paths
as well. Having done that, the secondary sorting I'd implemented (in
add_parameterized_path) is no longer needed --- any parameterized path that
survives add_path() at all is worth considering at higher levels. So this
should be a bit faster as well as simpler.
M src/backend/optimizer/README
M src/backend/optimizer/geqo/geqo_eval.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/util/pathnode.c
M src/include/nodes/relation.h
M src/test/regress/expected/join.out
Document that NOTIFY events are visible to all users.
commit : 9fe6da5c0d8e70c9a541c3e1e0d637ab19c75ac1
author : Bruce Momjian <[email protected]>
date : Wed, 29 Aug 2012 21:45:31 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 29 Aug 2012 21:45:31 -0400
M doc/src/sgml/ref/notify.sgml
Report postmaster.pid file as empty if it is empty, rather than reporting in contains invalid data.
commit : 3825963e7fbaa8dbc462d4f5286ff6149f4703dd
author : Bruce Momjian <[email protected]>
date : Wed, 29 Aug 2012 17:05:22 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 29 Aug 2012 17:05:22 -0400
M src/backend/utils/init/miscinit.c
M src/bin/pg_ctl/pg_ctl.c
Optimize SP-GiST insertions.
commit : c82dedb7a8a953785f24a3b10de376760d60c24c
author : Heikki Linnakangas <[email protected]>
date : Wed, 29 Aug 2012 09:14:08 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 29 Aug 2012 09:14:08 +0300
This includes two micro-optimizations to the tight inner loop in descending
the SP-GiST tree: 1. avoid an extra function call to index_getprocinfo when
calling user-defined choose function, and 2. avoid a useless palloc+pfree
when node labels are not used.
M src/backend/access/spgist/spgdoinsert.c
M src/backend/access/spgist/spgutils.c
Fix assorted compilation failures in contrib
commit : 9df55c8c3f0eba77de57006999d5700292fa9d33
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 23:43:09 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 23:43:09 -0400
Evidently I failed to test a compile after my earlier header shuffling.
M contrib/auto_explain/auto_explain.c
M contrib/dblink/dblink.c
M contrib/pageinspect/fsmfuncs.c
M contrib/tablefunc/tablefunc.c
Add strerror() string to chdir() error message
commit : 1a26e1c766fa84c2f93473eed83f0133d4b2ac5f
author : Peter Eisentraut <[email protected]>
date : Tue, 28 Aug 2012 23:01:23 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 28 Aug 2012 23:01:23 -0400
M src/port/exec.c
Split heapam_xlog.h from heapam.h
commit : 21c09e99dc252269360bd146afee9481fa80abbc
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 19:02:00 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 19:02:00 -0400
The heapam XLog functions are used by other modules, not all of which
are interested in the rest of the heapam API. With this, we let them
get just the XLog stuff in which they are interested and not pollute
them with unrelated includes.
Also, since heapam.h no longer requires xlog.h, many files that do
include heapam.h no longer get xlog.h automatically, including a few
headers. This is useful because heapam.h is getting pulled in by
execnodes.h, which is in turn included by a lot of files.
M src/backend/access/gin/gininsert.c
M src/backend/access/heap/heapam.c
M src/backend/access/heap/pruneheap.c
M src/backend/access/heap/rewriteheap.c
M src/backend/access/heap/visibilitymap.c
M src/backend/access/index/genam.c
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtsort.c
M src/backend/access/nbtree/nbtxlog.c
M src/backend/access/spgist/spginsert.c
M src/backend/access/transam/rmgr.c
M src/backend/commands/tablecmds.c
M src/backend/commands/vacuumlazy.c
M src/backend/executor/nodeSubplan.c
M src/backend/foreign/foreign.c
M src/backend/nodes/print.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/plancat.c
M src/backend/parser/parse_func.c
M src/backend/utils/adt/domains.c
M src/backend/utils/adt/regproc.c
M src/include/access/heapam.h
A src/include/access/heapam_xlog.h
M src/include/access/htup.h
M src/include/commands/explain.h
M src/include/commands/prepare.h
remove catcache.h from syscache.h
commit : fda0594fc2f4c98ee50ea02fa196ca51db81ea70
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 18:26:24 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 18:26:24 -0400
Instead, place a forward struct declaration for struct catclist in
syscache.h. This reduces header proliferation somewhat.
M src/backend/catalog/namespace.c
M src/backend/catalog/pg_conversion.c
M src/backend/catalog/pg_enum.c
M src/backend/utils/adt/acl.c
M src/backend/utils/cache/attoptcache.c
M src/backend/utils/cache/inval.c
M src/backend/utils/cache/lsyscache.c
M src/backend/utils/cache/spccache.c
M src/backend/utils/cache/syscache.c
M src/backend/utils/cache/ts_cache.c
M src/include/utils/syscache.h
Split resowner.h
commit : 45326c5a11530cff5db99c6d4b393439cc901f26
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 18:02:07 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 18:02:07 -0400
This lets files that are mere users of ResourceOwner not automatically
include the headers for stuff that is managed by the resowner mechanism.
M src/backend/access/common/tupdesc.c
M src/backend/access/transam/xact.c
M src/backend/commands/dbcommands.c
M src/backend/commands/extension.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/walwriter.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/buffer/localbuf.c
M src/backend/storage/file/fd.c
M src/backend/storage/lmgr/lock.c
M src/backend/utils/cache/catcache.c
M src/backend/utils/cache/evtcache.c
M src/backend/utils/cache/plancache.c
M src/backend/utils/cache/relcache.c
M src/backend/utils/cache/typcache.c
M src/backend/utils/resowner/resowner.c
M src/backend/utils/time/snapmgr.c
M src/include/utils/portal.h
M src/include/utils/resowner.h
A src/include/utils/resowner_private.h
M src/include/utils/snapmgr.h
add #includes to plpy_subxactobject.h to make it compile standalone
commit : 0a664ec27f3937c0ce428c07a41b6d8c7526ec57
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 16:11:44 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 16:11:44 -0400
M src/pl/plpython/plpy_subxactobject.h
Remove pg_stat_statements--1.0.sql, too.
commit : 0a83f2492f38fd0b82452dfd2a80cc70486ba73d
author : Tom Lane <[email protected]>
date : Tue, 28 Aug 2012 14:33:56 -0400
committer: Tom Lane <[email protected]>
date : Tue, 28 Aug 2012 14:33:56 -0400
Per Peter Geoghegan.
D contrib/pg_stat_statements/pg_stat_statements–1.0.sql
Remove hstore--1.0.sql.
commit : 9db098dfa91906cee4fffc1e3ba8ba3899820d5f
author : Tom Lane <[email protected]>
date : Tue, 28 Aug 2012 14:29:55 -0400
committer: Tom Lane <[email protected]>
date : Tue, 28 Aug 2012 14:29:55 -0400
Since we're not installing this file anymore, it has no reason to exist,
other than as historical reference; but we have an SCM for that.
D contrib/hstore/hstore–1.0.sql
Adjust pg_test_timing to show shortest test durations first, place percentage column before count column. Docs updated.
commit : 0f3351aacf5cd5fa87c31fd0d1f7f8dc0409c0b3
author : Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:57:13 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:57:13 -0400
M contrib/pg_test_timing/pg_test_timing.c
M doc/src/sgml/pgtesttiming.sgml
Prevent psql tab completion in SET from adding TO when the equals sign has no space before it.
commit : 65b2ee27ad926f622f06c3a4029b621e8d72fb67
author : Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:53:31 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:53:31 -0400
Report by Erik Rijkers
M src/bin/psql/tab-complete.c
Update doc mention of how to compute bigint advisory lock value, per Tom Lane's correction.
commit : 5ea6c9d79882815d4cc1c3c302f415eb637466f2
author : Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:17:11 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 28 Aug 2012 12:17:11 -0400
M doc/src/sgml/catalogs.sgml
syncrep.h must include xlogdefs.h
commit : 095e6c5a7da10db77d0e43e413fca64c946ad370
author : Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 09:46:08 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 28 Aug 2012 09:46:08 -0400
M src/include/replication/syncrep.h
Small punctuation fixes
commit : a5727888d744d1b41bba4d84dadf9e5c519aab45
author : Peter Eisentraut <[email protected]>
date : Tue, 28 Aug 2012 03:10:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 28 Aug 2012 03:10:04 -0400
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
Document how to create advisory lock "bigint" values in SQL.
commit : bf849af7f347ebcd394d6d789f557e75ead2f5ee
author : Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 22:36:37 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 22:36:37 -0400
David E. Wheeler
M doc/src/sgml/catalogs.sgml
Improve a couple of 9.2 release note entries.
commit : 7417a8e3dd14886887447053a5ccbd4f9501ba61
author : Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 20:53:57 -0400
committer: Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 20:53:57 -0400
Clarify the compatibility notes about EXTRACT() and about statistics
timing columns.
M doc/src/sgml/release-9.2.sgml
Add section IDs to subsections of syntax.sgml that lacked them.
commit : 87703287849bf785400d0daf57b9d6b5a05d0780
author : Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 20:17:12 -0400
committer: Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 20:17:12 -0400
This is so that these sections will have stable HTML tags that one can
link to, rather than things like "AEN1902". Perhaps we should mount a
campaign to do this everywhere, but I've found myself pointing at
syntax.sgml subsections often enough to be sure it's useful here.
M doc/src/sgml/syntax.sgml
Document the lack of reading the PGDATABASE environment variable in pg_restore.
commit : 483c2c1071c45e275782d33d646c3018f02f9f94
author : Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 15:26:53 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 15:26:53 -0400
M doc/src/sgml/ref/pg_restore.sgml
pg_upgrade: Fix exec_prog API to be less flaky
commit : 088c065ce8e405fafbfa966937184ece9defcf20
author : Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 14:21:09 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 14:21:09 -0400
The previous signature made it very easy to pass something other than
the printf-format specifier in the corresponding position, without any
warning from the compiler.
While at it, move some of the escaping, redirecting and quoting
responsibilities from the callers into exec_prog() itself. This makes
the callsites cleaner.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
Fix thinko in comment
commit : 34c02044ed7e7defde5a853b26dcd806c872d974
author : Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 14:20:28 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 14:20:28 -0400
It was confusing symlinks with hard links.
M contrib/pg_upgrade/file.c
Remove analyze_new_cluster.sh on make clean, too
commit : ab577e63faf792593ca728625a8ef0b1dfaf7500
author : Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 12:42:59 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 27 Aug 2012 12:42:59 -0400
M contrib/pg_upgrade/Makefile
Fix DROP INDEX CONCURRENTLY IF EXISTS.
commit : e323c553017601597b6a5f9f19426587df512ad9
author : Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 12:45:43 -0400
committer: Tom Lane <[email protected]>
date : Mon, 27 Aug 2012 12:45:43 -0400
This threw ERROR, not the expected NOTICE, if the index didn't exist.
The bug was actually visible in not-as-expected regression test output,
so somebody wasn't paying too close attention in commit
8cb53654dbdb4c386369eb988062d0bbb6de725e.
Per report from Brendan Byrd.
M src/backend/parser/gram.y
M src/test/regress/expected/create_index.out
Have pgindent requre pg_bsd_indent version 1.2 now that a new version has been created by adding #include <stdlib.h> to parse.c.
commit : e40bddb0f3ce9f9bf7c960b35f6ac0c19f65612b
author : Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 09:31:45 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 27 Aug 2012 09:31:45 -0400
per request from Kevin Grittner.
M src/tools/pgindent/pgindent
Collect and use histograms of lower and upper bounds for range types.
commit : 918eee0c497c88260a2e107318843c9b1947bc6f
author : Heikki Linnakangas <[email protected]>
date : Mon, 27 Aug 2012 15:48:46 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 27 Aug 2012 15:48:46 +0300
This enables selectivity estimation of the <<, >>, &<, &> and && operators,
as well as the normal inequality operators: <, <=, >=, >. "range @> element"
is also supported, but the range-variant @> and <@ operators are not,
because they cannot be sensibly estimated with lower and upper bound
histograms alone. We would need to make some assumption about the lengths of
the ranges for that. Alexander's patch included a separate histogram of
lengths for that, but I left that out of the patch for simplicity. Hopefully
that will be added as a followup patch.
The fraction of empty ranges is also calculated and used in estimation.
Alexander Korotkov, heavily modified by me.
M src/backend/utils/adt/Makefile
M src/backend/utils/adt/rangetypes.c
A src/backend/utils/adt/rangetypes_selfuncs.c
A src/backend/utils/adt/rangetypes_typanalyze.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_operator.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_statistic.h
M src/include/utils/rangetypes.h
pg_basebackup: Correct error message
commit : 6bb0b08fe65de32c5d43c0f7c76bd34801ce5056
author : Peter Eisentraut <[email protected]>
date : Mon, 27 Aug 2012 00:49:39 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 27 Aug 2012 00:49:39 -0400
It still thought that the --xlog-method option argument could be
empty, as in a previous version of this feature.
M src/bin/pg_basebackup/pg_basebackup.c
Update FreeBSD kernel configuration documentation.
commit : 7a42dff47e37e7cd7ba03a2ed6531f2d9a206e74
author : Bruce Momjian <[email protected]>
date : Sun, 26 Aug 2012 23:21:45 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 26 Aug 2012 23:21:45 -0400
Brad Davis
M doc/src/sgml/runtime.sgml
Fix up planner infrastructure to support LATERAL properly.
commit : 9ff79b9d4e71822a875c0f5e38f5ec86c7fb079f
author : Tom Lane <[email protected]>
date : Sun, 26 Aug 2012 22:48:55 -0400
committer: Tom Lane <[email protected]>
date : Sun, 26 Aug 2012 22:48:55 -0400
This patch takes care of a number of problems having to do with failure
to choose valid join orders and incorrect handling of lateral references
pulled up from subqueries. Notable changes:
* Add a LateralJoinInfo data structure similar to SpecialJoinInfo, to
represent join ordering constraints created by lateral references.
(I first considered extending the SpecialJoinInfo structure, but the
semantics are different enough that a separate data structure seems
better.) Extend join_is_legal() and related functions to prevent trying
to form unworkable joins, and to ensure that we will consider joins that
satisfy lateral references even if the joins would be clauseless.
* Fill in the infrastructure needed for the last few types of relation scan
paths to support parameterization. We'd have wanted this eventually
anyway, but it is necessary now because a relation that gets pulled up out
of a UNION ALL subquery may acquire a reltargetlist containing lateral
references, meaning that its paths *have* to be parameterized whether or
not we have any code that can push join quals down into the scan.
* Compute data about lateral references early in query_planner(), and save
in RelOptInfo nodes, to avoid repetitive calculations later.
* Assorted corner-case bug fixes.
There's probably still some bugs left, but this is a lot closer to being
real than it was before.
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/indxpath.c
M src/backend/optimizer/path/joinpath.c
M src/backend/optimizer/path/joinrels.c
M src/backend/optimizer/path/tidpath.c
M src/backend/optimizer/plan/analyzejoins.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planmain.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/placeholder.c
M src/backend/optimizer/util/relnode.c
M src/backend/optimizer/util/var.c
M src/backend/rewrite/rewriteManip.c
M src/include/nodes/nodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/planmain.h
M src/include/optimizer/planner.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Clarify documentation that primary key and unique constraints are copied for CREATE TABLE LIKE ... INCLUDING INDEXES.
commit : de87d4704432e98a327dbf42dbc4711fa2628a9c
author : Bruce Momjian <[email protected]>
date : Sun, 26 Aug 2012 16:33:11 -0400
committer: Bruce Momjian <[email protected]>
date : Sun, 26 Aug 2012 16:33:11 -0400
Per report from [email protected]
M doc/src/sgml/ref/create_table.sgml
Use psql_error() for most psql error calls, per request from Magnus.
commit : 9e9a5b71d56a40292e6485ff03e1b65351664ece
author : Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 22:58:42 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 22:58:42 -0400
M src/bin/psql/command.c
M src/bin/psql/common.c
M src/bin/psql/describe.c
M src/bin/psql/large_obj.c
Document clearly that psql \! parameter interpretation limitations are the same as \copy.
commit : f6752ee59af4b95248c32b0ee6477a15b0e93c63
author : Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 19:11:21 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 19:11:21 -0400
M doc/src/sgml/ref/psql-ref.sgml
Allow text timezone designations, e.g. "America/Chicago", when using the ISO "T" timestamptz format.
commit : 3e1a373e2b102b43faa8bbc4841f7511174e1166
author : Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 17:44:53 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 25 Aug 2012 17:44:53 -0400
M src/backend/utils/adt/datetime.c
Some spelling adjustments in release notes
commit : 7514208fbb29f62511c77d2ce4f9ec0608487426
author : Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 22:36:24 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 22:36:24 -0400
M doc/src/sgml/release-9.2.sgml
Normalize some British spellings
commit : 8606e47e1120b891e9a539881c0aa2bb9b03ba62
author : Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 22:35:53 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 22:35:53 -0400
M doc/src/sgml/high-availability.sgml
Fix issues with checks for unsupported transaction states in Hot Standby.
commit : 7abaa6b9d3eeccf777c0210b7340d960b9cceb97
author : Tom Lane <[email protected]>
date : Fri, 24 Aug 2012 13:09:04 -0400
committer: Tom Lane <[email protected]>
date : Fri, 24 Aug 2012 13:09:04 -0400
The GUC check hooks for transaction_read_only and transaction_isolation
tried to check RecoveryInProgress(), so as to disallow setting read/write
mode or serializable isolation level (respectively) in hot standby
sessions. However, GUC check hooks can be called in many situations where
we're not connected to shared memory at all, resulting in a crash in
RecoveryInProgress(). Among other cases, this results in EXEC_BACKEND
builds crashing during child process start if default_transaction_isolation
is serializable, as reported by Heikki Linnakangas. Protect those calls
by silently allowing any setting when not inside a transaction; which is
okay anyway since these GUCs are always reset at start of transaction.
Also, add a check to GetSerializableTransactionSnapshot() to complain
if we are in hot standby. We need that check despite the one in
check_XactIsoLevel() because default_transaction_isolation could be
serializable. We don't want to complain any sooner than this in such
cases, since that would prevent running transactions at all in such a
state; but a transaction can be run, if SET TRANSACTION ISOLATION is done
before setting a snapshot. Per report some months ago from Robert Haas.
Back-patch to 9.1, since these problems were introduced by the SSI patch.
Kevin Grittner and Tom Lane, with ideas from Heikki Linnakangas
M src/backend/commands/variable.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/init/postinit.c
Put options on man page and in help output in slightly better order
commit : 406473b152338a015ad7e222f92b9b885f277fe8
author : Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 00:06:59 -0400
committer: Peter Eisentraut <[email protected]>
date : Fri, 24 Aug 2012 00:06:59 -0400
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
libpq: Fix memory leak in URI parser
commit : 4faf074a53bb8e8e03714ce2746b9d11a95dc6e5
author : Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 22:33:04 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 22:33:04 -0400
When an invalid query parameter is reported, some memory leaks.
found by Coverity
M src/interfaces/libpq/fe-connect.c
Fix cascading privilege revoke to notice when privileges are still held.
commit : ec8a0135c3228087761ad3cdba18aebb01c7e17a
author : Tom Lane <[email protected]>
date : Thu, 23 Aug 2012 17:25:10 -0400
committer: Tom Lane <[email protected]>
date : Thu, 23 Aug 2012 17:25:10 -0400
If we revoke a grant option from some role X, but X still holds the option
via another grant, we should not recursively revoke the privilege from
role(s) Y that X had granted it to. This was supposedly fixed as one
aspect of commit 4b2dafcc0b1a579ef5daaa2728223006d1ff98e9, but I must not
have tested it, because in fact that code never worked: it forgot to shift
the grant-option bits back over when masking the bits being revoked.
Per bug #6728 from Daniel German. Back-patch to all active branches,
since this has been wrong since 8.0.
M src/backend/utils/adt/acl.c
M src/test/regress/expected/privileges.out
M src/test/regress/sql/privileges.sql
Fix typo in example.
commit : 8b6b50a34dea0852511094405f0298d78c3b43fe
author : Heikki Linnakangas <[email protected]>
date : Thu, 23 Aug 2012 11:57:34 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 23 Aug 2012 11:57:34 +0300
M doc/src/sgml/rangetypes.sgml
Add instructions for setting up documentation tool chain on Mac OS X
commit : 26a6267226cd4ff84040e4bf4b0d0a7fd1b5258c
author : Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 02:28:47 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 02:28:47 -0400
M doc/src/sgml/docguide.sgml
pg_upgrade: Run the created scripts in the test suite
commit : 7afa8bed65ea925208f128048f3a528a64e1319a
author : Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 02:27:36 -0400
committer: Peter Eisentraut <[email protected]>
date : Thu, 23 Aug 2012 02:27:36 -0400
Just to check that they actually work.
M contrib/pg_upgrade/test.sh
Remove overly-pessimistic statement about constraint exclusion.
commit : 6e2e12c9477c3b48854433251ebca9709be3e87b
author : Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 23:55:34 -0400
committer: Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 23:55:34 -0400
As of 9.2, constraint exclusion should work okay with prepared statements:
the planner will try custom plans with actual values of the parameters,
and observe that they are a lot cheaper than the generic plan, and thus
never fall back to using the generic plan. Noted by Tatsuhito Kasahara.
M doc/src/sgml/ddl.sgml
Make a cut at a major-features list for 9.2.
commit : b33f611682d0c587bb1496ff529fab1970f0d44c
author : Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 17:58:06 -0400
committer: Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 17:58:06 -0400
This is open to debate of course, but it's past time we had *something*
here.
M doc/src/sgml/release-9.2.sgml
Make an editorial pass over the 9.2 release notes.
commit : 979f8f0431ab2a727a45a4568f25d852aa0b94aa
author : Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 17:37:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 17:37:02 -0400
A very large number of small improvements ...
M doc/src/sgml/datatype.sgml
M doc/src/sgml/func.sgml
M doc/src/sgml/release-9.2.sgml
Fix erroneous documentation of synchronous_commit = remote_write.
commit : 932a271956afac90a676b946fd3e356b45581445
author : Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 14:04:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 22 Aug 2012 14:04:02 -0400
The docs claimed that this mode only waits for the standby to receive WAL
data, but actually it waits for the data to be written out to the standby's
OS; which is a pretty significant difference because it removes the risk of
crash of the walreceiver process.
M doc/src/sgml/config.sgml
M doc/src/sgml/high-availability.sgml
Fix typo.
commit : 03af60c010aebc0a100416897ecb0948168c99c9
author : Bruce Momjian <[email protected]>
date : Wed, 22 Aug 2012 12:05:25 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 22 Aug 2012 12:05:25 -0400
M doc/src/sgml/config.sgml
Document that pg_reload_conf() is also an easy way to reload the configuration file.
commit : 7dff5b8edd898146ffa4afc2df3f9d5c67e43f0e
author : Bruce Momjian <[email protected]>
date : Wed, 22 Aug 2012 12:00:24 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 22 Aug 2012 12:00:24 -0400
M doc/src/sgml/config.sgml
Fix install-strip on Mac OS X
commit : b748d8f280100e4ddbafcc65a768e287a1dfcc22
author : Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 23:42:43 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 23:42:43 -0400
There was a hack put into install-sh to call strip with the correct
options on Mac OS X. But that never worked, because configure
disabled stripping on that platform altogether. So remove that dead
code, and while we're at it, update install-sh to the latest upstream
source (from Automake).
Instead, set up the right strip options in programs.m4, so this now
actually works the way it was originally intended.
M config/install-sh
M config/programs.m4
M configure
Mark DateTimeParseError() noreturn
commit : 5c45d2f87835ccd3ffac338845ec79cab1b31a11
author : Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 23:30:05 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 23:30:05 -0400
This avoids a warning from clang 3.2 about an uninitialized variable
'dtype' in date_in().
M src/include/utils/datetime.h
Update 9.2 release notes to reflect commits to date.
commit : 0830cc9fe0ebebf0593ca2458ccf08638a546fb4
author : Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 22:56:10 -0400
committer: Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 22:56:10 -0400
I was unable to entirely resist the temptation to copy-edit related
entries, but will save most of that for a separate pass.
M doc/src/sgml/release-9.2.sgml
Avoid somewhat-theoretical overflow risks in RecordIsValid().
commit : 10685ec082181b285a48d982b4c3463fd80ee5ae
author : Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 18:41:52 -0400
committer: Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 18:41:52 -0400
This improves on commit 51fed14d73ed3acd2282b531fb1396877e44e86a by
eliminating the assumption that we can form <some pointer value> +
<some offset> without overflow. The entire point of those tests is that
we don't trust the offset value, so coding them in a way that could wrap
around if the buffer happens to be near the top of memory doesn't seem
sound. Instead, track the remaining space as a size_t variable and
compare offsets against that.
Also, improve comment about why we need the extra early check on
xl_tot_len.
M src/backend/access/transam/xlog.c
Fix dumping of security_barrier views with circular dependencies.
commit : 0f524ea0cf388a149f362e48a33c01662eeddc04
author : Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 15:18:36 -0400
committer: Tom Lane <[email protected]>
date : Tue, 21 Aug 2012 15:18:36 -0400
If a view has circular dependencies, pg_dump splits it into a CREATE TABLE
and a CREATE RULE command to break the dependency loop. However, if the
view has reloptions, those options cannot be applied in the CREATE TABLE
command, because views and tables have different allowed reloptions so
CREATE TABLE would reject them. Instead apply the reloptions after the
CREATE RULE, using ALTER VIEW SET.
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
Improve C comments in GetSnapshotData.
commit : 4b373e42d1efd24f871193ce8178c41f199c5df3
author : Robert Haas <[email protected]>
date : Tue, 21 Aug 2012 11:47:10 -0400
committer: Robert Haas <[email protected]>
date : Tue, 21 Aug 2012 11:47:10 -0400
Move discussion of why our algorithm for taking snapshots in recovery
to a more appropriate location in the function, and delete incorrect
mention of taking a lock.
M src/backend/storage/ipc/procarray.c
Add a note to the MVCC chapter that some things aren't transactional.
commit : 82ef3d3008f8ec9c565f7a5724196cd0f342d594
author : Robert Haas <[email protected]>
date : Tue, 21 Aug 2012 11:08:15 -0400
committer: Robert Haas <[email protected]>
date : Tue, 21 Aug 2012 11:08:15 -0400
Craig Ringer, slightly edited by me.
M doc/src/sgml/mvcc.sgml
Teach compiler that ereport(>=ERROR) does not return
commit : 71450d7fd6c7cf7b3e38ac56e363bff6a681973c
author : Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 00:03:32 -0400
committer: Peter Eisentraut <[email protected]>
date : Tue, 21 Aug 2012 00:03:32 -0400
When elevel >= ERROR, we add an abort() call to the ereport() macro to
give the compiler a hint that the ereport() expansion will not return,
but the abort() isn't actually reached because the longjmp happens in
errfinish().
Because the effect of ereport() varies with the elevel, we cannot use
standard compiler attributes such as noreturn for this.
M src/include/utils/elog.h
Remove external PID file on postmaster exit
commit : ffdd5a0ee37c5ac38038aeff98328727e986d2da
author : Peter Eisentraut <[email protected]>
date : Mon, 20 Aug 2012 23:47:11 -0400
committer: Peter Eisentraut <[email protected]>
date : Mon, 20 Aug 2012 23:47:11 -0400
M src/backend/postmaster/postmaster.c
Improved tab completion for CLUSTER VERBOSE.
commit : 029722ac8e0d6b52872486b9d1907530fc8a0192
author : Robert Haas <[email protected]>
date : Mon, 20 Aug 2012 16:45:44 -0400
committer: Robert Haas <[email protected]>
date : Mon, 20 Aug 2012 16:45:44 -0400
Jeff Janes
M src/bin/psql/tab-complete.c
Tab complete "TABLE whatever DROP CONSTRAINT" with a constraint name.
commit : 68386fc15b8ba01b5a4c4ed98c4a4d4968817cc9
author : Robert Haas <[email protected]>
date : Mon, 20 Aug 2012 16:30:08 -0400
committer: Robert Haas <[email protected]>
date : Mon, 20 Aug 2012 16:30:08 -0400
Jeff Janes
M src/bin/psql/tab-complete.c
Fix bugs in contrib/pg_trgm's LIKE pattern analysis code.
commit : b2a01b9ad1c6b074df1c4bc75ca988230dfa3cf0
author : Tom Lane <[email protected]>
date : Mon, 20 Aug 2012 13:24:52 -0400
committer: Tom Lane <[email protected]>
date : Mon, 20 Aug 2012 13:24:52 -0400
Extraction of trigrams did not process LIKE escape sequences properly,
leading to possible misidentification of trigrams near escapes, resulting
in incorrect index search results.
Fujii Masao
M contrib/pg_trgm/expected/pg_trgm.out
M contrib/pg_trgm/sql/pg_trgm.sql
M contrib/pg_trgm/trgm_op.c
Don't get confused if a WAL partial record header has xl_tot_len == 0.
commit : 51fed14d73ed3acd2282b531fb1396877e44e86a
author : Heikki Linnakangas <[email protected]>
date : Mon, 20 Aug 2012 19:51:42 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 20 Aug 2012 19:51:42 +0300
If a WAL record header was split across pages, but xl_tot_len was 0, we
would get confused and conclude that we had already read the whole record,
and proceed to CRC check it. That can lead to a crash in RecordIsValid(),
which isn't careful to not read beyond end-of-record, as defined by
xl_tot_len.
Add an explicit sanity check for xl_tot_len <= SizeOfXlogRecord. Also,
make RecordIsValid() more robust by checking in each step that it doesn't
try to access memory beyond end of record, even if a length field in the
record's or a backup block's header is bogus.
Per report and analysis by Tom Lane.
M src/backend/access/transam/xlog.c
Fix typo in comment.
commit : 9b2a237cee800ca11fb0415cc5484a46a8c1770d
author : Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 22:56:17 -0400
committer: Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 22:56:17 -0400
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Remove obsolete comment.
commit : a91f885f11c561ae2a1209c7ebc52fadc85137fb
author : Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 15:25:43 -0400
committer: Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 15:25:43 -0400
M src/backend/optimizer/prep/prepjointree.c
Allow OLD and NEW in multi-row VALUES within rules.
commit : 092d7ded29f36b0539046b23b81b9f0bf2d637f1
author : Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 14:12:16 -0400
committer: Tom Lane <[email protected]>
date : Sun, 19 Aug 2012 14:12:16 -0400
Now that we have LATERAL, it's fairly painless to allow this case, which
was left as a TODO in the original multi-row VALUES implementation.
M src/backend/optimizer/path/allpaths.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_relation.c
M src/backend/utils/adt/ruleutils.c
M src/include/nodes/parsenodes.h
M src/include/parser/parse_relation.h
M src/test/regress/expected/rules.out
M src/test/regress/sql/rules.sql
Make use of LATERAL in information_schema.sequences view.
commit : c246eb5aafe66d5537b468d6da2116c462775faf
author : Tom Lane <[email protected]>
date : Sat, 18 Aug 2012 16:14:57 -0400
committer: Tom Lane <[email protected]>
date : Sat, 18 Aug 2012 16:14:57 -0400
It said "XXX: The following could be improved if we had LATERAL" ...
so let's do that.
No catversion bump since either version of the view works fine.
M src/backend/catalog/information_schema.sql
Another round of planner fixes for LATERAL.
commit : 084a29c94f94b5a08aec9f68f3cfaf252f4fa17c
author : Tom Lane <[email protected]>
date : Sat, 18 Aug 2012 14:10:17 -0400
committer: Tom Lane <[email protected]>
date : Sat, 18 Aug 2012 14:10:17 -0400
Formerly, subquery pullup had no need to examine other entries in the range
table, since they could not contain any references to the subquery being
pulled up. That's no longer true with LATERAL, so now we need to be able
to visit rangetable subexpressions to replace Vars referencing the
pulled-up subquery. Also, this means that extract_lateral_references must
be unsurprised at encountering lateral PlaceHolderVars, since such might be
created when pulling up a subquery that's underneath an outer join with
respect to the lateral reference.
M src/backend/optimizer/plan/initsplan.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/var.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Copy-editing for recent window-functions documentation rewrite.
commit : 18226849ea12c566fb2b3be505448e0ba289ea10
author : Tom Lane <[email protected]>
date : Fri, 17 Aug 2012 15:40:35 -0400
committer: Tom Lane <[email protected]>
date : Fri, 17 Aug 2012 15:40:35 -0400
Fix grammar, put back some removed information, rearrange for clarity.
M doc/src/sgml/syntax.sgml
Check LIBXML_VERSION instead of testing in configure script.
commit : 470d0b9789981bc91a8ef2654911d80ab6a6be57
author : Tom Lane <[email protected]>
date : Fri, 17 Aug 2012 00:05:26 -0400
committer: Tom Lane <[email protected]>
date : Fri, 17 Aug 2012 00:05:26 -0400
We had put a test for libxml2's xmlStructuredErrorContext variable in
configure, but of course that doesn't work on Windows builds. The next
best alternative seems to be to test the LIBXML_VERSION symbol provided
by xmlversion.h.
Per report from Talha Bin Rizwan, though this fixes it in a different way
than his proposed patch.
M configure
M configure.in
M src/backend/utils/adt/xml.c
M src/include/pg_config.h.in
Update 'int' protocol documentation mention to be "signed", per request from Dmitriy Igrishin
commit : 305557984dd964ac397c6752e9d0f14646b60f15
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 22:07:14 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 22:07:14 -0400
M doc/src/sgml/protocol.sgml
Delete inaccurate C comment about FSM and adding pages, per Robert Haas.
commit : 33259576563f74d6c34b2f9e3292a54c66e9fd47
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 19:02:58 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 19:02:58 -0400
M src/backend/access/heap/pruneheap.c
Add URL for include file visualization tool.
commit : 86d0d16f8ae4b5da4fd7330c09d5ddd7d88b62f4
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:52:08 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:52:08 -0400
M src/tools/pginclude/README
Document that tab completation can interfere with some SQL commands.
commit : 1037f2f646d7c018c8968336afe3584a8c6e654d
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:41:38 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:41:38 -0400
M doc/src/sgml/ref/psql-ref.sgml
Add warning about pg_ctl restart and the use of relative paths on the command-line.
commit : c99016f1d0ad122aaf9dca83b033277f97e55bd3
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:15:47 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 18:15:47 -0400
M doc/src/sgml/ref/pg_ctl-ref.sgml
Allow create_index_paths() to consider multiple join bitmapscan paths.
commit : f5983923d81d6327bdacf9d439a1536c4c8c4c15
author : Tom Lane <[email protected]>
date : Thu, 16 Aug 2012 13:03:54 -0400
committer: Tom Lane <[email protected]>
date : Thu, 16 Aug 2012 13:03:54 -0400
In the initial cut at the "parameterized paths" feature, I'd simplified
create_index_paths() to the point where it would only generate a single
parameterized bitmap path per relation. Experimentation with an example
supplied by Josh Berkus convinces me that that's not good enough: we really
need to consider a bitmap path for each possible outer relation. Otherwise
we have regressions relative to pre-9.2 versions, in which the planner
picks a plain indexscan where it should have used a bitmap scan in queries
involving three or more tables. Indeed, after fixing this, several queries
in the regression tests show improved plans as a result of using bitmap not
plain indexscans.
M src/backend/optimizer/path/indxpath.c
M src/test/regress/expected/join.out
Suppress possibly-uninitialized-variable warning.
commit : 56ba337e6fdff1e7ecb916f3037c666a30a98af0
author : Tom Lane <[email protected]>
date : Thu, 16 Aug 2012 12:03:37 -0400
committer: Tom Lane <[email protected]>
date : Thu, 16 Aug 2012 12:03:37 -0400
M src/backend/utils/adt/rangetypes_spgist.c
Add possible alternate tool for pgrminclude, from Peter Geoghegan
commit : c04b9c1f3df93746661925dc09fb68ce026520c4
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:56:00 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:56:00 -0400
M src/tools/pginclude/README
In docs, clarify that, without ORDER BY, the window frame is all rows in the partition.
commit : c6ce4c13229c64c01393c86be220b532a0244d87
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:32:22 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:32:22 -0400
M doc/src/sgml/syntax.sgml
Revert: In docs, change a few cases of "not important" to "unimportant".
commit : 5c1b2f5daa678b94861ab29ccc0252e4f2eb40ff
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:26:40 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 11:26:40 -0400
Per request from Heikki
M doc/src/sgml/advanced.sgml
M doc/src/sgml/ltree.sgml
M doc/src/sgml/syntax.sgml
M doc/src/sgml/tablefunc.sgml
Rewrite window function reference section to more clearly explain keywords and concepts, based on suggestions by Florian Pflug.
commit : d5816d11af6334e94132bc73939d7c12b3cff792
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 10:42:42 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 10:42:42 -0400
M doc/src/sgml/syntax.sgml
In docs, change a few cases of "not important" to "unimportant".
commit : 7c97f6a0cb1692180699694c287c2a5965d10683
author : Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 10:36:33 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 16 Aug 2012 10:36:33 -0400
M doc/src/sgml/advanced.sgml
M doc/src/sgml/ltree.sgml
M doc/src/sgml/syntax.sgml
M doc/src/sgml/tablefunc.sgml
Add SP-GiST support for range types.
commit : 317dd55a9cae160c8d121eaec323a6aea3259fd8
author : Heikki Linnakangas <[email protected]>
date : Thu, 16 Aug 2012 12:55:37 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 16 Aug 2012 12:55:37 +0300
The implementation is a quad-tree, largely copied from the quad-tree
implementation for points. The lower and upper bound of ranges are the 2d
coordinates, with some extra code to handle empty ranges.
I left out the support for adjacent operator, -|-, from the original patch.
Not because there was necessarily anything wrong with it, but it was more
complicated than the other operators, and I only have limited time for
reviewing. That will follow as a separate patch.
Alexander Korotkov, reviewed by Jeff Davis and me.
M src/backend/utils/adt/Makefile
M src/backend/utils/adt/rangetypes_gist.c
A src/backend/utils/adt/rangetypes_spgist.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_opclass.h
M src/include/catalog/pg_opfamily.h
M src/include/catalog/pg_proc.h
M src/include/utils/rangetypes.h
M src/test/regress/expected/opr_sanity.out
M src/test/regress/expected/rangetypes.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/output/misc.source
M src/test/regress/sql/rangetypes.sql
Fix GiST buffering build bug, which caused "failed to re-find parent" errors.
commit : 89911b3ab848915dd64d21ca3d3537470c93f89c
author : Heikki Linnakangas <[email protected]>
date : Thu, 16 Aug 2012 12:42:11 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 16 Aug 2012 12:42:11 +0300
We use a hash table to track the parents of inner pages, but when inserting
to a leaf page, the caller of gistbufferinginserttuples() must pass a
correct block number of the leaf's parent page. Before gistProcessItup()
descends to a child page, it checks if the downlink needs to be adjusted to
accommodate the new tuple, and updates the downlink if necessary. However,
updating the downlink might require splitting the page, which might move the
downlink to a page to the right. gistProcessItup() doesn't realize that, so
when it descends to the leaf page, it might pass an out-of-date parent block
number as a result. Fix that by returning the block a tuple was inserted to
from gistbufferinginserttuples().
This fixes the bug reported by Zdeněk Jílovec.
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistbuild.c
M src/include/access/gist_private.h
Fix SGML markup; missing tag.
commit : de3773d951bfc85d8860295248cf91db524a4ef8
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 23:57:19 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 23:57:19 -0400
M doc/src/sgml/ref/create_foreign_table.sgml
Document that PGDATA has to point to the configuration files, rather than the actual data storage directory.
commit : 077908aed726b0e1605ed27156d7ebcf93a64d5d
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 22:59:37 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 22:59:37 -0400
Per suggestion from Thom Brown
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/storage.sgml
Document that pg_ctl -w allows for the entry of an SSL passphase on startup.
commit : 6ff55ebe3dc790ebd80f9a26fa3d05867aee728e
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:52:12 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:52:12 -0400
Per report from Thom Brown
M doc/src/sgml/ref/pg_ctl-ref.sgml
Add CREATE FOREIGN TABLE doc reference to CREATE SERVER.
commit : 16d508ccbc6f228c8c38dffbe9d295ac449c809b
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:38:01 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:38:01 -0400
Per suggestion from Ray Stell
M doc/src/sgml/ref/create_foreign_table.sgml
Properly document that NEW is unassigned in plpgsql for DELETE (not NULL), and OLD is unassigned for INSERT, and NEW/OLD are unassigned (not NULL) for statement-level triggers.
commit : 0729271adf9145900f59ec7a2053695bd551f4b1
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:29:58 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 20:29:58 -0400
Per report from Pavel Stehule
M doc/src/sgml/plpgsql.sgml
Add C comment about new \c parameter requirement for crashed connections.
commit : d55f1b852d4fe87f2a4d16ea3f0ce11a7019a352
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:17:26 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:17:26 -0400
M src/bin/psql/command.c
Update C comment to NOTICE to reflect previous commit changing the error level, per report from Tom.
commit : 41fa3dfb0a266d424fa5d87962cf7a543fe421e2
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:09:37 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:09:37 -0400
M src/backend/access/transam/xact.c
In psql, if the is no connection object, e.g. due to a server crash, require all parameters for \c, rather than using the defaults, which might be wrong.
commit : fe21fcaf8d91a71c15ff25276f9fa81e0cd1dba9
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:04:52 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 19:04:52 -0400
M src/bin/psql/command.c
Fix rescan logic in nodeCtescan.
commit : 4c5316931f2ec6b47aa4b98e2c3ca704907aca24
author : Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 19:01:16 -0400
committer: Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 19:01:16 -0400
The previous coding essentially assumed that nodes would be rescanned in
the same order they were initialized in; or at least that the "leader" of
a group of CTEscans would be rescanned before any others were required to
execute. Unfortunately, that isn't even a little bit true. It's possible
to devise queries in which the leader isn't rescanned until other CTEscans
on the same CTE have run to completion, or even in which the leader never
gets a rescan call at all.
The fix makes the leader specially responsible only for initial creation
and final destruction of the tuplestore; rescan resets are now a
symmetrically shared responsibility. This means that we might reset the
tuplestore multiple times when restarting a plan subtree containing
multiple CTEscans; but resetting an already-empty tuplestore is cheap
enough that that doesn't seem like a problem.
Per report from Adam Mackler; the new regression test cases are based on
his example query.
Back-patch to 8.4 where CTE scans were introduced.
M src/backend/executor/nodeCtescan.c
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
On second thought, explain why date_trunc("week") on interval values is not supported in the error message, rather than the docs.
commit : 083b9133aa0e5e91d74ba46b530a74989223324d
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 16:48:05 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 16:48:05 -0400
M doc/src/sgml/func.sgml
M src/backend/utils/adt/timestamp.c
Document why you can't use date_trunc("week") on intervals.
commit : 74f4881d7cc9c69cb0e0b236f06d1ebf9859a737
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 16:03:58 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 16:03:58 -0400
M doc/src/sgml/func.sgml
Add C comment that '=' is not documented for plpgsql assignment.
commit : 1d9a6ae8555da4a7de0046c61264748602ff6086
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 12:00:56 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 12:00:56 -0400
M src/pl/plpgsql/src/gram.y
Document that foreign "version" and "type" values are only useful to certain foreign data wrappers.
commit : fc5f20057f8666107f37d0c97fd6614054e72edc
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 11:47:02 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 11:47:02 -0400
M doc/src/sgml/ref/create_server.sgml
Disallow extensions from owning the schema they are assigned to.
commit : 4d642b59417d5d4a62d126ca12a80da45d2a3fbf
author : Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 11:26:55 -0400
committer: Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 11:26:55 -0400
This situation creates a dependency loop that confuses pg_dump and probably
other things. Moreover, since the mental model is that the extension
"contains" schemas it owns, but "is contained in" its extschema (even
though neither is strictly true), having both true at once is confusing for
people too. So prevent the situation from being set up.
Reported and patched by Thom Brown. Back-patch to 9.1 where extensions
were added.
M src/backend/commands/extension.c
Properly escape usernames in initdb, so names with single-quotes are supported. Also add assert to catch future breakage.
commit : a973296598f2d1eec48138a2ce4f3e63410d9ed0
author : Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 11:23:04 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 15 Aug 2012 11:23:04 -0400
Also, improve documentation that "double"-quotes must be used in
pg_hba.conf (not single quotes).
M doc/src/sgml/client-auth.sgml
M src/backend/parser/scansup.c
M src/bin/initdb/initdb.c
Resurrect the "last ditch" code path in join_search_one_level().
commit : eb919e8fde4333d4a627d349a1460b07fc52dd3b
author : Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 00:07:15 -0400
committer: Tom Lane <[email protected]>
date : Wed, 15 Aug 2012 00:07:15 -0400
This essentially reverts commit e54b10a62db2991235fe800c629baef4531a6d67,
in which I'd decided that the "last ditch" join logic was useless. The
folly of that is now exposed by a report from Pavel Stehule: although the
function should always find at least one join in a self-contained join
problem, it can still fail to do so in a sub-problem created by artificial
from_collapse_limit or join_collapse_limit constraints. Adjust the
comments to describe this, and simplify the code a bit to match the new
coding of the earlier loop in the function.
I'm not terribly happy about this: I still subscribe to the opinion stated
in the previous commit message that the "last ditch" code can obscure logic
bugs elsewhere. But the alternative seems to be to complicate the earlier
tests for does-this-relation-have-a-join-clause to the point where they can
tell whether the join clauses link outside the current join sub-problem.
And that looks messy, slow, and possibly a source of bugs in itself.
In any case, now is not the time to be inserting experimental code into
9.2, so let's just go back to the time-tested solution.
M src/backend/optimizer/path/joinrels.c
Add more limited large object trigger example.
commit : 864de654c8271ab7f9fb8397fcc665ffed93645c
author : Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 23:25:20 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 23:25:20 -0400
M doc/src/sgml/lo.sgml
Add doc example of restricting large object trigger firing to only updates of the column of interest.
commit : 9e84cccff28e52ab76aa3d3e88bd815dc36d24d8
author : Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 23:21:13 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 23:21:13 -0400
M doc/src/sgml/lo.sgml
Update release notes for 9.1.5, 9.0.9, 8.4.13, 8.3.20.
commit : e45ae401811e4fe07d2fc6ca8e44e9e38e0b3ba2
author : Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:24:00 -0400
committer: Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:24:00 -0400
M doc/src/sgml/release-8.3.sgml
M doc/src/sgml/release-8.4.sgml
M doc/src/sgml/release-9.0.sgml
M doc/src/sgml/release-9.1.sgml
Prevent access to external files/URLs via contrib/xml2's xslt_process().
commit : adc97d03b92fef50608c21059f0509fa97d314f6
author : Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:28:29 -0400
committer: Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:28:29 -0400
libxslt offers the ability to read and write both files and URLs through
stylesheet commands, thus allowing unprivileged database users to both read
and write data with the privileges of the database server. Disable that
through proper use of libxslt's security options.
Also, remove xslt_process()'s ability to fetch documents and stylesheets
from external files/URLs. While this was a documented "feature", it was
long regarded as a terrible idea. The fix for CVE-2012-3489 broke that
capability, and rather than expend effort on trying to fix it, we're just
going to summarily remove it.
While the ability to write as well as read makes this security hole
considerably worse than CVE-2012-3489, the problem is mitigated by the fact
that xslt_process() is not available unless contrib/xml2 is installed,
and the longstanding warnings about security risks from that should have
discouraged prudent DBAs from installing it in security-exposed databases.
Reported and fixed by Peter Eisentraut.
Security: CVE-2012-3488
M contrib/xml2/expected/xml2.out
M contrib/xml2/expected/xml2_1.out
M contrib/xml2/sql/xml2.sql
M contrib/xml2/xslt_proc.c
M doc/src/sgml/xml2.sgml
Prevent access to external files/URLs via XML entity references.
commit : 17351fce4e03f0e448f9332d4774b7d5615d1e48
author : Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:25:29 -0400
committer: Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 18:25:29 -0400
xml_parse() would attempt to fetch external files or URLs as needed to
resolve DTD and entity references in an XML value, thus allowing
unprivileged database users to attempt to fetch data with the privileges
of the database server. While the external data wouldn't get returned
directly to the user, portions of it could be exposed in error messages
if the data didn't parse as valid XML; and in any case the mere ability
to check existence of a file might be useful to an attacker.
The ideal solution to this would still allow fetching of references that
are listed in the host system's XML catalogs, so that documents can be
validated according to installed DTDs. However, doing that with the
available libxml2 APIs appears complex and error-prone, so we're not going
to risk it in a security patch that necessarily hasn't gotten wide review.
So this patch merely shuts off all access, causing any external fetch to
silently expand to an empty string. A future patch may improve this.
In HEAD and 9.2, also suppress warnings about undefined entities, which
would otherwise occur as a result of not loading referenced DTDs. Previous
branches don't show such warnings anyway, due to different error handling
arrangements.
Credit to Noah Misch for first reporting the problem, and for much work
towards a solution, though this simplistic approach was not his preference.
Also thanks to Daniel Veillard for consultation.
Security: CVE-2012-3489
M src/backend/utils/adt/xml.c
M src/test/regress/expected/xml.out
M src/test/regress/expected/xml_1.out
M src/test/regress/sql/xml.sql
Revert "commit_delay" change; just add comment that we don't have a microsecond specification.
commit : 03bda4535ee119d3dae7226faebed089925ace7e
author : Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 16:26:08 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 16:26:08 -0400
M src/backend/utils/misc/guc.c
Add pg_settings units display for "commit_delay" (ms).
commit : e74727440c4d3df443dbd3d0a2201751883316ce
author : Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 16:16:45 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 16:16:45 -0400
Also remove unnecessary units designation in postgresql.conf.sample.
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
In documentation, change "recommendable" to "recommended", per consultation with word definitions.
commit : 1d96cf94049d8df2197d040a395fb46926ea9f2a
author : Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 12:36:35 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 14 Aug 2012 12:36:35 -0400
Backpatch to 9.2.
M doc/src/sgml/charset.sgml
M doc/src/sgml/installation.sgml
M doc/src/sgml/manage-ag.sgml
M doc/src/sgml/passwordcheck.sgml
M doc/src/sgml/queries.sgml
Update time zone data files to tzdata release 2012e.
commit : 51fd748e5403e34efc83da5a6ff5b79122e40807
author : Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 10:54:24 -0400
committer: Tom Lane <[email protected]>
date : Tue, 14 Aug 2012 10:54:24 -0400
DST law changes in Morocco; Tokelau has relocated to the other side of
the International Date Line; and apparently Olson had Tokelau's GMT
offset wrong by an hour even before that.
There are also a large number of non-significant changes in this update.
Upstream took the opportunity to remove trailing whitespace, and the
SCCS-style version numbers on the individual files are gone too.
M src/timezone/data/africa
M src/timezone/data/antarctica
M src/timezone/data/asia
M src/timezone/data/australasia
M src/timezone/data/backward
M src/timezone/data/etcetera
M src/timezone/data/europe
M src/timezone/data/factory
M src/timezone/data/iso3166.tab
M src/timezone/data/leapseconds
M src/timezone/data/northamerica
M src/timezone/data/pacificnew
M src/timezone/data/solar87
M src/timezone/data/solar88
M src/timezone/data/solar89
M src/timezone/data/southamerica
M src/timezone/data/systemv
M src/timezone/data/yearistype.sh
M src/timezone/data/zone.tab
Add runtime checks for number of query parameters passed to libpq functions.
commit : f86e6ba40c9cc51c81fe1cf650b512ba5b19c86b
author : Heikki Linnakangas <[email protected]>
date : Mon, 13 Aug 2012 16:24:18 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 13 Aug 2012 16:24:18 +0300
The maximum number of parameters supported by the FE/BE protocol is 65535,
as it's transmitted as a 16-bit unsigned integer. However, the nParams
arguments to libpq functions are all of type 'int'. We can't change the
signature of libpq functions, but a simple bounds check is in order to make
it more clear what's going wrong if you try to pass more than 65535
parameters.
Per complaint from Jim Vanns.
M src/interfaces/libpq/fe-exec.c
More fixes for planner's handling of LATERAL.
commit : c1774d2c8193a322706f681dd984ac439d3a9dbb
author : Tom Lane <[email protected]>
date : Sun, 12 Aug 2012 16:01:26 -0400
committer: Tom Lane <[email protected]>
date : Sun, 12 Aug 2012 16:01:26 -0400
Re-allow subquery pullup for LATERAL subqueries, except when the subquery
is below an outer join and contains lateral references to relations outside
that outer join. If we pull up in such a case, we risk introducing lateral
cross-references into outer joins' ON quals, which is something the code is
entirely unprepared to cope with right now; and I'm not sure it'll ever be
worth coping with.
Support lateral refs in VALUES (this seems to be the only additional path
type that needs such support as a consequence of re-allowing subquery
pullup).
Put in a slightly hacky fix for joinpath.c's refusal to consider
parameterized join paths even when there cannot be any unparameterized
ones. This was causing "could not devise a query plan for the given query"
failures in queries involving more than two FROM items.
Put in an even more hacky fix for distribute_qual_to_rels() being unhappy
with join quals that contain references to rels outside their syntactic
scope; which is to say, disable that test altogether. Need to think about
how to preserve some sort of debugging cross-check here, while not
expending more cycles than befits a debugging cross-check.
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/joinpath.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/prepjointree.c
M src/backend/optimizer/util/pathnode.c
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/prep.h
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Fix some issues with LATERAL(SELECT UNION ALL SELECT).
commit : e76af54137c051cafcb1e39f68383a31d1d55ff6
author : Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 18:42:20 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 18:42:20 -0400
The LATERAL marking has to be propagated down to the UNION leaf queries
when we pull them up. Also, fix the formerly stubbed-off
set_append_rel_pathlist(). It does already have enough smarts to cope with
making a parameterized Append path at need; it just has to not assume that
there *must* be an unparameterized path.
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/prep/prepjointree.c
M src/test/regress/expected/join.out
M src/test/regress/sql/join.sql
Add link from COPY ref page to psql \copy.
commit : 83af58f6b5657840f5924332fccecca1e3556abe
author : Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 13:51:22 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 13:51:22 -0400
Jeff Janes
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/psql-ref.sgml
Fix dependencies generated during ALTER TABLE ADD CONSTRAINT USING INDEX.
commit : b53800355f9b3a4a4ee6e5e610accab77af8d1c3
author : Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 12:51:24 -0400
committer: Tom Lane <[email protected]>
date : Sat, 11 Aug 2012 12:51:24 -0400
This command generated new pg_depend entries linking the index to the
constraint and the constraint to the table, which match the entries made
when a unique or primary key constraint is built de novo. However, it did
not bother to get rid of the entries linking the index directly to the
table. We had considered the issue when the ADD CONSTRAINT USING INDEX
patch was written, and concluded that we didn't need to get rid of the
extra entries. But this is wrong: ALTER COLUMN TYPE wasn't expecting such
redundant dependencies to exist, as reported by Hubert Depesz Lubaczewski.
On reflection it seems rather likely to break other things as well, since
there are many bits of code that crawl pg_depend for one purpose or
another, and most of them are pretty naive about what relationships they're
expecting to find. Fortunately it's not that hard to get rid of the extra
dependency entries, so let's do that.
Back-patch to 9.1, where ALTER TABLE ADD CONSTRAINT USING INDEX was added.
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/include/catalog/index.h
Update overlooked comment.
commit : a67d6d9a78fc7ae84e37b8984f2ecbb40a587400
author : Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 17:36:54 -0400
committer: Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 17:36:54 -0400
M src/backend/postmaster/postmaster.c
Support having multiple Unix-domain sockets per postmaster.
commit : c9b0cbe98bd783e24a8c4d8d8ac472a494b81292
author : Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 17:26:44 -0400
committer: Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 17:26:44 -0400
Replace unix_socket_directory with unix_socket_directories, which is a list
of socket directories, and adjust postmaster's code to allow zero or more
Unix-domain sockets to be created.
This is mostly a straightforward change, but since the Unix sockets ought
to be created after the TCP/IP sockets for safety reasons (better chance
of detecting a port number conflict), AddToDataDirLockFile needs to be
fixed to support out-of-order updates of data directory lockfile lines.
That's a change that had been foreseen to be necessary someday anyway.
Honza Horak, reviewed and revised by Tom Lane
M doc/src/sgml/client-auth.sgml
M doc/src/sgml/config.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/runtime.sgml
M src/backend/libpq/pqcomm.c
M src/backend/postmaster/postmaster.c
M src/backend/tcop/postgres.c
M src/backend/utils/adt/varlena.c
M src/backend/utils/init/miscinit.c
M src/backend/utils/misc/guc.c
M src/backend/utils/misc/postgresql.conf.sample
M src/bin/initdb/initdb.c
M src/bin/pg_ctl/pg_ctl.c
M src/include/libpq/libpq.h
M src/include/miscadmin.h
M src/include/postmaster/postmaster.h
M src/include/utils/builtins.h
Prevent pg_upgrade from crashing if it can't write to the current directory.
commit : 85642ec00b5e0c58d2504b10c079693b8fb28cc5
author : Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 17:14:48 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 17:14:48 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/util.c
Adjust pgtest coding to be less complex.
commit : 914b1301cc7b4c1ffba9f4c037e6e76f8e787e05
author : Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 16:46:02 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 16:46:02 -0400
M src/tools/pgtest
Fix pgtest to return proper error code based on 'make' return code.
commit : 99ed473acb47cb0cda47032e3d2392beca569d59
author : Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 14:10:34 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 10 Aug 2012 14:10:34 -0400
M src/tools/pgtest
Centralize the logic for detecting misplaced aggregates, window funcs, etc.
commit : eaccfded98a9c677d3a2e849c1747ec90e8596a6
author : Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 11:35:33 -0400
committer: Tom Lane <[email protected]>
date : Fri, 10 Aug 2012 11:35:33 -0400
Formerly we relied on checking after-the-fact to see if an expression
contained aggregates, window functions, or sub-selects when it shouldn't.
This is grotty, easily forgotten (indeed, we had forgotten to teach
DefineIndex about rejecting window functions), and none too efficient
since it requires extra traversals of the parse tree. To improve matters,
define an enum type that classifies all SQL sub-expressions, store it in
ParseState to show what kind of expression we are currently parsing, and
make transformAggregateCall, transformWindowFuncCall, and transformSubLink
check the expression type and throw error if the type indicates the
construct is disallowed. This allows removal of a large number of ad-hoc
checks scattered around the code base. The enum type is sufficiently
fine-grained that we can still produce error messages of at least the
same specificity as before.
Bringing these error checks together revealed that we'd been none too
consistent about phrasing of the error messages, so standardize the wording
a bit.
Also, rewrite checking of aggregate arguments so that it requires only one
traversal of the arguments, rather than up to three as before.
In passing, clean up some more comments left over from add_missing_from
support, and annotate some tests that I think are dead code now that that's
gone. (I didn't risk actually removing said dead code, though.)
M src/backend/catalog/heap.c
M src/backend/commands/functioncmds.c
M src/backend/commands/indexcmds.c
M src/backend/commands/prepare.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/backend/commands/typecmds.c
M src/backend/optimizer/util/clauses.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_node.c
M src/backend/parser/parse_target.c
M src/backend/parser/parse_utilcmd.c
M src/backend/rewrite/rewriteManip.c
M src/include/optimizer/var.h
M src/include/parser/parse_agg.h
M src/include/parser/parse_clause.h
M src/include/parser/parse_expr.h
M src/include/parser/parse_node.h
M src/include/parser/parse_target.h
M src/include/rewrite/rewriteManip.h
M src/test/regress/expected/aggregates.out
M src/test/regress/expected/join.out
M src/test/regress/expected/window.out
M src/test/regress/expected/with.out
M src/test/regress/sql/aggregates.sql
Fix upper limit of superuser_reserved_connections, add limit for wal_senders
commit : b3055ab4fb5839a872bfe354b2b5ac31e6903ed6
author : Magnus Hagander <[email protected]>
date : Fri, 10 Aug 2012 14:49:03 +0200
committer: Magnus Hagander <[email protected]>
date : Fri, 10 Aug 2012 14:49:03 +0200
Should be limited to the maximum number of connections excluding
autovacuum workers, not including.
Add similar check for max_wal_senders, which should never be higher than
max_connections.
M doc/src/sgml/config.sgml
M src/backend/postmaster/postmaster.c
Turn off WalSender keepalives by default, users can enable if desired
commit : da4efa13d801ccc179f1d2c24d8a60c4a2f8ede9
author : Simon Riggs <[email protected]>
date : Thu, 9 Aug 2012 17:07:03 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 9 Aug 2012 17:07:03 +0100
M src/backend/replication/walsender.c
M src/include/replication/walsender_private.h
Ensure all replication message info is available and correct via WalRcv
commit : 87d8bd7c9fdc63d892968e1248e639c8078af615
author : Simon Riggs <[email protected]>
date : Thu, 9 Aug 2012 17:03:59 +0100
committer: Simon Riggs <[email protected]>
date : Thu, 9 Aug 2012 17:03:59 +0100
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/include/replication/walreceiver.h
Make psql -1 < file behave as expected.
commit : be690e291d59e8d0c9f4df59abe09f1ff6cc0da9
author : Robert Haas <[email protected]>
date : Thu, 9 Aug 2012 09:59:45 -0400
committer: Robert Haas <[email protected]>
date : Thu, 9 Aug 2012 09:59:45 -0400
Previously, the -1 option was silently ignored.
Also, emit an error if -1 is used in a context where it won't be
respected, to avoid user confusion.
Original patch by Fabien COELHO, but this version is quite different
from the original submission.
M doc/src/sgml/ref/psql-ref.sgml
M src/bin/psql/command.c
M src/bin/psql/help.c
M src/bin/psql/startup.c
Fix typo in comment
commit : 92ec0370eb65c4f059f2b60ee6e458b312bb7cbf
author : Alvaro Herrera <[email protected]>
date : Wed, 8 Aug 2012 17:34:20 -0400
committer: Alvaro Herrera <[email protected]>
date : Wed, 8 Aug 2012 17:34:20 -0400
M src/backend/commands/tablecmds.c
Doc correction to point out that 9.2+ can overwrite pg_xlog files.
commit : 42020a89c740846870f9e42274e8730f1986edd3
author : Simon Riggs <[email protected]>
date : Wed, 8 Aug 2012 22:34:46 +0100
committer: Simon Riggs <[email protected]>
date : Wed, 8 Aug 2012 22:34:46 +0100
Noted by Noah Misch, patch by Fujii Masao
M doc/src/sgml/backup.sgml
Merge parser's p_relnamespace and p_varnamespace lists into a single list.
commit : f630157496a70f8ece4fd4c27eeead88c74b9015
author : Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 16:41:04 -0400
committer: Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 16:41:04 -0400
Now that we are storing structs in these lists, the distinction between
the two lists can be represented with a couple of extra flags while using
only a single list. This simplifies the code and should save a little
bit of palloc traffic, since the majority of RTEs are represented in both
lists anyway.
M src/backend/parser/analyze.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/include/parser/parse_node.h
Fix minor bug in XLogFileRead() that accidentally worked. Cascading replication copied the incoming file into pg_xlog but didn't set path correctly, so the first attempt to open file failed causing it to loop around and look for file in pg_xlog. So the earlier coding worked, but accidentally rather than by design.
commit : 8143a56854a4f46968b12badb5b008f448e08ef5
author : Simon Riggs <[email protected]>
date : Wed, 8 Aug 2012 21:25:23 +0100
committer: Simon Riggs <[email protected]>
date : Wed, 8 Aug 2012 21:25:23 +0100
Spotted by Fujii Masao, fix by Fujii Masao and Simon Riggs
M src/backend/access/transam/xlog.c
Fix cache flush hazard in event trigger cache.
commit : 21786db81fca3fca0a17da3f58cc6590615e1580
author : Robert Haas <[email protected]>
date : Wed, 8 Aug 2012 16:38:37 -0400
committer: Robert Haas <[email protected]>
date : Wed, 8 Aug 2012 16:38:37 -0400
Bug spotted by Jeff Davis using -DCLOBBER_CACHE_ALWAYS.
M src/backend/utils/cache/evtcache.c
Add additional C comments for to_date/to_char() fixes.
commit : 2751740ab5c01b2ffc8afdb86b4c2c2bf37203e0
author : Bruce Momjian <[email protected]>
date : Wed, 8 Aug 2012 13:26:39 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 8 Aug 2012 13:26:39 -0400
M src/backend/utils/adt/formatting.c
Update isolation tests' README file.
commit : 633f2fbd8835b5a46959e2fda88003f45f7fdba0
author : Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 12:02:07 -0400
committer: Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 12:02:07 -0400
The directions explaining about running the prepared-transactions test
were not updated in commit ae55d9fbe3871a5e6309d9b91629f1b0ff2b8cba.
M src/test/isolation/README
Fix TwoPhaseGetDummyBackendId().
commit : db108349bf7fe7fe82e2ff32e42436cfbc4f37dc
author : Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 11:52:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 8 Aug 2012 11:52:02 -0400
This was broken in commit ed0b409d22346b1b027a4c2099ca66984d94b6dd,
which revised the GlobalTransactionData struct to not include the
associated PGPROC as its first member, but overlooked one place where
a cast was used in reliance on that equivalence.
The most effective way of fixing this seems to be to create a new function
that looks up the GlobalTransactionData struct given the XID, and make
both TwoPhaseGetDummyBackendId and TwoPhaseGetDummyProc rely on that.
Per report from Robert Ross.
M src/backend/access/transam/twophase.c
Implement SQL-standard LATERAL subqueries.
commit : 5ebaaa49445eb1ba7b299bbea3a477d4e4c0430b
author : Tom Lane <[email protected]>
date : Tue, 7 Aug 2012 19:02:54 -0400
committer: Tom Lane <[email protected]>
date : Tue, 7 Aug 2012 19:02:54 -0400
This patch implements the standard syntax of LATERAL attached to a
sub-SELECT in FROM, and also allows LATERAL attached to a function in FROM,
since set-returning function calls are expected to be one of the principal
use-cases.
The main change here is a rewrite of the mechanism for keeping track of
which relations are visible for column references while the FROM clause is
being scanned. The parser "namespace" lists are no longer lists of bare
RTEs, but are lists of ParseNamespaceItem structs, which carry an RTE
pointer as well as some visibility-controlling flags. Aside from
supporting LATERAL correctly, this lets us get rid of the ancient hacks
that required rechecking subqueries and JOIN/ON and function-in-FROM
expressions for invalid references after they were initially parsed.
Invalid column references are now always correctly detected on sight.
In passing, remove assorted parser error checks that are now dead code by
virtue of our having gotten rid of add_missing_from, as well as some
comments that are obsolete for the same reason. (It was mainly
add_missing_from that caused so much fudging here in the first place.)
The planner support for this feature is very minimal, and will be improved
in future patches. It works well enough for testing purposes, though.
catversion bump forced due to new field in RangeTblEntry.
M doc/src/sgml/keywords.sgml
M doc/src/sgml/queries.sgml
M doc/src/sgml/ref/select.sgml
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/geqo/geqo_eval.c
M src/backend/optimizer/path/allpaths.c
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/path/joinpath.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/plan/subselect.c
M src/backend/optimizer/prep/prepjointree.c
M src/backend/optimizer/util/pathnode.c
M src/backend/optimizer/util/var.c
M src/backend/parser/analyze.c
M src/backend/parser/gram.y
M src/backend/parser/parse_agg.c
M src/backend/parser/parse_clause.c
M src/backend/parser/parse_expr.c
M src/backend/parser/parse_relation.c
M src/backend/parser/parse_target.c
M src/backend/utils/adt/ruleutils.c
M src/include/catalog/catversion.h
M src/include/nodes/parsenodes.h
M src/include/nodes/relation.h
M src/include/optimizer/cost.h
M src/include/optimizer/pathnode.h
M src/include/optimizer/var.h
M src/include/parser/kwlist.h
M src/include/parser/parse_node.h
M src/include/parser/parse_relation.h
M src/interfaces/ecpg/preproc/ecpg.addons
M src/test/regress/expected/join.out
M src/test/regress/expected/rangefuncs.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/union.out
M src/test/regress/sql/join.sql
Tweak new Perl pgindent for compatibility with middle-aged Perls.
commit : 5078be480412790e4f1b2aeda04f8c65fc7a3b93
author : Tom Lane <[email protected]>
date : Tue, 7 Aug 2012 17:52:53 -0400
committer: Tom Lane <[email protected]>
date : Tue, 7 Aug 2012 17:52:53 -0400
We seem to have a rough policy that our Perl scripts should work with
Perl 5.8, so make this one do so. Main change is to not use the newfangled
\h character class in regexes; "[ \t]" is a serviceable replacement.
M src/tools/pgindent/pgindent
Fix memory leaks in event trigger code.
commit : eea65943c605215456d0f55f65e1ec802f5e221e
author : Robert Haas <[email protected]>
date : Tue, 7 Aug 2012 16:59:42 -0400
committer: Robert Haas <[email protected]>
date : Tue, 7 Aug 2012 16:59:42 -0400
Spotted by Jeff Davis.
M src/backend/utils/cache/evtcache.c
Fix to_char(), to_date(), and to_timestamp() to handle negative/BC century specifications just like positive/AD centuries. Previously the behavior was either wrong or inconsistent with positive/AD handling.
commit : ac78c4178bec7b252d22a39515ad6efd6c1a7d7e
author : Bruce Momjian <[email protected]>
date : Tue, 7 Aug 2012 13:34:44 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 7 Aug 2012 13:34:44 -0400
Centuries without years now always assume the first year of the century,
which is now documented.
M doc/src/sgml/func.sgml
M src/backend/utils/adt/formatting.c
M src/test/regress/expected/timestamp.out
M src/test/regress/expected/timestamptz.out
Fix pg_upgrade file share violation on Windows created by the commit 4741e9afb93f0d769655b2d18c2b73b86f281010. This was done by adding an optional second log file parameter to exec_prog(), and closing and reopening the log file between system() calls.
commit : fbcfa90bb8ceb77f7763b6ae16bcbb777849ccee
author : Bruce Momjian <[email protected]>
date : Tue, 7 Aug 2012 13:10:44 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 7 Aug 2012 13:10:44 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/check.c
M contrib/pg_upgrade/dump.c
M contrib/pg_upgrade/exec.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/server.c
Fix redundant wording
commit : 3a42a3ffd898114e6e19dafe0911b23921b288f4
author : Alvaro Herrera <[email protected]>
date : Tue, 7 Aug 2012 11:02:53 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 7 Aug 2012 11:02:53 -0400
M src/backend/utils/adt/misc.c
fsync backup_label after pg_start_backup()
commit : 0f04fc67f71f7cb29ccedb2e7ddf443b9e52b958
author : Simon Riggs <[email protected]>
date : Tue, 7 Aug 2012 16:19:13 +0100
committer: Simon Riggs <[email protected]>
date : Tue, 7 Aug 2012 16:19:13 +0100
Dave Kerr
M src/backend/access/transam/xlog.c
Typo fixes for previous commit.
commit : b112df8421abce1c61bcfd385490050604a6d4e3
author : Robert Haas <[email protected]>
date : Mon, 6 Aug 2012 16:12:17 -0400
committer: Robert Haas <[email protected]>
date : Mon, 6 Aug 2012 16:12:17 -0400
Noted by Thom Brown.
M doc/src/sgml/datatype.sgml
Warn more vigorously about the non-transactional behavior of sequences.
commit : 95282d3522f4a35fc0aa6b77110bae1e0d8d207f
author : Robert Haas <[email protected]>
date : Mon, 6 Aug 2012 15:18:00 -0400
committer: Robert Haas <[email protected]>
date : Mon, 6 Aug 2012 15:18:00 -0400
Craig Ringer, edited fairly heavily by me
M doc/src/sgml/datatype.sgml
M doc/src/sgml/func.sgml
Make strings identical
commit : f5f8e7169fca16ffa5d88c41402a408dde1cbdcc
author : Alvaro Herrera <[email protected]>
date : Mon, 6 Aug 2012 12:45:08 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 6 Aug 2012 12:45:08 -0400
M src/backend/utils/adt/rangetypes.c
Complain with proper error message if streaming stops prematurely
commit : 254316f5a240621ea417329bd26320c53e283020
author : Magnus Hagander <[email protected]>
date : Mon, 6 Aug 2012 13:53:46 +0200
committer: Magnus Hagander <[email protected]>
date : Mon, 6 Aug 2012 13:53:46 +0200
In particular, with a controlled shutdown of the master, pg_basebackup
with streaming log could terminate without an error message, even though
the backup is not consistent.
In passing, fix a few cases where walfile wasn't properly set to -1 after
closing.
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
Perform conversion from Python unicode to string/bytes object via UTF-8.
commit : 3ff15883b1b4bcefb2278313a3137a688ebda505
author : Heikki Linnakangas <[email protected]>
date : Mon, 6 Aug 2012 13:02:15 +0300
committer: Heikki Linnakangas <[email protected]>
date : Mon, 6 Aug 2012 13:02:15 +0300
We used to convert the unicode object directly to a string in the server
encoding by calling Python's PyUnicode_AsEncodedString function. In other
words, we used Python's routines to do the encoding. However, that has a
few problems. First of all, it required keeping a mapping table of Python
encoding names and PostgreSQL encodings. But the real killer was that Python
doesn't support EUC_TW and MULE_INTERNAL encodings at all.
Instead, convert the Python unicode object to UTF-8, and use PostgreSQL's
encoding conversion functions to convert from UTF-8 to server encoding. We
were already doing the same in the other direction in PLyUnicode_FromString,
so this is more consistent, too.
Note: This makes SQL_ASCII to behave more leniently. We used to map
SQL_ASCII to Python's 'ascii', which on Python means strict 7-bit ASCII
only, so you got an error if the python string contained anything but pure
ASCII. You no longer get an error; you get the UTF-8 representation of the
string instead.
Backpatch to 9.0, where these conversions were introduced.
Jan Urbański
D src/pl/plpython/expected/plpython_unicode_3.out
M src/pl/plpython/plpy_util.c
Replace pgindent shell script with Perl script. Update perltidy instructions to perltidy Perl files that lack Perl file extensions.
commit : 149ac7d45595f64f7b60833de7f146bc9a599656
author : Bruce Momjian <[email protected]>
date : Sat, 4 Aug 2012 12:41:21 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 Aug 2012 12:41:21 -0400
pgindent Perl coding by Andrew Dunstan, restructured by me.
M src/tools/pgindent/README
M src/tools/pgindent/pgindent
A src/tools/pgindent/pgindent.man
Reword documentation for concurrent index rebuilds to be clearer.
commit : 4639432597d14f6cb29919eec3f9b4708d152b70
author : Bruce Momjian <[email protected]>
date : Sat, 4 Aug 2012 10:35:37 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 4 Aug 2012 10:35:37 -0400
Backpatch to 9.1 and 9.2.
M doc/src/sgml/ref/create_index.sgml
Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input.
commit : 3152bf722fe334b70281256dbb74d9cb1e3643e1
author : Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 17:39:39 -0400
committer: Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 17:39:39 -0400
DecodeInterval() failed to honor the "range" parameter (the special SQL
syntax for indicating which fields appear in the literal string) if the
time was signed. This seems inappropriate, so make it work like the
not-signed case. The inconsistency was introduced in my commit
f867339c0148381eb1d01f93ab5c79f9d10211de, which as noted in its log message
was only really focused on making SQL-compliant literals work per spec.
Including a sign here is not per spec, but if we're going to allow it
then it's reasonable to expect it to work like the not-signed case.
Also, remove bogus setting of tmask, which caused subsequent processing to
think that what had been given was a timezone and not an hh:mm(:ss) field,
thus confusing checks for redundant fields. This seems to be an aboriginal
mistake in Lockhart's commit 2cf1642461536d0d8f3a1cf124ead0eac04eb760.
Add regression test cases to illustrate the changed behaviors.
Back-patch as far as 8.4, where support for spec-compliant interval
literals was added.
Range problem reported and diagnosed by Amit Kapila, tmask problem by me.
M src/backend/utils/adt/datetime.c
M src/test/regress/expected/interval.out
M src/test/regress/sql/interval.sql
Add link to synchronous_commit variables in high availability docs.
commit : 95e750520c47416554765a508b280f96802ff54f
author : Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 16:33:10 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 16:33:10 -0400
Backpatch to 9.2
Erik Rijkers
M doc/src/sgml/high-availability.sgml
Improve underdocumented btree_xlog_delete_get_latestRemovedXid() code.
commit : f786e91a75b2f64527dcf321e754b6448fcad7fe
author : Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 15:41:18 -0400
committer: Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 15:41:18 -0400
As noted by Noah Misch, btree_xlog_delete_get_latestRemovedXid is
critically dependent on the assumption that it's examining a consistent
state of the database. This was undocumented though, so the
seemingly-unrelated check for no active HS sessions might be thought to be
merely an optional optimization. Improve comments, and add an explicit
check of reachedConsistency just to be sure.
This function returns InvalidTransactionId (thereby killing all HS
transactions) in several cases that are not nearly unlikely enough for my
taste. This commit doesn't attempt to fix those deficiencies, just
document them.
Back-patch to 9.2, not from any real functional need but just to keep the
branches more closely synced to simplify possible future back-patching.
M src/backend/access/nbtree/nbtxlog.c
In SPGiST replay, do conflict resolution before modifying the page.
commit : c1793f2e0ce4ee5c713f27d0bdacc7d99b9103ac
author : Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 15:22:41 -0400
committer: Tom Lane <[email protected]>
date : Fri, 3 Aug 2012 15:22:41 -0400
In yesterday's commit 962e0cc71e839c58fb9125fa85511b8bbb8bdbee, I added the
ResolveRecoveryConflictWithSnapshot call in the wrong place. I correctly
put it before spgRedoVacuumRedirect itself would modify the index page ---
but not before RestoreBkpBlocks, so replay of a record with a full-page
image would modify the page before kicking off any conflicting HS
transactions. Oops.
M src/backend/access/spgist/spgxlog.c
Document that trying to exceed temp_file_limit causes a query cancel.
commit : 9fb5952cdf8870b430456b0674d64d6df622ee7c
author : Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 15:15:27 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 15:15:27 -0400
Backpatch to 9.2.
M doc/src/sgml/config.sgml
Document that, for psql -c, only the result of the last command is returned, per report from Aleksey Tsalolikhin
commit : 7b8c798362a4141904f690375ede8a5bb9138623
author : Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 14:02:22 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 14:02:22 -0400
Backpatch to 9.2 and 9.1.
M doc/src/sgml/ref/psql-ref.sgml
In pg_upgrade, use pg_log() instead of prep_status() for newline-terminated messages, per suggestion from Tom.
commit : e8969c4733b15857d6af2ec024a102897bfbfbf2
author : Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 12:43:37 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 3 Aug 2012 12:43:37 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/relfilenode.c
M contrib/pg_upgrade/util.c
Fix race conditions associated with SPGiST redirection tuples.
commit : 962e0cc71e839c58fb9125fa85511b8bbb8bdbee
author : Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 15:34:14 -0400
committer: Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 15:34:14 -0400
The correct test for whether a redirection tuple is removable is whether
tuple's xid < RecentGlobalXmin, not OldestXmin; the previous coding
failed to protect index searches being done in concurrent transactions that
have no XID. This mirrors the recent fix in btree's page recycling logic
made in commit d3abbbebe52eb1e59e621c880ad57df9d40d13f2.
Also, WAL-log the newest XID of any removed redirection tuple on an index
page, and apply ResolveRecoveryConflictWithSnapshot during InHotStandby WAL
replay. This protects against concurrent Hot Standby transactions possibly
needing to see the redirection tuple(s).
Per my query of 2012-03-12 and subsequent discussion.
M src/backend/access/spgist/spgutils.c
M src/backend/access/spgist/spgvacuum.c
M src/backend/access/spgist/spgxlog.c
M src/include/access/spgist_private.h
Update release notes for libpq feature change.
commit : 7719ed04bc4b8f08dab85ffe9c79a52fdb4756dd
author : Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 13:21:19 -0400
committer: Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 13:21:19 -0400
M doc/src/sgml/release-9.2.sgml
Replace libpq's "row processor" API with a "single row" mode.
commit : 41b9c8452b9df3a431dffc346890f926d17d47ad
author : Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 13:10:30 -0400
committer: Tom Lane <[email protected]>
date : Thu, 2 Aug 2012 13:10:30 -0400
After taking awhile to digest the row-processor feature that was added to
libpq in commit 92785dac2ee7026948962cd61c4cd84a2d052772, we've concluded
it is over-complicated and too hard to use. Leave the core infrastructure
changes in place (that is, there's still a row processor function inside
libpq), but remove the exposed API pieces, and instead provide a "single
row" mode switch that causes PQgetResult to return one row at a time in
separate PGresult objects.
This approach incurs more overhead than proper use of a row processor
callback would, since construction of a PGresult per row adds extra cycles.
However, it is far easier to use and harder to break. The single-row mode
still affords applications the primary benefit that the row processor API
was meant to provide, namely not having to accumulate large result sets in
memory before processing them. Preliminary testing suggests that we can
probably buy back most of the extra cycles by micro-optimizing construction
of the extra results, but that task will be left for another day.
Marko Kreen
M contrib/dblink/dblink.c
M doc/src/sgml/libpq.sgml
M src/interfaces/libpq/exports.txt
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/fe-exec.c
M src/interfaces/libpq/fe-lobj.c
M src/interfaces/libpq/fe-protocol2.c
M src/interfaces/libpq/fe-protocol3.c
M src/interfaces/libpq/libpq-fe.h
M src/interfaces/libpq/libpq-int.h
Add documentation cross-reference for JSON functions.
commit : 7c0fecdaefb10212d65652607833a4c8061e64e9
author : Tom Lane <[email protected]>
date : Wed, 1 Aug 2012 00:41:41 -0400
committer: Tom Lane <[email protected]>
date : Wed, 1 Aug 2012 00:41:41 -0400
Thom Brown
M doc/src/sgml/datatype.sgml
Fix WITH attached to a nested set operation (UNION/INTERSECT/EXCEPT).
commit : f6ce81f55a3c6932d5f88bc89374f404688f054e
author : Tom Lane <[email protected]>
date : Tue, 31 Jul 2012 17:56:21 -0400
committer: Tom Lane <[email protected]>
date : Tue, 31 Jul 2012 17:56:21 -0400
Parse analysis neglected to cover the case of a WITH clause attached to an
intermediate-level set operation; it only handled WITH at the top level
or WITH attached to a leaf-level SELECT. Per report from Adam Mackler.
In HEAD, I rearranged the order of SelectStmt's fields to put withClause
with the other fields that can appear on non-leaf SelectStmts. In back
branches, leave it alone to avoid a possible ABI break for third-party
code.
Back-patch to 8.4 where WITH support was added.
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/nodeFuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/analyze.c
M src/backend/parser/parse_cte.c
M src/backend/parser/parse_type.c
M src/include/nodes/parsenodes.h
M src/test/regress/expected/with.out
M src/test/regress/sql/with.sql
Fix syslogger so that log_truncate_on_rotation works in the first rotation.
commit : b76356ac22d8322e6074981b4d34ee19cd0dbc8a
author : Tom Lane <[email protected]>
date : Tue, 31 Jul 2012 14:36:54 -0400
committer: Tom Lane <[email protected]>
date : Tue, 31 Jul 2012 14:36:54 -0400
In the original coding of the log rotation stuff, we did not bother to make
the truncation logic work for the very first rotation after postmaster
start (or after a syslogger crash and restart). It just always appended
in that case. It did not seem terribly important at the time, but we've
recently had two separate complaints from people who expected it to work
unsurprisingly. (Both users tend to restart the postmaster about as often
as a log rotation is configured to happen, which is maybe not typical use,
but still...) Since the initial log file is opened in the postmaster,
fixing this requires passing down some more state to the syslogger child
process.
It's always been like this, so back-patch to all supported branches.
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
pg_basebackup: stylistic adjustments
commit : 2f29f011c82310235c8dfb25f7e648601276a802
author : Alvaro Herrera <[email protected]>
date : Tue, 31 Jul 2012 10:11:11 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 31 Jul 2012 10:11:11 -0400
The most user-visible part of this is to change the long options
--statusint and --noloop to --status-interval and --no-loop,
respectively, per discussion.
Also, consistently enclose file names in double quotes, per our
conventions; and consistently use the term "transaction log file" to
talk about WAL segments. (Someday we may need to go over this
terminology and make it consistent across the whole source code.)
Finally, reflow the code to better fit in 80 columns, and have pgindent
fix it up some more.
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
Now that the diskchecker.pl author has updated the download link on his website, revert the separate link to the download git repository.
commit : 04d2956f0df0d95da3dd2d202b9482d24822cc71
author : Bruce Momjian <[email protected]>
date : Mon, 30 Jul 2012 10:15:57 -0400
committer: Bruce Momjian <[email protected]>
date : Mon, 30 Jul 2012 10:15:57 -0400
Backpatch from 9.0 to current.
M doc/src/sgml/wal.sgml
Improve reporting of error situations in find_other_exec().
commit : 9ae8ebe0b221d9d547adfbfae74bd62e73e39fcd
author : Tom Lane <[email protected]>
date : Fri, 27 Jul 2012 19:31:13 -0400
committer: Tom Lane <[email protected]>
date : Fri, 27 Jul 2012 19:31:13 -0400
This function suppressed any stderr output from the called program, which
is unnecessary in the normal case and unhelpful in error cases. It also
gave a rather opaque message along the lines of "fgets failure: Success"
in case the called program failed to return anything on stdout. Since
we've seen multiple reports of people not understanding what's wrong when
pg_ctl reports this, improve the message.
Back-patch to all active branches.
M src/port/exec.c
Update doc mention of diskchecker.pl to add URL for script; retain URL for description.
commit : c9a2532c832cdc87dfa62bfdfd247707e3906e00
author : Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 21:25:26 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 21:25:26 -0400
Patch to 9.0 and later, where script is mentioned.
M doc/src/sgml/wal.sgml
Document that the pg_upgrade user of rsync might want to skip some files, like postmaster.pid.
commit : 69451b09686e591468e6b7b959544974b724cbe8
author : Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 14:30:07 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 14:30:07 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Only allow autovacuum to be auto-canceled by a directly blocked process.
commit : 26b438694cc4461f41f2acf54db6bb3d9c1ea940
author : Tom Lane <[email protected]>
date : Thu, 26 Jul 2012 14:29:22 -0400
committer: Tom Lane <[email protected]>
date : Thu, 26 Jul 2012 14:29:22 -0400
In the original coding of the autovacuum cancel feature, commit
acac68b2bcae818bc8803b8cb8cbb17eee8d5e2b, an autovacuum process was
considered a target for cancellation if it was found to hard-block any
process examined in the deadlock search. This patch tightens the test so
that the autovacuum must directly hard-block the current process. This
should make the behavior more predictable in general, and in particular
it ensures that an autovacuum will not be canceled with less than
deadlock_timeout grace period. In the old coding, it was possible for an
autovacuum to be canceled almost instantly, given unfortunate timing of two
or more other processes' lock attempts.
This also justifies the logging methodology in the recent commit
d7318d43d891bd63e82dcfc27948113ed7b1db80; without this restriction, that
patch isn't providing enough information to see the connection of the
canceling process to the autovacuum. Like that one, patch all the way
back.
M src/backend/storage/lmgr/deadlock.c
Tab complete table names after ALTER TABLE x [NO] INHERIT.
commit : d20cdd31c0f0cd2d94ecb6a5dff4d1f183106541
author : Robert Haas <[email protected]>
date : Thu, 26 Jul 2012 10:16:55 -0400
committer: Robert Haas <[email protected]>
date : Thu, 26 Jul 2012 10:16:55 -0400
Jeff Janes
M src/bin/psql/tab-complete.c
Log a better message when canceling autovacuum.
commit : d7318d43d891bd63e82dcfc27948113ed7b1db80
author : Robert Haas <[email protected]>
date : Thu, 26 Jul 2012 09:18:32 -0400
committer: Robert Haas <[email protected]>
date : Thu, 26 Jul 2012 09:18:32 -0400
The old message was at DEBUG2, so typically it didn't show up in the
log at all. As a result, in most cases where autovacuum was canceled,
the only information that was logged was the table being vacuumed,
with no indication as to what problem caused the cancel. Crank up
the level to LOG and add some more details to assist with debugging.
Back-patch all the way, per discussion on pgsql-hackers.
M src/backend/storage/lmgr/proc.c
Simplify pg_upgrade's handling when returning directory listings.
commit : 4da8fc05f0a7a8b08d7ba43658bd952a54376611
author : Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 06:22:06 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 26 Jul 2012 06:22:06 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Fix longstanding crash-safety bug with newly-created-or-reset sequences.
commit : af026b5d9b8ae6ef4c75a796bdac209df6411181
author : Tom Lane <[email protected]>
date : Wed, 25 Jul 2012 17:40:36 -0400
committer: Tom Lane <[email protected]>
date : Wed, 25 Jul 2012 17:40:36 -0400
If a crash occurred immediately after the first nextval() call for a serial
column, WAL replay would restore the sequence to a state in which it
appeared that no nextval() had been done, thus allowing the first sequence
value to be returned again by the next nextval() call; as reported in
bug #6748 from Xiangming Mei.
More generally, the problem would occur if an ALTER SEQUENCE was executed
on a freshly created or reset sequence. (The manifestation with serial
columns was introduced in 8.2 when we added an ALTER SEQUENCE OWNED BY step
to serial column creation.) The cause is that sequence creation attempted
to save one WAL entry by writing out a WAL record that made it appear that
the first nextval() had already happened (viz, with is_called = true),
while marking the sequence's in-database state with log_cnt = 1 to show
that the first nextval() need not emit a WAL record. However, ALTER
SEQUENCE would emit a new WAL entry reflecting the actual in-database state
(with is_called = false). Then, nextval would allocate the first sequence
value and set is_called = true, but it would trust the log_cnt value and
not emit any WAL record. A crash at this point would thus restore the
sequence to its post-ALTER state, causing the next nextval() call to return
the first sequence value again.
To fix, get rid of the idea of logging an is_called status different from
reality. This means that the first nextval-driven WAL record will happen
at the first nextval call not the second, but the marginal cost of that is
pretty negligible. In addition, make sure that ALTER SEQUENCE resets
log_cnt to zero in any case where it touches sequence parameters that
affect future nextval results. This will result in some user-visible
changes in the contents of a sequence's log_cnt column, as reflected in the
patch's regression test changes; but no application should be depending on
that anyway, since it was already true that log_cnt changes rather
unpredictably depending on checkpoint timing.
In addition, make some basically-cosmetic improvements to get rid of
sequence.c's undesirable intimacy with page layout details. It was always
really trying to WAL-log the contents of the sequence tuple, so we should
have it do that directly using a HeapTuple's t_data and t_len, rather than
backing into it with some magic assumptions about where the tuple would be
on the sequence's page.
Back-patch to all supported branches.
M src/backend/commands/sequence.c
M src/test/regress/expected/sequence.out
M src/test/regress/expected/sequence_1.out
Document that pg_basebackup will create its output directory
commit : 08d715a2d48909cb5e42359e15f89927957ee3c8
author : Peter Eisentraut <[email protected]>
date : Wed, 25 Jul 2012 22:00:00 +0300
committer: Peter Eisentraut <[email protected]>
date : Wed, 25 Jul 2012 22:00:00 +0300
M doc/src/sgml/ref/pg_basebackup.sgml
Add translator comments to module names
commit : 58f17dcf83dbd684613cbe8fea0886d2f81a3a14
author : Alvaro Herrera <[email protected]>
date : Wed, 25 Jul 2012 00:02:49 -0400
committer: Alvaro Herrera <[email protected]>
date : Wed, 25 Jul 2012 00:02:49 -0400
M src/bin/pg_dump/compress_io.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_custom.c
M src/bin/pg_dump/pg_backup_db.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_backup_tar.c
M src/bin/pg_dump/pg_dump_sort.c
Change syntax of new CHECK NO INHERIT constraints
commit : d7b47e515530520da9564b05991bd8a8c6f52b06
author : Alvaro Herrera <[email protected]>
date : Tue, 24 Jul 2012 15:49:54 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 24 Jul 2012 15:49:54 -0400
The initially implemented syntax, "CHECK NO INHERIT (expr)" was not
deemed very good, so switch to "CHECK (expr) NO INHERIT" instead. This
way it looks similar to SQL-standards compliant constraint attribute.
Backport to 9.2 where the new syntax and feature was introduced.
Per discussion.
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/release-9.2.sgml
M src/backend/commands/typecmds.c
M src/backend/parser/gram.y
M src/backend/utils/adt/ruleutils.c
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/inherit.out
M src/test/regress/input/constraints.source
M src/test/regress/output/constraints.source
M src/test/regress/sql/alter_table.sql
M src/test/regress/sql/inherit.sql
Update information schema to SQL:2011
commit : d61d9aa7501f31f99ee089f8b014161254eafa89
author : Peter Eisentraut <[email protected]>
date : Mon, 23 Jul 2012 22:31:43 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 23 Jul 2012 22:31:43 +0300
This is just a section renumbering for now. Some details might be
filled in later.
M src/backend/catalog/information_schema.sql
Make pgbench vacuum before building indexes.
commit : 46b2b7e0ff06498d51ebf08871c73e5b5e0aa050
author : Robert Haas <[email protected]>
date : Mon, 23 Jul 2012 14:38:34 -0400
committer: Robert Haas <[email protected]>
date : Mon, 23 Jul 2012 14:38:34 -0400
This is apparently faster than doing things the other way around when
the scale factor is large.
Along the way, adjust -n to suppress vacuuming during initialization
as well as during test runs.
Jeff Janes, with some small changes by me.
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
Fix name collision between concurrent regression tests.
commit : b71258af5613e627bb2b3b1e1874abe5c0226dc4
author : Tom Lane <[email protected]>
date : Sun, 22 Jul 2012 00:01:19 -0400
committer: Tom Lane <[email protected]>
date : Sun, 22 Jul 2012 00:01:19 -0400
Commit f5bcd398addcbeb785f0513cf28cba5d1ecd2c8a introduced a test using
a table named "circles" in inherit.sql. Unfortunately, the concurrently
executed constraints test was already using that table name, so the
parallel regression tests would sometimes fail. Rename table to dodge
the problem. Per buildfarm.
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Improve copydir() code for the case that fsync is off.
commit : 2d46a57ddcad394e514bbefb193a4a03e766f163
author : Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 20:10:29 -0400
committer: Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 20:10:29 -0400
We should avoid calling sync_file_range or posix_fadvise in this case,
since (a) we don't really care if the data gets synced, and might as
well save the kernel calls; (b) at least on Linux we know that the
kernel might block us until it's scheduled the write.
Also, avoid making a useless second traversal of the directory tree
if we're not actually going to call fsync(2) after all.
M src/backend/storage/file/copydir.c
M src/backend/storage/file/fd.c
Use --nosync during make check's initdb call.
commit : 2c4f5b4bc5385b37d062451642abd384536eeeb3
author : Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 19:56:22 -0400
committer: Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 19:56:22 -0400
We left this out of commit b966dd6c4228d696b291c1cdcb5ab8c8475fefa8
so as to get some more buildfarm testing of the new fsync code in initdb.
But since no problems have turned up, it's probably time to save the
cycles.
M src/test/regress/pg_regress.c
Suppress volatile-related warning seen in some compilers.
commit : 1f115d98b984c80e635392aed10cc6185d1f8f4b
author : Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 19:39:03 -0400
committer: Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 19:39:03 -0400
Antique versions of gcc complain about vars that are initialized outside
PG_TRY and then modified within it. Rather than marking the var volatile,
expend one more line of code.
M src/pl/plpgsql/src/pl_handler.c
Account for SRFs in targetlists in planner rowcount estimates.
commit : 31c7c642b6419b43eff903285e3da65e3f1901d6
author : Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 17:45:07 -0400
committer: Tom Lane <[email protected]>
date : Sat, 21 Jul 2012 17:45:07 -0400
We made use of the ROWS estimate for set-returning functions used in FROM,
but not for those used in SELECT targetlists; which is a bit of an
oversight considering there are common usages that require the latter
approach. Improve that. (I had initially thought it might be worth
folding this into cost_qual_eval, but after investigation concluded that
that wouldn't be very helpful, so just do it separately.) Per complaint
from David Johnston.
Back-patch to 9.2, but not further, for fear of destabilizing plan choices
in existing releases.
M src/backend/optimizer/path/costsize.c
M src/backend/optimizer/plan/createplan.c
M src/backend/optimizer/plan/planagg.c
M src/backend/optimizer/plan/planner.c
M src/backend/optimizer/util/clauses.c
M src/include/optimizer/clauses.h
M src/include/optimizer/planner.h
Revert temporary patch to debug Windows breakage.
commit : ed0af3324702685cce63aed0641b4cbb45816b50
author : Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 22:31:19 -0400
committer: Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 22:31:19 -0400
This reverts commit 0a248208a038d7847ef98996c6b70209d782415c.
M src/pl/plpgsql/src/pl_comp.c
Repair plpgsql_validator breakage.
commit : 0635c0b524368862da08271fbca626faf44290a2
author : Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 21:25:26 -0400
committer: Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 21:25:26 -0400
Commit 3a0e4d36ebd7f477822d5bae41ba121a40d22ccc arranged to
reference stack-allocated variables after they were out of scope.
That's no good, so let's arrange to not do that after all.
M src/pl/plpgsql/src/pl_handler.c
Remove now unneeded results file for disabled prepared transactions case.
commit : a1e5705c9fa6a46d5f284101765085182d3eb600
author : Andrew Dunstan <[email protected]>
date : Fri, 20 Jul 2012 16:30:34 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 20 Jul 2012 16:30:34 -0400
D src/test/isolation/expected/prepared-transactions_1.out
Temporary patch to try to debug why event trigger patch broke Windows.
commit : 0a248208a038d7847ef98996c6b70209d782415c
author : Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 16:20:15 -0400
committer: Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 16:20:15 -0400
Apologies for the ugliness.
M src/pl/plpgsql/src/pl_comp.c
Remove prepared transactions from main isolation test schedule.
commit : ae55d9fbe3871a5e6309d9b91629f1b0ff2b8cba
author : Andrew Dunstan <[email protected]>
date : Fri, 20 Jul 2012 15:51:40 -0400
committer: Andrew Dunstan <[email protected]>
date : Fri, 20 Jul 2012 15:51:40 -0400
There is no point in running this test when prepared transactions are disabled,
which is the default. New make targets that include the test are provided. This
will save some useless waste of cycles on buildfarm machines.
Backpatch to 9.1 where these tests were introduced.
M src/test/isolation/Makefile
M src/test/isolation/isolation_schedule
pg_dump: Simplify mkdir() error checking
commit : 8ca03aa41488a9f08dffe64724eb04692174350c
author : Peter Eisentraut <[email protected]>
date : Fri, 20 Jul 2012 22:34:11 +0300
committer: Peter Eisentraut <[email protected]>
date : Fri, 20 Jul 2012 22:34:11 +0300
mkdir() can check for errors itself. We don't need to code that
ourselves again.
M src/bin/pg_dump/pg_backup_directory.c
connoinherit may be true only for CHECK constraints
commit : f5bcd398addcbeb785f0513cf28cba5d1ecd2c8a
author : Alvaro Herrera <[email protected]>
date : Fri, 20 Jul 2012 12:33:34 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 20 Jul 2012 12:33:34 -0400
The code was setting it true for other constraints, which is
bogus. Doing so caused bogus catalog entries for such constraints, and
in particular caused an error to be raised when trying to drop a
constraint of types other than CHECK from a table that has children,
such as reported in bug #6712.
In 9.2, additionally ignore connoinherit=true for other constraint
types, to avoid having to force initdb; existing databases might already
contain bogus catalog entries.
Includes a catversion bump (in HEAD only).
Bug report from Miroslav Šulc
Analysis from Amit Kapila and Noah Misch; Amit also contributed the patch.
M src/backend/catalog/index.c
M src/backend/commands/tablecmds.c
M src/backend/commands/trigger.c
M src/include/catalog/catversion.h
M src/test/regress/expected/inherit.out
M src/test/regress/sql/inherit.sql
Fix whole-row Var evaluation to cope with resjunk columns (again).
commit : 8e617e29aaccfdd1b85af7f50dc83aa6dd7ef550
author : Tom Lane <[email protected]>
date : Fri, 20 Jul 2012 13:09:00 -0400
committer: Tom Lane <[email protected]>
date : Fri, 20 Jul 2012 13:09:00 -0400
When a whole-row Var is reading the result of a subquery, we need it to
ignore any "resjunk" columns that the subquery might have evaluated for
GROUP BY or ORDER BY purposes. We've hacked this area before, in commit
68e40998d058c1f6662800a648ff1e1ce5d99cba, but that fix only covered
whole-row Vars of named composite types, not those of RECORD type; and it
was mighty klugy anyway, since it just assumed without checking that any
extra columns in the result must be resjunk. A proper fix requires getting
hold of the subquery's targetlist so we can actually see which columns are
resjunk (whereupon we can use a JunkFilter to get rid of them). So bite
the bullet and add some infrastructure to make that possible.
Per report from Andrew Dunstan and additional testing by Merlin Moncure.
Back-patch to all supported branches. In 8.3, also back-patch commit
292176a118da6979e5d368a4baf27f26896c99a5, which for some reason I had
not done at the time, but it's a prerequisite for this change.
M src/backend/executor/execQual.c
M src/backend/executor/execUtils.c
M src/include/nodes/execnodes.h
M src/include/nodes/nodes.h
M src/test/regress/expected/subselect.out
M src/test/regress/sql/subselect.sql
Make new event trigger facility actually do something.
commit : 3a0e4d36ebd7f477822d5bae41ba121a40d22ccc
author : Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 11:38:47 -0400
committer: Robert Haas <[email protected]>
date : Fri, 20 Jul 2012 11:38:47 -0400
Commit 3855968f328918b6cd1401dd11d109d471a54d40 added syntax, pg_dump,
psql support, and documentation, but the triggers didn't actually fire.
With this commit, they now do. This is still a pretty basic facility
overall because event triggers do not get a whole lot of information
about what the user is trying to do unless you write them in C; and
there's still no option to fire them anywhere except at the very
beginning of the execution sequence, but it's better than nothing,
and a good building block for future work.
Along the way, add a regression test for ALTER LARGE OBJECT, since
testing of event triggers reveals that we haven't got one.
Dimitri Fontaine and Robert Haas
M contrib/pg_stat_statements/pg_stat_statements.c
M doc/src/sgml/plpgsql.sgml
M doc/src/sgml/ref/create_event_trigger.sgml
M src/backend/commands/event_trigger.c
M src/backend/commands/extension.c
M src/backend/commands/schemacmds.c
M src/backend/commands/trigger.c
M src/backend/executor/functions.c
M src/backend/executor/spi.c
M src/backend/tcop/pquery.c
M src/backend/tcop/utility.c
M src/backend/tsearch/ts_utils.c
M src/backend/utils/cache/Makefile
A src/backend/utils/cache/evtcache.c
M src/include/commands/event_trigger.h
M src/include/nodes/nodes.h
M src/include/port.h
M src/include/tcop/utility.h
A src/include/utils/evtcache.h
M src/pl/plpgsql/src/pl_comp.c
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/pl_handler.c
M src/pl/plpgsql/src/plpgsql.h
M src/port/qsort.c
M src/test/regress/expected/event_trigger.out
M src/test/regress/input/largeobject.source
M src/test/regress/output/largeobject.source
M src/test/regress/sql/event_trigger.sql
Rethink checkpointer's fsync-request table representation.
commit : be86e3dd5b42c33387ae976c014e6276c9439f7f
author : Tom Lane <[email protected]>
date : Thu, 19 Jul 2012 19:28:22 -0400
committer: Tom Lane <[email protected]>
date : Thu, 19 Jul 2012 19:28:22 -0400
Instead of having one hash table entry per relation/fork/segment, just have
one per relation, and use bitmapsets to represent which specific segments
need to be fsync'd. This eliminates the need to scan the whole hash table
to implement FORGET_RELATION_FSYNC, which fixes the O(N^2) behavior
recently demonstrated by Jeff Janes for cases involving lots of TRUNCATE or
DROP TABLE operations during a single checkpoint cycle. Per an idea from
Robert Haas.
(FORGET_DATABASE_FSYNC still sucks, but since dropping a database is a
pretty expensive operation anyway, we'll live with that.)
In passing, improve the delayed-unlink code: remove the pass over the list
in mdpreckpt, since it wasn't doing anything for us except supporting a
useless Assert in mdpostckpt, and fix mdpostckpt so that it will absorb
fsync requests every so often when clearing a large backlog of deletion
requests.
M src/backend/storage/smgr/md.c
Send only one FORGET_RELATION_FSYNC request when dropping a relation.
commit : 3072b7bade26d4cf72ad453ad7d3323927b1ea64
author : Tom Lane <[email protected]>
date : Thu, 19 Jul 2012 13:07:33 -0400
committer: Tom Lane <[email protected]>
date : Thu, 19 Jul 2012 13:07:33 -0400
We were sending one per fork, but a little bit of refactoring allows us
to send just one request with forknum == InvalidForkNumber. This not only
reduces pressure on the shared-memory request queue, but saves repeated
traversals of the checkpointer's hash table.
M src/backend/storage/smgr/md.c
M src/backend/storage/smgr/smgr.c
Refactor the way code is shared between some range type functions.
commit : a7a4add6c4243cbcf50a554bce4c34cb72a344b5
author : Heikki Linnakangas <[email protected]>
date : Wed, 18 Jul 2012 22:34:06 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 18 Jul 2012 22:34:06 +0300
Functions like range_eq, range_before etc. are exposed at the SQL-level, but
they're also used internally by the GiST consistent support function. The
code sharing was done by a hack, TrickFunctionCall2, which relied on the
knowledge that all the functions used fn_extra the same way. This commit
splits the functions into internal versions that take a TypeCacheEntry as
argument, and thin wrappers to expose the functions at the SQL-level. The
internal versions can then be called directly and in a less hacky way from
the GiST consistent function.
This is just cosmetic, but backpatch to 9.2 anyway, to avoid having a
different version of this code in the 9.2 branch. That would make
backpatching fixes in this area more difficult.
Alexander Korotkov
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/adt/rangetypes_gist.c
M src/include/utils/rangetypes.h
Fix statistics breakage from bgwriter/checkpointer process split.
commit : 80e373c3a8c43812bdc98fe0d433b9990acce5ad
author : Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 15:40:31 -0400
committer: Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 15:40:31 -0400
ForwardFsyncRequest() supposed that it could only be called in regular
backends, which used to be true; but since the splitup of bgwriter and
checkpointer, it is also called in the bgwriter. We do not want to count
such calls in pg_stat_bgwriter.buffers_backend statistics, so fix things
so that they aren't.
(It's worth noting here that this implies an alarmingly large increase in
the expected amount of cross-process fsync request traffic, which may well
mean that the process splitup was not such a hot idea.)
M src/backend/postmaster/checkpointer.c
Fix management of pendingOpsTable in auxiliary processes.
commit : 4a9c30a8a1d3a786abc4b8d95f0182463f66f919
author : Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 15:28:10 -0400
committer: Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 15:28:10 -0400
mdinit() was misusing IsBootstrapProcessingMode() to decide whether to
create an fsync pending-operations table in the current process. This led
to creating a table not only in the startup and checkpointer processes as
intended, but also in the bgwriter process, not to mention other auxiliary
processes such as walwriter and walreceiver. Creation of the table in the
bgwriter is fatal, because it absorbs fsync requests that should have gone
to the checkpointer; instead they just sit in bgwriter local memory and are
never acted on. So writes performed by the bgwriter were not being fsync'd
which could result in data loss after an OS crash. I think there is no
live bug with respect to walwriter and walreceiver because those never
perform any writes of shared buffers; but the potential is there for
future breakage in those processes too.
To fix, make AuxiliaryProcessMain() export the current process's
AuxProcType as a global variable, and then make mdinit() test directly for
the types of aux process that should have a pendingOpsTable. Having done
that, we might as well also get rid of the random bool flags such as
am_walreceiver that some of the aux processes had grown. (Note that we
could not have fixed the bug by examining those variables in mdinit(),
because it's called from BaseInit() which is run by AuxiliaryProcessMain()
before entering any of the process-type-specific code.)
Back-patch to 9.2, where the problem was introduced by the split-up of
bgwriter and checkpointer processes. The bogus pendingOpsTable exists
in walwriter and walreceiver processes in earlier branches, but absent
any evidence that it causes actual problems there, I'll leave the older
branches alone.
M src/backend/access/transam/xlog.c
M src/backend/bootstrap/bootstrap.c
M src/backend/postmaster/bgwriter.c
M src/backend/postmaster/checkpointer.c
M src/backend/postmaster/walwriter.c
M src/backend/replication/walreceiver.c
M src/backend/storage/ipc/procsignal.c
M src/backend/storage/smgr/md.c
M src/include/bootstrap/bootstrap.h
M src/include/miscadmin.h
M src/include/replication/walreceiver.h
Syntax support and documentation for event triggers.
commit : 3855968f328918b6cd1401dd11d109d471a54d40
author : Robert Haas <[email protected]>
date : Wed, 18 Jul 2012 10:16:16 -0400
committer: Robert Haas <[email protected]>
date : Wed, 18 Jul 2012 10:16:16 -0400
They don't actually do anything yet; that will get fixed in a
follow-on commit. But this gets the basic infrastructure in place,
including CREATE/ALTER/DROP EVENT TRIGGER; support for COMMENT,
SECURITY LABEL, and ALTER EXTENSION .. ADD/DROP EVENT TRIGGER;
pg_dump and psql support; and documentation for the anticipated
initial feature set.
Dimitri Fontaine, with review and a bunch of additional hacking by me.
Thom Brown extensively reviewed earlier versions of this patch set,
but there's not a whole lot of that code left in this commit, as it
turns out.
M doc/src/sgml/catalogs.sgml
A doc/src/sgml/event-trigger.sgml
M doc/src/sgml/filelist.sgml
M doc/src/sgml/postgres.sgml
M doc/src/sgml/ref/allfiles.sgml
A doc/src/sgml/ref/alter_event_trigger.sgml
M doc/src/sgml/ref/alter_extension.sgml
M doc/src/sgml/ref/comment.sgml
A doc/src/sgml/ref/create_event_trigger.sgml
A doc/src/sgml/ref/drop_event_trigger.sgml
M doc/src/sgml/ref/psql-ref.sgml
M doc/src/sgml/ref/security_label.sgml
M doc/src/sgml/reference.sgml
M src/backend/catalog/Makefile
M src/backend/catalog/aclchk.c
M src/backend/catalog/dependency.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_shdepend.c
M src/backend/catalog/system_views.sql
M src/backend/commands/Makefile
M src/backend/commands/alter.c
M src/backend/commands/dropcmds.c
A src/backend/commands/event_trigger.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/parser/gram.y
M src/backend/tcop/utility.c
M src/backend/utils/adt/pseudotypes.c
M src/backend/utils/cache/syscache.c
M src/bin/pg_dump/common.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
M src/bin/psql/command.c
M src/bin/psql/describe.c
M src/bin/psql/describe.h
M src/bin/psql/help.c
M src/include/catalog/catversion.h
M src/include/catalog/dependency.h
M src/include/catalog/indexing.h
A src/include/catalog/pg_event_trigger.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_type.h
A src/include/commands/event_trigger.h
M src/include/nodes/nodes.h
M src/include/nodes/parsenodes.h
M src/include/parser/kwlist.h
M src/include/utils/acl.h
M src/include/utils/builtins.h
M src/include/utils/syscache.h
A src/test/regress/expected/event_trigger.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/sanity_check.out
M src/test/regress/parallel_schedule
M src/test/regress/serial_schedule
A src/test/regress/sql/event_trigger.sql
Get rid of useless global variable in pg_upgrade.
commit : faf26bf1175530cc97ce3e804ff10dc2be7026d3
author : Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 01:23:12 -0400
committer: Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 01:23:12 -0400
Since the scandir() emulation was taken out of pg_upgrade, there's
no longer any need for scandir_file_pattern to exist as a global
variable. Replace it with a local in the one remaining function
that was making use of it.
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/relfilenode.c
Improve pg_upgrade's load_directory() function.
commit : 3d6ec663bb701b7192822f83a6a1cf4f7574d67e
author : Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 01:13:20 -0400
committer: Tom Lane <[email protected]>
date : Wed, 18 Jul 2012 01:13:20 -0400
Error out on out-of-memory, rather than returning -1, which the sole
existing caller wasn't checking for anyway. There doesn't seem to be
any use-case for making the caller check for failure here.
Detect failure return from readdir().
Use a less platform-dependent method of calculating the entrysize.
It's possible, but not yet confirmed, that this explains bug #6733,
in which Mike Wilson reports a pg_upgrade crash that did not occur
in 9.1. (Note that load_directory is effectively new code in 9.2,
at least on platforms that have scandir().)
Fix up comments, avoid uselessly using two counters, reduce the number
of realloc calls to something sane.
M contrib/pg_upgrade/file.c
M contrib/pg_upgrade/pg_upgrade.h
M contrib/pg_upgrade/util.c
Improve coding around the fsync request queue.
commit : 73b796a52c50d6f44400c99eff1a01c89d08782f
author : Tom Lane <[email protected]>
date : Tue, 17 Jul 2012 16:55:39 -0400
committer: Tom Lane <[email protected]>
date : Tue, 17 Jul 2012 16:55:39 -0400
In all branches back to 8.3, this patch fixes a questionable assumption in
CompactCheckpointerRequestQueue/CompactBgwriterRequestQueue that there are
no uninitialized pad bytes in the request queue structs. This would only
cause trouble if (a) there were such pad bytes, which could happen in 8.4
and up if the compiler makes enum ForkNumber narrower than 32 bits, but
otherwise would require not-currently-planned changes in the widths of
other typedefs; and (b) the kernel has not uniformly initialized the
contents of shared memory to zeroes. Still, it seems a tad risky, and we
can easily remove any risk by pre-zeroing the request array for ourselves.
In addition to that, we need to establish a coding rule that struct
RelFileNode can't contain any padding bytes, since such structs are copied
into the request array verbatim. (There are other places that are assuming
this anyway, it turns out.)
In 9.1 and up, the risk was a bit larger because we were also effectively
assuming that struct RelFileNodeBackend contained no pad bytes, and with
fields of different types in there, that would be much easier to break.
However, there is no good reason to ever transmit fsync or delete requests
for temp files to the bgwriter/checkpointer, so we can revert the request
structs to plain RelFileNode, getting rid of the padding risk and saving
some marginal number of bytes and cycles in fsync queue manipulation while
we are at it. The savings might be more than marginal during deletion of
a temp relation, because the old code transmitted an entirely useless but
nonetheless expensive-to-process ForgetRelationFsync request to the
background process, and also had the background process perform the file
deletion even though that can safely be done immediately.
In addition, make some cleanup of nearby comments and small improvements to
the code in CompactCheckpointerRequestQueue/CompactBgwriterRequestQueue.
M src/backend/postmaster/checkpointer.c
M src/backend/storage/buffer/bufmgr.c
M src/backend/storage/smgr/md.c
M src/include/postmaster/bgwriter.h
M src/include/storage/relfilenode.h
M src/include/storage/smgr.h
PL/Python: Remove PLy_result_ass_item
commit : 71f2dd23210f9607d1584fad89e0f8df9750e921
author : Peter Eisentraut <[email protected]>
date : Tue, 17 Jul 2012 23:26:49 +0300
committer: Peter Eisentraut <[email protected]>
date : Tue, 17 Jul 2012 23:26:49 +0300
It is apparently no longer used after the new slicing support was
implemented (a97207b6908f1d4a7d19b37b818367bb0171039f), so let's
remove the dead code and see if anything cares.
M src/pl/plpython/plpy_resultobject.c
Show step titles in the pg_upgrade man page
commit : d6ce58c01056fa0f475ea468f1633890f6a1d74c
author : Peter Eisentraut <[email protected]>
date : Tue, 17 Jul 2012 21:34:22 +0300
committer: Peter Eisentraut <[email protected]>
date : Tue, 17 Jul 2012 21:34:22 +0300
The upstream XSLT stylesheets missed that case.
found by Álvaro Herrera
M doc/src/sgml/stylesheet-man.xsl
Remove recently added PL/Perl encoding tests
commit : 65558995a214026ec544326465711588eafd2e95
author : Alvaro Herrera <[email protected]>
date : Tue, 17 Jul 2012 12:31:48 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 17 Jul 2012 12:31:48 -0400
These only pass cleanly on UTF8 and SQL_ASCII encodings, besides the
Japanese encoding in which they were originally written, which is clearly
not good enough. Since the functionality they test has not ever been
tested from PL/Perl, the best answer seems to be to remove the new tests
completely.
Per buildfarm results and ensuing discussion.
M src/pl/plperl/expected/plperl_lc.out
M src/pl/plperl/expected/plperl_lc_1.out
M src/pl/plperl/sql/plperl_lc.sql
Put back storage/proc.h in postmaster.c.
commit : 57b9bdda39e05d127f6930045d289ffc9935c971
author : Tom Lane <[email protected]>
date : Tue, 17 Jul 2012 10:14:06 -0400
committer: Tom Lane <[email protected]>
date : Tue, 17 Jul 2012 10:14:06 -0400
I took this out thinking it wasn't needed anymore, but the EXEC_BACKEND
code still needs it. Per buildfarm.
M src/backend/postmaster/postmaster.c
Introduce timeout handling framework
commit : f34c68f09671c4566854c7e20e9253d4f335c0b0
author : Alvaro Herrera <[email protected]>
date : Mon, 16 Jul 2012 18:43:21 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 16 Jul 2012 18:43:21 -0400
Management of timeouts was getting a little cumbersome; what we
originally had was more than enough back when we were only concerned
about deadlocks and query cancel; however, when we added timeouts for
standby processes, the code got considerably messier. Since there are
plans to add more complex timeouts, this seems a good time to introduce
a central timeout handling module.
External modules register their timeout handlers during process
initialization, and later enable and disable them as they see fit using
a simple API; timeout.c is in charge of keeping track of which timeouts
are in effect at any time, installing a common SIGALRM signal handler,
and calling setitimer() as appropriate to ensure timely firing of
external handlers.
timeout.c additionally supports pluggable modules to add their own
timeouts, though this capability isn't exercised anywhere yet.
Additionally, as of this commit, walsender processes are aware of
timeouts; we had a preexisting bug there that made those ignore SIGALRM,
thus being subject to unhandled deadlocks, particularly during the
authentication phase. This has already been fixed in back branches in
commit 0bf8eb2a, which see for more details.
Main author: Zoltán Böszörményi
Some review and cleanup by Álvaro Herrera
Extensive reworking by Tom Lane
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/startup.c
M src/backend/replication/walsender.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/proc.c
M src/backend/tcop/postgres.c
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/Makefile
A src/backend/utils/misc/timeout.c
M src/include/storage/proc.h
M src/include/storage/standby.h
A src/include/utils/timeout.h
Remove unreachable code
commit : dd16f9480ac67ab0c6b0102d110cd5121ed9ab46
author : Peter Eisentraut <[email protected]>
date : Mon, 16 Jul 2012 22:15:03 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 16 Jul 2012 22:15:03 +0300
The Solaris Studio compiler warns about these instances, unlike more
mainstream compilers such as gcc. But manual inspection showed that
the code is clearly not reachable, and we hope no worthy compiler will
complain about removing this code.
M contrib/hstore/hstore_io.c
M contrib/intarray/_int_bool.c
M contrib/intarray/_int_gist.c
M contrib/ltree/ltxtquery_io.c
M contrib/ltree/ltxtquery_op.c
M src/backend/access/gin/ginbtree.c
M src/backend/access/gin/ginget.c
M src/backend/access/gist/gistget.c
M src/backend/executor/nodeGroup.c
M src/backend/libpq/be-secure.c
M src/backend/storage/buffer/freelist.c
M src/backend/tcop/postgres.c
M src/backend/tsearch/dict_thesaurus.c
M src/backend/utils/adt/formatting.c
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsvector_parser.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/psql/variables.c
M src/interfaces/ecpg/ecpglib/typename.c
M src/pl/plpgsql/src/pl_exec.c
Add comment why seemingly dead code is necessary
commit : a76c857eba977a91a07ab752d4811eb5734f0b5c
author : Peter Eisentraut <[email protected]>
date : Mon, 16 Jul 2012 22:08:04 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 16 Jul 2012 22:08:04 +0300
M src/pl/plperl/plperl.c
Avoid pre-determining index names during CREATE TABLE LIKE parsing.
commit : c92be3c0595d504a1516e7e158d085150ff1c4dc
author : Tom Lane <[email protected]>
date : Mon, 16 Jul 2012 13:25:18 -0400
committer: Tom Lane <[email protected]>
date : Mon, 16 Jul 2012 13:25:18 -0400
Formerly, when trying to copy both indexes and comments, CREATE TABLE LIKE
had to pre-assign names to indexes that had comments, because it made up an
explicit CommentStmt command to apply the comment and so it had to know the
name for the index. This creates bad interactions with other indexes, as
shown in bug #6734 from Daniele Varrazzo: the preassignment logic couldn't
take any other indexes into account so it could choose a conflicting name.
To fix, add a field to IndexStmt that allows it to carry a comment to be
assigned to the new index. (This isn't a user-exposed feature of CREATE
INDEX, only an internal option.) Now we don't need preassignment of index
names in any situation.
I also took the opportunity to refactor DefineIndex to accept the IndexStmt
as such, rather than passing all its fields individually in a mile-long
parameter list.
Back-patch to 9.2, but no further, because it seems too dangerous to change
IndexStmt or DefineIndex's API in released branches. The bug exists back
to 9.0 where CREATE TABLE LIKE grew the ability to copy comments, but given
the lack of prior complaints we'll just let it go unfixed before 9.2.
M src/backend/bootstrap/bootparse.y
M src/backend/commands/indexcmds.c
M src/backend/commands/tablecmds.c
M src/backend/nodes/copyfuncs.c
M src/backend/nodes/equalfuncs.c
M src/backend/nodes/outfuncs.c
M src/backend/parser/gram.y
M src/backend/parser/parse_utilcmd.c
M src/backend/tcop/utility.c
M src/include/commands/defrem.h
M src/include/nodes/parsenodes.h
Prevent corner-case core dump in rfree().
commit : 54fd196ffc6432b62fe075e564f457db64fb288c
author : Tom Lane <[email protected]>
date : Sun, 15 Jul 2012 13:27:54 -0400
committer: Tom Lane <[email protected]>
date : Sun, 15 Jul 2012 13:27:54 -0400
rfree() failed to cope with the case that pg_regcomp() had initialized the
regex_t struct but then failed to allocate any memory for re->re_guts (ie,
the first malloc call in pg_regcomp() failed). It would try to touch the
guts struct anyway, and thus dump core. This is a sufficiently narrow
corner case that it's not surprising it's never been seen in the field;
but still a bug is a bug, so patch all active branches.
Noted while investigating whether we need to call pg_regfree after a
failure return from pg_regcomp. Other than this bug, it turns out we
don't, so adjust comments appropriately.
M src/backend/regex/regcomp.c
M src/backend/utils/adt/regexp.c
Don't initialize TLI variable to -1, as TimeLineID is unsigned.
commit : 2686da9db2aec19763ff2dfe5c034da8fb5eb382
author : Heikki Linnakangas <[email protected]>
date : Sat, 14 Jul 2012 21:02:04 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sat, 14 Jul 2012 21:02:04 +0300
This was causing a compiler warning with Solaris compiler. Use 0 instead.
The variable is initialized just for the sake of tidyness and/or debugging,
it's not used for anything before setting it to a real value.
Per report and suggestion from Peter Eisentraut.
M src/backend/replication/walreceiver.c
Print the name of the WAL file containing latest REDO ptr in pg_controldata.
commit : 6c349a565abf1e5ddf68971c62afff14947bcfa2
author : Heikki Linnakangas <[email protected]>
date : Sat, 14 Jul 2012 14:17:43 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sat, 14 Jul 2012 14:17:43 +0300
This makes it easier to determine how far back you need to keep archived WAL
files, to restore from a backup.
Fujii Masao
M src/bin/pg_controldata/pg_controldata.c
Add link to PEP 394 regarding python2 vs python3 naming
commit : 8e708e5e36d8a0295780a9aa1d99f01f5acb6182
author : Peter Eisentraut <[email protected]>
date : Sat, 14 Jul 2012 13:06:09 +0300
committer: Peter Eisentraut <[email protected]>
date : Sat, 14 Jul 2012 13:06:09 +0300
M doc/src/sgml/plpython.sgml
Add fsync capability to initdb, and use sync_file_range() if available.
commit : b966dd6c4228d696b291c1cdcb5ab8c8475fefa8
author : Tom Lane <[email protected]>
date : Fri, 13 Jul 2012 17:16:58 -0400
committer: Tom Lane <[email protected]>
date : Fri, 13 Jul 2012 17:16:58 -0400
Historically we have not worried about fsync'ing anything during initdb
(in fact, initdb intentionally passes -F to each backend launch to prevent
it from fsync'ing). But with filesystems getting more aggressive about
caching data, that's not such a good plan anymore. Make initdb do a pass
over the finished data directory tree to fsync everything. For testing
purposes, the -N/--nosync flag can be used to restore the old behavior.
Also, testing shows that on Linux, sync_file_range() is much faster than
posix_fadvise() for hinting to the kernel that an fsync is coming,
apparently because the latter blocks on a rather small request queue while
the former doesn't. So use this function if available in initdb, and also
in the backend's pg_flush_data() (where it currently will affect only the
speed of CREATE DATABASE's cloning step).
We will later make pg_regress invoke initdb with the --nosync flag
to avoid slowing down cases such as "make check" in contrib. But
let's not do so until we've shaken out any portability issues in this
patch.
Jeff Davis, reviewed by Andres Freund
M configure
M configure.in
M doc/src/sgml/ref/initdb.sgml
M src/backend/storage/file/fd.c
M src/bin/initdb/initdb.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
Cosmetic cleanup of ginInsertValue().
commit : 1a9405d26537c6d95269bf48f5ea80fbf7967260
author : Tom Lane <[email protected]>
date : Fri, 13 Jul 2012 11:37:39 -0400
committer: Tom Lane <[email protected]>
date : Fri, 13 Jul 2012 11:37:39 -0400
Make it clearer that the passed stack mustn't be empty, and that we
are not supposed to fall off the end of the stack in the main loop.
Tighten the loop that extracts the root block number, too.
Markus Wanner and Tom Lane
M src/backend/access/gin/ginbtree.c
Avoid extra newlines in XML mapping in table forest mode
commit : a84bf4922e566f047536112a2aaf488559ee62dd
author : Peter Eisentraut <[email protected]>
date : Thu, 12 Jul 2012 23:47:33 +0300
committer: Peter Eisentraut <[email protected]>
date : Thu, 12 Jul 2012 23:47:33 +0300
found by P. Broennimann
M src/backend/utils/adt/xml.c
M src/test/regress/expected/xmlmap.out
Skip text->binary conversion of unnecessary columns in contrib/file_fdw.
commit : a36088bcfae85eeeb55e85c3f06c61cb2f0621c6
author : Tom Lane <[email protected]>
date : Thu, 12 Jul 2012 16:26:59 -0400
committer: Tom Lane <[email protected]>
date : Thu, 12 Jul 2012 16:26:59 -0400
When reading from a text- or CSV-format file in file_fdw, the datatype
input routines can consume a significant fraction of the runtime.
Often, the query does not need all the columns, so we can get a useful
speed boost by skipping I/O conversion for unnecessary columns.
To support this, add a "convert_selectively" option to the core COPY code.
This is undocumented and not accessible from SQL (for now, anyway).
Etsuro Fujita, reviewed by KaiGai Kohei
M contrib/file_fdw/file_fdw.c
M src/backend/commands/copy.c
Remove 'x =- 1' check for pgindent, not needed, per report from Andrew Dunstan.
commit : 76720bdf1a817d999b9a8c3478a136793e5abec6
author : Bruce Momjian <[email protected]>
date : Thu, 12 Jul 2012 14:37:35 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 12 Jul 2012 14:37:35 -0400
M src/tools/pgindent/pgindent
Fix memory and file descriptor leaks in pg_receivexlog/pg_basebackup
commit : 058a050ec769fb1431220d822f00b0a442293514
author : Magnus Hagander <[email protected]>
date : Thu, 12 Jul 2012 13:31:19 +0200
committer: Magnus Hagander <[email protected]>
date : Thu, 12 Jul 2012 13:31:19 +0200
When the internal loop mode was added, freeing memory and closing
filedescriptors before returning became important, and a few cases
in the code missed that.
Fujii Masao
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_basebackup/streamutil.c
Add array_remove() and array_replace() functions.
commit : 84a42560c82aeb9f3690d93a0d03cf544f53b89b
author : Tom Lane <[email protected]>
date : Wed, 11 Jul 2012 13:59:35 -0400
committer: Tom Lane <[email protected]>
date : Wed, 11 Jul 2012 13:59:35 -0400
These functions support removing or replacing array element value(s)
matching a given search value. Although intended mainly to support a
future array-foreign-key feature, they seem useful in their own right.
Marco Nenciarini and Gabriele Bartolini, reviewed by Alex Hunsaker
M doc/src/sgml/func.sgml
M src/backend/utils/adt/arrayfuncs.c
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
M src/include/utils/array.h
M src/test/regress/expected/arrays.out
M src/test/regress/sql/arrays.sql
Document that Log-Shipping Standby Servers cannot be upgraded by pg_upgrade.
commit : f9951252dbd86391ab3a9bcba99f4e9f13e311a6
author : Bruce Momjian <[email protected]>
date : Tue, 10 Jul 2012 23:08:19 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 10 Jul 2012 23:08:19 -0400
Backpatch to 9.2.
M doc/src/sgml/pgupgrade.sgml
Fix bogus macro definition.
commit : 01215d61a7b162ca441c5bc0312550f2d88fddb2
author : Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 22:36:11 -0400
committer: Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 22:36:11 -0400
Per buildfarm complaints.
M src/include/mb/pg_wchar.h
Add comments about additional mule-internal charsets from emacs's source code(lisp/international/mule-conf.el). These charsets have not been supported up to now anyway, so this is just for adding commentary. Also add mention that we follow emacs's implementation, not xemacs's.
commit : 1c7a7faa5b74042dc3b3726296a17ff913dcd84c
author : Tatsuo Ishii <[email protected]>
date : Wed, 11 Jul 2012 08:10:50 +0900
committer: Tatsuo Ishii <[email protected]>
date : Wed, 11 Jul 2012 08:10:50 +0900
M src/include/mb/pg_wchar.h
Fix ASCII case in pg_wchar2mule_with_len.
commit : 60e9c224a197aa37abb1aa3aefa3aad42da61f7f
author : Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 15:58:36 -0400
committer: Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 15:58:36 -0400
Also some cosmetic improvements for wchar-to-mblen patch.
M src/backend/utils/mb/wchar.c
plperl: Skip setting UTF8 flag when in SQL_ASCII encoding
commit : 379607c9e83dcfaccf6ccda47615e7f90c3c0b0c
author : Alvaro Herrera <[email protected]>
date : Mon, 9 Jul 2012 17:36:29 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 9 Jul 2012 17:36:29 -0400
When in SQL_ASCII encoding, strings passed around are not necessarily
UTF8-safe. We had already fixed this in some places, but it looks like
we missed some.
I had to backpatch Peter Eisentraut's a8b92b60 to 9.1 in order for this
patch to cherry-pick more cleanly.
Patch from Alex Hunsaker, tweaked by Kyotaro HORIGUCHI and myself.
Some desultory cleanup and comment addition by me, during patch review.
Per bug report from Christoph Berg in
[email protected]
M src/pl/plperl/GNUmakefile
M src/pl/plperl/Util.xs
M src/pl/plperl/expected/plperl.out
A src/pl/plperl/expected/plperl_lc.out
A src/pl/plperl/expected/plperl_lc_1.out
M src/pl/plperl/plperl_helpers.h
M src/pl/plperl/sql/plperl.sql
A src/pl/plperl/sql/plperl_lc.sql
perltidy adjustments to new file
commit : fc4a8a6d748ee213f49deb2d090febbdae3121c7
author : Alvaro Herrera <[email protected]>
date : Mon, 9 Jul 2012 17:35:57 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 9 Jul 2012 17:35:57 -0400
M src/interfaces/libpq/test/regress.pl
Re-implement extraction of fixed prefixes from regular expressions.
commit : 628cbb50ba80c83917b07a7609ddec12cda172d0
author : Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 14:54:37 -0400
committer: Tom Lane <[email protected]>
date : Tue, 10 Jul 2012 14:54:37 -0400
To generate btree-indexable conditions from regex WHERE conditions (such as
WHERE indexed_col ~ '^foo'), we need to be able to identify any fixed
prefix that a regex might have; that is, find any string that must be a
prefix of all strings satisfying the regex. We used to do that with
entirely ad-hoc code that looked at the source text of the regex. It
didn't know very much about regex syntax, which mostly meant that it would
fail to identify some optimizable cases; but Viktor Rosenfeld reported that
it would produce actively wrong answers for quantified parenthesized
subexpressions, such as '^(foo)?bar'. Rather than trying to extend the
ad-hoc code to cover this, let's get rid of it altogether in favor of
identifying prefixes by examining the compiled form of a regex.
To do this, I've added a new entry point "pg_regprefix" to the regex library;
hopefully it is defined in a sufficiently general fashion that it can remain
in the library when/if that code gets split out as a standalone project.
Since this bug has been there for a very long time, this fix needs to get
back-patched. However it depends on some other recent commits (particularly
the addition of wchar-to-database-encoding conversion), so I'll commit this
separately and then go to work on back-porting the necessary fixes.
M src/backend/regex/Makefile
M src/backend/regex/README
M src/backend/regex/regc_color.c
A src/backend/regex/regprefix.c
M src/backend/utils/adt/regexp.c
M src/backend/utils/adt/selfuncs.c
M src/include/regex/regex.h
M src/include/regex/regguts.h
M src/include/utils/builtins.h
M src/test/regress/expected/regex.out
M src/test/regress/sql/regex.sql
Refactor pattern_fixed_prefix() to avoid dealing in incomplete patterns.
commit : 00dac6000d422033c3e8d191f01ee0e6525794c2
author : Tom Lane <[email protected]>
date : Mon, 9 Jul 2012 23:22:55 -0400
committer: Tom Lane <[email protected]>
date : Mon, 9 Jul 2012 23:22:55 -0400
Previously, pattern_fixed_prefix() was defined to return whatever fixed
prefix it could extract from the pattern, plus the "rest" of the pattern.
That definition was sensible for LIKE patterns, but not so much for
regexes, where reconstituting a valid pattern minus the prefix could be
quite tricky (certainly the existing code wasn't doing that correctly).
Since the only thing that callers ever did with the "rest" of the pattern
was to pass it to like_selectivity() or regex_selectivity(), let's cut out
the middle-man and just have pattern_fixed_prefix's subroutines do this
directly. Then pattern_fixed_prefix can return a simple selectivity
number, and the question of how to cope with partial patterns is removed
from its API specification.
While at it, adjust the API spec so that callers who don't actually care
about the pattern's selectivity (which is a lot of them) can pass NULL for
the selectivity pointer to skip doing the work of computing a selectivity
estimate.
This patch is only an API refactoring that doesn't actually change any
processing, other than allowing a little bit of useless work to be skipped.
However, it's necessary infrastructure for my upcoming fix to regex prefix
extraction, because after that change there won't be any simple way to
identify the "rest" of the regex, not even to the low level of fidelity
needed by regex_selectivity. We can cope with that if regex_fixed_prefix
and regex_selectivity communicate directly, but not if we have to work
within the old API. Hence, back-patch to all active branches.
M src/backend/optimizer/path/indxpath.c
M src/backend/utils/adt/selfuncs.c
M src/include/utils/selfuncs.h
Fix planner to pass correct collation to operator selectivity estimators.
commit : e7ef6d7e248cd39b8a4a7630776ec3924feeafa6
author : Tom Lane <[email protected]>
date : Sun, 8 Jul 2012 23:51:08 -0400
committer: Tom Lane <[email protected]>
date : Sun, 8 Jul 2012 23:51:08 -0400
We can do this without creating an API break for estimation functions
by passing the collation using the existing fmgr functionality for
passing an input collation as a hidden parameter.
The need for this was foreseen at the outset, but we didn't get around to
making it happen in 9.1 because of the decision to sort all pg_statistic
histograms according to the database's default collation. That meant that
selectivity estimators generally need to use the default collation too,
even if they're estimating for an operator that will do something
different. The reason it's suddenly become more interesting is that
regexp interpretation also uses a collation (for its LC_TYPE not LC_COLLATE
property), and we no longer want to use the wrong collation when examining
regexps during planning. It's not that the selectivity estimate is likely
to change much from this; rather that we are thinking of caching compiled
regexps during planner estimation, and we won't get the intended benefit
if we cache them with a different collation than the executor will use.
Back-patch to 9.1, both because the regexp change is likely to get
back-patched and because we might as well get this right in all
collation-supporting branches, in case any third-party code wants to
rely on getting the collation. The patch turns out to be minuscule
now that I've done it ...
M src/backend/optimizer/path/clausesel.c
M src/backend/optimizer/util/plancat.c
M src/backend/utils/adt/selfuncs.c
M src/include/optimizer/plancat.h
Simplify and document regex library's compact-NFA representation.
commit : c6aae3042be5249e672b731ebeb21875b5343010
author : Tom Lane <[email protected]>
date : Sat, 7 Jul 2012 17:39:50 -0400
committer: Tom Lane <[email protected]>
date : Sat, 7 Jul 2012 17:39:50 -0400
The previous coding abused the first element of a cNFA state's arcs list
to hold a per-state flag bit, which was confusing, undocumented, and not
even particularly efficient. Get rid of that in favor of a separate
"stflags" vector. Since there's only one bit in use, I chose to allocate a
char per state; we could possibly replace this with a bitmap at some point,
but that would make accesses a little slower. It's already about 8X
smaller than before, so let's not get overly tense.
Also document the representation better than it was before, which is to say
not at all.
This patch is a byproduct of investigations towards extracting a "fixed
prefix" string from the compact-NFA representation of regex patterns.
Might need to back-patch it if we decide to back-patch that fix, but for
now it's just code cleanup so I'll just put it in HEAD.
M src/backend/regex/regc_nfa.c
M src/backend/regex/regcomp.c
M src/backend/regex/rege_dfa.c
M src/include/regex/regguts.h
Convert libpq regress script to Perl
commit : a184e4db83c80d28103774ced984c7790fbd44ba
author : Alvaro Herrera <[email protected]>
date : Fri, 6 Jul 2012 15:38:11 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 6 Jul 2012 15:38:11 -0400
This should ease its use on the Windows build environment.
M src/interfaces/libpq/test/Makefile
A src/interfaces/libpq/test/regress.pl
D src/interfaces/libpq/test/regress.sh
Update libpq test expected output
commit : adb9b7d53be5a3a0cae8b7a71c28a3e8c7628769
author : Alvaro Herrera <[email protected]>
date : Fri, 6 Jul 2012 16:23:30 -0400
committer: Alvaro Herrera <[email protected]>
date : Fri, 6 Jul 2012 16:23:30 -0400
Commit 2b443063 changed wording for some of the error messages, but
neglected updating the regress output to match.
M src/interfaces/libpq/test/expected.out
Run updated copyright.pl on HEAD and 9.2 trees, updating the psql \copyright output to 2012.
commit : 3c9b406420760a8da4de8d0e2b6336f15caf3c9c
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 12:28:18 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 12:28:18 -0400
Backpatch to 9.2.
M src/backend/catalog/genbki.pl
M src/backend/utils/Gen_fmgrtab.pl
M src/bin/psql/help.c
Have copyright.pl skip updating something that is just the current year, to avoid producing dups, e.g. 2012-2012
commit : d17c0135cdf6e478a29080f563da3d65cb441291
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 12:21:43 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 12:21:43 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Modify copyright.pl so all lines are processed, not just the first match, so files that contain embedded copyrights are updated, e.g. pgsql/help.c.
commit : 95203e0833664a1cb221e4f3ad766d167db893b8
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 11:58:55 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 11:58:55 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Fix copyright.pl to properly skip the .git directory by adding a basename() qualification.
commit : 5198ae89924db730d7d3ec3ab7b14c17a22c7f82
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 11:43:59 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 11:43:59 -0400
M src/tools/copyright.pl
Fix spacing in copyright.pl after being run with missing regex slash (now added).
commit : b9eb808bf2e5f0ab5cfd1dc7410f3c457a18f6d1
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 10:57:08 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 10:57:08 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Update pg_upgrade comments for recent configpath fix.
commit : c742d1dbe759f4c1e3304e5fbca88e061f64978f
author : Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 09:39:22 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 6 Jul 2012 09:39:22 -0400
M contrib/pg_upgrade/option.c
Fix failure of new wchar->mb functions to advance from pointer.
commit : f6a05fd973a102f7e66c491d3f854864b8d24844
author : Robert Haas <[email protected]>
date : Thu, 5 Jul 2012 23:47:53 -0400
committer: Robert Haas <[email protected]>
date : Thu, 5 Jul 2012 23:47:53 -0400
Bug spotted by Tom Lane.
M src/backend/utils/mb/wchar.c
Fix PGDATAOLD and PGDATANEW to properly set pgconfig location, per report from Tom.
commit : 2eeb5eb23fa9ad1a2d636bbf2fd68e6709848d23
author : Bruce Momjian <[email protected]>
date : Thu, 5 Jul 2012 23:36:30 -0400
committer: Bruce Momjian <[email protected]>
date : Thu, 5 Jul 2012 23:36:30 -0400
Backpatch to 9.2.
M contrib/pg_upgrade/option.c
Don't try to trim "../" in join_path_components().
commit : 85254199478bcf49d0ac83fdf22d6bcf35ceccb1
author : Tom Lane <[email protected]>
date : Thu, 5 Jul 2012 17:15:05 -0400
committer: Tom Lane <[email protected]>
date : Thu, 5 Jul 2012 17:15:05 -0400
join_path_components() tried to remove leading ".." components from its
tail argument, but it was not nearly bright enough to do so correctly
unless the head argument was (a) absolute and (b) canonicalized.
Rather than try to fix that logic, let's just get rid of it: there is no
correctness reason to remove "..", and cosmetic concerns can be taken
care of by a subsequent canonicalize_path() call. Per bug #6715 from
Greg Davidson.
Back-patch to all supported branches. It appears that pre-9.2, this
function is only used with absolute paths as head arguments, which is why
we'd not noticed the breakage before. However, third-party code might be
expecting this function to work in more general cases, so it seems wise
to back-patch.
In HEAD and 9.2, also make some minor cosmetic improvements to callers.
M src/bin/initdb/initdb.c
M src/bin/psql/command.c
M src/port/path.c
Revert part of the previous patch that avoided using PLy_elog().
commit : de479e2ed28925ddd2907cad3e2d5dddd3b97199
author : Heikki Linnakangas <[email protected]>
date : Thu, 5 Jul 2012 23:40:25 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 5 Jul 2012 23:40:25 +0300
That caused the plpython_unicode regression test to fail on SQL_ASCII
encoding, as evidenced by the buildfarm. The reason is that with the patch,
you don't get the detail in the error message that you got before. That
detail is actually very informative, so rather than just adjust the expected
output, let's revert that part of the patch for now to make the buildfarm
green again, and figure out some other way to avoid the recursion of
PLy_elog() that doesn't lose the detail.
M src/pl/plpython/plpy_util.c
Fix mapping of PostgreSQL encodings to Python encodings.
commit : b66de4c6d7208d9ec420b912758377a3533c7a7d
author : Heikki Linnakangas <[email protected]>
date : Thu, 5 Jul 2012 21:45:24 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 5 Jul 2012 21:45:24 +0300
Windows encodings, "win1252" and so forth, are named differently in Python,
like "cp1252". Also, if the PyUnicode_AsEncodedString() function call fails
for some reason, use a plain ereport(), not a PLy_elog(), to report that
error. That avoids recursion and crash, if PLy_elog() tries to call
PLyUnicode_Bytes() again.
This fixes bug reported by Asif Naeem. Backpatch down to 9.0, before that
plpython didn't even try these conversions.
Jan Urbański, with minor comment improvements by me.
M src/pl/plpython/plpy_util.c
Remove support for using wait3() in place of waitpid().
commit : fc548b2296df3fe039bf68e196bfd883338e0faa
author : Tom Lane <[email protected]>
date : Thu, 5 Jul 2012 14:00:40 -0400
committer: Tom Lane <[email protected]>
date : Thu, 5 Jul 2012 14:00:40 -0400
All Unix-oid platforms that we currently support should have waitpid(),
since it's in V2 of the Single Unix Spec. Our git history shows that
the wait3 code was added to support NextStep, which we officially dropped
support for as of 9.2. So get rid of the configure test, and simplify the
macro spaghetti in reaper(). Per suggestion from Fujii Masao.
M configure
M configure.in
M src/backend/postmaster/postmaster.c
M src/include/pg_config.h.in
M src/include/pg_config.h.win32
pg_upgrade: abstract out copying of files from old cluster to new
commit : 666d494d19dbd5dc7a177709a2f7069913f8ab89
author : Alvaro Herrera <[email protected]>
date : Thu, 5 Jul 2012 11:38:42 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 5 Jul 2012 11:38:42 -0400
Currently only pg_clog is copied, but some other directories could need
the same treatment as well, so create a subroutine to do it.
Extracted from my (somewhat larger) FOR KEY SHARE patch.
M contrib/pg_upgrade/pg_upgrade.c
Fix function argument tab completion for schema-qualified or quoted function names
commit : 3644a63984cbdba2c78c22fd9a0cdb0f4701b600
author : Magnus Hagander <[email protected]>
date : Thu, 5 Jul 2012 14:03:49 +0200
committer: Magnus Hagander <[email protected]>
date : Thu, 5 Jul 2012 14:03:49 +0200
Dean Rasheed, reviewed by Josh Kupershmidt
M src/bin/psql/tab-complete.c
Fix missing regex slash that caused perltidy to get confused on copyright.pl.
commit : 539d38757a4709b5039ed4318567349da06f0690
author : Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 21:58:48 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 21:58:48 -0400
Backpatch to 9.2.
M src/tools/copyright.pl
Run newly-configured perltidy script on Perl files.
commit : 042d9ffc282a8c796d2a5babc600c1a6db150dac
author : Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 21:47:49 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 21:47:49 -0400
Run on HEAD and 9.2.
M contrib/intarray/bench/bench.pl
M contrib/intarray/bench/create_test.pl
M contrib/seg/seg-validate.pl
M contrib/seg/sort-segments.pl
M doc/src/sgml/generate-errcodes-table.pl
M doc/src/sgml/generate_history.pl
M doc/src/sgml/mk_feature_tables.pl
M src/backend/catalog/Catalog.pm
M src/backend/catalog/genbki.pl
M src/backend/utils/Gen_fmgrtab.pl
M src/backend/utils/generate-errcodes.pl
M src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
M src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
M src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
M src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
M src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
M src/backend/utils/mb/Unicode/UCS_to_most.pl
M src/backend/utils/mb/Unicode/ucs2utf.pl
M src/backend/utils/sort/gen_qsort_tuple.pl
M src/bin/psql/create_help.pl
M src/interfaces/ecpg/preproc/check_rules.pl
M src/interfaces/ecpg/preproc/parse.pl
M src/pl/plperl/plc_perlboot.pl
M src/pl/plperl/plperl_opmask.pl
M src/pl/plperl/text2macro.pl
M src/pl/plpgsql/src/generate-plerrcodes.pl
M src/pl/plpython/generate-spiexceptions.pl
M src/test/locale/sort-test.pl
M src/test/performance/runtests.pl
M src/tools/check_bison_recursion.pl
M src/tools/check_keywords.pl
M src/tools/copyright.pl
M src/tools/msvc/Install.pm
M src/tools/msvc/MSBuildProject.pm
M src/tools/msvc/Mkvcbuild.pm
M src/tools/msvc/Project.pm
M src/tools/msvc/Solution.pm
M src/tools/msvc/VCBuildProject.pm
M src/tools/msvc/VSObjectFactory.pm
M src/tools/msvc/build.pl
M src/tools/msvc/builddoc.pl
M src/tools/msvc/config_default.pl
M src/tools/msvc/gendef.pl
M src/tools/msvc/mkvcbuild.pl
M src/tools/msvc/pgbison.pl
M src/tools/msvc/pgflex.pl
M src/tools/msvc/vcregress.pl
M src/tools/version_stamp.pl
M src/tools/win32tzlist.pl
Reduce messages about implicit indexes and sequences to DEBUG1.
commit : d7c734841b3e6cb44de363a8a3d83c35b75b30d9
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 20:34:24 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 20:34:24 -0400
Per recent discussion on pgsql-hackers, these messages are too
chatty for most users.
M contrib/btree_gist/expected/not_equal.out
M contrib/citext/expected/citext.out
M contrib/citext/expected/citext_1.out
M contrib/dblink/expected/dblink.out
M contrib/pgstattuple/expected/pgstattuple.out
M contrib/sepgsql/expected/ddl.out
M contrib/sepgsql/expected/dml.out
M contrib/tablefunc/expected/tablefunc.out
M doc/src/sgml/tcn.sgml
M src/backend/commands/indexcmds.c
M src/backend/parser/parse_utilcmd.c
M src/pl/plpython/expected/plpython_error.out
M src/pl/plpython/expected/plpython_error_0.out
M src/pl/plpython/expected/plpython_schema.out
M src/pl/plpython/expected/plpython_subtransaction.out
M src/pl/plpython/expected/plpython_subtransaction_0.out
M src/pl/plpython/expected/plpython_subtransaction_5.out
M src/test/regress/expected/alter_table.out
M src/test/regress/expected/arrays.out
M src/test/regress/expected/cluster.out
M src/test/regress/expected/collate.out
M src/test/regress/expected/copy2.out
M src/test/regress/expected/copyselect.out
M src/test/regress/expected/create_table.out
M src/test/regress/expected/create_table_like.out
M src/test/regress/expected/delete.out
M src/test/regress/expected/dependency.out
M src/test/regress/expected/domain.out
M src/test/regress/expected/enum.out
M src/test/regress/expected/foreign_data.out
M src/test/regress/expected/foreign_key.out
M src/test/regress/expected/functional_deps.out
M src/test/regress/expected/inherit.out
M src/test/regress/expected/join.out
M src/test/regress/expected/namespace.out
M src/test/regress/expected/plpgsql.out
M src/test/regress/expected/rangefuncs.out
M src/test/regress/expected/rangetypes.out
M src/test/regress/expected/returning.out
M src/test/regress/expected/rowtypes.out
M src/test/regress/expected/rules.out
M src/test/regress/expected/select_views.out
M src/test/regress/expected/select_views_1.out
M src/test/regress/expected/sequence.out
M src/test/regress/expected/sequence_1.out
M src/test/regress/expected/subselect.out
M src/test/regress/expected/temp.out
M src/test/regress/expected/transactions.out
M src/test/regress/expected/triggers.out
M src/test/regress/expected/truncate.out
M src/test/regress/expected/typed_table.out
M src/test/regress/expected/union.out
M src/test/regress/expected/vacuum.out
M src/test/regress/expected/with.out
M src/test/regress/output/constraints.source
Have pg_dump in binary-upgrade mode properly drop user-created extensions that might exist in the new empty cluster databases, like plpgsql.
commit : 3e00d332615be32d64bbb1f604a783fade3146c0
author : Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 17:36:50 -0400
committer: Bruce Momjian <[email protected]>
date : Wed, 4 Jul 2012 17:36:50 -0400
Backpatch to 9.2.
M src/bin/pg_dump/pg_dump.c
Fix sample INSTR function to return 0 if third arg is 0.
commit : 0fc32c00d74404a9a535e0e1b8d9437dfd8075db
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 17:19:23 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 17:19:23 -0400
Albe Laurenz, per a report by Greg Smith that our sample function
doesn't quite match Oracle's behavior.
M doc/src/sgml/plpgsql.sgml
Add wchar -> mb conversion routines.
commit : 72dd6291f216440f6bb61a8733729a37c7e3b2d2
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 17:10:10 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 17:10:10 -0400
This is infrastructure for Alexander Korotkov's work on indexing regular
expression searches.
Alexander Korotkov, with a bit of further hackery on the MULE conversion
by me
M src/backend/utils/mb/mbutils.c
M src/backend/utils/mb/wchar.c
M src/include/mb/pg_wchar.h
More doc cleanups for recent shared memory changes.
commit : 248b5fce0643c5662c60ac7f8bfe4d68b7e96bb4
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:57:48 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:57:48 -0400
Josh Kupershmidt
M doc/src/sgml/config.sgml
Documentation cleanups for recent shared memory changes.
commit : 390bfc643de4faf6df8cb40e71b17791ce61a71e
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:56:12 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:56:12 -0400
M doc/src/sgml/runtime.sgml
Increase the maximum initdb-configured value for shared_buffers to 128MB.
commit : f358428280953643313ee7756e0a8b8ccfde7660
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:52:35 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:52:35 -0400
The old value of 32MB has been around for a very long time, and in the
meantime typical system memories have become vastly larger. Also, now
that we no longer depend on being able to fit the entirety of our
shared memory segment into the system's limit on System V shared
memory, there's a much better chance of the higher limit actually
proving productive.
Per recent discussion on pgsql-hackers.
M src/bin/initdb/initdb.c
Make oid2name, pgbench, and vacuumlo set fallback_application_name.
commit : 17676c785a95b2598c5735c0025f7dc7727a96bc
author : Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:39:33 -0400
committer: Robert Haas <[email protected]>
date : Wed, 4 Jul 2012 15:39:33 -0400
Amit Kapila, reviewed by Shigeru Hanada and Peter Eisentraut,
with some modifications by me.
M contrib/oid2name/oid2name.c
M contrib/pgbench/pgbench.c
M contrib/vacuumlo/vacuumlo.c
Remove duplicate, unnecessary, variable declaration
commit : 10e0dd8f91364635b73103c5e207b48b811da5b5
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 16:16:54 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 16:16:54 +0200
M src/backend/libpq/auth.c
Set the write location in the pg_receivexlog status messages
commit : dbc6fcf35d4fa95ea2fd4d7bbd9e56be560c1ef9
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 15:13:09 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 15:13:09 +0200
This makes it possible for the master to track how much data has
actually been written my pg_receivexlog - and not just how much
has been sent towards it.
M src/bin/pg_basebackup/receivelog.c
Always treat a standby returning an an invalid flush location as async
commit : 0c4b468692804a232e324962d968e61c1837a13a
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 15:10:46 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 15:10:46 +0200
This ensures that a standby such as pg_receivexlog will not be selected
as sync standby - which would cause the master to block waiting for
a location that could never happen.
Fujii Masao
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
Remove reference to default wal_buffers being 8
commit : 817d870cf990698cbc6672068e6af5405c2ae7a4
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 09:22:21 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 09:22:21 +0200
This hasn't been true since 9.1, when the default was changed to -1.
Remove the reference completely, keeping the discussion of the parameter
and it's shared memory effects on the config page.
M doc/src/sgml/wal.sgml
Remove references to pgfoundry as recommended hosting platform
commit : 51fc406819a06799e77ecfa751557318e16e4677
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 08:59:35 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 08:59:35 +0200
pgfoundry is deprectaed and no longer accepting new projects,
so we really shouldn't be directing people there.
M doc/src/sgml/external-projects.sgml
Remove references to PostgreSQL bundled on Solaris
commit : d80785e6ed872acfc4ec156e540e16db878a81d3
author : Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 08:58:31 +0200
committer: Magnus Hagander <[email protected]>
date : Wed, 4 Jul 2012 08:58:31 +0200
Also remove special references to downloads off pgfoundry since they are
not correct - downloads are done through the main website.
M doc/src/sgml/installation.sgml
Improve documentation about MULE encoding.
commit : 09022de1f55708bcfe8b2bf206d818055c34d49e
author : Tom Lane <[email protected]>
date : Wed, 4 Jul 2012 00:29:57 -0400
committer: Tom Lane <[email protected]>
date : Wed, 4 Jul 2012 00:29:57 -0400
This commit improves the comments in pg_wchar.h and creates #define symbols
for some formerly hard-coded values. No substantive code changes.
Tatsuo Ishii and Tom Lane
M src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
M src/backend/utils/mb/wchar.c
M src/include/mb/pg_wchar.h
Forgot an #include in the previous patch :-(
commit : 47a2adc83c492aed92b6754fe40b485b9fe5929e
author : Alvaro Herrera <[email protected]>
date : Tue, 3 Jul 2012 16:40:15 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 3 Jul 2012 16:40:15 -0400
M src/backend/catalog/pg_shdepend.c
Have REASSIGN OWNED work on extensions, too
commit : 0c7b9dc7d037c4465227dc2300ff48019feeba37
author : Alvaro Herrera <[email protected]>
date : Tue, 3 Jul 2012 15:09:59 -0400
committer: Alvaro Herrera <[email protected]>
date : Tue, 3 Jul 2012 15:09:59 -0400
Per bug #6593, REASSIGN OWNED fails when the affected role has created
an extension. Even though the user related to the extension is not
nominally the owner, its OID appears on pg_shdepend and thus causes
problems when the user is to be dropped.
This commit adds code to change the "ownership" of the extension itself,
not of the contained objects. This is fine because it's currently only
called from REASSIGN OWNED, which would also modify the ownership of the
contained objects. However, this is not sufficient for a working ALTER
OWNER implementation extension.
Back-patch to 9.1, where extensions were introduced.
Bug #6593 reported by Emiliano Leporati.
M src/backend/catalog/pg_shdepend.c
M src/backend/commands/extension.c
M src/include/commands/extension.h
Have copyright tool mention that certain files should be updated in back branches.
commit : b33385b89d30ad3daa63b398e56a5e3822fd59c6
author : Bruce Momjian <[email protected]>
date : Tue, 3 Jul 2012 12:01:38 -0400
committer: Bruce Momjian <[email protected]>
date : Tue, 3 Jul 2012 12:01:38 -0400
M src/tools/copyright.pl
Remove misleading hints about reducing the System V request size.
commit : 6a77bff086b9bba94ab6cd6229a74f44d3ec266d
author : Robert Haas <[email protected]>
date : Tue, 3 Jul 2012 10:07:47 -0400
committer: Robert Haas <[email protected]>
date : Tue, 3 Jul 2012 10:07:47 -0400
Since the request size will now be ~48 bytes regardless of how
shared_buffers et. al. are set, much of this advice is no longer
relevant.
M src/backend/port/sysv_shmem.c
Fix a stupid bug I introduced into XLogFlush().
commit : 3cf39e6ddbece4000ee56a0f79cdbe71fb2865ff
author : Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 15:33:59 -0400
committer: Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 15:33:59 -0400
Commit f11e8be3e812cdbbc139c1b4e49141378b118dee broke this; it was right
in Peter's original patch, but I messed it up before committing.
M src/backend/access/transam/xlog.c
Fix position of WalSndWakeupRequest call.
commit : 3bb592bb20d02093d6488a57c7c4ee94803ddc9a
author : Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 14:43:10 -0400
committer: Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 14:43:10 -0400
This avoids discriminating against wal_sync_method = open_sync or
open_datasync.
Fujii Masao, reviewed by Andres Freund
M src/backend/access/transam/xlog.c
Assorted message style improvements
commit : 2b44306315cf84479f735b12f78499616172dbb9
author : Peter Eisentraut <[email protected]>
date : Mon, 2 Jul 2012 21:12:46 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 2 Jul 2012 21:12:46 +0300
M src/backend/access/spgist/spgutils.c
M src/backend/access/transam/xlog.c
M src/backend/utils/adt/rangetypes.c
M src/backend/utils/misc/guc.c
M src/backend/utils/time/snapmgr.c
M src/bin/pg_basebackup/streamutil.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/psql/common.c
M src/bin/psql/variables.c
M src/interfaces/libpq/fe-connect.c
M src/interfaces/libpq/win32.c
M src/pl/plpgsql/src/gram.y
M src/test/regress/expected/plpgsql.out
Fix to_date's handling of year 519.
commit : 41f4a0ab789463971add986dbc778d77ec5a0ef4
author : Tom Lane <[email protected]>
date : Mon, 2 Jul 2012 11:35:21 -0400
committer: Tom Lane <[email protected]>
date : Mon, 2 Jul 2012 11:35:21 -0400
A thinko in commit 029dfdf1157b6d837a7b7211cd35b00c6bcd767c caused the year
519 to be handled differently from either adjacent year, which was not the
intention AFAICS. Report and diagnosis by Marc Cousin.
In passing, remove redundant re-tests of year value.
M src/backend/utils/adt/formatting.c
Work a little harder on comments for walsender wakeup patch.
commit : 82cdd2df759efe2b43183ee954b4a2e10b2c59f4
author : Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 11:28:53 -0400
committer: Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 11:28:53 -0400
Per gripe from Tom Lane.
M src/backend/access/transam/xlog.c
Make commit_delay much smarter.
commit : f11e8be3e812cdbbc139c1b4e49141378b118dee
author : Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 10:26:31 -0400
committer: Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 10:26:31 -0400
Instead of letting every backend participating in a group commit wait
independently, have the first one that becomes ready to flush WAL wait
for the configured delay, and let all the others wait just long enough
for that first process to complete its flush. This greatly increases
the chances of being able to configure a commit_delay setting that
actually improves performance.
As a side consequence of this change, commit_delay now affects all WAL
flushes, rather than just commits. There was some discussion on
pgsql-hackers about whether to rename the GUC to, say, wal_flush_delay,
but in the absence of consensus I am leaving it alone for now.
Peter Geoghegan, with some changes, mostly to the documentation, by me.
M doc/src/sgml/config.sgml
M doc/src/sgml/wal.sgml
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
Make walsender more responsive.
commit : f83b59997d29f06c3d67e7eb9a1f2c9cd017d665
author : Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 09:36:34 -0400
committer: Robert Haas <[email protected]>
date : Mon, 2 Jul 2012 09:36:34 -0400
Per testing by Andres Freund, this improves replication performance
and reduces replication latency and latency jitter. I was a bit
concerned about moving more work into XLogInsert, but testing seems
to show that it's not a problem in practice.
Along the way, improve comments for WaitLatchOrSocket.
Andres Freund. Review and stylistic cleanup by me.
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
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/walsender.c
M src/include/replication/walsender.h
Fix race condition in enum value comparisons.
commit : 9ad45c18b6c8d03ce18a26223eb0d15e900c7a2c
author : Tom Lane <[email protected]>
date : Sun, 1 Jul 2012 17:12:49 -0400
committer: Tom Lane <[email protected]>
date : Sun, 1 Jul 2012 17:12:49 -0400
When (re) loading the typcache comparison cache for an enum type's values,
use an up-to-date MVCC snapshot, not the transaction's existing snapshot.
This avoids problems if we encounter an enum OID that was created since our
transaction started. Per report from Andres Freund and diagnosis by Robert
Haas.
To ensure this is safe even if enum comparison manages to get invoked
before we've set a transaction snapshot, tweak GetLatestSnapshot to
redirect to GetTransactionSnapshot instead of throwing error when
FirstSnapshotSet is false. The existing uses of GetLatestSnapshot (in
ri_triggers.c) don't care since they couldn't be invoked except in a
transaction that's already done some work --- but it seems just conceivable
that this might not be true of enums, especially if we ever choose to use
enums in system catalogs.
Note that the comparable coding in enum_endpoint and enum_range_internal
remains GetTransactionSnapshot; this is perhaps debatable, but if we
changed it those functions would have to be marked volatile, which doesn't
seem attractive.
Back-patch to 9.1 where ALTER TYPE ADD VALUE was added.
M src/backend/utils/cache/typcache.c
M src/backend/utils/time/snapmgr.c
Suppress compiler warnings in readfuncs.c.
commit : 39bfc94c86f1990e9db8ea3da0e82995cc1b76db
author : Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 22:27:49 -0400
committer: Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 22:27:49 -0400
Commit 7357558fc8866e3a449aa9473c419b593d67b5b6 introduced "(void) token;"
into the READ_TEMP_LOCALS() macro, to suppress complaints from gcc 4.6
when the value of token was not used anywhere in a particular node-read
function. However, this just moved the warning around: inspection of
buildfarm results shows that some compilers are now complaining that token
is being read before it's set. Revert the READ_TEMP_LOCALS() macro change
and instead put "(void) token;" into READ_NODE_FIELD(), which is the
principal culprit for cases where the warning might occur. In principle we
might need the same in READ_BITMAPSET_FIELD() and/or READ_LOCATION_FIELD(),
but it seems unlikely that a node would consist only of such fields, so
I'll leave them alone for now.
M src/backend/nodes/readfuncs.c
Remove inappropriate semicolons after function definitions.
commit : fa188b5ef568446fe06fa6268c5592b12119c834
author : Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 17:29:39 -0400
committer: Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 17:29:39 -0400
Solaris Studio warns about this, and some compilers might think it's an
outright syntax error.
M src/backend/utils/adt/json.c
Declare AnonymousShmem pointer as "void *".
commit : 81e82643837de93909e0c5a8e14e805f3f69f41e
author : Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 17:19:46 -0400
committer: Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 17:19:46 -0400
The original coding had it as "PGShmemHeader *", but that doesn't offer any
notational benefit because we don't dereference it. And it was resulting
in compiler warnings on some platforms, notably buildfarm member
castoroides, where mmap() and munmap() are evidently declared to take and
return "char *".
M src/backend/port/sysv_shmem.c
Prevent CREATE TABLE LIKE/INHERITS from (mis) copying whole-row Vars.
commit : 541ffa65c32b278da8ab2d19433fa6d37bd15c8d
author : Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 16:43:50 -0400
committer: Tom Lane <[email protected]>
date : Sat, 30 Jun 2012 16:43:50 -0400
If a CHECK constraint or index definition contained a whole-row Var (that
is, "table.*"), an attempt to copy that definition via CREATE TABLE LIKE or
table inheritance produced incorrect results: the copied Var still claimed
to have the rowtype of the source table, rather than the created table.
For the LIKE case, it seems reasonable to just throw error for this
situation, since the point of LIKE is that the new table is not permanently
coupled to the old, so there's no reason to assume its rowtype will stay
compatible. In the inheritance case, we should ideally allow such
constraints, but doing so will require nontrivial refactoring of CREATE
TABLE processing (because we'd need to know the OID of the new table's
rowtype before we adjust inherited CHECK constraints). In view of the lack
of previous complaints, that doesn't seem worth the risk in a back-patched
bug fix, so just make it throw error for the inheritance case as well.
Along the way, replace change_varattnos_of_a_node() with a more robust
function map_variable_attnos(), which is capable of being extended to
handle insertion of ConvertRowtypeExpr whenever we get around to fixing
the inheritance case nicely, and in the meantime it returns a failure
indication to the caller so that a helpful message with some context can be
thrown. Also, this code will do the right thing with subselects (if we
ever allow them in CHECK or indexes), and it range-checks varattnos before
using them to index into the map array.
Per report from Sergey Konoplev. Back-patch to all supported branches.
M src/backend/commands/tablecmds.c
M src/backend/parser/parse_utilcmd.c
M src/backend/rewrite/rewriteManip.c
M src/include/commands/tablecmds.h
M src/include/rewrite/rewriteManip.h
initdb: Update check_need_password for new options
commit : e4ffa86b5739fdf85b1050c4b2e26ab14ef476e9
author : Peter Eisentraut <[email protected]>
date : Sat, 30 Jun 2012 15:39:16 +0300
committer: Peter Eisentraut <[email protected]>
date : Sat, 30 Jun 2012 15:39:16 +0300
Change things so that something like initdb --auth-local=peer
--auth-host=md5 does not cause a "must specify a password" error,
like initdb -A md5 does.
M src/bin/initdb/initdb.c
Validate xlog record header before enlarging the work area to store it.
commit : 567787f216da750b3805aea6fd8aef19e8b882a1
author : Heikki Linnakangas <[email protected]>
date : Sat, 30 Jun 2012 23:08:34 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sat, 30 Jun 2012 23:08:34 +0300
If the record header is garbled, we're now quite likely to notice it before
we try to make a bogus memory allocation and run out of memory. That can
still happen, if the xlog record is split across pages (we cannot verify
the record header until reading the next page in that scenario), but this
reduces the chances. An out-of-memory is treated as a corrupt record
anyway, so this isn't a correctness issue, just a case of giving a better
error message.
Per Amit Kapila's suggestion.
M src/backend/access/transam/xlog.c
Fix confusion between "size" and "AnonymousShmemSize".
commit : 42e2ce6ae3e931953135a55b173a5ec4c54506c4
author : Tom Lane <[email protected]>
date : Fri, 29 Jun 2012 15:12:10 -0400
committer: Tom Lane <[email protected]>
date : Fri, 29 Jun 2012 15:12:10 -0400
Noted by Andres Freund. Also improve a couple of comments.
M src/backend/port/sysv_shmem.c
Initialize shared memory copy of ckptXidEpoch correctly when not in recovery.
commit : 7a5c9ca93ad7d9b84f612d6157bf8990c7041d3c
author : Heikki Linnakangas <[email protected]>
date : Fri, 29 Jun 2012 19:19:29 +0300
committer: Heikki Linnakangas <[email protected]>
date : Fri, 29 Jun 2012 19:19:29 +0300
This bug was introduced by commit 20d98ab6e4110087d1816cd105a40fcc8ce0a307,
so backpatch this to 9.0-9.2 like that one.
This fixes bug #6710, reported by Tarvi Pillessaar
M src/backend/access/transam/xlog.c
Make the pg_upgrade log files contain actual commands
commit : 4741e9afb93f0d769655b2d18c2b73b86f281010
author : Alvaro Herrera <[email protected]>
date : Thu, 28 Jun 2012 23:27:00 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 28 Jun 2012 23:27:00 -0400
Now the log file not only contains the output from commands executed by
system(), but also what command it was in the first place. This
arrangement makes debugging a lot simpler.
M contrib/pg_upgrade/exec.c
Make init-po and update-po recursive make targets
commit : b344c651fb87cb7c7f9f59b714e2879e777caf66
author : Peter Eisentraut <[email protected]>
date : Fri, 29 Jun 2012 14:01:54 +0300
committer: Peter Eisentraut <[email protected]>
date : Fri, 29 Jun 2012 14:01:54 +0300
This is for convenience, now that adding recursive targets is much
easier than it used to be when the NLS stuff was initially added.
M GNUmakefile.in
M src/Makefile.global.in
M src/pl/plpgsql/Makefile
Fix NOTIFY to cope with I/O problems, such as out-of-disk-space.
commit : ae90128dc5f8412c8ce31804bbf0a0f8ab345db1
author : Tom Lane <[email protected]>
date : Fri, 29 Jun 2012 00:51:34 -0400
committer: Tom Lane <[email protected]>
date : Fri, 29 Jun 2012 00:51:34 -0400
The LISTEN/NOTIFY subsystem got confused if SimpleLruZeroPage failed,
which would typically happen as a result of a write() failure while
attempting to dump a dirty pg_notify page out of memory. Subsequently,
all attempts to send more NOTIFY messages would fail with messages like
"Could not read from file "pg_notify/nnnn" at offset nnnnn: Success".
Only restarting the server would clear this condition. Per reports from
Kevin Grittner and Christoph Berg.
Back-patch to 9.0, where the problem was introduced during the
LISTEN/NOTIFY rewrite.
M src/backend/commands/async.c
pg_upgrade: fix off-by-one mistake in snprintf
commit : 9e26326ad6cd11ac32d11e6cbeb613443f361da6
author : Alvaro Herrera <[email protected]>
date : Thu, 28 Jun 2012 23:37:27 -0400
committer: Alvaro Herrera <[email protected]>
date : Thu, 28 Jun 2012 23:37:27 -0400
snprintf counts trailing NUL towards the char limit. Failing to account
for that was causing an invalid value to be passed to pg_resetxlog -l,
aborting the upgrade process.
M contrib/pg_upgrade/controldata.c
Provide MAP_FAILED if sys/mman.h doesn't.
commit : c1494b733015bf09d75c362925ec3f2740a77f73
author : Tom Lane <[email protected]>
date : Thu, 28 Jun 2012 14:18:31 -0400
committer: Tom Lane <[email protected]>
date : Thu, 28 Jun 2012 14:18:31 -0400
On old HPUX this has to be #defined to -1. It might be that other values
are required on other dinosaur systems, but we'll worry about that when
and if we get reports.
M src/backend/port/sysv_shmem.c
Update outdated commit; xlp_rem_len field is in page header now.
commit : 8f85667a860437c50ae13008cad5359909388d3e
author : Heikki Linnakangas <[email protected]>
date : Thu, 28 Jun 2012 20:32:31 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 28 Jun 2012 20:32:31 +0300
Spotted by Amit Kapila
M src/backend/access/transam/xlog.c
Further fix install program detection
commit : dcd5af6c3498a265053aa3292d41c3946e225627
author : Peter Eisentraut <[email protected]>
date : Thu, 28 Jun 2012 20:05:36 +0300
committer: Peter Eisentraut <[email protected]>
date : Thu, 28 Jun 2012 20:05:36 +0300
The $(or) make function was introduced in GNU make 3.81, so the
previous coding didn't work in 3.80. Write it differently, and
improve the variable naming to make more sense in the new coding.
M configure
M configure.in
M src/Makefile.global.in
Fix broken mmap failure-detection code, and improve error message.
commit : 39715af23ae459684963c350dd69eafa2d502e7e
author : Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 12:57:22 -0400
committer: Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 12:57:22 -0400
Per an observation by Thom Brown that my previous commit made an
overly large shmem allocation crash the server, on Linux.
M src/backend/port/sysv_shmem.c
Dramatically reduce System V shared memory consumption.
commit : b0fc0df9364d2d2d17c0162cf3b8b59f6cb09f67
author : Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 11:05:16 -0400
committer: Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 11:05:16 -0400
Except when compiling with EXEC_BACKEND, we'll now allocate only a tiny
amount of System V shared memory (as an interlock to protect the data
directory) and allocate the rest as anonymous shared memory via mmap.
This will hopefully spare most users the hassle of adjusting operating
system parameters before being able to start PostgreSQL with a
reasonable value for shared_buffers.
There are a bunch of documentation updates needed here, and we might
need to adjust some of the HINT messages related to shared memory as
well. But it's not 100% clear how portable this is, so before we
write the documentation, let's give it a spin on the buildfarm and
see what turns red.
M src/backend/port/sysv_shmem.c
Add missing space in event_source GUC description.
commit : c5b3451a8e72cb7825933d4f4827f467cb38b498
author : Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 08:15:08 -0400
committer: Robert Haas <[email protected]>
date : Thu, 28 Jun 2012 08:15:08 -0400
This has apparently been wrong since event_source was added.
Alexander Lakhin
M src/backend/utils/misc/guc.c
Make UtilityContainsQuery recurse until it finds a non-utility Query.
commit : bde689f809027422d4c0baaa3e63b69ce5762e2c
author : Tom Lane <[email protected]>
date : Wed, 27 Jun 2012 23:18:30 -0400
committer: Tom Lane <[email protected]>
date : Wed, 27 Jun 2012 23:18:30 -0400
The callers of UtilityContainsQuery want it to return a non-utility Query
if it returns anything at all. However, since we made CREATE TABLE
AS/SELECT INTO into a utility command instead of a variant of SELECT,
a command like "EXPLAIN SELECT INTO" results in two nested utility
statements. So what we need UtilityContainsQuery to do is drill down
to the bottom non-utility Query.
I had thought of this possibility in setrefs.c, and fixed it there by
looping around the UtilityContainsQuery call; but overlooked that the call
sites in plancache.c have a similar issue. In those cases it's
notationally inconvenient to provide an external loop, so let's redefine
UtilityContainsQuery as recursing down to a non-utility Query instead.
Noted by Rushabh Lathia. This is a somewhat cleaned-up version of his
proposed patch.
M src/backend/optimizer/plan/setrefs.c
M src/backend/tcop/utility.c
Fix install program detection
commit : f7867154129781ee1522344bef50890c01f2b47a
author : Peter Eisentraut <[email protected]>
date : Wed, 27 Jun 2012 21:21:18 +0300
committer: Peter Eisentraut <[email protected]>
date : Wed, 27 Jun 2012 21:21:18 +0300
configure handles INSTALL as a substitution variable specially, and
apparently it gets confused when it's set to empty. Use INSTALL_
instead as a workaround to avoid the issue.
M configure
M configure.in
M src/Makefile.global.in
Fix two more neglected comments, still referring to log/seg.
commit : a8f97b39c70e831ced842eb7e41f810bee63e431
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Jun 2012 19:11:26 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Jun 2012 19:11:26 +0300
Fujii Masao
M src/backend/access/transam/xlog.c
I neglected many comments in the log+seg -> 64-bit segno patch. Fix.
commit : ec786c6c81bfa1067319305ff84b862eba3b2f27
author : Heikki Linnakangas <[email protected]>
date : Wed, 27 Jun 2012 17:53:53 +0300
committer: Heikki Linnakangas <[email protected]>
date : Wed, 27 Jun 2012 17:53:53 +0300
Reported by Amit Kapila.
M src/backend/access/transam/xlog.c
M src/backend/replication/walreceiver.c
Update release notes for pg_terminate_backend changes.
commit : 7700b82e6b071f298e3426042197c13843a5b499
author : Robert Haas <[email protected]>
date : Wed, 27 Jun 2012 08:44:50 -0400
committer: Robert Haas <[email protected]>
date : Wed, 27 Jun 2012 08:44:50 -0400
M doc/src/sgml/release-9.2.sgml
Use system install program when available and usable
commit : 9db7ccae2000524b72a4052352cbb5407fb53b02
author : Peter Eisentraut <[email protected]>
date : Wed, 27 Jun 2012 13:40:51 +0300
committer: Peter Eisentraut <[email protected]>
date : Wed, 27 Jun 2012 13:40:51 +0300
In a3176dac22c4cd14971e35119e245abee7649cb9 we switched to using
install-sh unconditionally, because the configure check
AC_PROG_INSTALL would pick up any random program named install, which
has caused failure reports
(http://archives.postgresql.org/pgsql-hackers/2001-03/msg00312.php).
Now the configure check is much improved and should avoid false
positives. It has also been shown that using a system install program
can significantly reduce "make install" times, so it's worth trying.
M configure
M configure.in
M src/Makefile.global.in
Allow pg_terminate_backend() to be used on backends with matching role.
commit : c60ca19de9ad777c51243605571d1d7606000f08
author : Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 16:16:52 -0400
committer: Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 16:16:52 -0400
A similar change was made previously for pg_cancel_backend, so now it
all matches again.
Dan Farina, reviewed by Fujii Masao, Noah Misch, and Jeff Davis,
with slight kibitzing on the doc changes by me.
M doc/src/sgml/func.sgml
M doc/src/sgml/high-availability.sgml
M src/backend/utils/adt/misc.c
When LWLOCK_STATS is defined, count spindelays.
commit : b79ab00144e64217d418fde884bca8ea58fbd4a4
author : Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 16:02:55 -0400
committer: Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 16:02:55 -0400
When LWLOCK_STATS is *not* defined, the only change is that
SpinLockAcquire now returns the number of delays.
Patch by me, review by Jeff Janes.
M src/backend/storage/lmgr/lwlock.c
M src/backend/storage/lmgr/s_lock.c
M src/include/storage/s_lock.h
Cope with smaller-than-normal BLCKSZ setting in SPGiST indexes on text.
commit : 757773602c424b1e51c2d9cad8a59398ba7f7b2c
author : Tom Lane <[email protected]>
date : Tue, 26 Jun 2012 14:36:25 -0400
committer: Tom Lane <[email protected]>
date : Tue, 26 Jun 2012 14:36:25 -0400
The original coding failed miserably for BLCKSZ of 4K or less, as reported
by Josh Kupershmidt. With the present design for text indexes, a given
inner tuple could have up to 256 labels (requiring either 3K or 4K bytes
depending on MAXALIGN), which means that we can't positively guarantee no
failures for smaller blocksizes. But we can at least make it behave sanely
so long as there are few enough labels to fit on a page. Considering that
btree is also more prone to "index tuple too large" failures when BLCKSZ is
small, it's not clear that we should expend more work than this on this
case.
M src/backend/access/spgist/spgtextproc.c
Make DROP FUNCTION hint more informative.
commit : 0caa0d04db24d2c571fa7daa410bc6a5b319a2a2
author : Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 13:33:23 -0400
committer: Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 13:33:23 -0400
If you decide you want to take the hint, this gives you something you
can paste right back to the server.
Dean Rasheed
M src/backend/catalog/pg_proc.c
M src/test/regress/expected/polymorphism.out
M src/test/regress/expected/rangefuncs.out
Reduce use of heavyweight locking inside hash AM.
commit : 76837c1507cb5a5a0048046233568447729e66dd
author : Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 06:56:10 -0400
committer: Robert Haas <[email protected]>
date : Tue, 26 Jun 2012 06:56:10 -0400
Avoid using LockPage(rel, 0, lockmode) to protect against changes to
the bucket mapping. Instead, an exclusive buffer content lock is now
viewed as sufficient permission to modify the metapage, and a shared
buffer content lock is used when such modifications need to be
prevented. This more relaxed locking regimen makes it possible that,
when we're busy getting a heavyweight bucket on the bucket we intend
to search or insert into, a bucket split might occur underneath us.
To compenate for that possibility, we use a loop-and-retry system:
release the metapage content lock, acquire the heavyweight lock on the
target bucket, and then reacquire the metapage content lock and check
that the bucket mapping has not changed. Normally it hasn't, and
we're done. But if by chance it has, we simply unlock the metapage,
release the heavyweight lock we acquired previously, lock the new
bucket, and loop around again. Even in the worst case we cannot loop
very many times here, since we don't split the same bucket again until
we've split all the other buckets, and 2^N gets big pretty fast.
This results in greatly improved concurrency, because we're
effectively replacing two lwlock acquire-and-release cycles in
exclusive mode (on one of the lock manager locks) with a single
acquire-and-release cycle in shared mode (on the metapage buffer
content lock). Testing shows that it's still not quite as good as
btree; for that, we'd probably have to find some way of getting rid
of the heavyweight bucket locks as well, which does not appear
straightforward.
Patch by me, review by Jeff Janes.
M src/backend/access/hash/README
M src/backend/access/hash/hashinsert.c
M src/backend/access/hash/hashpage.c
M src/backend/access/hash/hashsearch.c
Fix pg_upgrade, broken by the xlogid/segno -> 64-bit int refactoring.
commit : 038f3a05092365eca070bdc588554520dfd5ffb9
author : Heikki Linnakangas <[email protected]>
date : Tue, 26 Jun 2012 07:35:57 +0300
committer: Heikki Linnakangas <[email protected]>
date : Tue, 26 Jun 2012 07:35:57 +0300
The xlogid + segno representation of a particular WAL segment doesn't make
much sense in pg_resetxlog anymore, now that we don't use that anywhere
else. Use the WAL filename instead, since that's a convenient way to name a
particular WAL segment.
I did this partially for pg_resetxlog in the original xlogid/segno -> uint64
patch, but I neglected pg_upgrade and the docs. This should now be more
complete.
M contrib/pg_upgrade/controldata.c
M contrib/pg_upgrade/pg_upgrade.c
M contrib/pg_upgrade/pg_upgrade.h
M doc/src/sgml/ref/pg_resetxlog.sgml
M src/bin/pg_resetxlog/pg_resetxlog.c
Make pg_dump emit more accurate dependency information.
commit : 8a504a363925fc5c7af48cd723da3f7e4d7ba9e2
author : Tom Lane <[email protected]>
date : Mon, 25 Jun 2012 21:20:24 -0400
committer: Tom Lane <[email protected]>
date : Mon, 25 Jun 2012 21:20:24 -0400
While pg_dump has included dependency information in archive-format output
ever since 7.3, it never made any large effort to ensure that that
information was actually useful. In particular, in common situations where
dependency chains include objects that aren't separately emitted in the
dump, the dependencies shown for objects that were emitted would reference
the dump IDs of these un-dumped objects, leaving no clue about which other
objects the visible objects indirectly depend on. So far, parallel
pg_restore has managed to avoid tripping over this misfeature, but only
by dint of some crude hacks like not trusting dependency information in
the pre-data section of the archive.
It seems prudent to do something about this before it rises up to bite us,
so instead of emitting the "raw" dependencies of each dumped object,
recursively search for its actual dependencies among the subset of objects
that are being dumped.
Back-patch to 9.2, since that code hasn't yet diverged materially from
HEAD. At some point we might need to back-patch further, but right now
there are no known cases where this is actively necessary. (The one known
case, bug #6699, is fixed in a different way by my previous patch.) Since
this patch depends on 9.2 changes that made TOC entries be marked before
output commences as to whether they'll be dumped, back-patching further
would require additional surgery; and as of now there's no evidence that
it's worth the risk.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
Improve pg_dump's dependency-sorting logic to enforce section dump order.
commit : a1ef01fe163b304760088e3e30eb22036910a495
author : Tom Lane <[email protected]>
date : Mon, 25 Jun 2012 21:19:10 -0400
committer: Tom Lane <[email protected]>
date : Mon, 25 Jun 2012 21:19:10 -0400
As of 9.2, with the --section option, it is very important that the concept
of "pre data", "data", and "post data" sections of the output be honored
strictly; else a dump divided into separate sectional files might be
unrestorable. However, the dependency-sorting logic knew nothing of
sections and would happily select output orderings that didn't fit that
structure. Doing so was mostly harmless before 9.2, but now we need to be
sure it doesn't do that. To fix, create dummy objects representing the
section boundaries and add dependencies between them and all the normal
objects. (This might sound expensive but it seems to only add a percent or
two to pg_dump's runtime.)
This also fixes a problem introduced in 9.1 by the feature that allows
incomplete GROUP BY lists when a primary key is given in GROUP BY.
That means that views can depend on primary key constraints. Previously,
pg_dump would deal with that by simply emitting the primary key constraint
before the view definition (and hence before the data section of the
output). That's bad enough for simple serial restores, where creating an
index before the data is loaded works, but is undesirable for speed
reasons. But it could lead to outright failure of parallel restores, as
seen in bug #6699 from Joe Van Dyk. That happened because pg_restore would
switch into parallel mode as soon as it reached the constraint, and then
very possibly would try to emit the view definition before the primary key
was committed (as a consequence of another bug that causes the view not to
be correctly marked as depending on the constraint). Adding the section
boundary constraints forces the dependency-sorting code to break the view
into separate table and rule declarations, allowing the rule, and hence the
primary key constraint it depends on, to revert to their intended location
in the post-data section. This also somewhat accidentally works around the
bogus-dependency-marking problem, because the rule will be correctly shown
as depending on the constraint, so parallel pg_restore will now do the
right thing. (We will fix the bogus-dependency problem for real in a
separate patch, but that patch is not easily back-portable to 9.1, so the
fact that this patch is enough to dodge the only known symptom is
fortunate.)
Back-patch to 9.1, except for the hunk that adds verification that the
finished archive TOC list is in correct section order; the place where
it was convenient to add that doesn't exist in 9.1.
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dump.h
M src/bin/pg_dump/pg_dump_sort.c
Tighten up includes in sinvaladt.h, twophase.h, proc.h
commit : 77ed0c69504aad141dea314b1de261195aae5c9e
author : Alvaro Herrera <[email protected]>
date : Mon, 25 Jun 2012 17:45:15 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 25 Jun 2012 17:45:15 -0400
Remove proc.h from sinvaladt.h and twophase.h; also replace xlog.h in
proc.h with xlogdefs.h.
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/storage/ipc/ipci.c
M src/backend/storage/ipc/procarray.c
M src/backend/storage/lmgr/lock.c
M src/backend/storage/lmgr/predicate.c
M src/backend/utils/init/postinit.c
M src/backend/utils/misc/guc.c
M src/include/access/twophase.h
M src/include/storage/proc.h
M src/include/storage/sinvaladt.h
Unify calling conventions for postgres/postmaster sub-main functions
commit : eeece9e60984e76e5a41c1e2fa9efc5a1761e560
author : Peter Eisentraut <[email protected]>
date : Mon, 25 Jun 2012 21:25:26 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 25 Jun 2012 21:25:26 +0300
There was a wild mix of calling conventions: Some were declared to
return void and didn't return, some returned an int exit code, some
claimed to return an exit code, which the callers checked, but
actually never returned, and so on.
Now all of these functions are declared to return void and decorated
with attribute noreturn and don't return. That's easiest, and most
code already worked that way.
M src/backend/main/main.c
M src/backend/postmaster/autovacuum.c
M src/backend/postmaster/pgarch.c
M src/backend/postmaster/pgstat.c
M src/backend/postmaster/postmaster.c
M src/backend/postmaster/syslogger.c
M src/backend/replication/walsender.c
M src/backend/tcop/postgres.c
M src/backend/utils/misc/help_config.c
M src/include/bootstrap/bootstrap.h
M src/include/pgstat.h
M src/include/postmaster/autovacuum.h
M src/include/postmaster/bgwriter.h
M src/include/postmaster/pgarch.h
M src/include/postmaster/postmaster.h
M src/include/postmaster/startup.h
M src/include/postmaster/syslogger.h
M src/include/postmaster/walwriter.h
M src/include/replication/walreceiver.h
M src/include/replication/walsender.h
M src/include/storage/ipc.h
M src/include/tcop/tcopprot.h
M src/include/utils/help_config.h
Fix typo in DEBUG message, introduced by recent WAL refactoring.
commit : c7d47abd04dc1322fd545370cfeb743680df0e3a
author : Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 14:00:35 -0400
committer: Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 14:00:35 -0400
Fujii Masao
M src/backend/replication/walsender.c
Unbreak pg_resetxlog -l.
commit : a6427f1f478b0bf43d1b861ee4053e2e8bc6118b
author : Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 13:58:38 -0400
committer: Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 13:58:38 -0400
Fujii Masao
M src/bin/pg_resetxlog/pg_resetxlog.c
Remove sanity test in XRecOffIsValid.
commit : 2dfa87bcb6eb3ee6e41c40ed4a8a43019a66bd38
author : Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 12:14:43 -0400
committer: Robert Haas <[email protected]>
date : Mon, 25 Jun 2012 12:14:43 -0400
Commit 061e7efb1b4c5b8a5d02122b7780531b8d5bf23d changed the rules
for splitting xlog records across pages, but neglected to update this
test. It's possible that there's some better action here than just
removing the test completely, but this at least appears to get some
of the things that are currently broken (like initdb on MacOS X)
working again.
M src/include/access/xlog_internal.h
Fix warning for 64-bit literal on 32-bit build.
commit : 5c7f954d310783d49724367c9fa6514bc62b7cce
author : Kevin Grittner <[email protected]>
date : Mon, 25 Jun 2012 07:25:00 -0500
committer: Kevin Grittner <[email protected]>
date : Mon, 25 Jun 2012 07:25:00 -0500
M src/bin/pg_resetxlog/pg_resetxlog.c
Replace int2/int4 in C code with int16/int32
commit : b8b2e3b2deeaab19715af063fc009b7c230b2336
author : Peter Eisentraut <[email protected]>
date : Mon, 25 Jun 2012 01:51:46 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 25 Jun 2012 01:51:46 +0300
The latter was already the dominant use, and it's preferable because
in C the convention is that intXX means XX bits. Therefore, allowing
mixed use of int2, int4, int8, int16, int32 is obviously confusing.
Remove the typedefs for int2 and int4 for now. They don't seem to be
widely used outside of the PostgreSQL source tree, and the few uses
can probably be cleaned up by the time this ships.
M contrib/btree_gist/btree_int2.c
M contrib/btree_gist/btree_int4.c
M contrib/cube/cube.c
M contrib/hstore/hstore.h
M contrib/hstore/hstore_gist.c
M contrib/hstore/hstore_io.c
M contrib/intarray/_int.h
M contrib/intarray/_int_bool.c
M contrib/intarray/_int_gin.c
M contrib/intarray/_int_gist.c
M contrib/intarray/_int_tool.c
M contrib/intarray/_intbig_gist.c
M contrib/ltree/_ltree_gist.c
M contrib/ltree/ltree.h
M contrib/ltree/ltree_gist.c
M contrib/ltree/ltree_op.c
M contrib/ltree/ltxtquery_io.c
M contrib/ltree/ltxtquery_op.c
M contrib/pg_trgm/trgm_gist.c
M doc/src/sgml/xfunc.sgml
M src/backend/access/hash/hashfunc.c
M src/backend/access/spgist/spgquadtreeproc.c
M src/backend/catalog/Catalog.pm
M src/backend/catalog/namespace.c
M src/backend/catalog/pg_type.c
M src/backend/commands/cluster.c
M src/backend/commands/trigger.c
M src/backend/optimizer/prep/prepunion.c
M src/backend/parser/parse_utilcmd.c
M src/backend/tsearch/to_tsany.c
M src/backend/tsearch/ts_parse.c
M src/backend/tsearch/wparser_def.c
M src/backend/utils/adt/arrayfuncs.c
M src/backend/utils/adt/int.c
M src/backend/utils/adt/ruleutils.c
M src/backend/utils/adt/tsginidx.c
M src/backend/utils/adt/tsgistidx.c
M src/backend/utils/adt/tsquery.c
M src/backend/utils/adt/tsquery_gist.c
M src/backend/utils/adt/tsrank.c
M src/backend/utils/adt/tsvector.c
M src/backend/utils/adt/tsvector_op.c
M src/include/access/gin_private.h
M src/include/c.h
M src/include/catalog/namespace.h
M src/include/catalog/pg_am.h
M src/include/catalog/pg_amop.h
M src/include/catalog/pg_amproc.h
M src/include/catalog/pg_attrdef.h
M src/include/catalog/pg_attribute.h
M src/include/catalog/pg_authid.h
M src/include/catalog/pg_class.h
M src/include/catalog/pg_collation.h
M src/include/catalog/pg_constraint.h
M src/include/catalog/pg_conversion.h
M src/include/catalog/pg_database.h
M src/include/catalog/pg_depend.h
M src/include/catalog/pg_description.h
M src/include/catalog/pg_index.h
M src/include/catalog/pg_inherits.h
M src/include/catalog/pg_largeobject.h
M src/include/catalog/pg_proc.h
M src/include/catalog/pg_rewrite.h
M src/include/catalog/pg_seclabel.h
M src/include/catalog/pg_shdepend.h
M src/include/catalog/pg_statistic.h
M src/include/catalog/pg_trigger.h
M src/include/catalog/pg_ts_config_map.h
M src/include/catalog/pg_type.h
M src/include/commands/vacuum.h
M src/include/tsearch/ts_public.h
M src/include/tsearch/ts_type.h
M src/include/tsearch/ts_utils.h
M src/include/utils/builtins.h
M src/interfaces/ecpg/ecpglib/sqlda.c
I missed some references to xlogid/xrecoff in Win32-only code. Fix.
commit : 7eb8c7851458eb88def80c290a4b5bc37cc321f3
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 22:14:31 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 22:14:31 +0300
M src/bin/pg_basebackup/pg_basebackup.c
Use UINT64CONST for 64-bit integer constants.
commit : 0687a26002c86e3115783d75f212358ef348525f
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 21:41:23 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 21:41:23 +0300
Peter Eisentraut advised me that UINT64CONST is the proper way to do that,
not LL suffix.
M src/include/access/xlog_internal.h
Oops. Remove stray paren.
commit : a218e23a08519d525d09565bbeddbf682f76d4dd
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 20:03:57 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 20:03:57 +0300
I didn't notice this on my laptop as I don't HAVE_FSYNC_WRITETHROUGH.
M src/backend/access/transam/xlog.c
Use LL suffix for 64-bit constants.
commit : 96ff85e2dd64e7987ee6d69f306e3b8f54cc72c0
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 20:00:42 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 20:00:42 +0300
Per warning from buildfarm member 'locust'. At least I think this what's
making it upset.
M src/include/access/xlog_internal.h
Replace XLogRecPtr struct with a 64-bit integer.
commit : 0ab9d1c4b31622e9176472b4276f3e9831e3d6ba
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:51:37 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:51:37 +0300
This simplifies code that needs to do arithmetic on XLogRecPtrs.
To avoid changing on-disk format of data pages, the LSN on data pages is
still stored in the old format. That should keep pg_upgrade happy. However,
we have XLogRecPtrs embedded in the control file, and in the structs that
are sent over the replication protocol, so this changes breaks compatibility
of pg_basebackup and server. I didn't do anything about this in this patch,
per discussion on -hackers, the right thing to do would to be to change the
replication protocol to be architecture-independent, so that you could use
a newer version of pg_receivexlog, for example, against an older server
version.
M contrib/pageinspect/rawpage.c
M src/backend/access/gist/gist.c
M src/backend/access/gist/gistutil.c
M src/backend/access/transam/transam.c
M src/backend/access/transam/twophase.c
M src/backend/access/transam/xact.c
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/postmaster/checkpointer.c
M src/backend/replication/basebackup.c
M src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
M src/backend/replication/repl_scanner.l
M src/backend/replication/syncrep.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walreceiverfuncs.c
M src/backend/replication/walsender.c
M src/backend/storage/ipc/standby.c
M src/backend/storage/lmgr/proc.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/transam.h
M src/include/access/xlog_internal.h
M src/include/access/xlogdefs.h
M src/include/catalog/pg_control.h
M src/include/storage/bufpage.h
Allow WAL record header to be split across pages.
commit : 061e7efb1b4c5b8a5d02122b7780531b8d5bf23d
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:27:10 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:27:10 +0300
This saves a few bytes of WAL space, but the real motivation is to make it
predictable how much WAL space a record requires, as it no longer depends
on whether we need to waste the last few bytes at end of WAL page because
the header doesn't fit.
The total length field of WAL record, xl_tot_len, is moved to the beginning
of the WAL record header, so that it is still always found on the first page
where a WAL record begins.
Bump WAL version number again as this is an incompatible change.
M src/backend/access/transam/xlog.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
Move WAL continuation record information to WAL page header.
commit : 20ba5ca64c7c858400f845f8ded330604e2c8d61
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:15:00 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:15:00 +0300
The continuation record only contained one field, xl_rem_len, so it makes
things simpler to just include it in the WAL page header. This wastes four
bytes on pages that don't begin with a continuation from previos page, plus
four bytes on every page, because of padding.
The motivation of this is to make it easier to calculate how much space a
WAL record needs. Before this patch, it depended on how many page boundaries
the record crosses. The motivation of that, in turn, is to separate the
allocation of space in the WAL from the copying of the record data to the
allocated space. Keeping the calculation of space required simple helps to
keep the critical section of allocating the space from WAL short. But that's
not included in this patch yet.
Bump WAL version number again, as this is an incompatible change.
M src/backend/access/transam/xlog.c
M src/include/access/xlog_internal.h
Don't waste the last segment of each 4GB logical log file.
commit : dfda6ebaec6763090fb78b458a979b558c50b39b
author : Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:06:38 +0300
committer: Heikki Linnakangas <[email protected]>
date : Sun, 24 Jun 2012 18:06:38 +0300
The comments claimed that wasting the last segment made it easier to do
calculations with XLogRecPtrs, because you don't have problems representing
last-byte-position-plus-1 that way. In my experience, however, it only made
things more complicated, because the there was two ways to represent the
boundary at the beginning of a logical log file: logid = n+1 and xrecoff = 0,
or as xlogid = n and xrecoff = 4GB - XLOG_SEG_SIZE. Some functions were
picky about which representation was used.
Also, use a 64-bit segment number instead of the log/seg combination, to
point to a certain WAL segment. We assume that all platforms have a working
64-bit integer type nowadays.
This is an incompatible change in WAL format, so bumping WAL version number.
M src/backend/access/transam/xlog.c
M src/backend/access/transam/xlogfuncs.c
M src/backend/postmaster/checkpointer.c
M src/backend/replication/basebackup.c
M src/backend/replication/walreceiver.c
M src/backend/replication/walsender.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_basebackup/receivelog.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/include/access/xlog.h
M src/include/access/xlog_internal.h
M src/include/access/xlogdefs.h
Make pgbench -i emit only one-tenth as many status messages.
commit : 47c7365e794a0a57382efefbf1f2b062c7a3e3d3
author : Robert Haas <[email protected]>
date : Fri, 22 Jun 2012 09:03:25 -0400
committer: Robert Haas <[email protected]>
date : Fri, 22 Jun 2012 09:03:25 -0400
These days, even a wimpy system can insert 10000 tuples in the blink of
an eye, so there's no real need for this much verbosity.
Per complaint from Tatsuo Ishii.
M contrib/pgbench/pgbench.c
Document that && can be used to search arrays.
commit : 6ef5baf8b1cb609218b2fafb378b3f190a6f90f9
author : Robert Haas <[email protected]>
date : Fri, 22 Jun 2012 08:59:41 -0400
committer: Robert Haas <[email protected]>
date : Fri, 22 Jun 2012 08:59:41 -0400
Also, add some cross-links to the indexing documentation, so it's easier
to notice that && and other array operators have index support.
Ryan Kelly, edited by me.
M doc/src/sgml/array.sgml
M doc/src/sgml/func.sgml
Make placeholders in SQL command help more consistent and precise
commit : 6753ced3104046340659db15626580bc49df617d
author : Peter Eisentraut <[email protected]>
date : Fri, 22 Jun 2012 01:06:14 +0300
committer: Peter Eisentraut <[email protected]>
date : Fri, 22 Jun 2012 01:06:14 +0300
To avoid divergent names on related pages, avoid ambiguities, and
reduce translation work a little.
M doc/src/sgml/ref/alter_aggregate.sgml
M doc/src/sgml/ref/alter_extension.sgml
M doc/src/sgml/ref/alter_foreign_table.sgml
M doc/src/sgml/ref/alter_sequence.sgml
M doc/src/sgml/ref/alter_server.sgml
M doc/src/sgml/ref/alter_table.sgml
M doc/src/sgml/ref/alter_trigger.sgml
M doc/src/sgml/ref/alter_view.sgml
M doc/src/sgml/ref/analyze.sgml
M doc/src/sgml/ref/copy.sgml
M doc/src/sgml/ref/create_database.sgml
M doc/src/sgml/ref/create_extension.sgml
M doc/src/sgml/ref/create_index.sgml
M doc/src/sgml/ref/create_rule.sgml
M doc/src/sgml/ref/create_sequence.sgml
M doc/src/sgml/ref/create_table.sgml
M doc/src/sgml/ref/create_table_as.sgml
M doc/src/sgml/ref/create_trigger.sgml
M doc/src/sgml/ref/delete.sgml
M doc/src/sgml/ref/drop_aggregate.sgml
M doc/src/sgml/ref/drop_extension.sgml
M doc/src/sgml/ref/drop_rule.sgml
M doc/src/sgml/ref/drop_server.sgml
M doc/src/sgml/ref/drop_tablespace.sgml
M doc/src/sgml/ref/drop_trigger.sgml
M doc/src/sgml/ref/grant.sgml
M doc/src/sgml/ref/insert.sgml
M doc/src/sgml/ref/revoke.sgml
M doc/src/sgml/ref/update.sgml
M doc/src/sgml/ref/vacuum.sgml
Fix memory leak in ARRAY(SELECT ...) subqueries.
commit : d14241c2cf72966c09c1acece5cb44b5c84204b4
author : Tom Lane <[email protected]>
date : Thu, 21 Jun 2012 17:26:07 -0400
committer: Tom Lane <[email protected]>
date : Thu, 21 Jun 2012 17:26:07 -0400
Repeated execution of an uncorrelated ARRAY_SUBLINK sub-select (which
I think can only happen if the sub-select is embedded in a larger,
correlated subquery) would leak memory for the duration of the query,
due to not reclaiming the array generated in the previous execution.
Per bug #6698 from Armando Miraglia. Diagnosis and fix idea by Heikki,
patch itself by me.
This has been like this all along, so back-patch to all supported versions.
M src/backend/executor/nodeSubplan.c
M src/include/nodes/execnodes.h
Repair comment mangled by a pgindent run long ago
commit : 68d0e3cbf9c4b5981679668ebb554a4ec050fc72
author : Alvaro Herrera <[email protected]>
date : Mon, 28 May 2012 13:47:29 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 28 May 2012 13:47:29 -0400
M src/backend/commands/lockcmds.c
Add a small cache of locks owned by a resource owner in ResourceOwner.
commit : eeb6f37d89fc60c6449ca12ef9e91491069369cb
author : Heikki Linnakangas <[email protected]>
date : Thu, 21 Jun 2012 15:01:17 +0300
committer: Heikki Linnakangas <[email protected]>
date : Thu, 21 Jun 2012 15:01:17 +0300
This speeds up reassigning locks to the parent owner, when the transaction
holds a lot of locks, but only a few of them belong to the current resource
owner. This is particularly helps pg_dump when dumping a large number of
objects.
The cache can hold up to 15 locks in each resource owner. After that, the
cache is marked as overflowed, and we fall back to the old method of
scanning the whole local lock table. The tradeoff here is that the cache has
to be scanned whenever a lock is released, so if the cache is too large,
lock release becomes more expensive. 15 seems enough to cover pg_dump, and
doesn't have much impact on lock release.
Jeff Janes, reviewed by Amit Kapila and Heikki Linnakangas.
M src/backend/storage/lmgr/lock.c
M src/backend/utils/resowner/resowner.c
M src/include/storage/lock.h
M src/include/utils/resowner.h
Remove incomplete/incorrect support for zero-column foreign keys.
commit : dfd9c116cc3ebaf42f895b9b16a9ff69bb21664b
author : Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 20:15:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 20:15:02 -0400
The original coding in ri_triggers.c had partial support for the concept of
zero-column foreign key constraints. But this is not defined in the SQL
standard, nor was it ever allowed by any other part of Postgres, nor was it
very fully implemented even here (eg there was no support for preventing
PK-table deletions that would violate the constraint). Doesn't seem very
useful to carry 100-plus lines of code for a corner case that no one is
interested in making work. Instead, just add a check that the column list
read from pg_constraint is non-empty.
M src/backend/utils/adt/ri_triggers.c
Increase MAX_SYSCACHE_CALLBACKS from 20 to 32.
commit : 0ce4459a366def5173a59a74ba1b81e8449b8df1
author : Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 19:47:37 -0400
committer: Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 19:47:37 -0400
By my count there are 18 callers of CacheRegisterSyscacheCallback in the
core code in HEAD, so we are potentially leaving as few as 2 slots for any
add-on code to use (though possibly not all these callers would actually
activate in any particular session). That doesn't seem like a lot of
headroom, so let's pump it up a little.
M src/backend/utils/cache/inval.c
Cache the results of ri_FetchConstraintInfo in a backend-local cache.
commit : 45ba424f332a7eaa685a4e23f142a43114c65811
author : Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 17:24:14 -0400
committer: Tom Lane <[email protected]>
date : Wed, 20 Jun 2012 17:24:14 -0400
Extracting data from pg_constraint turned out to take as much as 10% of the
runtime in a bulk-update case where the foreign key column wasn't changing,
because we did it over again for each tuple. Fix that by maintaining a
backend-local cache of the results. This is really a pretty small patch,
but converting the trigger functions to work with pointers rather than
local struct variables requires a lot of mechanical changes.
M src/backend/utils/adt/ri_triggers.c
Improve tests for whether we can skip queueing RI enforcement triggers.
commit : cfa0f4255bb0f5550d37a01c4d8fe2966d20040c
author : Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 20:07:08 -0400
committer: Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 20:07:08 -0400
During an update of a PK row, we can skip firing the RI trigger if any old
key value is NULL, because then the row could not have had any matching
rows in the FK table. Conversely, during an update of an FK row, the
outcome is determined if any new key value is NULL. In either case it
becomes unnecessary to compare individual key values.
This patch was inspired by discussion of Vik Reykja's patch to use IS NOT
DISTINCT semantics for the key comparisons. In the event there is no need
for that and so this patch looks nothing like his, but he should still get
credit for having re-opened consideration of the trigger skip logic.
M src/backend/commands/trigger.c
M src/backend/utils/adt/ri_triggers.c
M src/include/commands/trigger.h
Add pgbench option to add foreign key constraints to the standard scenario.
commit : afe1c51c9d65c67c7474c60d64bceefe9953dde6
author : Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 18:33:59 -0400
committer: Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 18:33:59 -0400
The option --foreign-keys, used at initialization time, will create foreign
key constraints for the columns that represent references to other tables'
primary keys. This can help in benchmarking FK performance.
Jeff Janes
M contrib/pgbench/pgbench.c
M doc/src/sgml/pgbench.sgml
pg_dump: Fix verbosity level in LO progress messages
commit : 11b335ac4cc895db8c1b27455281fa36f97c53ff
author : Alvaro Herrera <[email protected]>
date : Mon, 18 Jun 2012 16:37:49 -0400
committer: Alvaro Herrera <[email protected]>
date : Mon, 18 Jun 2012 16:37:49 -0400
In passing, reword another instance of the same message that was
gratuitously different.
Author: Josh Kupershmidt
after a bug report by Bosco Rama
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_tar.c
Remove confusing half sentence from legal notice
commit : c521665bd725448a333e1b2c693f460c63789f5c
author : Peter Eisentraut <[email protected]>
date : Wed, 20 Jun 2012 00:07:58 +0300
committer: Peter Eisentraut <[email protected]>
date : Wed, 20 Jun 2012 00:07:58 +0300
pointed out by Stefan Kaltenbrunner
M doc/src/sgml/legal.sgml
Share RI trigger code between NO ACTION and RESTRICT cases.
commit : fe3db740025d80f70ceccb33b2bf3c085a2fca80
author : Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 14:31:54 -0400
committer: Tom Lane <[email protected]>
date : Tue, 19 Jun 2012 14:31:54 -0400
These triggers are identical except for whether ri_Check_Pk_Match is to be
called, so factor out the common code to save a couple hundred lines.
Also, eliminate null-column checks in ri_Check_Pk_Match, since they're
duplicate with the calling functions and require unnecessary complication
in its API statement.
Simplify the way code is shared between RI_FKey_check_ins and
RI_FKey_check_upd, too.
M src/backend/utils/adt/ri_triggers.c
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Improve comments about why SET DEFAULT triggers must recheck for matches.
commit : 48756be9cf31c37a936eecff051bf143d5866551
author : Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 22:45:07 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 22:45:07 -0400
I was confused about this, so try to make it clearer for the next person.
(This seems like a fairly inefficient way of dealing with a corner case,
but I don't have a better idea offhand. Maybe if there were a way to turn
off the RI_FKey_keyequal_upd_fk event filter temporarily?)
M src/backend/utils/adt/ri_triggers.c
Allow ON UPDATE/DELETE SET DEFAULT plans to be cached.
commit : e8c9fd5fdf768323911f7088e8287f63b513c3c6
author : Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 19:37:23 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 19:37:23 -0400
Once upon a time, somebody was worried that cached RI plans wouldn't get
remade with new default values after ALTER TABLE ... SET DEFAULT, so they
didn't allow caching of plans for ON UPDATE/DELETE SET DEFAULT actions.
That time is long gone, though (and even at the time I doubt this was the
greatest hazard posed by ALTER TABLE...). So allow these triggers to cache
their plans just like the others.
The cache_plan argument to ri_PlanCheck is now vestigial, since there
are no callers that don't pass "true"; but I left it alone in case there
is any future need for it.
M src/backend/utils/adt/ri_triggers.c
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Remove derived fields from RI_QueryKey, and do a bit of other cleanup.
commit : 03a5ba24b096a9acbbc9682adc0a27d1db31c570
author : Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 18:50:03 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 18:50:03 -0400
We really only need the foreign key constraint's OID and the query type
code to uniquely identify each plan we are caching for FK checks. The
other stuff that was in the struct had no business being used as part of
a hash key, and was all just being copied from struct RI_ConstraintInfo
anyway. Get rid of the unnecessary fields, and readjust various function
APIs to make them use RI_ConstraintInfo not RI_QueryKey as info source.
I'd be surprised if this makes any measurable performance difference,
but it certainly feels cleaner.
M src/backend/utils/adt/ri_triggers.c
pg_dump: Add missing newlines at end of messages
commit : e1e97e93134a8b52861ae801117f94a15da410a4
author : Peter Eisentraut <[email protected]>
date : Mon, 18 Jun 2012 23:57:00 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 18 Jun 2012 23:57:00 +0300
M src/bin/pg_dump/dumputils.c
M src/bin/pg_dump/pg_backup_archiver.c
M src/bin/pg_dump/pg_backup_directory.c
M src/bin/pg_dump/pg_dump.c
Update SQL spec references in ri_triggers code to match SQL:2008.
commit : f9429746c970b5e46a843a5cd0387fb0081b8f55
author : Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 12:19:38 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 12:19:38 -0400
Now that what we're implementing isn't SQL92, we probably shouldn't cite
chapter and verse in that spec anymore. Also fix some comments that
talked about MATCH FULL but in fact were in code that's also used for
MATCH SIMPLE.
No code changes in this commit, just comments.
M src/backend/utils/adt/ri_triggers.c
Change ON UPDATE SET NULL/SET DEFAULT referential actions to meet SQL spec.
commit : c75be2ad6013684f2c118eea3ad8498f8d129c59
author : Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 12:12:52 -0400
committer: Tom Lane <[email protected]>
date : Mon, 18 Jun 2012 12:12:52 -0400
Previously, when executing an ON UPDATE SET NULL or SET DEFAULT action for
a multicolumn MATCH SIMPLE foreign key constraint, we would set only those
referencing columns corresponding to referenced columns that were changed.
This is what the SQL92 standard said to do --- but more recent versions
of the standard say that all referencing columns should be set to null or
their default values, no matter exactly which referenced columns changed.
At least for SET DEFAULT, that is clearly saner behavior. It's somewhat
debatable whether it's an improvement for SET NULL, but it appears that
other RDBMS systems read the spec this way. So let's do it like that.
This is a release-notable behavioral change, although considering that
our documentation already implied it was done this way, the lack of
complaints suggests few people use such cases.
M doc/src/sgml/ddl.sgml
M doc/src/sgml/ref/create_table.sgml
M src/backend/utils/adt/ri_triggers.c
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Refer to the default foreign key match style as MATCH SIMPLE internally.
commit : f5297bdfe4c4a47376c41b96161fb55c2294a0b1
author : Tom Lane <[email protected]>
date : Sun, 17 Jun 2012 20:16:07 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Jun 2012 20:16:07 -0400
Previously we followed the SQL92 wording, "MATCH <unspecified>", but since
SQL99 there's been a less awkward way to refer to the default style.
In addition to the code changes, pg_constraint.confmatchtype now stores
this match style as 's' (SIMPLE) rather than 'u' (UNSPECIFIED). This
doesn't affect pg_dump or psql because they use pg_get_constraintdef()
to reconstruct foreign key definitions. But other client-side code might
examine that column directly, so this change will have to be marked as
an incompatibility in the 9.3 release notes.
M doc/src/sgml/catalogs.sgml
M src/backend/catalog/information_schema.sql
M src/backend/commands/trigger.c
M src/backend/parser/gram.y
M src/backend/utils/adt/ri_triggers.c
M src/backend/utils/adt/ruleutils.c
M src/include/catalog/catversion.h
M src/include/nodes/parsenodes.h
M src/test/regress/expected/foreign_key.out
M src/test/regress/sql/foreign_key.sql
Make documentation of --help and --version options more consistent
commit : bb7520cc26dcd392e3dce294b685b3a0d6dae9e9
author : Peter Eisentraut <[email protected]>
date : Mon, 18 Jun 2012 02:44:00 +0300
committer: Peter Eisentraut <[email protected]>
date : Mon, 18 Jun 2012 02:44:00 +0300
Before, some places didn't document the short options (-? and -V),
some documented both, some documented nothing, and they were listed in
various orders. Now this is hopefully more consistent and complete.
M contrib/oid2name/oid2name.c
M contrib/pg_archivecleanup/pg_archivecleanup.c
M contrib/pg_standby/pg_standby.c
M contrib/pg_upgrade/option.c
M contrib/pgbench/pgbench.c
M contrib/vacuumlo/vacuumlo.c
M doc/src/sgml/oid2name.sgml
M doc/src/sgml/pgarchivecleanup.sgml
M doc/src/sgml/pgbench.sgml
M doc/src/sgml/pgstandby.sgml
M doc/src/sgml/pgtestfsync.sgml
M doc/src/sgml/pgtesttiming.sgml
M doc/src/sgml/ref/createuser.sgml
M doc/src/sgml/ref/dropdb.sgml
M doc/src/sgml/ref/dropuser.sgml
M doc/src/sgml/ref/ecpg-ref.sgml
M doc/src/sgml/ref/initdb.sgml
M doc/src/sgml/ref/pg_basebackup.sgml
M doc/src/sgml/ref/pg_config-ref.sgml
M doc/src/sgml/ref/pg_ctl-ref.sgml
M doc/src/sgml/ref/pg_receivexlog.sgml
M doc/src/sgml/ref/postgres-ref.sgml
M doc/src/sgml/vacuumlo.sgml
M src/backend/main/main.c
M src/bin/initdb/initdb.c
M src/bin/pg_basebackup/pg_basebackup.c
M src/bin/pg_basebackup/pg_receivexlog.c
M src/bin/pg_config/pg_config.c
M src/bin/pg_controldata/pg_controldata.c
M src/bin/pg_ctl/pg_ctl.c
M src/bin/pg_dump/pg_dump.c
M src/bin/pg_dump/pg_dumpall.c
M src/bin/pg_dump/pg_restore.c
M src/bin/pg_resetxlog/pg_resetxlog.c
M src/bin/psql/help.c
M src/bin/scripts/clusterdb.c
M src/bin/scripts/createdb.c
M src/bin/scripts/createlang.c
M src/bin/scripts/createuser.c
M src/bin/scripts/dropdb.c
M src/bin/scripts/droplang.c
M src/bin/scripts/dropuser.c
M src/bin/scripts/reindexdb.c
M src/bin/scripts/vacuumdb.c
M src/interfaces/ecpg/preproc/ecpg.c
Fix stats collector to recover nicely when system clock goes backwards.
commit : 9e18eacbdff2ae2abd5ff38eee725e6399e39b41
author : Tom Lane <[email protected]>
date : Sun, 17 Jun 2012 17:11:07 -0400
committer: Tom Lane <[email protected]>
date : Sun, 17 Jun 2012 17:11:07 -0400
Formerly, if the system clock went backwards, the stats collector would
fail to update the stats file any more until the clock reading again
exceeds whatever timestamp was last written into the stats file. Such
glitches in the clock's behavior are not terribly unlikely on machines
not using NTP. Such a scenario has been observed to cause regression test
failures in the buildfarm, and it could have bad effects on the behavior
of autovacuum, so it seems prudent to install some defenses.
We could directly detect the clock going backwards by adding
GetCurrentTimestamp calls in the stats collector's main loop, but that
would hurt performance on platforms where GetCurrentTimestamp is expensive.
To minimize the performance hit in normal cases, adopt a more complicated
scheme wherein backends check for clock skew when reading the stats file,
and if they see it, signal the stats collector by sending an extra stats
inquiry message. The stats collector does an extra GetCurrentTimestamp
only when it receives an inquiry with an apparently out-of-order
timestamp.
To avoid unnecessary GetCurrentTimestamp calls, expand the inquiry messages
to carry the backend's current clock reading as well as its stats cutoff
time. The latter, being intentionally slightly in-the-past, would trigger
more clock rechecks than we need if it were used for this purpose.
We might want to backpatch this change at some point, but let's let it
shake out in the buildfarm for awhile first.
M src/backend/postmaster/pgstat.c
M src/include/pgstat.h
Reorder basebackup options, to list pg_basebackup first
commit : 920febdad5073688fac34664249ab329dced8320
author : Magnus Hagander <[email protected]>
date : Sun, 17 Jun 2012 21:18:02 +0800
committer: Magnus Hagander <[email protected]>
date : Sun, 17 Jun 2012 21:18:02 +0800
Since this is the easy way of doing it, it should be listed first. All
the old information is retained for those who want the more advanced way.
Also adds a subheading for compressing logs, that seems to have been missing
M doc/src/sgml/backup.sgml
Remove 'for' loop perltidy argument, and move args to perltidyrc file.
commit : 47463a809870a736fcd2a4c6896c0f54be831f51
author : Bruce Momjian <[email protected]>
date : Sat, 16 Jun 2012 10:12:50 -0400
committer: Bruce Momjian <[email protected]>
date : Sat, 16 Jun 2012 10:12:50 -0400
Backpatch to 9.2.
Per suggestion from Noah Misch
M src/tools/pgindent/README
A src/tools/pgindent/perltidyrc
In pgindent, suppress reading the perltidy RC file using --noprofile.
commit : 0acd97825916bd341dfc6061a0713e0c56901571
author : Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 22:50:02 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 22:50:02 -0400
M src/tools/pgindent/README
Update pgindent Perl indentation instructions based on feedback from Àlvaro and Noah Misch.
commit : d6e02074371b39f9bfd7323c95102e4af53b34c6
author : Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 22:43:23 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 22:43:23 -0400
Backpatch to 9.2.
M src/tools/pgindent/README
Improve pg_upgrade wording for pg_ctl start failure; could be connection failure.
commit : 877b55c61962b480080a818b95dd462d5a7fe68d
author : Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 19:57:01 -0400
committer: Bruce Momjian <[email protected]>
date : Fri, 15 Jun 2012 19:57:01 -0400
Backpatch to 9.2.
Per report from Evan D. Hoffman
M contrib/pg_upgrade/server.c
Improve reporting of permission errors for array types
commit : 15b1918e7d3532f0e4ec3455ae6ce45fae09c86f
author : Peter Eisentraut <[email protected]>
date : Fri, 15 Jun 2012 22:55:03 +0300
committer: Peter Eisentraut <[email protected]>
date : Fri, 15 Jun 2012 22:55:03 +0300
Because permissions are assigned to element types, not array types,
complaining about permission denied on an array type would be
misleading to users. So adjust the reporting to refer to the element
type instead.
In order not to duplicate the required logic in two dozen places,
refactor the permission denied reporting for types a bit.
pointed out by Yeb Havinga during the review of the type privilege
feature
M src/backend/access/common/tupdesc.c
M src/backend/catalog/aclchk.c
M src/backend/catalog/objectaddress.c
M src/backend/catalog/pg_aggregate.c
M src/backend/commands/functioncmds.c
M src/backend/commands/opclasscmds.c
M src/backend/commands/operatorcmds.c
M src/backend/commands/tablecmds.c
M src/backend/commands/typecmds.c
M src/include/utils/acl.h
M src/test/regress/expected/privileges.out
Add more message pluralization
commit : d933092e0ab55ed95615977e50963f969ac9793d
author : Peter Eisentraut <[email protected]>
date : Fri, 15 Jun 2012 02:01:00 +0300
committer: Peter Eisentraut <[email protected]>
date : Fri, 15 Jun 2012 02:01:00 +0300
Even though we can't do much about the case with multiple plurals in
one sentence, we can fix the other cases.
M src/backend/commands/dbcommands.c
Improve readability and error messages in pg_backup_start_time.
commit : 8507c2f8564b709bb6a3cc86e9599f6129f45c8e
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 15:20:08 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 15:20:08 -0400
Gurjeet Singh, with corrections by me.
M src/backend/access/transam/xlogfuncs.c
Doc corrections for pg_is_in_backup patch.
commit : c616d85f6b6c7bd160c71583e2445b460eee8e3d
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 14:31:05 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 14:31:05 -0400
Fujii Masao
M doc/src/sgml/func.sgml
New SQL functons pg_backup_in_progress() and pg_backup_start_time()
commit : 68de499bda40fdf1395b714bb63febad61046700
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 13:25:43 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 13:25:43 -0400
Darold Gilles, reviewed by Gabriele Bartolini and others, rebased by
Marco Nenciarini. Stylistic cleanup and OID fixes by me.
M doc/src/sgml/func.sgml
M src/backend/access/transam/xlogfuncs.c
M src/include/access/xlog_internal.h
M src/include/catalog/catversion.h
M src/include/catalog/pg_proc.h
During transaction cleanup, release locks before deleting files.
commit : cd80073445ff5d72ad42923ba3d017541feae103
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 10:19:33 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 10:19:33 -0400
There's no need to hold onto the locks until the files are needed,
and by doing it this way, we reduce the impact on other backends who
may be awaiting locks we hold.
Noah Misch
M src/backend/access/transam/xact.c
Add new function log_newpage_buffer.
commit : 6cd015bea38b8a59feb84bf238a880a3b503cf5f
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 10:11:16 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 10:11:16 -0400
When I implemented the ginbuildempty() function as part of
implementing unlogged tables, I falsified the note in the header
comment for log_newpage. Although we could fix that up by changing
the comment, it seems cleaner to add a new function which is
specifically intended to handle this case. So do that.
M src/backend/access/gin/gininsert.c
M src/backend/access/heap/heapam.c
M src/include/access/heapam.h
Remove misplaced sanity check from heap_create().
commit : a475c6036752c26dca538632b68fd2cc592976b7
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:58:53 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:58:53 -0400
Even when allow_system_table_mods is not set, we allow creation of any
type of SQL object in pg_catalog, except for relations. And you can
get relations into pg_catalog, too, by initially creating them in some
other schema and then moving them with ALTER .. SET SCHEMA. So this
restriction, which prevents relations (only) from being created in
pg_catalog directly, is fairly pointless. If we need a safety mechanism
for this, it should be placed further upstream, so that it affects all
SQL objects uniformly, and picks up both CREATE and SET SCHEMA.
For now, just rip it out, per discussion with Tom Lane.
M src/backend/bootstrap/bootparse.y
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/include/catalog/heap.h
Remove RELKIND_UNCATALOGED.
commit : d2c86a1ccd17145eeed2377ff7930e2ccbf5869e
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:47:30 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:47:30 -0400
This may have been important at some point in the past, but it no
longer does anything useful.
Review by Tom Lane.
M contrib/pgstattuple/pgstattuple.c
M src/backend/access/common/reloptions.c
M src/backend/catalog/dependency.c
M src/backend/catalog/heap.c
M src/backend/catalog/index.c
M src/backend/catalog/toasting.c
M src/backend/commands/indexcmds.c
M src/backend/utils/cache/relcache.c
M src/include/catalog/pg_class.h
M src/include/utils/relcache.h
Make \conninfo print SSL information.
commit : 7582e0be78bc031803e274d428381e0b6077b810
author : Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:43:14 -0400
committer: Robert Haas <[email protected]>
date : Thu, 14 Jun 2012 09:43:14 -0400
Alastair Turner, per suggestion from Bruce Momjian.
M src/bin/psql/command.c
Add 9.2 branch to git_changelog's list.
commit : 80491a19839fd7741805622552f503202780fc52
author : Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:23:31 -0400
committer: Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:23:31 -0400
M src/tools/git_changelog
Flesh out RELEASE_CHANGES instructions for branching in git.
commit : f32609db72f07d6477a4c7de2565cb244f2af969
author : Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:11:06 -0400
committer: Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:11:06 -0400
We have this info in the wiki, but it should be here too.
M src/tools/RELEASE_CHANGES
Stamp library minor versions for 9.3.
commit : 357c5493349c5d7603739b9a44384b0e9f35fc25
author : Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:06:26 -0400
committer: Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 22:06:26 -0400
This includes fixing the MSVC copy of ecpg/preproc's version info, which
seems to have been overlooked repeatedly. Can't we fix that so there are
not two copies??
M src/interfaces/ecpg/compatlib/Makefile
M src/interfaces/ecpg/ecpglib/Makefile
M src/interfaces/ecpg/pgtypeslib/Makefile
M src/interfaces/ecpg/preproc/Makefile
M src/interfaces/libpq/Makefile
M src/tools/msvc/Mkvcbuild.pm
Stamp HEAD as 9.3devel.
commit : bed88fceac04042f0105eb22a018a4f91d64400d
author : Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 20:03:02 -0400
committer: Tom Lane <[email protected]>
date : Wed, 13 Jun 2012 20:03:02 -0400
Let the hacking begin ...
M configure
M configure.in
M doc/bug.template
M src/include/pg_config.h.win32
M src/interfaces/libpq/libpq.rc.in
M src/port/win32ver.rc
M src/tools/version_stamp.pl