Re: Stopping Postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Mitchell <david(dot)mitchell(at)telogis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stopping Postgres
Date: 2005-07-14 22:05:51
Message-ID: 5139.1121378751@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Mitchell <david(dot)mitchell(at)telogis(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sunny 2005-07-14 22:24:07 How to obtain the list of data table name only
Previous Message Rob Brenart 2005-07-14 21:58:36 Re: Case insensitive unique constraint