Query regarding replication slots

From: RKN Sai Krishna <rknsaiforpostgres(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Query regarding replication slots
Date: 2022-01-11 11:18:59
Message-ID: CAMVpbFMt=jb+Krk2AWUh3+YQYOSEfTD0D+vhhNGK7f2Vz4_edA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I have a very basic question related to replication slots. Why should
the master/primary server maintain the replication slot info like lsn
corresponding to each standby server etc. Instead, why can't each
standby server send the lsn that it needs, and master/primary server
maintain the minimum lsn across all of the standby servers so that the
information could be used for cleanup/removal of WAL segments?

The minimum lsn could as well be streamed to all of the standby
servers while streaming the WAL records, so that the cleanup on the
standby server as well happens as per the minimum lsn. Also, even if
the primary server crashes, any standby server becoming the master is
well aware of the minimum lsn and the WAL records required for all of
the remaining standby servers are intact.

Thanks,
RKN

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-01-11 11:23:41 Re: a misbehavior of partition row movement (?)
Previous Message Peter Eisentraut 2022-01-11 11:18:58 Re: ICU for global collation