Re: Something fishy happening on frogmouth

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Something fishy happening on frogmouth
Date: 2013-10-31 14:43:17
Message-ID: 20131031144317.GA24221@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-10-31 10:29:17 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Thu, Oct 31, 2013 at 5:50 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> >> On 2013-10-31 11:33:28 +0200, Heikki Linnakangas wrote:
> >>> Wait, that sounds horrible. If you kill -9 the server, and then rm -rf
> >>> $PGDATA, the shared memory segment is leaked until next reboot?
>
> >> Our main shared memory segment works the same way, doesn't it? And it
> >> has for a long time.
>
> > It does, and what's the alternative, anyway?
>
> Well, what we expect from the existing shmem code is that restarting the
> postmaster will clean things up, ie find and destroy the leaked shmem.
> It sounds to me like this may not work like that, in which case I agree
> with Heikki that it's not really acceptable.

The code writes a state file containing the identity of the dsm "control
segment" used last time. That state file is read at startup and if it
still exists used to attach to the control segment which contains a list
of "user defined" dsm segments so they can be cleaned up

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-10-31 14:43:27 Re: Something fishy happening on frogmouth
Previous Message Tom Lane 2013-10-31 14:29:17 Re: Something fishy happening on frogmouth