Thread: How many secondary databases can I create?
Hello all, I have accidently :-) found 'initlocation' and now I like to know, how many secondary database i can create. I like to do that, because I have a Virtual Webserver and for each VirtualHost I have a local $USER. Now I like to create seperatly secondary databases for each $USER/VHost. Thanks Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment
As many as you have disk space for I guess. You might need one postmaster per location but I'm not sure about that, check the docs... On Fri, Nov 12, 2004 at 04:18:13PM +0100, Michelle Konzack wrote: > Hello all, > > I have accidently :-) found 'initlocation' and now I like to > know, how many secondary database i can create. > > I like to do that, because I have a Virtual Webserver and for > each VirtualHost I have a local $USER. Now I like to create > seperatly secondary databases for each $USER/VHost. > > Thanks > Michelle > > -- > Linux-User #280138 with the Linux Counter, http://counter.li.org/ > Michelle Konzack Apt. 917 ICQ #328449886 > 50, rue de Soultz MSM LinuxMichi > 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com) -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment
Hello Martijn, Am 2004-11-12 17:01:20, schrieb Martijn van Oosterhout: > As many as you have disk space for I guess. You might need one > postmaster per location but I'm not sure about that, check the docs... I have read, that the "secondary databases" are attached to the main database which mean, it builds a cluster. I have nothing read about other postmasters... Please note, that I do not run seperatly databases. I like only to split it per $USER physicaly from the main database. I like to have this setup for my new Virtual-Webserver where I have for each VHost a local $USER. Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment
On Fri, 12 Nov 2004 17:20:59 +0100, Michelle Konzack <linux4michelle@freenet.de> wrote: > Please note, that I do not run seperatly databases. > I like only to split it per $USER physicaly from the main database. > > I like to have this setup for my new Virtual-Webserver where I have > for each VHost a local $USER. Some time ago I talked with a friend working at some ISP, and we were talking about PostgreSQL's superiority to hmm, other RDBMSs... ;) Blah, blah, blah. The question is - how to give many many users access to PostgreSQL... I see three approaches, and all of these have pros and cons. 1) One pgsql per user -- in other words each user runs its own copy of pgsql -- waste of memory (each user having its own shared mem, etc), but can enforce quota limits, etc. Hard to keep all those copies of pgsql running. 2) one pgsql database per user. Probably most common. :) Each user has full pgsql database at her disposal. It's a bit hard to manage quotas, dbsize comes in handy but it involeves creating some sort of "quota enforcing" daemon... 3) one pgsql database with one schema per user. Interesting, can very easily create many "databases", does not give full pgsql power, harder to manage quotas than previous model... Hmm, I wonder what are the feelings of people using such models. I did not use them, so I have no idea. And I wonder how problematic is "quota enforcement" there.... Regards. Dawid
Dawid Kuroczko wrote: >On Fri, 12 Nov 2004 17:20:59 +0100, Michelle Konzack ><linux4michelle@freenet.de> wrote: > > >>Please note, that I do not run seperatly databases. >>I like only to split it per $USER physicaly from the main database. >> >>I like to have this setup for my new Virtual-Webserver where I have >>for each VHost a local $USER. >> >> > >Some time ago I talked with a friend working at some ISP, and we were >talking about PostgreSQL's superiority to hmm, other RDBMSs... ;) >Blah, blah, blah. The question is - how to give many many users >access to PostgreSQL... I see three approaches, and all of these >have pros and cons. > >1) One pgsql per user -- in other words each user runs its own copy of >pgsql -- waste of memory (each user having its own shared mem, etc), >but can enforce quota limits, etc. Hard to keep all those copies of >pgsql running. > > > Hello, We use this version as it allows us to provide the best security and flexibility to the customer Sincerely, Joshua D. Drake -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC Postgresql support, programming shared hosting and dedicated hosting. +1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com PostgreSQL Replicator -- production quality replication for PostgreSQL
Attachment
Hello Dawid, Am 2004-11-13 21:42:14, schrieb Dawid Kuroczko: > Some time ago I talked with a friend working at some ISP, and we were > talking about PostgreSQL's superiority to hmm, other RDBMSs... ;) > Blah, blah, blah. The question is - how to give many many users > access to PostgreSQL... I see three approaches, and all of these > have pros and cons. > > 1) One pgsql per user -- in other words each user runs its own copy of > pgsql -- waste of memory (each user having its own shared mem, etc), > but can enforce quota limits, etc. Hard to keep all those copies of > pgsql running. This is what I have tried for 2 (???) years... and failed. It need to much memory. I have on one of my older Servers only ~140 VHosts/$USERS and I have tried to start for each $USER a postmaster... I was running out of memory with 4 GByte of RAM on a Dual Athlon. > 2) one pgsql database per user. Probably most common. :) Each user > has full pgsql database at her disposal. It's a bit hard to manage quotas, > dbsize comes in handy but it involeves creating some sort of "quota > enforcing" daemon... This is what I like to do, but if I use initlocation /home/$USER/.postgresql/ to create a secondary database and use my it with tha master db as cluster, I do not know, how I put the $USER database into this location... It seems not to be possibel. I think, it works only, If I have ond HDD and it is not enough diskspace so I attach a second HDD and a secondary db on the new HDD. > 3) one pgsql database with one schema per user. Interesting, can very > easily create many "databases", does not give full pgsql power, harder > to manage quotas than previous model... To much administration. > Hmm, I wonder what are the feelings of people using such models. > I did not use them, so I have no idea. And I wonder how problematic > is "quota enforcement" there.... :-( I have the wish, that $USER can create a secondary/cluster database in there own $HOME. A feature which I am missing... > Regards. > Dawid Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment
Hello Joshua, Am 2004-11-13 21:40:10, schrieb Joshua D. Drake: > Dawid Kuroczko wrote: > >1) One pgsql per user -- in other words each user runs its own copy of > >pgsql -- waste of memory (each user having its own shared mem, etc), > >but can enforce quota limits, etc. Hard to keep all those copies of > >pgsql running. > > > Hello, > > We use this version as it allows us to provide the best security > and flexibility to the customer This is right, but how many $USER do you have and what Computer ? And I think, the database is only accessible local without TCP ? If you have 100 $USER und 100 postmasers running and $USER wish to connect via TCP how do you manage the Ports ? I am searching a solution to split up a ~800 GByte big database... and currently it increase around 100 MByte/day. (running with 9 x SCSI-HDD 147 GByte in Raid-5 on a Quad-Athlon with only 4 GByte of memory and not 8 GByte as I like) > Sincerely, > > Joshua D. Drake Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)