From: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> |
---|---|
To: | postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: streamlined standby procedure |
Date: | 2006-02-07 16:04:08 |
Message-ID: | 1139328248.24321.292.camel@coppola.muc.ecircle.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2006-02-07 at 16:45, Tom Lane wrote:
> Csaba Nagy <nagy(at)ecircle-ag(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Samokhvalov | 2006-02-07 16:19:18 | Re: Sequences/defaults and pg_dump |
Previous Message | Tom Lane | 2006-02-07 16:01:21 | Re: Actual expression of a constraint |