pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Support invalidating replication slots due to horizon and wal_le
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2023-04-12 5ec69b71f1  Improve error messages introduced in be87200efd9 and 0fdab27ad68
* pgsql: Support invalidating replication slots due to horizon and wal_le
@ 2023-04-08 06:09  Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Andres Freund @ 2023-04-08 06:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Support invalidating replication slots due to horizon and wal_level

Needed for logical decoding on a standby. Slots need to be invalidated because
of the horizon if rows required for logical decoding are removed. If the
primary's wal_level is lowered from 'logical', logical slots on the standby
need to be invalidated.

The new invalidation methods will be used in a subsequent commit.

Logical slots that have been invalidated can be identified via the new
pg_replication_slots.conflicting column.

See 6af1793954e for an overall design of logical decoding on a standby.

Bumps catversion for the addition of the new pg_replication_slots column.

Author: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Author: Andres Freund <andres@anarazel.de>
Author: Amit Khandekar <amitdkhan.pg@gmail.com> (in an older version)
Reviewed-by: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20230407075009.igg7be27ha2htkbt@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/be87200efd9308ccfe217ce8828f316e93e370da

Modified Files
--------------
doc/src/sgml/system-views.sgml            |  10 ++
src/backend/access/transam/xlog.c         |   8 +-
src/backend/catalog/system_views.sql      |   3 +-
src/backend/replication/logical/logical.c |   7 ++
src/backend/replication/slot.c            | 151 +++++++++++++++++++++++++-----
src/backend/replication/slotfuncs.c       |  12 ++-
src/include/catalog/catversion.h          |   2 +-
src/include/catalog/pg_proc.dat           |   6 +-
src/include/replication/slot.h            |   9 +-
src/test/regress/expected/rules.out       |   5 +-
10 files changed, 176 insertions(+), 37 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Support invalidating replication slots due to horizon and wal_le
@ 2023-04-11 03:03  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Kyotaro Horiguchi @ 2023-04-11 03:03 UTC (permalink / raw)
  To: andres@anarazel.de; +Cc: pgsql-committers@lists.postgresql.org

> Support invalidating replication slots due to horizon and wal_level

This adds the following message.

+			appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on the primary server"));

This message is missing a period at the end.

regards.

inline patch 1: src/backend/replication/slot.c (+1/-1 lines) download inline-1.patchdiff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 41848f0ac6..e73fd2d13b 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -1274,7 +1274,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause, break; case RS_INVAL_WAL_LEVEL: - appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on the primary server")); + appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on the primary server.")); break; case RS_INVAL_NONE: pg_unreachable();
-- Kyotaro Horiguchi NTT Open Source Software Center ^ permalink raw reply [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-04-11 03:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-04-08 06:09 pgsql: Support invalidating replication slots due to horizon and wal_le Andres Freund <andres@anarazel.de>
2023-04-11 03:03 ` Kyotaro Horiguchi <horikyota.ntt@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox