Re: Keeping separate WAL segments for each database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Keeping separate WAL segments for each database
Дата
Msg-id 19417.1277939103@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Keeping separate WAL segments for each database  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Keeping separate WAL segments for each database  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I think one per database and one extra one for the shared catalogs
> would be enough.  Most transactions would either touch either just the
> database, or just the shared catalogs, so you'd write the commit
> record in whichever stream was appropriate.  If you had a transaction
> that touched both, you'd write the commit record in both places, and
> include in each stream a reference to the other stream.  On replay,
> when you reach a commit record that references the another stream, you
> pause until the reference stream also reaches the matching commit
> record.  If you reach the end of that WAL stream without finding the
> commit record, then, in archive recovery, you just keep waiting for
> more of the stream to arrive; and, in crash recovery, you write a
> matching commit record at the end of WAL.

Surely you'd have to roll back, not commit, in that situation.  You have
no excuse for assuming that you've replayed all effects of the
transaction.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Check constraints on non-immutable keys
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Keeping separate WAL segments for each database