Search Postgresql Archives

Re: PostgreSQL logical replication depends on WAL segments?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wal retention in pg_wal and wal archiving are different things. The OP got problems cause he deliberately went on to delete files in pg_wal which means he used the wrong method to address a wrong situation.

However, if the OP has still those WAL files archived he can use them to bring logical replication back in synch. Don't ask me how I know : https://www.postgresql.org/message-id/ae8812c3-d138-73b7-537a-a273e15ef6e1%40matrix.gatewaynet.com

I don't think we are disagreeing.  My point is that WAL will be retained in pg_wal if it is still needed by a replication slot, and any one of those WAL files will not be archived and recycled as long as it no longer needed by a replication slot.  So yes, they are different things, but they are related in that sense.

It sounded to me like he had an old slot in place pointing to old WAL files, which the cron job removed, thus leading to his error.

Sure, he can recover from this by moving those WAL files back into pg_wal.  But my point is simply that he should rely on WAL archiving rather than archiving via cron because Postgres handles knowing whether or not a replication slot still needs a WAL file.

Thanks,
Jeremy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux