I wrote:
> Hah, nice one. Apparently the "detach the queue" path in
> mq_putmessage() has never ever been tested, because it
> contains a double pfree, and this fixes it:
or, actually, the bug's not so old: apparently I broke it in
e78d1d6d4. Where's my brown paper bag?
regards, tom lane