Обсуждение: Two instances show same databases
I'm setting up a second instance on a server. The instance versions are 8.3.5 (original instance) and 9.1.3 (the new instance I'm attempting to set up).
I believe I have followed the steps in setting up a second instance faithfully. The new instance starts up, but I'm seeing that when I list the 9.1.3 databases, the 8.3.5 databases are shown.
As the _pgsql user I run '/usr/local/postgresql/pgsql-9.1.3/bin/psql -l' and I get a listing of databases from the 8.3.5 instance (with the 'Access privileges' column added).
I believe this can't be right and I think I've done something wrong.
The settings I've used for the 9.1.3 instance are:
The configuration during compile used was:
./configure --prefix=/usr/local/postgresql/pgsql-9.1.3
(For 8.3.5 I used the default prefix, /usr/local/pgsql)
In /usr/local/postgresql/pgsql-9.1.3/data/postgresql.conf
port = 5433
(The 8.3.5 port is the default, 5432)
The initdb command used is:
/usr/local/postgresql/pgsql-9.1.3/bin/initdb -E utf8 --locale=en_US.UTF-8 -D /usr/local/postgresql/pgsql-9.1.3/data
The startup invocation is:
/usr/local/postgresql/pgsql-9.1.3/bin/pg_ctl -D /usr/local/postgresql/pgsql-9.1.3/data -l /var/log/pgsql/pgsql-9.1.3/access.log start
The lock files are in place:
/tmp/.s.PGSQL.5432
/tmp/.s.PGSQL.5432.lock
/tmp/.s.PGSQL.5433
/tmp/.s.PGSQL.5433.lock
/tmp/.s.PGSQL.5432.lock
/tmp/.s.PGSQL.5433
/tmp/.s.PGSQL.5433.lock
I appreciate any help.
Sincerely,
Jose
.......................................................
Jose Hales-Garcia
UCLA Department of Statistics
On Thu, Apr 19, 2012 at 1:15 AM, Jose Hales-Garcia <jose.halesgarcia@stat.ucla.edu> wrote:
Hello,I'm setting up a second instance on a server. The instance versions are 8.3.5 (original instance) and 9.1.3 (the new instance I'm attempting to set up).I believe I have followed the steps in setting up a second instance faithfully. The new instance starts up, but I'm seeing that when I list the 9.1.3 databases, the 8.3.5 databases are shown.As the _pgsql user I run '/usr/local/postgresql/pgsql-9.1.3/bin/psql -l' and I get a listing of databases from the 8.3.5 instance (with the 'Access privileges' column added).I believe this can't be right and I think I've done something wrong.The settings I've used for the 9.1.3 instance are:The configuration during compile used was:./configure --prefix=/usr/local/postgresql/pgsql-9.1.3(For 8.3.5 I used the default prefix, /usr/local/pgsql)In /usr/local/postgresql/pgsql-9.1.3/data/postgresql.confport = 5433(The 8.3.5 port is the default, 5432)The initdb command used is:/usr/local/postgresql/pgsql-9.1.3/bin/initdb -E utf8 --locale=en_US.UTF-8 -D /usr/local/postgresql/pgsql-9.1.3/dataThe startup invocation is:/usr/local/postgresql/pgsql-9.1.3/bin/pg_ctl -D /usr/local/postgresql/pgsql-9.1.3/data -l /var/log/pgsql/pgsql-9.1.3/access.log startThe lock files are in place:/tmp/.s.PGSQL.5432
/tmp/.s.PGSQL.5432.lock
/tmp/.s.PGSQL.5433
/tmp/.s.PGSQL.5433.lock
Whats the output of this command ?
/usr/local/postgresql/pgsql-9.1.3/bin/psql -p 5433 -l
On Wed, Apr 18, 2012 at 7:45 PM, Jose Hales-Garcia <jose.halesgarcia@stat.ucla.edu> wrote:
Hello,I'm setting up a second instance on a server. The instance versions are 8.3.5 (original instance) and 9.1.3 (the new instance I'm attempting to set up).I believe I have followed the steps in setting up a second instance faithfully. The new instance starts up, but I'm seeing that when I list the 9.1.3 databases, the 8.3.5 databases are shown.As the _pgsql user I run '/usr/local/postgresql/pgsql-9.1.3/bin/psql -l' and I get a listing of databases from the 8.3.5 instance (with the 'Access privileges' column added).I believe this can't be right and I think I've done something wrong.The settings I've used for the 9.1.3 instance are:The configuration during compile used was:./configure --prefix=/usr/local/postgresql/pgsql-9.1.3(For 8.3.5 I used the default prefix, /usr/local/pgsql)In /usr/local/postgresql/pgsql-9.1.3/data/postgresql.confport = 5433(The 8.3.5 port is the default, 5432)
Then you need to connect to the 9.1.3 DB with the 9.1.3 port and the 8.3.5 DB with the 8.3.5 port:
psql -p 5432 -l
would show 8.3.5 databases
psql -p 5433 -l
would show 9.1.3 databases
--Scott
The initdb command used is:/usr/local/postgresql/pgsql-9.1.3/bin/initdb -E utf8 --locale=en_US.UTF-8 -D /usr/local/postgresql/pgsql-9.1.3/dataThe startup invocation is:/usr/local/postgresql/pgsql-9.1.3/bin/pg_ctl -D /usr/local/postgresql/pgsql-9.1.3/data -l /var/log/pgsql/pgsql-9.1.3/access.log startThe lock files are in place:/tmp/.s.PGSQL.5432
/tmp/.s.PGSQL.5432.lock
/tmp/.s.PGSQL.5433
/tmp/.s.PGSQL.5433.lockI appreciate any help.Sincerely,Jose.......................................................Jose Hales-GarciaUCLA Department of Statistics
On Apr 18, 2012, at 2:00 PM, Scott Mead wrote:
Then you need to connect to the 9.1.3 DB with the 9.1.3 port and the 8.3.5 DB with the 8.3.5 port:psql -p 5432 -lwould show 8.3.5 databasespsql -p 5433 -lwould show 9.1.3 databases
That solves my problem.
Thank you,
Jose
.......................................................
Jose Hales-Garcia
UCLA Department of Statistics