Answer the question
In order to leave comments, you need to log in
How to check last used postgresql 14 replication slot?
I write a crutch - manual failover. The output of the last used postgtresql 14 streaming replication slot is needed for the command:
pg_basebackup -h $MIP -D /home/$USER/compose/postgres-data/ -U replica -P -v -R -X stream -C -S standby1
Answer the question
In order to leave comments, you need to log in
Think about the question "why". Choose something more predictable for the slot name, it will be easier to script and easier to maintain. For example, the hostname of this replica.
Well, if you want to do it inconveniently - take the slot_name from pg_replication_slots, cut off the unnecessary, bring it to the number
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question