pgsql-bugs@counterstorm.com writes:
> We have seen this twice. The first time, it was on a 32 bit Fedora
> Core 3 system during a `postgres stop`. The stop hung because one of
> the processes was in async_notify and refused to get out. We were
> unable to do further debugging because the db was in shutdown. We
> were forced to kill -9 the process.
Next time try attaching to the stuck backend with gdb so you can get
a stack trace. It's difficult to speculate what could be wrong without
a better-localized idea of where it's hanging. It'd be a good idea to
rebuild with --enable-debug so that the stack trace will be most useful
when you get it.
regards, tom lane