Re: [BUGS] 8.2 pg_freespacemap crash

2009-04-07 Thread Tom Lane
I wrote: > Hmm. Actually the freespace.c code rounds that number up to the next > multiple of CHUNKPAGES: > /* Allocate page-storage arena */ > nchunks = (MaxFSMPages - 1) / CHUNKPAGES + 1; While that's true, on closer inspection the *real* problem is that CHUNKPAGES is only correct f

[BUGS] 8.2 pg_freespacemap crash

2009-04-07 Thread Dimitri Fontaine
Hi, We've been hit by a pg_freespacemap contrib module crash (SIGSEGV), gdb showed it was in line 162 of it's pg_freespacemap.c file. fctx->record[i].reltablespace = fsmrel->key.spcNode; Thanks to Andrew Gierth (irc:RhodiumToad) and after some analysis and we've been able to understan

Re: [BUGS] 8.2 pg_freespacemap crash

2009-04-07 Thread Tom Lane
Dimitri Fontaine writes: > Thanks to Andrew Gierth (irc:RhodiumToad) and after some analysis and we've > been able to understand what happened: MaxFSMPages is not the maximum number > of elements (tables and indexes) contained into the FSM memory, and the > contrib believes it is. Hmm. Actua