Read only postgres server

From: EvilJonny <eviljonny(at)eviljonnys(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Read only postgres server
Date: 2010-04-02 17:14:56
Message-ID: 4BB62610.9070003@eviljonnys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

Is it possible to start the postgres server up in a read only mode
rather than doing specific user permissions.

The reason I ask is I am migrating from one platform to another (with
different versions of postgres), I've done a pg_dump and imported that
on the new platform, I have a script which copies all new rows from the
old platform to the new platform.

What I want to do is stop all writes to the old platform, copy all the
new rows using the script mentioned previously and then change the
clients to write to the new database. It's critically important for me
to have the databases in sync with all ids in all tables matching and
not to lose any data.

To this end it's worth nothing that clients that fail to write will try
again every five minutes so any failed writes in the mean time are
effectively queued and will be written to the new platform once it is on.

I could revoke the user privileges but I want to be able to very quickly
revert to the old platform with as simple of a procedure as possible if
anything goes wrong during the transfer, as such I would prefer not to
alter any of the data in the database. If it's not possible to start up
in read only globally across the server then I will just do this but it
will require a more complex rollback plan.

Thanks,

Jonathan

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Matt Devlin 2010-04-02 23:05:23 postgres install question
Previous Message L. Loewe 2010-04-02 04:11:22 Re: slow plan on join when adding where clause