Re: restrict global access to be readonly - Mailing list pgsql-hackers

From Tom Lane
Subject Re: restrict global access to be readonly
Date
Msg-id 16691.1423959894@sss.pgh.pa.us
Whole thread Raw
In response to Re: restrict global access to be readonly  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: restrict global access to be readonly  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 2/14/15 3:14 PM, Robert Haas wrote:
>> Although I like the idea, it's not clear to me how to implement it.

> Throw an error in AssignTransactionId/GetNewTransactionId?

A whole lot depends on what you choose to mean by "read only".  If it
means the same thing as "all transactions are READ ONLY", that would be
useful for some purposes, and it would have the advantage of having a
visible relationship to a long-established feature with the same name.
If you want it to mean "no writes to disk at all", that's something
totally different, and possibly not all that useful (eg, do you really
want to make sorts fail if they'd spill to disk? How about hint bit
updates?).  Jim's suggestion above would be somewhere in the middle,
as it would successfully block use of temp tables but not eg. VACUUM.
Another possibility that would be attractive for replication-related
use-cases would be "nothing that generates WAL thank you very much".

I'm inclined to think that we should agree on the desired semantics
before jumping to implementation.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Reduce pinning in btree indexes
Next
From: Kevin Grittner
Date:
Subject: Allow "snapshot too old" error, to prevent bloat