[COMMITTERS] pgsql: Add valgrind suppression for pg_atomic_init_u64.

2014-11-14 Thread Andres Freund
Add valgrind suppression for pg_atomic_init_u64. pg_atomic_init_u64 (indirectly) uses compare/exchange to guarantee atomic writes on platforms where compare/exchange is available, but 64bit writes aren't atomic (yes, those exist). That leads to a harmless read of the initial value of variable. Br

[COMMITTERS] pgsql: Move BufferGetBlockNumber() out of heap_page_is_all_visible()'s

2014-11-14 Thread Andres Freund
Move BufferGetBlockNumber() out of heap_page_is_all_visible()'s inner loop. In some workloads BufferGetBlockNumber() shows up in profiles due to the sheer number of calls to it (and because it causes cache misses). The compiler can't move it out of the loop because it's a full extern function call

[COMMITTERS] pgsql: Allow interrupting GetMultiXactIdMembers

2014-11-14 Thread Alvaro Herrera
Allow interrupting GetMultiXactIdMembers This function has a loop which can lead to uninterruptible process "stalls" (actually infinite loops) when some bugs are triggered. Avoid that unpleasant situation by adding a check for interrupts in a place that shouldn't degrade performance in the normal

[COMMITTERS] pgsql: Allow interrupting GetMultiXactIdMembers

2014-11-14 Thread Alvaro Herrera
Allow interrupting GetMultiXactIdMembers This function has a loop which can lead to uninterruptible process "stalls" (actually infinite loops) when some bugs are triggered. Avoid that unpleasant situation by adding a check for interrupts in a place that shouldn't degrade performance in the normal

[COMMITTERS] pgsql: Allow interrupting GetMultiXactIdMembers

2014-11-14 Thread Alvaro Herrera
Allow interrupting GetMultiXactIdMembers This function has a loop which can lead to uninterruptible process "stalls" (actually infinite loops) when some bugs are triggered. Avoid that unpleasant situation by adding a check for interrupts in a place that shouldn't degrade performance in the normal

[COMMITTERS] pgsql: Reduce disk footprint of brin regression test

2014-11-14 Thread Alvaro Herrera
Reduce disk footprint of brin regression test Per complaint from Tom. While at it, throw in some extra tests for nulls as well, and make sure that the set of data we insert on the second round is not identical to the first one. Both measures are intended to improve coverage of the test. Also un

Re: [COMMITTERS] pgsql: Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

2014-11-14 Thread Stephen Frost
* Thom Brown ([email protected]) wrote: > There's still some left-over text that wasn't reverted. Patch attached to > fix. Good catch, fix pushed, thanks! Stephen signature.asc Description: Digital signature

[COMMITTERS] pgsql: Revert change to ALTER TABLESPACE summary.

2014-11-14 Thread Stephen Frost
Revert change to ALTER TABLESPACE summary. When ALTER TABLESPACE MOVE ALL was changed to be ALTER TABLE ALL IN TABLESPACE, the ALTER TABLESPACE summary should have been adjusted back to its original definition. Patch by Thom Brown (thanks!). Branch -- REL9_4_STABLE Details --- http://gi

[COMMITTERS] pgsql: Revert change to ALTER TABLESPACE summary.

2014-11-14 Thread Stephen Frost
Revert change to ALTER TABLESPACE summary. When ALTER TABLESPACE MOVE ALL was changed to be ALTER TABLE ALL IN TABLESPACE, the ALTER TABLESPACE summary should have been adjusted back to its original definition. Patch by Thom Brown (thanks!). Branch -- master Details --- http://git.postg

[COMMITTERS] pgsql: Document BRIN's pages_per_range in CREATE INDEX

2014-11-14 Thread Alvaro Herrera
Document BRIN's pages_per_range in CREATE INDEX Author: Michael Paquier Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/79172a58ea3e858750c93c61d55411a209c5ac69 Modified Files -- doc/src/sgml/ref/create_index.sgml | 17 + 1 file changed,

[COMMITTERS] pgsql: Clean up includes from RLS patch

2014-11-14 Thread Stephen Frost
Clean up includes from RLS patch The initial patch for RLS mistakenly included headers associated with the executor and planner bits in rewrite/rowsecurity.h. Per policy and general good sense, executor headers should not be included in planner headers or vice versa. The include of execnodes.h w

[COMMITTERS] pgsql: Document evaluation-order considerations for aggregate functions

2014-11-14 Thread Tom Lane
Document evaluation-order considerations for aggregate functions. The SELECT reference page didn't really address the question of when aggregate function evaluation occurs, nor did the "expression evaluation rules" documentation mention that CASE can't be used to control whether an aggregate gets

[COMMITTERS] pgsql: Document evaluation-order considerations for aggregate functions

2014-11-14 Thread Tom Lane
Document evaluation-order considerations for aggregate functions. The SELECT reference page didn't really address the question of when aggregate function evaluation occurs, nor did the "expression evaluation rules" documentation mention that CASE can't be used to control whether an aggregate gets

[COMMITTERS] pgsql: Ensure unlogged tables are reset even if crash recovery errors o

2014-11-14 Thread Andres Freund
Ensure unlogged tables are reset even if crash recovery errors out. Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed

[COMMITTERS] pgsql: Fix initdb --sync-only to also sync tablespaces.

2014-11-14 Thread Andres Freund
Fix initdb --sync-only to also sync tablespaces. 630cd14426dc added initdb --sync-only, for use by pg_upgrade, by just exposing the existing fsync code. That's wrong, because initdb so far had absolutely no reason to deal with tablespaces. Fix --sync-only by additionally explicitly syncing each o

[COMMITTERS] pgsql: Fix initdb --sync-only to also sync tablespaces.

2014-11-14 Thread Andres Freund
Fix initdb --sync-only to also sync tablespaces. 630cd14426dc added initdb --sync-only, for use by pg_upgrade, by just exposing the existing fsync code. That's wrong, because initdb so far had absolutely no reason to deal with tablespaces. Fix --sync-only by additionally explicitly syncing each o

[COMMITTERS] pgsql: Ensure unlogged tables are reset even if crash recovery errors o

2014-11-14 Thread Andres Freund
Ensure unlogged tables are reset even if crash recovery errors out. Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed

[COMMITTERS] pgsql: Backport "Expose fsync_fname as a public API".

2014-11-14 Thread Andres Freund
Backport "Expose fsync_fname as a public API". Backport commit cc52d5b33ff5df29de57dcae9322214cfe9c8464 back to 9.1 to allow backpatching some unlogged table fixes that use fsync_fname. Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/c7299d32f64d09cfc1f586bdb7

[COMMITTERS] pgsql: Sync unlogged relations to disk after they have been reset.

2014-11-14 Thread Andres Freund
Sync unlogged relations to disk after they have been reset. Unlogged relations are only reset when performing a unclean restart. That means they have to be synced to disk during clean shutdowns. During normal processing that's achieved by registering a buffer's file to be fsynced at the next check

[COMMITTERS] pgsql: Sync unlogged relations to disk after they have been reset.

2014-11-14 Thread Andres Freund
Sync unlogged relations to disk after they have been reset. Unlogged relations are only reset when performing a unclean restart. That means they have to be synced to disk during clean shutdowns. During normal processing that's achieved by registering a buffer's file to be fsynced at the next check

[COMMITTERS] pgsql: Ensure unlogged tables are reset even if crash recovery errors o

2014-11-14 Thread Andres Freund
Ensure unlogged tables are reset even if crash recovery errors out. Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed

[COMMITTERS] pgsql: Sync unlogged relations to disk after they have been reset.

2014-11-14 Thread Andres Freund
Sync unlogged relations to disk after they have been reset. Unlogged relations are only reset when performing a unclean restart. That means they have to be synced to disk during clean shutdowns. During normal processing that's achieved by registering a buffer's file to be fsynced at the next check

