mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Block replication slot advance for these not yet reserving WAL
Such replication slots are physical slots freshly created without WAL being reserved, which is the default behavior, which have not been used yet as WAL consumption resources to retain WAL. This prevents advancing a slot to a position older than any WAL available, which could falsify calculations for WAL segment recycling. This also cleans up a bit the code, as ReplicationSlotRelease() would be called on ERROR, and improves error messages. Reported-by: Kyotaro Horiguchi Author: Michael Paquier Reviewed-by: Andres Freund, Álvaro Herrera, Kyotaro Horiguchi Discussion: https://postgr.es/m/20180626071305.GH31353@paquier.xyz
This commit is contained in:
@ -9867,7 +9867,8 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
|
||||
<entry></entry>
|
||||
<entry>The address (<literal>LSN</literal>) of oldest WAL which still
|
||||
might be required by the consumer of this slot and thus won't be
|
||||
automatically removed during checkpoints.
|
||||
automatically removed during checkpoints. <literal>NULL</literal>
|
||||
if the <literal>LSN</literal> of this slot has never been reserved.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
|
Reference in New Issue
Block a user