Re: Re: File count restriction of directory limits number of relations inside a database. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Re: File count restriction of directory limits number of relations inside a database.
Date
Msg-id 20150408123339.GB9764@awork2.anarazel.de
Whole thread Raw
In response to Re: File count restriction of directory limits number of relations inside a database.  (sudalai <sudalait2@gmail.com>)
List pgsql-hackers
On 2015-04-07 20:49:21 -0700, sudalai wrote:
> Hi,
> 
>       Ya you are right, ext4 allows more directory entries(more than 32000)
> but we limited the number of files insides the directory to 32000 to get
> better performance. Sorry i'm not mentioned that in my post.

There's actually a restriction to ~64k *subdirectories* in a
directory. But none on the number of files. And with the b-tree
directories ext3/4 have been using for a long while accessing a
directory entry is going to be cheaper than accessing a dirent in a
subdirectory.

So I think you're just prematurely optimizing at the wrong end.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Re: File count restriction of directory limits number of relations inside a database.
Next
From: Michael Paquier
Date:
Subject: Making src/test/ssl more robust