[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: upgrading to postgresql 7.1



>>>>> "Petr" == Petr Cech <cech@atrey.karlin.mff.cuni.cz> writes:

    >> 
    >> comes up with errors like:
    >> 
    >> psql:db_6.5.out:13:ERROR: source database "template1" is being
    >> accessed by other users

    Petr> I think I saw this when I had psql attached on another
    Petr> console to template1 - read the message :)

No, I didn't. No other processes running, I just typed in
/etc/init.d/postgresql start seconds before (no, it wasn't running
before I typed that in, either).

Here is the code again:

\connect template1 postgres
create database bbs;

why should it matter that template1 is being accessed in order to
create a bbs database, anyway?

The first \connect template1 (without the postgres user) worked fine.

    >> psql:db_6.5.out:14:\connect: FATAL 1: Database: "bbs" does not
    >> exist in the system catalog.

    Petr> and probably because of the previous error it doesn't create
    Petr> this one

Probably.

    >> line 13 is: create database bbs; line 14 is: \connect bbs
    >> postgres

    Petr> also I think there are problems with user creation. it uses
    Petr> INSERT INTO pg_shadow, which is wrong. I've created users
    Petr> with CREATE USER according to the dump

I think that part is OK, at least I didn't get any errors:

\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;
www-data        33      f       t       f       f       \N      \N
bbs     500     f       t       f       f       \N      \N
bam     503     t       t       f       f       \N      \N
\.
\connect template1 postgres
create database bbs;


I haven't given up just yet, but have completely run out of options to
try next...
-- 
Brian May <bam@debian.org>



Reply to: