"Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> [We would also have to block SIGTERM around the second cancel_shmem_exit and
>> cleanup_routine, no? Or if it's idempotent (actually, wouldn't it have to be?)
>> run them in the reverse order.]
>
> No, we wouldn't, because a SIGTERM can only actually fire at a
> CHECK_FOR_INTERRUPTS() call. You'd just need to be sure there wasn't
> one in the cleanup code.
Wait, huh? In that case I don't see what advantage any of this has over
Bruce's patch. And his approach seemed a lot more robust.
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production
Tuning