I have just installed PostgreSQL 7.2.3 and I need to load it with a dump from 7.0.2, but when I submit my dump I get an error.
After the install, I created the data directory with
,
then
(obviously postgres user did already exist).
After that, I made initdb (by postgres user) and then started postmaster (by pg_ctl).
Finally I tried to restore my db with
and I get an error that's something like "I cannot create a database because some other users are connected to template1" (I'm sorry I don't have the exact error text, but I didn't work on this machine when I got it).
This is the beginning of the dump:
It gives me the first error in "create database callcenter", stating that some other users are connected to template1; then it gets a fatal error when it tries to connect to that db (obviously!).
The strange matter (to me) is that some months ago I loaded the same 7.0.2 backup to version 7.2.1, and it worked perfectly.
Help...?!?!?
After the install, I created the data directory with
Code:
mkdir /usr/local/pgsql723/data
then
Code:
chown postgres /usr/local/pgsql723/data
After that, I made initdb (by postgres user) and then started postmaster (by pg_ctl).
Finally I tried to restore my db with
Code:
/usr/local/pgsql723/bin/psql -d template1 -f restorefile
This is the beginning of the dump:
Code:
\connect template1
select datdba into table tmp_pg_shadow from pg_database where datname = 'template1';
delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba;
drop table tmp_pg_shadow;
copy pg_shadow from stdin;
root 29 t f t f \N \N
callcenter 27 t f t f \N \N
nobody 28 t f t t \N \N
\.
delete from pg_group;
copy pg_group from stdin;
callgroup 1 {26,29,27}
\.
\connect template1 callcenter
create database "callcenter" with encoding='SQL_ASCII';
\connect callcenter callcenter
It gives me the first error in "create database callcenter", stating that some other users are connected to template1; then it gets a fatal error when it tries to connect to that db (obviously!).
The strange matter (to me) is that some months ago I loaded the same 7.0.2 backup to version 7.2.1, and it worked perfectly.
Help...?!?!?