Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • There are 3 replication : 2 are inactive, 1 active. The active replication has state : streaming; sync_state : async; sent_lsn = write_lsn = replay_lsn = 98/8800C590. I already dropped the inactive replications. And I want to resync the active one. Should I drop the replication and recreate it OR restart the replication ? Thanks @LaurezAlbe Commented Sep 13, 2022 at 22:54
  • 1
    The active one synchronizes itself, don't worry about it. Drop the inactive replication slots, and your problem is history. Commented Sep 14, 2022 at 5:53
  • yes. Thanks. Finally the files in pg_wal drops to only 2400+. But, out of curiosity, how long does it take for number of WALs to be reduced to 0 when archiving_mode is turned off ? I have a couple of WALs that are 1 year old. If archiving is off, no WALs will be kept around. So the postgres internal should eat them all up. Correct ? @LaurenzAlbe Commented Sep 14, 2022 at 12:33
  • 1
    Yes, correct. WAL is deleted at the end of a checkpoint. Actually, I would have expected all your old WAL segments to go away at that time. I didn't read the code on the exact algorithm, but I would expect your WAL size to go down still more as time goes by, unless there is another obstacle. Commented Sep 14, 2022 at 13:56