Re: Re: File count restriction of directory limits number of relations inside a database.

From: Andres Freund <andres(at)anarazel(dot)de>
To: sudalai <sudalait2(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: File count restriction of directory limits number of relations inside a database.
Date: 2015-04-08 12:33:39
Message-ID: 20150408123339.GB9764@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-08 12:57:07 Making src/test/ssl more robust
Previous Message Tomas Vondra 2015-04-08 12:29:26 Re: Re: File count restriction of directory limits number of relations inside a database.