Re: [patch] libpq one-row-at-a-time API

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] libpq one-row-at-a-time API
Date: 2012-08-01 15:18:46
Message-ID: 4741.1343834326@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[ getting back to this now after assorted distractions ]

Marko Kreen <markokr(at)gmail(dot)com> writes:
> Just to show agreement: both PQgetRowData() and optimized PGresult
> do not belong to 9.2.

OK, we're all on board with leaving those for later.

> Only open questions are:

> * Is there better API than PQsetSingleRowMode()? New PQsend*
> functions is my alternative.

After thinking it over, I'm really unexcited about adding new versions
of all the PQsend functions. If we had the prospect of more flags in
future that could be added to a bitmask flags argument, it would be
more palatable, but it's far from clear what those might be. So I'm
now leaning towards using PQsetSingleRowMode as-is.

> * Should we rollback rowBuf change? I think no, as per benchmark
> it performs better than old code.

I had already pretty much come to that conclusion just based on code
review, without thinking about performance. In particular, we had done
some nontrivial work towards improving error-case handling in the data
message parsing code, and I don't really want to give that up, nor
rewrite it on the fly now. About the only reason I could see for
reverting rowBuf was that I thought it might hurt performance; so now
that you've proven the opposite, we should leave it alone.

So I'm working from the first set of patches in your message
<20120721194907(dot)GA28021(at)gmail(dot)com>.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2012-08-01 15:19:28 Re: Help me develop new commit_delay advice
Previous Message Robert Haas 2012-08-01 14:42:40 Re: New statistics for WAL buffer dirty writes