Re: Support custom socket directory in pg_upgrade

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Support custom socket directory in pg_upgrade
Дата
Msg-id 28968.1542049235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Support custom socket directory in pg_upgrade  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Support custom socket directory in pg_upgrade  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 7 Nov 2018, at 08:23, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
>> Why not always create a temporary directory and put it there.  Then we
>> don't need an option.  It's not like the current directory is a
>> particularly good choice anyway.

> I agree that cwd isn’t a terribly good default, but is there a good way to
> identify a suitable temporary directory to use across all platforms (mostly
> thinking about Windows)?

Windows isn't a problem because it doesn't do Unix-style sockets anyway.
However, I agree that Peter's proposal is just begging the question of
how we'd identify a better default choice than cwd.

Also, even if we had an arguably-better idea, I suspect that there would
always be cases where it didn't work.  For example, one idea is to make
a temporary directory under the installation's normal socket directory
(thus, /tmp/pgXXXX/ or some such).  But, if the normal socket directory
is not /tmp, we might find that pg_upgrade can't write there.

So I'm inclined to think that a --socketdir option is a reasonable
feature independently of whether someone comes up with a different
proposal for the default location.

            regards, tom lane


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

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: Race condition in WaitForBackgroundWorkerStartup
Следующее
От: Elvis Pranskevichus
Дата:
Сообщение: Re: [HACKERS] [PATCH v2] Add and report the new "session_read_only" GUC pseudo-variable.