Skip site navigation (1) Skip section navigation (2)

pgsql: Fix pg_upgrade to cope with non-default unix_socket_directorysc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pg_upgrade to cope with non-default unix_socket_directorysc
Date: 2012-09-03 17:53:04
Message-ID: E1T8apc-0005ZQ-KL@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.

When starting either an old or new postmaster, force it to place its Unix
socket in the current directory.  This makes it even harder for accidental
connections to occur during pg_upgrade, and also works around some
scenarios where the default socket location isn't usable.  (For example,
if the default location is something other than "/tmp", it might not exist
during "make check".)

When checking an already-running old postmaster, find out its actual socket
directory location from postmaster.pid, if possible.  This dodges problems
with an old postmaster having a configured location different from the
default built into pg_upgrade's libpq.  We can't find that out if the old
postmaster is pre-9.1, so also document how to cope with such scenarios
manually.

In support of this, centralize handling of the connection-related command
line options passed to pg_upgrade's subsidiary programs, such as pg_dump.
This should make future changes easier.

Bruce Momjian and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f763b77193b04eba03a1f4ce46df34dc0348419e

Modified Files
--------------
contrib/pg_upgrade/check.c      |    4 +-
contrib/pg_upgrade/dump.c       |    4 +-
contrib/pg_upgrade/option.c     |   63 ++++++++++++++++++++++++++++++++++++
contrib/pg_upgrade/pg_upgrade.c |   19 ++++++-----
contrib/pg_upgrade/pg_upgrade.h |    4 ++
contrib/pg_upgrade/server.c     |   67 ++++++++++++++++++++++++++++++++++-----
doc/src/sgml/pgupgrade.sgml     |    8 +++++
7 files changed, 149 insertions(+), 20 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-09-03 19:03:20
Subject: pgsql: Back-patch recent pg_upgrade fixes into 9.2.
Previous:From: Bruce MomjianDate: 2012-09-03 16:57:52
Subject: Re: [COMMITTERS] pgsql: Make a cut at a major-features list for 9.2.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group