Re: Weaker shmem interlock w/o postmaster.pid

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weaker shmem interlock w/o postmaster.pid
Date: 2013-09-12 02:57:22
Message-ID: 1378954642417-5770559.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah Misch-2 wrote
>> > I'm thinking to preserve postmaster.pid at immediate shutdown in all
>> released
>> > versions, but I'm less sure about back-patching a change to make
>> > PGSharedMemoryCreate() pickier. On the one hand, allowing startup to
>> proceed
>> > with backends still active in the same data directory is a corruption
>> hazard.
>>
>> The corruption risk, imv anyway, is sufficient to backpatch the change
>> and overrides the concerns around very fast shutdown/restarts.
>
> Making PGSharedMemoryCreate() pickier in all branches will greatly
> diminish
> the marginal value of preserving postmaster.pid, so I'm fine with dropping
> the
> postmaster.pid side of the proposal.

Its probably still worth a fresh look at the immediate shutdown process to
see whether the current location where postmaster.pid is removed is
acceptable. It may not be necessary to leave it in place always but:

1) if there is a section of shared memory that can only be reached/found if
one knows the pid, and
2) postmaster.pid is removed before that area is "secured from future
clobbering"

then there may be a risk that can still be mitigated by moving its removal
without having to go to the extreme.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Weaker-shmem-interlock-w-o-postmaster-pid-tp5770399p5770559.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-09-12 03:25:20 Re: Weaker shmem interlock w/o postmaster.pid
Previous Message Noah Misch 2013-09-12 02:28:00 Re: Weaker shmem interlock w/o postmaster.pid