[COMMITTERS] pgsql: Remove leftover variable from previous commit.

2017-06-05 Thread Andres Freund
Remove leftover variable from previous commit. Apparently I somehow mis-resolved a conflict slightly. Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9d09842830ee6d1a28c86161520fe980fb7e75ab Modified Files -- src/backend/replication/walsender.c |

[COMMITTERS] pgsql: Revert "Prevent panic during shutdown checkpoint"

2017-06-05 Thread Andres Freund
Revert "Prevent panic during shutdown checkpoint" This reverts commit 086221cf6b1727c2baed4703c582f657b7c5350e, which was made to master only. The approach implemented in the above commit has some issues. While those could easily be fixed incrementally, doing so would make backpatching considera

[COMMITTERS] pgsql: Have walsenders participate in procsignal infrastructure.

2017-06-05 Thread Andres Freund
Have walsenders participate in procsignal infrastructure. The non-participation in procsignal was a problem for both changes in master, e.g. parallelism not working for normal statements run in walsender backends, and older branches, e.g. recovery conflicts and catchup interrupts not working for l

[COMMITTERS] pgsql: Have walsenders participate in procsignal infrastructure.

2017-06-05 Thread Andres Freund
Have walsenders participate in procsignal infrastructure. The non-participation in procsignal was a problem for both changes in master, e.g. parallelism not working for normal statements run in walsender backends, and older branches, e.g. recovery conflicts and catchup interrupts not working for l

[COMMITTERS] pgsql: Prevent possibility of panics during shutdown checkpoint.

2017-06-05 Thread Andres Freund
Prevent possibility of panics during shutdown checkpoint. When the checkpointer writes the shutdown checkpoint, it checks afterwards whether any WAL has been written since it started and throws a PANIC if so. At that point, only walsenders are still active, so one might think this could not happe

[COMMITTERS] pgsql: Prevent possibility of panics during shutdown checkpoint.

2017-06-05 Thread Andres Freund
Prevent possibility of panics during shutdown checkpoint. When the checkpointer writes the shutdown checkpoint, it checks afterwards whether any WAL has been written since it started and throws a PANIC if so. At that point, only walsenders are still active, so one might think this could not happe

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Have walsenders participate in procsignal infrastructure.

2017-06-05 Thread Andres Freund
Have walsenders participate in procsignal infrastructure. The non-participation in procsignal was a problem for both changes in master, e.g. parallelism not working for normal statements run in walsender backends, and older branches, e.g. recovery conflicts and catchup interrupts not working for l

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Prevent possibility of panics during shutdown checkpoint.

2017-06-05 Thread Andres Freund
Prevent possibility of panics during shutdown checkpoint. When the checkpointer writes the shutdown checkpoint, it checks afterwards whether any WAL has been written since it started and throws a PANIC if so. At that point, only walsenders are still active, so one might think this could not happe

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Unify SIGHUP handling between normal and walsender backends.

2017-06-05 Thread Andres Freund
Unify SIGHUP handling between normal and walsender backends. Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths ch

[COMMITTERS] pgsql: Prevent possibility of panics during shutdown checkpoint.

2017-06-05 Thread Andres Freund
Prevent possibility of panics during shutdown checkpoint. When the checkpointer writes the shutdown checkpoint, it checks afterwards whether any WAL has been written since it started and throws a PANIC if so. At that point, only walsenders are still active, so one might think this could not happe

[COMMITTERS] pgsql: Have walsenders participate in procsignal infrastructure.

2017-06-05 Thread Andres Freund
Have walsenders participate in procsignal infrastructure. The non-participation in procsignal was a problem for both changes in master, e.g. parallelism not working for normal statements run in walsender backends, and older branches, e.g. recovery conflicts and catchup interrupts not working for l

[COMMITTERS] pgsql: Wire up query cancel interrupt for walsender backends.

2017-06-05 Thread Andres Freund
Wire up query cancel interrupt for walsender backends. This allows to cancel commands run over replication connections. While it might have some use before v10, it has become important now that normal SQL commands are allowed in database connected walsender connections. Author: Petr Jelinek Revie

[COMMITTERS] pgsql: Don't set application_name in logical replication workers

2017-06-05 Thread Peter Eisentraut
Don't set application_name in logical replication workers This was bothering some people because it's not the intended use of application_name and it makes the default view of pg_stat_activity bulky. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/41a21bf9b4a2449edd

[COMMITTERS] pgsql: Fix ALTER SUBSCRIPTION grammar ambiguity

2017-06-05 Thread Peter Eisentraut
Fix ALTER SUBSCRIPTION grammar ambiguity There was a grammar ambiguity between SET PUBLICATION name REFRESH and SET PUBLICATION SKIP REFRESH, because SKIP is not a reserved word. To resolve that, fold the refresh choice into the WITH options. Refreshing is the default now. Reported-by: tushar

