@Julio Leyva: The table does get vacuumed at the end of the maintenance tasks; in this case it's not making it that far, of course.
@Scott Marlowe: Truncate isn't an option here, unfortunately.
I'm less concerned with the particular query than with the general question of when a shutdown could hang like this. I expected this to be possible when using -m fast, but my understanding was that -m immediate really forced termination.
I'm setting up a test on the user's machine where it will try immediate first, rather than fast.
David