Re: [PATCH] Re: [pgsql-advocacy] Why READ ONLY transactions?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Sean Chittenden <sean(at)chittenden(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCH] Re: [pgsql-advocacy] Why READ ONLY transactions?
Date: 2003-12-01 19:57:05
Message-ID: 25787.1070308625@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Josh Berkus wrote:
>> I thought that this was rejected thouroughly by Tom some months ago. He
>> argued pretty strongly that READ ONLY transactions were *not* a security
>> feature and that trying to make them one would work very poorly.

> I remember something like that, but I thought the patch was the result
> of that discussion. Tom?

Hm, I can't find anything in the archives in which I said that. I did
argue that using GUC to control a security feature would be a mistake:
http://archives.postgresql.org/pgsql-patches/2003-07/msg00198.php
and after watching Bruce struggle with trying to make logging-related
GUC settings secure, I think my point is pretty much proved ;-).
I don't want to see more cruft like that added to the GUC logic.

Another thing to think about is that the semantics of START TRANSACTION
READ ONLY are constrained by the SQL standard, and they are not exactly
"read only" in the traditional sense (eg, you can still create and use
temp tables). If we go down this path, I would be unsurprised to run
into a showstopper conflict between what's needed for reasonably
"secure" behavior and what the spec dictates. It would be less risky
to use some other approach, if we are really interested in creating
read-only users.

So I'm still of the opinion I gave in the above-mentioned thread, that
I'd rather make "read only user" be a concept driven by a flag in the
user's pg_shadow entry.

regards, tom lane

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Josh Berkus 2003-12-01 20:02:31 Re: BSDCan 2004
Previous Message Josh Berkus 2003-12-01 19:32:14 Re: Presentation: Adoption and Trends

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2003-12-01 20:50:47 Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"
Previous Message Bruce Momjian 2003-12-01 19:12:46 Re: [PATCH] Re: [pgsql-advocacy] Why READ ONLY transactions?

Browse pgsql-patches by date

  From Date Subject
Next Message Ron Mayer 2003-12-01 20:50:47 Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"
Previous Message Bruce Momjian 2003-12-01 19:12:46 Re: [PATCH] Re: [pgsql-advocacy] Why READ ONLY transactions?