Re: postmaster.pid file auto-clean up?

From: Michael Clark <codingninja(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sebastien Boisvert <sebastienboisvert(at)yahoo(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: postmaster.pid file auto-clean up?
Date: 2012-08-26 15:21:56
Message-ID: CACAT_AdkZRO2u08MdYG_8YhFUZOMLJrgv4fyUcoDNiMt5sjTAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Aug 26, 2012 at 10:25 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Clark <codingninja(at)gmail(dot)com> writes:
> > PID 8574 is actually iTunes, not PG,
>
> iTunes? What is that doing running under PG's userid?
>
>
>
We back our client application with PG, each OSX user gets their own
instance of PG.
It runs as that OSX user.

> > Seb figured out how to contrive this situation.
> > Run PG, copy the pid file, stop pg, copy the copied pid file back to the
> > data dir and edit it, replacing the old PID with that of another running
> > process.
>
> You're kidding, right? If you intentionally set out to break the
> postmaster interlock, you will doubtless be able to do that, and would
> still be able to break any other algorithm we might devise. Let's
> confine this discussion to scenarios that could arise without
> intentional interference.
>
>
We were presented with a problem we didn't understand.
We set out to try and figure out how we could replicate the problem, for
debugging purposes.
We managed to do so to see how our application behaves, and to see how PG
behaves.

In the wild this scenario has arisen without intentional interference. In
debugging, yes, we contrived the situation to replicate the behaviour.
Mind you, we may be using PG in an environment that isn't advisable.

We just started this discussion to learn and understand, and to see if this
is a situation that would be expected to be handled.

Thanks,
Michael.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2012-08-26 17:25:35 Re: postmaster.pid file auto-clean up?
Previous Message John D. West 2012-08-26 15:19:35 Re: run function on server restart