Re: Unable to start postgresql

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, John Iliffe <john(dot)iliffe(at)iliffe(dot)ca>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unable to start postgresql
Date: 2017-03-09 14:17:51
Message-ID: 73900481-6196-1b23-557f-48e3caa350f5@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/08/2017 09:28 PM, Tom Lane wrote:
> John Iliffe <john(dot)iliffe(at)iliffe(dot)ca> writes:
>> On Wednesday 08 March 2017 23:35:10 Tom Lane wrote:
>>> That isn't proving a lot: as I showed in my example lsof output,
>>> Fedora's lsof will map "5432" to "postgres" in the context of an IP
>>> port number. (I'm sure there's a way to turn that off, but -n ain't
>>> it.)
>
>> Yes, but your lsof output also showed a line for postmaster and mine
>> doesn't.
>
> That's because I started mine by saying "postmaster" not "postgres".
> It's not real relevant, just ancient habit of mine.
>
>> In your case postmaster has an IPv6 TCP socket (but no IPv4 I
>> notice)
>
> Uh, what? I showed an IPv6, an IPv4, and a Unix socket.
>
>> The following is from ss, the new version of netstat:
>> ------------------------------------
>> tcp LISTEN 0 128 127.0.0.1:postgres *:*
>> tcp LISTEN 0 128 ::1:postgres :::*
>> ------------------------------------
>
> Well, that's pretty interesting, because it proves that *something* has
> got IPv4 port 5432 open. If not your manually-started postmaster, then
> what? You need to inquire into that a bit harder. Running lsof as root
> and examining all processes might help.

Or using ss, something like:

sudo ss -l -p| grep post
u_str LISTEN 0 128 /tmp/.s.PGSQL.5442 15355 * 0 users:(("postmaster",pid=848,fd=5))
u_str LISTEN 0 128 /tmp/.s.PGSQL.5432 15913 * 0 users:(("postmaster",pid=849,fd=5))
tcp LISTEN 0 128 *:postgresql *:* users:(("postmaster",pid=849,fd=3))
tcp LISTEN 0 128 127.0.0.1:5442 *:* users:(("postmaster",pid=848,fd=4))
tcp LISTEN 0 128 :::postgresql :::* users:(("postmaster",pid=849,fd=4))
tcp LISTEN 0 128 ::1:5442 :::* users:(("postmaster",pid=848,fd=3))

>
> regards, tom lane
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Iliffe 2017-03-09 16:14:04 Re: Unable to start postgresql
Previous Message Naveen Raj 2017-03-09 13:28:57 Help regarding flushing data from Shared Memory to Database