I wrote: > So the bug is in fact in David's changes, and it consists in palloc > sometimes handing back non-maxaligned pointers. I find it mildly > astonishing that we managed to get through core regression tests > without such a fault surfacing, but there you have it.
Oh! I just noticed that the troublesome context (rb->change_context) is a SlabContext, so it may be that this only happens in non-aset contexts. It's a lot easier to believe that the core tests never exercise the case of pfree'ing a slab chunk. regards, tom lane