Re: Support custom socket directory in pg_upgrade
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-12T19:00:35Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add a --socketdir option to pg_upgrade.
- 2d34ad843031 12.0 landed
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