Re: Stopping Postgres - Mailing list pgsql-general

From Tom Lane
Subject Re: Stopping Postgres
Date
Msg-id 5139.1121378751@sss.pgh.pa.us
Whole thread Raw
In response to Re: Stopping Postgres  (David Mitchell <david.mitchell@telogis.com>)
List pgsql-general
David Mitchell <david.mitchell@telogis.com> writes:
> I run the following as root:
> su postgres -c "pg_ctl stop -D /var/lib/postgresql/data -m fast"
> Or with -m immediate. Some of the backends stop but others never
> shutdown. Even if I do a killall postmaster (just with sigterm, not -9),
> these backends hang around. The backends are currently executing queries
> but the queries stop running at this point.

Can you be more specific about what queries the problem backends are
executing?  It sounds to me like a situation where those backends are
executing a code path that doesn't do CHECK_FOR_INTERRUPTS reasonably
often.  We find such paths every now and then, but it's hard to guess
exactly where your difficulty might be without more data.

The very best thing would be to attach to some of the non-stopping
backends with gdb and get stack traces.

            regards, tom lane

pgsql-general by date:

Previous
From: Rob Brenart
Date:
Subject: Re: Case insensitive unique constraint
Next
From: Joe Healy
Date:
Subject: gborg down