David Mitchell <david.mitchell@xxxxxxxxxxx> 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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq