Re: [GENERAL] Is it OK to create a directory in PGDATA dir - Mailing list pgsql-general

From Tomas Vondra
Subject Re: [GENERAL] Is it OK to create a directory in PGDATA dir
Date
Msg-id 7140e6cc-70fa-eb61-23b8-b1a99a07e3d5@2ndquadrant.com
Whole thread Raw
In response to [GENERAL] Is it OK to create a directory in PGDATA dir  (rakeshkumar464 <rakeshkumar464@outlook.com>)
Responses Re: [GENERAL] Is it OK to create a directory in PGDATA dir  ("Igal @ Lucee.org" <igal@lucee.org>)
Re: [GENERAL] Is it OK to create a directory in PGDATA dir  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi,

On 10/19/2017 09:58 PM, rakeshkumar464 wrote:
> In the container world, sometime the only persistent storage path
> (that is, storage outside container world) is PGDATA.>

I don't want to be the "You're doing it wrong!" guy, but you're doing it
wrong. If a container only gives you a single persistent storage path,
then don't use it as PGDATA directly, but create PGDATA as one of the
directories in that path. And create a directory for other stuff next to
it, not in the data directory.

>
> Is it fine to create a subdir inside PGDATA and store our stuff
> there, or will PG freak out seeing a foreign object.
> 

PostgreSQL certainly does not check if there are unknown directories in
the data directory, and it will not crash and burn. But it causes all
sorts of problems, and it increases the probability of human error.

regards

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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: rakeshkumar464
Date:
Subject: [GENERAL] Is it OK to create a directory in PGDATA dir
Next
From: "Igal @ Lucee.org"
Date:
Subject: Re: [GENERAL] Is it OK to create a directory in PGDATA dir