[COMMITTERS] pgsql: Ignore WL_POSTMASTER_DEATH latch event in single user mode

2017-06-05 Thread Peter Eisentraut
Ignore WL_POSTMASTER_DEATH latch event in single user mode Otherwise code that uses this will abort with an assertion failure, because postmaster_alive_fds are not initialized. Reported-by: tushar Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/06bfb801c73c89e66f4

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b2482ab83242d895e0e0eaa362b5a918d15ce408 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-c

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- REL9_2_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f964a7c5ab9f8af5cf496f650ce162f7e3d34714 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-c

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6da9996358989b86744febd0eab24f0b5dc2f7d0 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-c

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2e02136fe688046cd3b3c0bbcdd6ba970932ec8e Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committe

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/da30fa603aeb3b406931543b1ff4427bdf051ec5 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-c

[COMMITTERS] pgsql: Fix thinko in previous openssl change

2017-06-05 Thread Andrew Dunstan
Fix thinko in previous openssl change Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/ec504aff740993560d8d1ca16f70cbf8147cc622 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-c

[COMMITTERS] pgsql: Fix record length computation in pg_waldump/xlogdump.

2017-06-05 Thread Andres Freund
Fix record length computation in pg_waldump/xlogdump. The current method of computing the record length (excluding the lenght of full-page images) has been wrong since the WAL format has been revamped in 2c03216d831160bedd72d45f712601b6f7d03f1c. Only the main record's length was counted, but that

[COMMITTERS] pgsql: Fix record length computation in pg_waldump/xlogdump.

2017-06-05 Thread Andres Freund
Fix record length computation in pg_waldump/xlogdump. The current method of computing the record length (excluding the lenght of full-page images) has been wrong since the WAL format has been revamped in 2c03216d831160bedd72d45f712601b6f7d03f1c. Only the main record's length was counted, but that

[COMMITTERS] pgsql: Fix record length computation in pg_waldump/xlogdump.

2017-06-05 Thread Andres Freund
Fix record length computation in pg_waldump/xlogdump. The current method of computing the record length (excluding the lenght of full-page images) has been wrong since the WAL format has been revamped in 2c03216d831160bedd72d45f712601b6f7d03f1c. Only the main record's length was counted, but that

[COMMITTERS] pgsql: Code review for shm_toc.h/.c.

2017-06-05 Thread Tom Lane
Code review for shm_toc.h/.c. Declare the toc_nentry field as uint32 not Size. Since shm_toc_lookup() reads the field without any lock, it has to be atomically readable, and we do not assume that for fields wider than 32 bits. Performance would be impossibly bad for entry counts approaching 2^32

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- REL9_3_STABLE Details --- https://git.postgre

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- REL9_5_STABLE Details --- https://git.postgre

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- REL9_2_STABLE Details --- https://git.postgre

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- master Details --- https://git.postgresql.org

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- REL9_4_STABLE Details --- https://git.postgre

[COMMITTERS] pgsql: Find openssl lib files in right directory for MSVC

2017-06-05 Thread Andrew Dunstan
Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. Branch -- REL9_6_STABLE Details --- https://git.postgre

[COMMITTERS] pgsql: Don't be so trusting that shm_toc_lookup() will always succeed.

2017-06-05 Thread Tom Lane
Don't be so trusting that shm_toc_lookup() will always succeed. Given the possibility of race conditions and so on, it seems entirely unsafe to just assume that shm_toc_lookup() always finds the key it's looking for --- but that was exactly what all but one call site were doing. To fix, add a "bo

Re: [COMMITTERS] pgsql: Fix signal handling in logical replication workers

2017-06-05 Thread Andrew Dunstan
On 06/02/2017 09:13 PM, Petr Jelinek wrote: > On 03/06/17 02:59, Tom Lane wrote: >> I wrote: >>> Peter Eisentraut writes: Fix signal handling in logical replication workers >>> It looks like this broke buildfarm member nightjar. >>> Not clear why - I don't see anything especially platform-s

[COMMITTERS] pgsql: Fix typo in error message.

2017-06-05 Thread Heikki Linnakangas
Fix typo in error message. Daniele Varrazzo Discussion: https://www.postgresql.org/message-id/CA+mi_8bqY5THP8hLKKSdMEr5GCz6M=hd6_ulbvfeyebfwqu...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/af51fea039bb8e00066d68d919312df1701dc03e Modified File

[COMMITTERS] pgsql: Fix comments in simplehash.h.

2017-06-05 Thread Heikki Linnakangas
Fix comments in simplehash.h. Jeff Janes and me. Discussion: https://www.postgresql.org/message-id/CAMkU=1zYnniLYg+W9itL93DXebCjx6Uk6m_=xa8p_zm65x3...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/553e16951c0db4e3d2d0f804ff7f9d2ac0a96fe5 Modified