Re: unix_socket_directory vs pg_ctl? - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: unix_socket_directory vs pg_ctl?
Date
Msg-id 200311300529.hAU5TAP10267@candle.pha.pa.us
Whole thread Raw
In response to unix_socket_directory vs pg_ctl?  ("Szűcs Gábor" <surrano@mailbox.hu>)
List pgsql-bugs
Yep, bug.  pg_ctl doesn't look at PGHOST to see if it is a path to the
socket files --- it only looks at PGPORT:
           if "$PGPATH/psql" -p $PGPORT -l >/dev/null 2>&1

Added to TODO:
   * Have pg_ctl look at PGHOST in case it is a socket directory

---------------------------------------------------------------------------

Szűcs Gábor wrote:
> Dear Gurus,
>
> ============================================================================
>                         POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name  : Gabor Szucs
> Your email address : surrano@mailbox.hu
>
>
> System Configuration
> ---------------------
>   Architecture (example: Intel Pentium)   : Intel Pentium 2
>
>   Operating System (example: Linux 2.0.26 ELF)  : Debian "Woody" 2.4.21 Elf
>
>   PostgreSQL version (example: PostgreSQL-7.4):   PostgreSQL-7.4
>
>   Compiler used (example:  gcc 2.95.2)  : gcc 2.95.4 20011002 (Debian
> prerelease)
>
>
> Please enter a FULL description of your problem:
> ------------------------------------------------
>
> Abstract: setting unix_socket_directory in postgresql.conf seems to confuse
> pg_ctl so that it starts postmaster but can't see it running so reports as
> "failed"
>
>
> Please describe a way to repeat the problem.   Please try to provide a
> concise reproducible example, if at all possible:
> ----------------------------------------------------------------------
>
> Details:
>
> 1. Debian "Woody" Linux, appropriate postgresql (7.2.1) and php4 packages
> installed.
>
> 2. I did my best to put 7.2.1 out of the way without uninstalling it, since
> the php4-pgsql package depends on it.
>
> 3. Downloaded and unzipped postgresql-7.4 (also tried 7.4RC2 last weekend).
> Configured to default port 5440 ("40" as in "(7.)4.0"). Compiled,
> regress-tested, installed, initdb.
>
> 4. Configured postgresql.conf to use
>
>   unix_socket_directory = '/var/run/postgresql'
>
>   since Debian's php package requires socket files to be there.
>
> 5. Starting with
>
>   bin/pg_ctl -w -D data -l data/logfile
>
>   causes postmaster to start, but pg_ctl keeps sleeping and re-checking,
> then gives up. However, postmaster runs, with socket files in the given
> directory.
>
> --------------------- cut here ---------------------
>
>
> It seems my mail didn't hit the list, so I re-send it with the standard bug
> template.
>
> I know workarounds (the ugliest being "recompile php", or the simpler
> "symlink the socket files from /tmp"). What I'm concerned is if I'm doing
> something wrong, or is it an existent bug in Postgresql.
>
> If needed, I can give detailed information (please specify) about my system,
> or even try compiling and installing different versions with different
> settings. I just don't have any ideas what to try and what not to so guide
> me how to help you.
>
> --------------------- cut here ---------------------
>
> G.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073 


pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PATCH: Uninitialized variable usage in contrib/pg_autovacuum
Next
From: Joe Sunday
Date:
Subject: netmask(inet) function broken in 7.4