Re: abstract Unix-domain sockets

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: abstract Unix-domain sockets
Date: 2020-11-10 06:24:31
Message-ID: 20201110062431.GK1887@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 09, 2020 at 09:04:24AM +0100, Peter Eisentraut wrote:
> On 2020-11-09 07:08, Michael Paquier wrote:
> The @ is the standard way of representing this in the user interface and the
> configuration, so it seems sensible to me that way.

Ok.

> Can you sketch how you would structure this? I realize it's not very
> elegant, but I couldn't come up with a better way that didn't involve having
> to duplicate some of the error messages into multiple branches.

I think that I would use a StringInfo to build each sentence of the
hint separately. The first sentence, "Is another postmaster already
running on port %d?" is already known. Then the second sentence could
be built depending on the two other conditions. FWIW, I think that it
is confusing to mention in the hint to remove a socket file that
cannot be removed.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-11-10 07:10:57 Re: Temporary tables versus wraparound... again
Previous Message Craig Ringer 2020-11-10 06:22:16 Re: PATCH: Report libpq version and configuration