Re: [PATCHES] COPY with no WAL, in certain circumstances - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] COPY with no WAL, in certain circumstances
Date
Msg-id 12920.1168187348@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] COPY with no WAL, in certain circumstances  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] COPY with no WAL, in certain circumstances
Re: [PATCHES] COPY with no WAL, in certain circumstances
List pgsql-hackers
I wrote:
> ... The active-portal kluge that you've just
> mentioned is nothing but a kluge, proving that you thought of some cases
> where it would fail.  But I doubt you thought of everything.

BTW, a sufficient counterexample for that kluge is that neither SPI or
SQL-function execution use a separate portal for invoked commands.  Thus
testing whether there's only one active portal isn't sufficient to prove
that you're not inside a function executing in serializable mode, and
thus it could have a transaction snapshot predating the COPY.

It's conceivable that it's safe anyway, or could be made so with some
rejiggering of the tests in tqual.c, but counting active portals doesn't
do anything to help.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] COPY with no WAL, in certain circumstances
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] SGML index build fix