Re: database folder name and tables filenames

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Mimiko <vbvbrj(at)gmail(dot)com>, Postgresql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: database folder name and tables filenames
Date: 2017-02-15 00:47:21
Message-ID: fce721c5-bcd0-97e0-209e-cc4f24d148c7@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/14/2017 09:47 AM, Mimiko wrote:
> On 14.02.2017 17:30, Adrian Klaver wrote:
>>> Is there a way to change postgres behavior to name database folders by
>>> the database name? And table files in them by table's name? And not
>>> using OIDs.
>>
>> No.
>>
>> Is there a particular problem you are trying to solve?
>
> No, there is not a problem. Its a convenience to visually view databases
> and tables with theirs name and know what the size they occupy with
> using queries of pg_catalog, like there is in mysql.

Take look at:

https://www.postgresql.org/docs/9.6/static/functions-admin.html#FUNCTIONS-ADMIN-DBOBJECT

So as example:

test=# select pg_size_pretty(pg_database_size('test'));
pg_size_pretty
----------------
8464 kB
(1 row)

>
>
> On 14.02.2017 17:34, Tom Lane wrote:
>> It used to work like that, decades ago, and it caused enormous problems
>> during table/database renames. We're not going back.
>
> So this is the culprit. Isn't there any option to use names? Even when
> compiling?
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-02-15 01:00:35 Re: Can't restart Postgres
Previous Message Tom Lane 2017-02-14 23:36:39 Re: Bad planning data resulting in OOM killing of postgres