[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about snapshotting Debian subprojects (e.g. neuro.debian.net)

[I put d-snapshot back into the Cc; might be interesting for other too.]

On Mon, 11 Oct 2010, Yaroslav Halchenko wrote:

> Dear Peter,
> Please find 3 minor patches attached.  And please pardon my ignorant
> question, I haven't dealt with DBs much:  how did you setup to run
> two pg's on 
> main on 5432
> readonly on 5433 

I don't, on the one host.  That's probably just an artefact of taking
sample config from different setups.  We do however mirror the database
between two hosts, but that is quite painful (basically we dump the
index files and import them on the other host).  I expect this will
become much nicer with postgres 9 replication, but I haven't yet tried.

> I have used pg_createcluster to create 2nd DB with
> "default_transaction_read_only = on" but if I point it to the same
> db location -- pg_ctlcluster refuses to start it so I guess that is
> "illegal" since locking conflicts...

Yeah, I wouldn't try that :)

> As a workaround I could of cause simply create a read-only user for the
> main server, but I was surprised to find only ugly ways [1] to  create
> such a user in pre-9 postgresql, so decided simply to ask you ;)

Debian's snapshot database has such a user - it's simply the guest user.
They can read everything but don't have write (i.e.
insert/update/delete) privileges on anything.

                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/

Reply to: