Re: Replication and PITR

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Replication and PITR
Дата
Msg-id 1159261256.3874.86.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: Replication and PITR  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Replication and PITR  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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 по дате отправления:

Предыдущее
От: Ralf Wiebicke
Дата:
Сообщение: Re: in failed sql transaction
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Replication and PITR