I have a case that master has been restarted many times, restart_lsn not moved since nov 2022 till today apr 2023.
I have tried pg_replication_slot_advance() but no luck :-(
postgres 12.8
1 master (4 publisher) many SR slaves, and 1 logical replication (4 subscribers)
Is there a chance to edit the state file under the pg_replslots folder?
On Wed, Aug 19, 2020 at 8:16 PM Kiran Singh <kiranjanarthan24@xxxxxxxxx> wrote:
When logical replication is setup, any wal generation on any tables will result in replication lag. Since you are running a long running transaction on the master, the maximum number of changes kept in the memory per transaction is 4MB. If the transaction requires more than 4MB the changes are spilled to disk. This is when you will start seeing1. Replication lag spiking2. Storage being consumed3. Restart lsn stops moving forwardYou can confirm if the heavy write that you are talking about is spilling to disk or not by setting log_min_messges to debug 2. Try to find if the changes are spilled to disk.To answer your question:1. As long as the write heavy query is running on the database, you will not see restart lsn moving.2. You will have to have smaller transactions3. When the query is completed, you will see restart_lsn moving forward
regards
ujang jaenudin | Self-Employed, DBA Consultant
http://id.linkedin.com/pub/ujang-jaenudin/12/64/bab
ujang jaenudin | Self-Employed, DBA Consultant
http://id.linkedin.com/pub/ujang-jaenudin/12/64/bab