pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Let's use libpq for everything
Date: Mon, 22 Dec 2014 22:53:01 +0200
Message-ID: <549884AD.2060805@vmware.com> (raw)
In-Reply-To: <CAB7nPqRKR52mmr4aWiubJOeRTbO-7qr8Tv7vYjzg6ncNzTJU_Q@mail.gmail.com>
References: <5457B9E9.5040403@vmware.com>
	<546AEECB.1030602@2ndquadrant.com>
	<54774DCA.2020107@vmware.com>
	<CAB7nPqSc7M_wJYjZEfQ7QyBg1mbo3_Dhg0Jeiqx7HpO+46HFTA@mail.gmail.com>
	<5487215E.7040909@vmware.com>
	<CAB7nPqRKR52mmr4aWiubJOeRTbO-7qr8Tv7vYjzg6ncNzTJU_Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 12/10/2014 07:57 AM, Michael Paquier wrote:
> On Wed, Dec 10, 2014 at 1:20 AM, Heikki Linnakangas <hlinnakangas@vmware.com>
> wrote:
>>> 6) I am getting many regression failures after applying this patch and
>>> running the tests on OSX, please see attached.
>>
>>
>> Attached is a new version [1], with a lot of small fixes here and there.
> It
>> passes all the regression tests for me. Can you try again with this
> version?
>> If it's still failing on OS X, will need to investigate.
>
> With this version regression tests are passing on all my OSX/Linux dev
> machines. At least I do not see failures directly related to it.

Great!

> Few comments:
> 1) Here an error message would be nice:
> +               /*
> +                * XXX: we don't check the result here. Should we? We're
> rolling back,
> +                * so it's not clear what else we can do on error. Giving
> an error
> +                * message to the application would be nice though.
> +                */
> +               if (pgres != NULL)
> +               {
> +                       PQclear(pgres);
> +                       pgres = NULL;
> +               }

Yeah. I left it as it is for now, with the XXX comment. (the 
corresponding code in master also ignores errors, so this isn't a 
regression)

> 2) Is this planned to be updated after this patch?
> +
> +       /*
> +        * Update our copy of the transaction status.
> +        *
> +        * XXX: Once we stop using the socket directly, and do everything
> with
> +        * libpq, we can get rid of the transaction_status field altogether
> +        * and always ask libpq for it.
> +        */
> +       LIBPQ_update_transaction_status(self);

That idea mentioned in the above comment make sense, but I'm not going 
to immediately follow up on it. Besides updating the in-trans and 
in-error-trans flags in the connection object, 
LIBPQ_update_transaction_status also calls CC_on_abort and CC_on_commit 
functions when the state changes, so we can't just directly remove 
LIBPQ_update_transaction_status.

> 3) Did you do some performance tests here?
> +       /*
> +        * XXX: We need to do Prepare + Describe as two different
> round-trips
> +        * to the server, while without libpq we send a Parse and Describe
> +        * message followed by a single Sync.
> +        */

Not specifically, but I did analyze the number of round-trips performed 
by the regression suite earlier.

I've merged this with latest changes in the master branch, and did some 
error handling fixes. Latest version is again attached here, and also 
available in github 
(https://github.com/hlinnaka/psqlodbc/tree/libpq-integration4).

- Heikki

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Attachments:

  libpq-integration4-3.patch.gz (application/gzip, 91.5K) download

view thread (11+ messages)  latest in thread

Message-ID: <549884AD.2060805@vmware.com>
Permalink:  ../549884AD.2060805@vmware.com/
Also on:    postgresql.org/message-id/549884AD.2060805@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hlinnakangas@vmware.com, michael.paquier@gmail.com, craig@2ndquadrant.com
  Subject: Re: Let's use libpq for everything
  In-Reply-To: <549884AD.2060805@vmware.com>
  References: <5457B9E9.5040403@vmware.com> <546AEECB.1030602@2ndquadrant.com> <54774DCA.2020107@vmware.com> <CAB7nPqSc7M_wJYjZEfQ7QyBg1mbo3_Dhg0Jeiqx7HpO+46HFTA@mail.gmail.com> <5487215E.7040909@vmware.com> <CAB7nPqRKR52mmr4aWiubJOeRTbO-7qr8Tv7vYjzg6ncNzTJU_Q@mail.gmail.com> <549884AD.2060805@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox