Re: [Pgsqlrpms-hackers] Safer auto-initdb for RPM init script

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [Pgsqlrpms-hackers] Safer auto-initdb for RPM init script
Дата
Msg-id 24279.1156517135@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [Pgsqlrpms-hackers] Safer auto-initdb for RPM init  (Reinhard Max <max@suse.de>)
Список pgsql-hackers
Reinhard Max <max@suse.de> writes:
> Another flaw of the flag-file method is, that PGDATA might have been 
> changed by the sysadmin between installing the RPM and calling the 
> init script for the first time.

What problem do you see there?  With either of these methods, a manual
change in PGDATA would require a manual initdb before the postmaster
would start.  That seems like a good conservative thing to me.

(Actually, with the flag-file method you could get the initscript
to run initdb for you by hand-creating the flag file, but it seems
unlikely people would do that in practice.)

> But shouldn't mountpoints always have 000 permissions to prevent 
> writing into the directory as long as nothing is mounted to it?

Not sure that that helps much given that the initscript runs as root.
And in any case the point here is to protect against human error,
not to assume that the installation is managed according to very
best practices.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [Pgsqlrpms-hackers] Safer auto-initdb for RPM init
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Safer auto-initdb for RPM init script