Re: [PATCHES] COPY with no WAL, in certain circumstances

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] COPY with no WAL, in certain circumstances
Date: 2007-01-09 20:09:47
Message-ID: 1168373387.3951.325.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sun, 2007-01-07 at 11:29 -0500, Tom Lane wrote:
> 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.

New patch submitted to -patches on different thread.

...continuing this discussion about setting HEAP_XMIN_COMMITTED...

> 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.

What would the best/acceptable way be to test for this condition?

Using
if (IsXactIsoLevelSerializable)
would not be a very tight condition, but at least it would avoid putting
additional status flags into every transaction, just to test for this
case in COPY statements.

ISTM unlikely that people would try to use COPY in Serializable mode;
what do people think?

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-01-09 20:12:21 Re: 8.3 pending patch queue
Previous Message Alvaro Herrera 2007-01-09 19:09:45 Re: 8.3 pending patch queue

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-01-09 21:31:40 Re: [PATCHES] COPY with no WAL, in certain circumstances
Previous Message Simon Riggs 2007-01-09 20:02:54 COPY with no WAL, v2