aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/guc_hooks.h
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2024-03-08 08:10:45 +0530
committerAmit Kapila <akapila@postgresql.org>2024-03-08 08:10:45 +0530
commitbf279ddd1c28ce0251446ee90043a4cb96e5db0f (patch)
tree642eb01435995795793fc61cedcc66949c824f1d /src/include/utils/guc_hooks.h
parent453c46873774219243501b8efc16b2b5a5e9d194 (diff)
downloadpostgresql-bf279ddd1c28ce0251446ee90043a4cb96e5db0f.tar.gz
postgresql-bf279ddd1c28ce0251446ee90043a4cb96e5db0f.zip
Introduce a new GUC 'standby_slot_names'.
This patch provides a way to ensure that physical standbys that are potential failover candidates have received and flushed changes before the primary server making them visible to subscribers. Doing so guarantees that the promoted standby server is not lagging behind the subscribers when a failover is necessary. The logical walsender now guarantees that all local changes are sent and flushed to the standby servers corresponding to the replication slots specified in 'standby_slot_names' before sending those changes to the subscriber. Additionally, the SQL functions pg_logical_slot_get_changes, pg_logical_slot_peek_changes and pg_replication_slot_advance are modified to ensure that they process changes for failover slots only after physical slots specified in 'standby_slot_names' have confirmed WAL receipt for those. Author: Hou Zhijie and Shveta Malik Reviewed-by: Masahiko Sawada, Peter Smith, Bertrand Drouvot, Ajin Cherian, Nisha Moond, Amit Kapila Discussion: https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com
Diffstat (limited to 'src/include/utils/guc_hooks.h')
-rw-r--r--src/include/utils/guc_hooks.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/utils/guc_hooks.h b/src/include/utils/guc_hooks.h
index c8a7aa9a112..d64dc5fcdb0 100644
--- a/src/include/utils/guc_hooks.h
+++ b/src/include/utils/guc_hooks.h
@@ -174,5 +174,8 @@ extern bool check_wal_consistency_checking(char **newval, void **extra,
extern void assign_wal_consistency_checking(const char *newval, void *extra);
extern bool check_wal_segment_size(int *newval, void **extra, GucSource source);
extern void assign_wal_sync_method(int new_wal_sync_method, void *extra);
+extern bool check_standby_slot_names(char **newval, void **extra,
+ GucSource source);
+extern void assign_standby_slot_names(const char *newval, void *extra);
#endif /* GUC_HOOKS_H */