| From: | Steve Atkins <steve(at)blighty(dot)com> | 
|---|---|
| To: | pgsql-general General <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Run postgresql engine in readonly mode? | 
| Date: | 2008-10-12 17:30:06 | 
| Message-ID: | EFAFA8B3-9022-4E64-A4FB-27C848965B89@blighty.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Oct 11, 2008, at 6:41 PM, Joshua Tolley wrote:
> On Thu, Oct 9, 2008 at 2:37 AM, Galland Gregoire  
> <greg(dot)pg(at)practeo(dot)ch> wrote:
>> Hi all!
>>
>> I would like to run all my databases in a readonly mode just for a  
>> few
>> hours (migration plan).
>>
>> Is it a way to tell the postgresql engine to run in readonly?
>>
>> Sincerly
>>
>> G.Galland
>>
>
> This comes up periodically on lists. There's not really a way. You can
> set transactions as read only (see docs for SET TRANSACTION) but
> that's probably not feasible, as you'd have to change your
> application. You might create triggers preventing INSERTs and UPDATEs,
> but a good bet is just to back up before hand and warn your users.
set default_transaction_read_only to true?
Not entirely proof against a determined user, but good enough for most  
things, I'd guess.
Cheers,
   Steve
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Williams | 2008-10-12 18:17:29 | Re: Reg: Permission error in Windows psql while trying to read sql commands from file | 
| Previous Message | James Hitz | 2008-10-12 17:16:20 | Chart of Accounts |