> > > I am a fan of stricter, all-assumption-covering conditions. In case we > > > don't want to check restart_lsn, an Assert might be useful to validate > > > our assumption. > > > > Agreed. I'll throw in an assert. > > Changed this in the patch to throw an assert.
pg_receivewal: error: unexpected termination of replication stream: ERROR: requested WAL segment 0000000100000000000000EB has already been removed pg_receivewal: disconnected; waiting 5 seconds to try again pg_receivewal: error: unexpected termination of replication stream: ERROR: requested WAL segment 0000000100000000000000EB has already been removed pg_receivewal: disconnected; waiting 5 seconds to try again ^Cpostgres@pgvm:~$ /usr/local/pgsql/bin/psql psql (16devel) Type "help" for help.
postgres=# select * from pg_replication_slots; slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase -----------+---------------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------+----------- s3 | test_decoding | logical | 5 | postgres | f | f | | | 769 | | 0/A992E7D0 | lost | | f s5 | | physical | | | f | f | | | | 0/EB000000 | | lost | | f