Forum OpenACS Q&A: Response to File Table Overflow.

Collapse
Posted by Don Baccus on
Oh ... Postgres.

AOLserver, at least, keeps persistent connections open to Postgres backend processes.  Each of these processes will open files, one file per table and one file per index.  The ACS has lots of tables and lots  of indices.  Actually, come to think of it the shared buffer manager does file management so presumably file handles are shared between child processes.  Still, it's easy to see that you might need quite a few file handles to run the ACS!

I've been through the Postgres shared buffer management code before, but didn't dig into how and when file handles are grabbed (i.e. files opened and closed).

This is one potential drawback to the PG model of one-table-per-file (as opposed to say Oracle that stuffs tables into a tablespace which in turn is stuffed into a file).  Still, with modern Linux/Unix systems you can have lots and lots of file handles.  Three more cheers  for cheap hardware!

Also, PG will open files to sort and do heap joins if you haven't started it with the appropriate switches that tell it to use lots of RAM for these things.  I'll be writing something on this in the next couple of weeks.