Re: UUNET socket-file-location patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: UUNET socket-file-location patch
Date: 2000-11-13 17:51:57
Message-ID: 200011131751.MAA29356@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

> I have to agree with Peter E. on this patch: it's poorly thought out.

Now you tell me. :-)

> I don't mind the idea of being able to relocate the socket file,
> but the client-side interface they've chosen is silly. Having to
> add another switch to every client app is not reasonable --- it's
> bad enough that you had to hack every one of the clients we supply,
> but what of client apps that just use libpq or one of the other
> interface libraries? They'll be unable to talk to such a postmaster
> without further work.

The only solution for other apps is to use the environment variable
PGUNXSOCKET or use PQconnectdb with unixsocket="lkjasdf".

Overloading the hostname with a leading slash is another nice option.
If I do that in libpq, then all the apps can benefit, right?

> We should revert all the client-side changes from this patch, and
> instead teach libpq and the other interfaces to treat a host name
> that starts with a slash as being a path to a socket file (replacing
> the default assumption of "/tmp"). Much cleaner, especially for
> existing client apps.

I can easily back out whatever you want. Let me back out the client
changes, and hack libpq to handle the leading slash. Sounds good.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2000-11-13 19:08:36 Re: Re: UUNET socket-file-location patch
Previous Message Tom Lane 2000-11-13 17:33:52 Re: UUNET socket-file-location patch

Browse pgsql-hackers by date

  From Date Subject
Next Message Limin Liu 2000-11-13 18:24:21 (download ANSI SQL benchmark?) Re: Postgres article
Previous Message Lamar Owen 2000-11-13 17:40:54 Re: Details for planned template0/template1 change