postgresql/src/backend/utils
Robert Haas b8bb8dbf20 More synchronous replication tweaks.
SyncRepRequested() must check not only the value of the
synchronous_replication GUC but also whether max_wal_senders > 0.
Otherwise, we might end up waiting for sync rep even when there's no
possibility of a standby ever managing to connect.  There are some
existing cross-checks to prevent this, but they're not quite sufficient:
the user can start the server with max_wal_senders=0,
synchronous_standby_names='', and synchronous_replication=off and then
subsequent make synchronous_standby_names not empty using pg_ctl reload,
and then SET synchronous_standby=on, leading to an indefinite hang.

Along the way, rename the global variable for the synchronous_replication
GUC to match the name of the GUC itself, for clarity.

Report by Fujii Masao, though I didn't use his patch.
2011-03-10 15:43:37 -05:00
..
adt Remove collation information from TypeName, where it does not belong. 2011-03-09 22:39:20 -05:00
cache Support data-modifying commands (INSERT/UPDATE/DELETE) in WITH. 2011-02-25 18:58:02 -05:00
error Add some words of caution to elog.c. 2011-02-17 10:29:42 -05:00
fmgr Implement an API to let foreign-data wrappers actually be functional. 2011-02-20 00:18:14 -05:00
hash Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
init Log replication connections only when log_connections is on 2011-01-18 20:02:25 +01:00
mb Fix pg_server_to_client, that was broken in the previous commit. 2011-02-21 16:27:57 +09:00
misc More synchronous replication tweaks. 2011-03-10 15:43:37 -05:00
mmgr Run a portal's cleanup hook immediately when pushing it to DONE state. 2011-03-03 13:04:06 -05:00
resowner Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
sort Per-column collation support 2011-02-08 23:04:18 +02:00
time Rearrange snapshot handling to make rule expansion more consistent. 2011-02-28 23:28:06 -05:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Per-column collation support 2011-02-08 23:04:18 +02:00
Gen_dummy_probes.sed Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Gen_fmgrtab.pl Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
generate-errcodes.pl Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00