Re: Replication and PITR - Mailing list pgsql-general

From Csaba Nagy
Subject Re: Replication and PITR
Date
Msg-id 1159261256.3874.86.camel@coppola.muc.ecircle.de
Whole thread Raw
In response to Re: Replication and PITR  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Replication and PITR
List pgsql-general
> I would think that the data pages are written and consistent while in
> recovery mode, so maybe it's reasonable to do. However, I'm only
> speculating and anything like this would probably not be coming soon.

I was thinking at one point about what problems could prevent the
standby to allow read only access, and got to the conclusion that it
would be difficult to assure consistency.

Think about it: you start a read only transaction on the standby, but if
the standby continues to apply changes from the master, it is entirely
possible it will rewrite/delete some pages which contain data which your
read only transaction should be able to see, but it won't see it.

So to make the read only transactions consistent, the standby would be
required to stop applying changes which are newer than the oldest read
only transaction running. That would mean you will have a backlog of WAL
records to apply at least as big as the age of your oldest running read
only transaction, therefore the data will be delayed the same compared
to the master, which might be OK for some scenarios...

Of course there might be other problems too.

Cheers,
Csaba.




pgsql-general by date:

Previous
From: Ralf Wiebicke
Date:
Subject: Re: in failed sql transaction
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Replication and PITR