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

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: 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:29:26
Message-ID: 55251F26.5020207@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/08/15 07:09, Jim Nasby wrote:
> On 4/7/15 10:49 PM, sudalai wrote:
>> 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.
>> That the reason we plan to use tablespace. The problem we faced in
>> tablespace is, the location should be present on both master and slave
>> and
>> we need to create multiple tablespaces. That why i changed the source, to
>> create a sub directory on the given location and take that location for
>> tablespace creation. So i can given one location (that present in both
>> master & slave) to create multiple tablespaces.
>
> Having run databases that probably had more than that number of files
> and not seeing any issues with that, why are you even bothering with
> this? We've gotten no reports from the field that this is actually a
> problem.
>
> If you could provide some data that this was causing a real (not a
> hypothetical) issue it'd be a lot easier to get the community excited
> about it.

Right. I was just going to write something along these lines. I've
personally ran databases with far more objects, and the filesystem was
never the main problem (unless going way back into past).

Sudalaj, I'd like to see some numbers showing that this indeed is a
problem. Do you have any benchmark demonstrating the issue, or are you
acting based on obsolete folk wisdom / assumptions?

Also, we already have a solution for that - use separate databases
instead of schemas. That creates separate directory per database, and it
also solves other issues (e.g. the statistics file will be split per
database). It may not fit your application needs, though.

--
Tomas Vondra http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-04-08 12:33:39 Re: Re: File count restriction of directory limits number of relations inside a database.
Previous Message Petr Jelinek 2015-04-08 12:24:53 Re: Replication identifiers, take 4