You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Unsurprisingly, this requires wal_level = logical to be set on the primary andstandby. The infrastructure added in2666975 ensures that slots areinvalidated if the primary's wal_level is lowered.Creating a slot on a standby waits for a xl_running_xact record to beprocessed. If the primary is idle (and thus not emitting xl_running_xactrecords), that can take a while. To make that faster, this commit alsointroduces the pg_log_standby_snapshot() function. By executing it on theprimary, completion of slot creation on the standby can be accelerated.Note that logical decoding on a standby does not itself enforce that requiredcatalog rows are not removed. The user has to use physical replication slots +hot_standby_feedback or other measures to prevent that. If catalog rowsrequired for a slot are removed, the slot is invalidated.See6af1793 for an overall design of logical decoding on a standby.Bumps catversion, for the addition of the pg_log_standby_snapshot() function.Author: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>Author: Andres Freund <andres@anarazel.de> (in an older version)Author: Amit Khandekar <amitdkhan.pg@gmail.com> (in an older version)Reviewed-by: Andres Freund <andres@anarazel.de>Reviewed-by: FabrÌzio de Royes Mello <fabriziomello@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Reviewed-By: Robert Haas <robertmhaas@gmail.com>