Re: Transaction Snapshot Cloning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction Snapshot Cloning
Date: 2008-01-12 00:57:01
Message-ID: 29072.1200099421@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris Browne <cbbrowne(at)acm(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2008-01-12 00:59:52 Re: Declarative partitioning grammar
Previous Message Merlin Moncure 2008-01-12 00:46:36 Re: Declarative partitioning grammar