×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Trouble upgrading to 7.2.3

Trouble upgrading to 7.2.3

Trouble upgrading to 7.2.3

(OP)
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
mkdir /usr/local/pgsql723/data,
then 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 /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:

\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...?!?!?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close