Hi Again All,

I'm running into more issues.  I started from scratch today, because
I've so much reconfiguration that I've lost where I originally was.

Each of these commands were run under the user 'postgres'

Original Server:

I created a dump of all the databases using 'pg_dumpall > if.out' and
transferred it to the new server.

Here is the output of the original server's databases.

postgres@debo:/home/admin$ psql -l
            List of databases
       Name        |  Owner   | Encoding
-------------------+----------+----------
 accounts | admin    | UNICODE
 buena         | admin    | UNICODE
 inspiring  | admin    | UNICODE
 template0         | postgres | UNICODE
 template1         | postgres | UNICODE
 test              | postgres | UNICODE
(6 rows)
________________________________________________________________________________
I then restored the dump on the new server using 'psql -f
/home/postgres_bk/if.out'

Here is the output from the new server (notice the encoding difference)

postgres@sql-ledger:/home/postgres_bk$ psql -l
                                      List of databases
       Name        |  Owner   | Encoding |  Collation  |    Ctype    |
  Access privileges
-------------------+----------+----------+-------------+-------------+-----------------------
 accounts | admin    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 buena         | admin    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 inspiring  | admin    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres          | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0         | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres
                                                                     :
postgres=CTc/postgres
 template1         | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres
                                                                     :
postgres=CTc/postgres
 test              | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
(7 rows)
_________________________________________________________________________________

Here is my confusion.  Is the 'admin' Owner the database owner or is
that the superuser on the system?  ie. Is admin=root, or is admin the
actual database owner?

I couldn't find the password for 'admin' so in lieu of changing the
password on our good server and risk blowing it up, I decided to
change the password in the dump.  I know it's not the securest, but at
this point, I'm just trying to make sure I'm in the right direction.
I've assumed that 'admin' is the database owner so I created a user in
sql-ledger.  When I enter 'admin.pl', then I didn't see any users so I
created a user.

I created a user/password
I selected pg as the driver
I left the host/port blank
I entered accounts for the dataset
I assigned it user 'admin'
I assigned it password '[inthedump]'

After logging in, I get:
Error!

SELECT * FROM defaults
ERROR: permission denied for relation defaults

Any idea?  A gentleman earlier suggested ensuring that I'm restoring
under the correct user, but I'm under the impression that the restore
will create databases and assign appropriate passwords.  Am I in the
right direction?

-m
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to