Azure postgres db replica data storage duration

Dooley, Enda (Enda) 21 Reputation points
2023-01-03T15:08:39.84+00:00

For https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-read-replicas-portal, is it possible to set up the replica to only have certain data period?
e.g. could we have a task just running on the repliaca to delete all data older than 3 months old?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2023-01-03T23:39:57.39+00:00

    Hi, @Dooley, Enda (Enda) Welcome to the Microsoft Q&A platform, thanks for posting the question and for using Azure Services.
    As I understand correctly you want to know if there is a possibility of setup a replica for a certain data period
    Unfortunately, this is not possible. Think of a read replica as a read-only copy of the primary. However, you can do logical replication where you could do something like this but the challenge will be if the primary server updates a row that is > 3 months old.

    Please let me know if you need additional information.

    Regards
    Geetha


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.