Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble upgrading to 7.2.3

Status
Not open for further replies.

Luca200

Programmer
Jul 7, 2002
13
IT
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
Code:
mkdir /usr/local/pgsql723/data
,
then
Code:
chown postgres /usr/local/pgsql723/data
(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
Code:
/usr/local/pgsql723/bin/psql -d template1 -f restorefile
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:

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 &quot;callcenter&quot; with encoding='SQL_ASCII';
\connect callcenter callcenter

It gives me the first error in &quot;create database callcenter&quot;, 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...?!?!?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top