Обсуждение: multiple $PGDATA dir's for one! postmaster?
hi, is there anyway that one postmaster will manage different PGDATA directories (e.g. on different harddrives)? or is it restricted to one ? thanks christian __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/
On Thu, 2003-03-06 at 05:44, Tom Tom wrote: > hi, > > is there anyway that one postmaster will manage > different > PGDATA directories (e.g. on different harddrives)? > or is it restricted to one ? > This was a little ambigous to me, so heres the possible answers I came up with: a) You want to run postgresql but you'd like to split your database over two physical hard drives. You can do this with multiple $pgdata's, but you can symlink the files/directories under $pgdata to different hard drives. b) You like to switch back and forth between two different data dirs for testing purposes. AFAIK you can do this, whenever you start/stop the postmaster just pass it a different $pgdata string and it will read from the new $pgdata dir. You'll need to make sure that the two servers are running on different ports, but I can't think of any other hang-ups. You should note though that both databases will actually be seperate processes, with there own statistics and connection child processes, just that they both will be started with the same binary. Robert Treat
On Thu, Mar 06, 2003 at 02:44:13AM -0800, Tom Tom wrote: > is there anyway that one postmaster will manage > different > PGDATA directories (e.g. on different harddrives)? > or is it restricted to one ? You can use more than one. Check out initlocation. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
On Thu, Mar 06, 2003 at 02:44:13AM -0800, Tom Tom wrote: > hi, > > is there anyway that one postmaster will manage > different > PGDATA directories (e.g. on different harddrives)? > or is it restricted to one ? Short answer: yes, RTFM, man postmaster ;-). (You can specify different database cluster with -D option, as long as they do not share port - read manual.) Best regards, -- --- Artur Pietruk