Re: Question about snapshotting Debian subprojects (e.g. neuro.debian.net)
- To: Yaroslav Halchenko <firstname.lastname@example.org>
- Cc: email@example.com
- Subject: Re: Question about snapshotting Debian subprojects (e.g. neuro.debian.net)
- From: Peter Palfrader <firstname.lastname@example.org>
- Date: Tue, 12 Oct 2010 22:54:31 +0200
- Message-id: <20101012205431.GC28881@anguilla.noreply.org>
- In-reply-to: <20101012012408.GP921@onerussian.com>
- References: <20100511171912.GD25442@onerussian.com> <20100519234410.GH13025@anguilla.noreply.org> <20100922205321.GJ921@onerussian.com> <20100922215706.GG9394@anguilla.noreply.org> <20100922232306.GM921@onerussian.com> <20100927170324.GA31208@onerussian.com> <20100927174058.GI9394@anguilla.noreply.org> <20101006153101.GA921@onerussian.com> <20101007193404.GP28469@anguilla.noreply.org> <20101012012408.GP921@onerussian.com>
[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  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/