Re: streamlined standby procedure

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: streamlined standby procedure
Дата
Msg-id 1139328248.24321.292.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: streamlined standby procedure  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 2006-02-07 at 16:45, Tom Lane wrote:
> Csaba Nagy <nagy@ecircle-ag.com> writes:
> > You obviously did not read further down :-)
> > I was proposing a subscription system, where the slave can specify the
> > oldest WAL file it is interested in, and keep that up to date as it
> > processes them.
> 
> And how is that "system view" going to handle subscriptions?

Not THAT "system view" will handle the subscription... there would be
this view which exposes the WAL files, which would do exactly that,
expose the existing WAL files, and only those which exist. Of course it
must place some kind of lock on the WAL file it currently streams so it
is not recycled, but other than that this view should not be concerned
with subscription issues.

The subscription system would be a table in which you can insert
(subscriber_id, oldest_WAL_file_name_i'm_interested_in) tuples. When
recycling WAL files, this table will be consulted and only WAL files
older than the oldest entry in the subscription table are allowed to be
recycled.

Slaves will update their subscription line after processing each WAL
file, setting it to the next WAL file name they need. So the oldest WAL
to be kept will actually be in sync with what the slaves really need.

OK, now I start to see what you mean, i.e. if there's no subscription
then all WAL files are immediately recycled, and the view can only show
one entry, the current WAL. But actually that's OK, you still can see
what's the current WAL file, and can subscribe starting with it.

Cheers,
Csaba.




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: streamlined standby procedure
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Compiling UDF DLL under Win32