Re: cheaper snapshots

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: cheaper snapshots
Дата
Msg-id 4E3274EA020000250003F8B6@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: cheaper snapshots  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:
>> (4)  We communicate acceptable snapshots to the replica to make
>> the order of visibility visibility match the master even when
>> that doesn't match the order that transactions returned from
>> commit.
>>  I (predictably) like (4) -- even though it's a lot of work....
> 
> I think that (4), beyond being a lot of work, will also have
> pretty terrible performance.  You're basically talking about
> emitting two WAL records for every commit instead of one.
Well, I can think of a great many other ways this could be done,
each with its own trade-offs of various types of overhead against
how close the replica is to current.  At one extreme you could do
what you describe, at the other you could generate a new snapshot on
the replica once every few minutes.
Then there are more clever ways, in discussions a few months ago I
suggested that adding two new bit flags to the commit record would
suffice, and I don't remember anyone blowing holes in that idea.  Of
course, that was to achieve serializable behavior on the replica,
based on some assumption that the current hot standby already
supported repeatable read.  We might need another bit or two to
solve the problems with that which have surfaced on this thread.
-Kevin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nikhil Sontakke
Дата:
Сообщение: Re: Check constraints on partition parents only?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: error: could not find pg_class tuple for index 2662