Re: our checks for read-only queries are not great - Mailing list pgsql-hackers

From Tom Lane
Subject Re: our checks for read-only queries are not great
Date
Msg-id 8765.1578597846@sss.pgh.pa.us
Whole thread Raw
In response to Re: our checks for read-only queries are not great  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: our checks for read-only queries are not great
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'd be really interested to hear if anyone knows the history behind
> allowing CLUSTER, REINDEX, VACUUM, and some operations on temp tables.
> It seems to have been that way for a long time. I wonder if it was a
> deliberate choice or something that just happened semi-accidentally.

Within a "read-only" xact you mean?  I believe that allowing DML writes
was intentional.  As for the utility commands, I suspect that it was in
part accidental (error of omission?), and then if anyone thought hard
about it they decided that allowing DML writes to temp tables justifies
those operations too.

Have you tried excavating in our git history to see when the relevant
permission tests originated?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Removing pg_pltemplate and creating "trustable" extensions
Next
From: Alvaro Herrera
Date:
Subject: Re: Coding in WalSndWaitForWal