Re: Hint to set owner for tablespace directory

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Maksim Milyutin <milyutinma(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hint to set owner for tablespace directory
Date: 2018-09-07 15:05:21
Message-ID: b1a2ea3c-9472-2ca3-a5ab-ada7215a0d65@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/09/2018 11:59, Maksim Milyutin wrote:
> OK. However I think it would be helpful to leave the mention about
> setting necessary owner for tablespace directory. My final version of
> hint is "You might need to fix permissions on this directory or its
> parents or install the PostgreSQL system user as the owner of this
> directory." And updated version of patch is attached.

You are still proposing to hint that the permissions on the tablespace
directory might be correct but that the main database instance is
running under the wrong user. I don't think that is a plausible
situation. Clearly changing the tablespace directory permissions is
much simpler than changing the entire database setup.

The normal error situation here is that the tablespace directory has
been created in a way that the "postgres" user can't access the way it
wants. I don't see how the existing messaging is insufficient in that case.

If anything, we should look to create some consistency with initdb. It
basically does the same thing when it creates a new data directory. I'm
not aware of a need to add more hints there either.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-09-07 15:13:17 Re: libpq stricter integer parsing
Previous Message Pavel Stehule 2018-09-07 14:28:00 Re: [HACKERS] proposal: schema variables