Re: Read-only transactions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Read-only transactions
Date: 2003-01-07 20:57:55
Message-ID: Pine.LNX.4.44.0301072147300.29178-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-01-07 20:58:33 Re: IPv6 patch
Previous Message Francisco Figueiredo Jr. 2003-01-07 20:45:20 Re: [Npgsql-general] Get function OID and function calling support