0

I have 2 postgres clusters (A and B) on different servers. Whenever data is written to the table on server A, I want to copy the data to the table on server B. But the data retention in the table on server A is only 1 month whereas the data needs to be retained for 1 year on server B. (The tables are partitioned)

How can I achieve this?

3
  • 2
    You can use logical replication for only the INSERT statements for this table. See postgresql.org/docs/17/logical-replication.html for details Commented Sep 2, 2024 at 15:07
  • @FrankHeikens, I also want to replicate the updates and deletes. I only want to exclude the purging of old partitions. Is that possible via logical replication? Commented Sep 4, 2024 at 1:38
  • 1
    Yes, no problem. Drop table partition isn’t part of the replication. Just test it Commented Sep 4, 2024 at 1:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.