Alvaro Herrera <alvherre@xxxxxxxxxxxxxx> writes: > But then I thought, why do we need it to be a file > at all? Why not use a mmap'ed memory area or something like that, and > only write it to a file on postmaster shutdown? Yeah, we definitely need some other technology for this. The difficulty is in dealing with a highly variably sized chunk of data --- our existing shmem approach won't work well, and once you get away from that the old portability question raises its head. There's also a synchronization issue: how can the stats collector make updates appear atomic? mmap by itself doesn't solve that AFAIK. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq