Re: Transaction Snapshot Cloning - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Transaction Snapshot Cloning
Date
Msg-id 29072.1200099421@sss.pgh.pa.us
Whole thread Raw
In response to Re: Transaction Snapshot Cloning  (Chris Browne <cbbrowne@acm.org>)
Responses Re: Transaction Snapshot Cloning  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
Chris Browne <cbbrowne@acm.org> writes:
> Note that we required that the "provider transaction" have the
> attributes IsXactIsoLevelSerializable and XactReadOnly both being
> true, so we have the mandates that the resultant backend process:

> a) Is in read only mode, and
> b) Is in serializable mode.

If XactReadOnly were a "hard" read only constraint, that argument
might be worth the electrons it's written on.  I quote TFM:

: When a transaction is read-only, the following SQL commands are
: disallowed: INSERT, UPDATE, DELETE, and COPY FROM if the table they
: would write to is not a temporary table; all CREATE, ALTER, and DROP
: commands; COMMENT, GRANT, REVOKE, TRUNCATE; and EXPLAIN ANALYZE and
: EXECUTE if the command they would execute is among those listed. This is
: a high-level notion of read-only that does not prevent all writes to
: disk.

... and it doesn't prevent the need for a separate XID, either.

Now I think someone was looking into a "hard" read only mode for
use in doing read-only queries against a PITR slave; if that
ever happens it might be adaptable to serve this purpose too.
But we haven't got it today.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Declarative partitioning grammar
Next
From: Neil Conway
Date:
Subject: DECLARE CURSOR code question