* Stephen Frost (sfr...@snowman.net) wrote: > Ehhh, it's likely to be cached.. Sounds like a stretch to me that this > would actually be a performance hit. If it turns out to really be one, > we could just wait to move to subdirectories until some threshold (eg- > 30k) is hit.
Thinking this through a bit more, I realized that I didn't explain my thought here very well. My idea would be- do everything as we do now, until we hit a threshold (perhaps an easy one would be '10000'). Once we hit the threshold, create a subdirectory first and then the new database directory in that. eg: 0/ 1/ 2/ 3/ 4/ [...] 9999/ 00001/0/ 00001/1/ 00001/2/ 00001/3/ 00001/[...] 00001/9999/ 00002/0/ 00002/1/ 00002/2/ 00002/[...] 00002/9999/ 00003/0/ 00003/1/ [...] 09999/0/ 09999/1/ 09999/[...] 09999/9999/ This would allow for 220M+ databases. I'm not sure how bad it'd be to introduce another field to pg_database which provides the directory (as it'd now be distinct from the oid..) or if that might require alot of changes. Not sure how easy it'd be to implement something to address this problem while we continue to tie the directory name to the oid. Thanks, Stephen
signature.asc
Description: Digital signature