Re: Replication and PITR

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Bo Lorentsen <bl(at)netgroup(dot)dk>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Replication and PITR
Date: 2006-09-26 09:00:56
Message-ID: 1159261256.3874.86.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message 林黛玉 2006-09-26 09:01:49 cannt setup postgresql database for my opennms
Previous Message Ralf Wiebicke 2006-09-26 08:32:05 Re: in failed sql transaction