[COMMITTERS] pgsql: Backport "Expose fsync_fname as a public API".

2014-11-14 Thread Andres Freund
Backport "Expose fsync_fname as a public API". Backport commit cc52d5b33ff5df29de57dcae9322214cfe9c8464 back to 9.1 to allow backpatching some unlogged table fixes that use fsync_fname. Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/86673a44a7570b931e928b9714

[COMMITTERS] pgsql: Backport "Expose fsync_fname as a public API".

2014-11-14 Thread Andres Freund
Backport "Expose fsync_fname as a public API". Backport commit cc52d5b33ff5df29de57dcae9322214cfe9c8464 back to 9.1 to allow backpatching some unlogged table fixes that use fsync_fname. Branch -- REL9_1_STABLE Details --- http://git.postgresql.org/pg/commitdiff/b0a48e996bd7ff336ea26344d3

[COMMITTERS] pgsql: Sync unlogged relations to disk after they have been reset.

2014-11-14 Thread Andres Freund
Sync unlogged relations to disk after they have been reset. Unlogged relations are only reset when performing a unclean restart. That means they have to be synced to disk during clean shutdowns. During normal processing that's achieved by registering a buffer's file to be fsynced at the next check

[COMMITTERS] pgsql: Ensure unlogged tables are reset even if crash recovery errors o

2014-11-14 Thread Andres Freund
Ensure unlogged tables are reset even if crash recovery errors out. Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed

[COMMITTERS] pgsql: Ensure unlogged tables are reset even if crash recovery errors o

2014-11-14 Thread Andres Freund
Ensure unlogged tables are reset even if crash recovery errors out. Unlogged relations are reset at the end of crash recovery as they're only synced to disk during a proper shutdown. Unfortunately that and later steps can fail, e.g. due to running out of space. This reset was, up to now performed

[COMMITTERS] pgsql: Fix initdb --sync-only to also sync tablespaces.

2014-11-14 Thread Andres Freund
Fix initdb --sync-only to also sync tablespaces. 630cd14426dc added initdb --sync-only, for use by pg_upgrade, by just exposing the existing fsync code. That's wrong, because initdb so far had absolutely no reason to deal with tablespaces. Fix --sync-only by additionally explicitly syncing each o

[COMMITTERS] pgsql: Sync unlogged relations to disk after they have been reset.

2014-11-14 Thread Andres Freund
Sync unlogged relations to disk after they have been reset. Unlogged relations are only reset when performing a unclean restart. That means they have to be synced to disk during clean shutdowns. During normal processing that's achieved by registering a buffer's file to be fsynced at the next check

[COMMITTERS] pgsql: Remove unused InhPaths

2014-11-14 Thread Alvaro Herrera
Remove unused InhPaths Allegedly, the last remaining usages of that struct were removed by 0e99be1c. Author: Peter Geoghegan Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/e4d1e264918f4019c86c807e7c349658f7a10397 Modified Files -- src/include/parser/pa

[COMMITTERS] pgsql: Get rid of SET LOGGED indexes persistence kludge

2014-11-14 Thread Alvaro Herrera
Get rid of SET LOGGED indexes persistence kludge This removes ATChangeIndexesPersistence() introduced by f41872d0c1239d36 which was too ugly to live for long. Instead, the correct persistence marking is passed all the way down to reindex_index, so that the transient relation built to contain the

[COMMITTERS] pgsql: postgres_fdw.h: don't pull in rel.h when relcache.h is enough

2014-11-14 Thread Alvaro Herrera
postgres_fdw.h: don't pull in rel.h when relcache.h is enough Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/f9ef578d050c509d0f4bc02b3c0a3a0497056a2a Modified Files -- contrib/postgres_fdw/deparse.c |1 + contrib/postgres_fdw/postgres_fdw.c |