Re: Read-only transactions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Read-only transactions
Date
Msg-id Pine.LNX.4.44.0301072147300.29178-100000@localhost.localdomain
Whole thread Raw
In response to Re: Read-only transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Read-only transactions
List pgsql-hackers
Tom Lane writes:

> Where are you planning to check this?

In general, I'm trying to align it like a (self-imposed) permission check.
For the query-like statements I'm looking at ExecCheckRTPerms().  (That
also handles EXECUTE and EXPLAIN most easily.)  Utility statements have a
check in tcop/utility.c, COPY does it in DoCopy() (out of convenience).
In any case you don't pay more than a 'if (XactReadOnly && ...)' if it's
not activated.

> As such it's not clear to me why vacuum and checkpoint are included in
> the forbidden list.  They don't logically change any data.  The same
> might be said of reindex.

You're right.  I'll allow that class of statements.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: "Francisco Figueiredo Jr."
Date:
Subject: Re: [Npgsql-general] Get function OID and function calling support
Next
From: Peter Eisentraut
Date:
Subject: Re: IPv6 patch