Re: Speed dblink using alternate libpq tuple storage

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: greg(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org, mmoncure(at)gmail(dot)com, shigeru(dot)hanada(at)gmail(dot)com
Subject: Re: Speed dblink using alternate libpq tuple storage
Date: 2012-02-21 11:15:07
Message-ID: CAM103DuBvgCta46RJgkwhMvTZd9VkPxYOhZ238Y+f8KmV18WXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you. Everything seems clear.
Please wait for a while.

> PQskipResult:
> - store old callback and param in local vars
> - set do-nothing row callback
> - call PQgetresu
>
> On Tue, Feb 21, 2012 at 12:13 PM, Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> >> > - PQskipResult(conn, true) makes all consequent PQgetResult()'s
> >> > to skip all the rows.
> >
> > Well, Is this right?
>
> Yes, call getResult() until it returns NULL.
>
> >> > If this is right, row processor should stay also in PGresult
> >> > context. PQskipResult() replaces the row processor in PGconn when
> >> > the second parameter is true, and in PGresult for false.
> >>
> >> No, let's keep row processor only under PGconn.
> >
> > Then, Should I add the stash for the row processor (and needless
> > for param) to recall after in PGconn?
>
> PQskipResult:
> - store old callback and param in local vars
> - set do-nothing row callback
> - call PQgetresult() once, or until it returns NULL
> - restore old callback
> - return 1 if last result was non-NULL, 0 otherwise
>
> --
> marko
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2012-02-21 11:19:41 Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Previous Message Pavel Stehule 2012-02-21 10:48:15 Re: Access Error Details from PL/pgSQL