Re: user connection not recorded?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: user connection not recorded?
Date: 2015-07-30 14:36:26
Message-ID: 55BA366A.5000007@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/30/2015 07:21 AM, Tom Lane wrote:
> Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
>> On 07/30/2015 06:42 AM, Melvin Davidson wrote:
>>> I can understand that the host is not available in nslookup, but why is
>>> the user not being recorded?
>
>> A quick look at the source shows that Postgres system process can have NULL username:
>
> Well, the real point is that that message comes out before we've collected
> the startup packet, so we don't *have* a username yet. All we know is
> that somebody's opened a TCP connection. The later "connection
> authorized" message will tell you what database user name they gave.

Eventually got around to figuring that. So just for my reference, the
code snippet I showed from postinit.c seems to show a path where a
username is not used but is substituted with BOOTSTRAP_SUPERUSERID.

Am I following that correctly and what is BOOTSTRAP_SUPERUSERID?

>
> If you see lots more "connection received" than "connection authorized"
> then somebody is connecting to your postmaster and failing to
> authenticate, which is usually a good thing to investigate.
>
> 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 Tom Lane 2015-07-30 14:46:14 Re: user connection not recorded?
Previous Message Adrian Klaver 2015-07-30 14:27:30 Re: user connection not recorded?