pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedAlternate Database Locations
12+ messages / 5 participants
[nested] [flat]
* Alternate Database Locations
@ 2000-10-24 18:40 Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
0 siblings, 1 reply; 12+ messages in thread
From: Brian C. Doyle @ 2000-10-24 18:40 UTC (permalink / raw)
To: pgsql-sql
Hello,
I am working on seting up alternate database locations for my users.
I have done
% initlocation /home/userid
% createdb -D /home/userid userid
and i always get
ERROR: The database path '/home/httpd/jbbent' is invalid. This may be due
to a character that is not allowed or because the chosen path isn't
permitted for databases
I have done both of these as the user and as postgres I have had the dir
chmod to 777 and still nothing. what am I doing wrong?
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-24 23:00 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:04 ` Re: Alternate Database Locations Roderick A. Anderson <raanders@altoplanos.net>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
0 siblings, 2 replies; 12+ messages in thread
From: Brian C. Doyle @ 2000-10-24 23:00 UTC (permalink / raw)
To: pgsql-sql
Never mind... I got it working
At 02:40 PM 10/24/00 -0400, Brian C. Doyle wrote:
>Hello,
>
>I am working on seting up alternate database locations for my users.
>I have done
>
>% initlocation /home/userid
>% createdb -D /home/userid userid
>
>and i always get
>
>ERROR: The database path '/home/httpd/jbbent' is invalid. This may be due
>to a character that is not allowed or because the chosen path isn't
>permitted for databases
>
>I have done both of these as the user and as postgres I have had the dir
>chmod to 777 and still nothing. what am I doing wrong?
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-25 19:04 ` Roderick A. Anderson <raanders@altoplanos.net>
1 sibling, 0 replies; 12+ messages in thread
From: Roderick A. Anderson @ 2000-10-25 19:04 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
On Tue, 24 Oct 2000, Brian C. Doyle wrote:
> Never mind... I got it working
OK, don't play your cards so close to the vest. What was the problem (and
solution)?
TIA,
Rod
--
Roderick A. Anderson
raanders@altoplanos.net Altoplanos Information Systems, Inc.
Voice: 208.765.6149 212 S. 11th Street, Suite 5
FAX: 208.664.5299 Coeur d'Alene, ID 83814
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-25 19:20 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 02:43 ` Re: Alternate Database Locations Tom Lane <tgl@sss.pgh.pa.us>
2000-10-26 02:54 ` Re: Alternate Database Locations indraneel@www.cdfd.org.in
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
1 sibling, 3 replies; 12+ messages in thread
From: Brian C. Doyle @ 2000-10-25 19:20 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@altoplanos.net>; +Cc: pgsql-sql
Well I got it working kinda.
You have set up an environment for the new directory and export it under
the PGSQL super user account
PGDATA2=/home/userid
export PGDATA2
Then run
initlocation PGDATA2
After that you have to restart your postmaster with the data dir as PGDATA2
postmaster -d PGDATA2
Now you can greate a new db in a new location
createdb mydb -D PGDATA2
that is it and you have a new location for ALL your database if you use it
... If you do not add -D PGDATA2 for future db it writes to the default
location but you may have problems access it.
I am still trying to find out how to get multiple postmasters running on
different ports at the same time. Does anyone have any clue how to do that?
At 12:04 PM 10/25/00 -0700, Roderick A. Anderson wrote:
>On Tue, 24 Oct 2000, Brian C. Doyle wrote:
>
> > Never mind... I got it working
>
>OK, don't play your cards so close to the vest. What was the problem (and
>solution)?
>
>
>TIA,
>Rod
>--
>Roderick A. Anderson
>raanders@altoplanos.net Altoplanos Information Systems, Inc.
>Voice: 208.765.6149 212 S. 11th Street, Suite 5
>FAX: 208.664.5299 Coeur d'Alene, ID 83814
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 02:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2 siblings, 0 replies; 12+ messages in thread
From: Tom Lane @ 2000-10-26 02:43 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: Roderick A. Anderson <raanders@altoplanos.net>; pgsql-sql
"Brian C. Doyle" <bcdoyle@mindspring.com> writes:
> I am still trying to find out how to get multiple postmasters running on
> different ports at the same time. Does anyone have any clue how to do that?
Uh, you just do it. Start each postmaster in a different data directory
and with a different port number (-D and -P switches) and you're set.
Unless you run out of shared memory or some such, in which case some
tweaking of kernel parameters is called for...
regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 02:54 ` indraneel@www.cdfd.org.in
2 siblings, 0 replies; 12+ messages in thread
From: indraneel@www.cdfd.org.in @ 2000-10-26 02:54 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
AFAIK the port number is compiled in, so you need to recompile. It's there
in the docs somewhere. you have to use a different value for --with-pgport
option in ./configure .
On Wed, 25 Oct 2000, Brian C. Doyle wrote:
>
> I am still trying to find out how to get multiple postmasters running on
> different ports at the same time. Does anyone have any clue how to do that?
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 10:08 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 14:02 ` Re: Alternate Database Locations Tom Lane <tgl@sss.pgh.pa.us>
2000-10-26 14:56 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 18:04 ` Re: Alternate Database Locations indraneel@www.cdfd.org.in
2000-10-26 19:12 ` Re: Alternate Database Locations Peter Eisentraut <peter_e@gmx.net>
2 siblings, 4 replies; 12+ messages in thread
From: Brian C. Doyle @ 2000-10-26 10:08 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
Okay I am still doing something wrong here
I set PGDATA2=/home/user1/database
export PGDATA2
then I start postmaster
postmaster -d PGDATA2 -i -p 5431 &
and i get
Can't create pid file: /usr/local/pgsql/data/postmaster.pid
Is another postmaster (pid: 10686) running?
What am I missing... I know it must be simple!!!
Thanks for all of your help!
At 10:43 PM 10/25/00 -0400, Tom Lane wrote:
>"Brian C. Doyle" <bcdoyle@mindspring.com> writes:
> > I am still trying to find out how to get multiple postmasters running on
> > different ports at the same time. Does anyone have any clue how to do
> that?
>
>Uh, you just do it. Start each postmaster in a different data directory
>and with a different port number (-D and -P switches) and you're set.
>
>Unless you run out of shared memory or some such, in which case some
>tweaking of kernel parameters is called for...
>
> regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 14:02 ` Tom Lane <tgl@sss.pgh.pa.us>
3 siblings, 0 replies; 12+ messages in thread
From: Tom Lane @ 2000-10-26 14:02 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
"Brian C. Doyle" <bcdoyle@mindspring.com> writes:
> Okay I am still doing something wrong here
> I set PGDATA2=/home/user1/database
> export PGDATA2
> then I start postmaster
> postmaster -d PGDATA2 -i -p 5431 &
I think you are confusing the "alternate database directory" stuff with
having a separate installation (primary directory). To set up a second
postmaster, you first have to initdb its installation directory:
initdb -D /home/user1/database
then start the postmaster like so:
postmaster -D /home/user1/database -p whatever ...
Instead of -D (note upper case), you can alternatively set env variable
PGDATA for these two programs.
The stuff in the manual about alternate database directories is to allow
a *single* postmaster to manage databases located somewhere other than
underneath its installation directory. It's got nothing at all to do
with starting additional postmasters.
regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 14:56 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 15:21 ` Re: Alternate Database Locations Tom Lane <tgl@sss.pgh.pa.us>
3 siblings, 1 reply; 12+ messages in thread
From: Brian C. Doyle @ 2000-10-26 14:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
Okay...
I can now run as many postmasters as I could imagine... KICK BUTT!!!!
I am still running into a problem with the "alternate database
locations" and that is I seem to be able to only set up 1 other alternate
location.
After getting the first alt location setup Iset PGDATA2= /home/user1/database
export it
initdb -D /home/user1/database
started postmaster -D /home/user1/database
initlocation 'PGDATA2'
createdb user1 -D 'PGDATA2'
it creates but it is putting it in /home/user/database
the first alt location i set up!!!
I know I am being a pain in the ass but I truly do appreciate all the help
At 10:02 AM 10/26/00 -0400, Tom Lane wrote:
>"Brian C. Doyle" <bcdoyle@mindspring.com> writes:
> > Okay I am still doing something wrong here
> > I set PGDATA2=/home/user1/database
> > export PGDATA2
>
> > then I start postmaster
> > postmaster -d PGDATA2 -i -p 5431 &
>
>I think you are confusing the "alternate database directory" stuff with
>having a separate installation (primary directory). To set up a second
>postmaster, you first have to initdb its installation directory:
>
> initdb -D /home/user1/database
>
>then start the postmaster like so:
>
> postmaster -D /home/user1/database -p whatever ...
>
>Instead of -D (note upper case), you can alternatively set env variable
>PGDATA for these two programs.
>
>The stuff in the manual about alternate database directories is to allow
>a *single* postmaster to manage databases located somewhere other than
>underneath its installation directory. It's got nothing at all to do
>with starting additional postmasters.
>
> regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 14:56 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 12+ messages in thread
From: Tom Lane @ 2000-10-26 15:21 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
"Brian C. Doyle" <bcdoyle@mindspring.com> writes:
> createdb user1 -D 'PGDATA2'
> it creates but it is putting it in /home/user/database
> the first alt location i set up!!!
Um, are you sure createdb is connecting to the right postmaster?
When you use multiple postmasters you have to keep a close eye
on clients' PGPORT settings ...
If it is the right postmaster but wrong interpretation of PGDATA2,
the odds are that you started that postmaster with the wrong value
of PGDATA2. Remember that it's the postmaster's environment, not
the client's, in which alternate-DB environment variables are expanded.
(initlocation is an exception because it doesn't contact the postmaster)
regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 18:04 ` indraneel@www.cdfd.org.in
3 siblings, 0 replies; 12+ messages in thread
From: indraneel@www.cdfd.org.in @ 2000-10-26 18:04 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
Is that a small d or a capital D? try this:
postmaster -D $PGDATA2 -i -p 5431 &
\Indraneel
On Thu, 26 Oct 2000, Brian C. Doyle wrote:
> Okay I am still doing something wrong here
>
> I set PGDATA2=/home/user1/database
> export PGDATA2
>
> then I start postmaster
> postmaster -d PGDATA2 -i -p 5431 &
> and i get
>
> Can't create pid file: /usr/local/pgsql/data/postmaster.pid
> Is another postmaster (pid: 10686) running?
>
> What am I missing... I know it must be simple!!!
>
> Thanks for all of your help!
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Alternate Database Locations
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:20 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 10:08 ` Re: Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
@ 2000-10-26 19:12 ` Peter Eisentraut <peter_e@gmx.net>
3 siblings, 0 replies; 12+ messages in thread
From: Peter Eisentraut @ 2000-10-26 19:12 UTC (permalink / raw)
To: Brian C. Doyle <bcdoyle@mindspring.com>; +Cc: pgsql-sql
Brian C. Doyle writes:
> Okay I am still doing something wrong here
>
> I set PGDATA2=/home/user1/database
> export PGDATA2
>
> then I start postmaster
> postmaster -d PGDATA2 -i -p 5431 &
postmaster -D $PGDATA -i -p 5431 >logfile 2>&1 </dev/null &
> and i get
>
> Can't create pid file: /usr/local/pgsql/data/postmaster.pid
> Is another postmaster (pid: 10686) running?
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
^ permalink raw reply [nested|flat] 12+ messages in thread
end of thread, other threads:[~2000-10-26 19:12 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-24 18:40 Alternate Database Locations Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-24 23:00 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-25 19:04 ` Roderick A. Anderson <raanders@altoplanos.net>
2000-10-25 19:20 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 02:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-26 02:54 ` indraneel@www.cdfd.org.in
2000-10-26 10:08 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 14:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-26 14:56 ` Brian C. Doyle <bcdoyle@mindspring.com>
2000-10-26 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-26 18:04 ` indraneel@www.cdfd.org.in
2000-10-26 19:12 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox