From: Bruce Momjian on

What happened to this patch?

---------------------------------------------------------------------------

Itagaki Takahiro wrote:
>
> Merlin Moncure <mmoncure(a)gmail.com> wrote:
>
> > Takahiro<itagaki.takahiro(a)oss.ntt.co.jp> wrote:
> > > contrib/dblink seems to have no treatments for query cancels.
> > > (1) Users need to wait for completion of remote query.
> > > (2) PGresult objects will be memory leak.
>
> Here is a patch to fix the issues. I hope the fixes will be ported
> to older versions if possible.
>
> (1) is fixed by using non-blocking APIs in libpq. I think we should
> always use non-blocking APIs even if the dblink function itself is
> a blocking-function.
>
> (2) is fixed by RegisterXactCallback(AtEOXact_dblink). However, there
> might be any better solutions -- for example, ResourceOwner framework.
>
>
> > > For (1), asynchronous libpq functions should be used instead of blocking
> > > ones, and wait for the remote query using a loop with CHECK_FOR_INTERRUPTS().
> >
> > How would you structure this loop exactly?
>
> Please check execute_query() and wait_for_result() in the patch.
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>

[ Attachment, skipping... ]

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

--
Bruce Momjian <bruce(a)momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
+ If your life is a hard drive, Christ can be your backup. +

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

From: Robert Haas on
On Wed, Feb 24, 2010 at 2:33 PM, Bruce Momjian <bruce(a)momjian.us> wrote:
> What happened to this patch?

I'm pretty sure it's the same as this:

https://commitfest.postgresql.org/action/patch_view?id=263

....Robert

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

From: Takahiro Itagaki on

Robert Haas <robertmhaas(a)gmail.com> wrote:

> I'm pretty sure it's the same as this:
> https://commitfest.postgresql.org/action/patch_view?id=263

Yes, (2) are resolved with the patch with a different implementation.

> (2) is fixed by RegisterXactCallback(AtEOXact_dblink). However, there
> might be any better solutions -- for example, ResourceOwner framework.

(1) still exists, but we had a consensus that we don't have to fix it
because we have async functions.

> (1) is fixed by using non-blocking APIs in libpq. I think we should
> always use non-blocking APIs even if the dblink function itself is
> a blocking-function.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center



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