pgsql-bugs(at)postgresql(dot)org writes:
> Stacktrace is:
> #0 0x812ac0c in chunk_free (ar_ptr=0x81cb860, p=0xd4ef05d3) at malloc.c:3125
> #1 0x812a4d3 in chunk_alloc (ar_ptr=0x81cb860, nb=7176) at malloc.c:2612
> #2 0x8129f8f in __libc_malloc (bytes=7168) at malloc.c:2714
This looks like malloc's bookkeeping data structures must have gotten
clobbered, perhaps by a wild store operation or freeing a chunk twice
or some such. The error is doubtless somewhere in the postmaster,
not in InitLocalBuffer. Before you expend effort trying to hunt it
down, I'd suggest updating to the latest stable release, 7.1.3 ---
the problem may be fixed already. If that doesn't help, consider
linking the postmaster with a debugging malloc package, such as Electric
Fence...
regards, tom lane