Re: [PATCH] Include application_name in "connection authorized" log message

From: Don Seiler <don(at)seiler(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Include application_name in "connection authorized" log message
Date: 2018-09-25 16:47:49
Message-ID: CAHJZqBDYo+ZOnGShETCXMnZTkEXc2RLcGDW7oOG3pt6QbjMdFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 24, 2018 at 4:10 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:

>
> * Don Seiler (don(at)seiler(dot)us) wrote:
> >
> > OK I created a new function called clean_ascii() in common/string.c. I
> call
> > this from my new logic in postmaster.c as well as replacing the logic in
> > guc.c's check_application_name() and check_cluster_name().
>
> Since we're putting it into common/string.c (which seems pretty
> reasonable to me, at least), I went ahead and changed it to be
> 'pg_clean_ascii'. I didn't see any other obvious cases where we could
> use this function (though typecmds.c does have an interesting ASCII
> check for type categories..).
>

Good idea, makes it all a bit more uniform.

> Otherwise, I added some comments, added application_name to the
> replication 'connection authorized' messages (seems like we really
> should be consistent across all of them...), ran it through pgindent,
> and updated a variable name or two here and there.
>

This looks great. Thanks for cleaning it up and all your help along the way!

> > I've been fighting my own confusion with git and rebasing and fighting
> the
> > same conflicts over and over and over, but this patch should be what I
> > want. If anyone has time to review my git process, I would appreciate
> it. I
> > must be doing something wrong to have these same conflicts every time I
> > rebase (or I completely misunderstand what it actually does).
>
> I'd be happy to chat about it sometime, of course, just have to find
> time when we both have a free moment. :)
>

Gladly! Hopefully there is some other low-hanging fruit that would be
within my grasp to help out again in the future.

> Attached is the updated patch. If you get a chance to look over it
> again and make sure it looks good to you, that'd be great. I did a bit
> of testing of it myself but wouldn't complain if someone else wanted to
> also.
>

Reviewed and approved, for whatever my approval is worth. Thanks again!

Don.

--
Don Seiler
www.seiler.us

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michail Nikolaev 2018-09-25 16:52:55 Re: txid_status returns NULL for recently commited transactions
Previous Message Michail Nikolaev 2018-09-25 16:47:40 txid_status returns NULL for recently commited transactions