Re: [PATCH] pgbench - refactor some connection finish/null into common function

From: "Rady, Doug" <radydoug(at)amazon(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgbench - refactor some connection finish/null into common function
Date: 2018-02-21 19:11:15
Message-ID: AE49ECA0-D3F4-48F7-8647-CCC25C86D979@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 1/30/18, 03:41, "Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr> wrote:
Hello Doug,
Hi Fabien,

> This patch refactors all of the connection state PQfinish() and NULL’ing into a single function.
> Excludes PQfinish() in doConnect().

My 0.02€:

The argument could be "PGconn **" instead of a "CState *"?
If so, it may be used in a few more places. What is your opinion?

I should have named finishCon() as finishCStateCon() since it was specific to that use pattern.
I'll resubmit with that change if you think it helps.

I'm fine with this kind of factorization which takes out a three-line
pattern, but I'm wondering whether it would please committers.

Guess we'll find out ...

--
Fabien.
Thanks!
doug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-02-21 19:37:22 Re: [HACKERS] pageinspect option to forgo buffer locking?
Previous Message Peter Geoghegan 2018-02-21 18:55:20 Re: pgsql: Avoid valgrind complaint about write() of uninitalized bytes.