Re: directory name equal database name - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: directory name equal database name
Date
Msg-id 7029.1580833215@sss.pgh.pa.us
Whole thread Raw
In response to directory name equal database name  (squid ward <squidw@mail.ru>)
Responses Re[2]: directory name equal database name  (squid ward <squidw@mail.ru>)
List pgsql-interfaces
=?UTF-8?B?c3F1aWQgd2FyZA==?= <squidw@mail.ru> writes:
> Question is why directory name not equal as database name?

Because (1) it doesn't work for database names that aren't legal as
filenames (according to the none-too-well-standardized rules of your
particular filesystem); (2) SQL requires us to treat "FOO" and "foo"
as distinct names, but the filesystem might not; (3) renaming a database
is dangerous, as there's no way to make the directory rename action
atomic with commit of the system catalog updates; (4) renaming a database
causes problems for concurrent sessions that might be in the middle of
opening files in that database.  And probably a few other reasons I
don't recall off the top of my head.

> Can i change it?

No.

            regards, tom lane



pgsql-interfaces by date:

Previous
From: Dave Cramer
Date:
Subject: Re: directory name equal database name
Next
From: مهنــ التعليم ــدس MOHANDSEDU
Date:
Subject: yti