Re: Remaining Streaming Replication Open Items - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Remaining Streaming Replication Open Items
Date
Msg-id v2m603c8f071004080640yee83c213qb7f4770b34eef5c2@mail.gmail.com
Whole thread Raw
In response to Re: Remaining Streaming Replication Open Items  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Remaining Streaming Replication Open Items  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Thu, Apr 8, 2010 at 8:00 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Thu, 2010-04-08 at 07:53 -0400, Robert Haas wrote:
>
>> > I do. I see no reason to do the latter, ever, so should not be added to
>> > any TODO.
>>
>> Well, stopping recovery earlier would mean fewer locks, which would
>> mean a better chance for the read-only backends to finish their work
>> and exit quickly.  But I'm not sure how much it's worth worrying
>> about.
>
> The purpose of the lock is to prevent access to objects when they are in
> inappropriate states for access. If we stopped startup and allowed
> access, how do we know that things are in sufficiently good state to
> allow access? We don't. If the Startup process is holding a lock then
> that is the only safe thing to do. Otherwise we might allow access to a
> table with a partially built index or other screw ups.

Hmm.  Good point.  I guess you could really only stop the startup
process safely when it wasn't holding any locks anyhow - you couldn't
just kill it and have it release the locks.

...Robert


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Remaining Streaming Replication Open Items
Next
From: Robert Haas
Date:
Subject: Re: Hot Standby: Startup at shutdown checkpoint