Re: postgres_fdw: Provide better emulation of READ COMMITTED behavior

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw: Provide better emulation of READ COMMITTED behavior
Date: 2024-12-05 17:37:02
Message-ID: CA+TgmoaYs6DLXrZB8NWzUi3YPL9yvBhFOG4UMENMCJ+WY2pn5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 5, 2024 at 4:41 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> Comments welcome! Maybe I am missing something, though.

I have a hard time seeing how this would work if cursors are in use on
the main server. Say I do this:

DECLARE foo CURSOR FOR SELECT * FROM ft1 UNION ALL SELECT * FROM ft2;
...fetch some rows from cursor foo but few enough that we only scan ft1...
...do something that causes a snapshot refresh like issue another query...
...fetch more rows from cursor foo until we start scanning ft2...

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-12-05 18:29:52 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Tom Lane 2024-12-05 17:23:14 Re: Potential null pointer dereference in postgres.c