Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"

From: "Hager, Paul CIV NAVSEA Crane, NAVSEA" <paul(dot)hager(at)navy(dot)mil>
To: "Dave Page" <dpage(at)pgadmin(dot)org>, "pgAdmin Support" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"
Date: 2013-09-09 17:16:42
Message-ID: 80BEA9C0F981324E996C49694D18E3500CFE6BA3@naeacranez03v.nadsusea.nads.navy.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I was only able to get to this today.

I created the two files - schema and data per your suggestion below. Ended up with a relatively small schema file and a large data file, which is what I expected. They are located c:documents and settings\phager\my documents or something similar.

Then I hit a snag. I assume on Windows XP I'm supposed to go to the command line. "psql" is not recognized. I went to c:\program files\9.1\bin\ and found psql.exe. I set my directory in "My Documents" and then did the following:

"c:\program files\9.1\bin\psql" -h localhost development-pgs < dsYYYYMMDD

That generated the following error: FATAL: role "phager" does not exist

I haven't a clue what the problem is. What's a "role" and why is it treating part of the pathname as a "role"?

Thanks,

Paul Hager

Computer Scientist
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
Code WXMP, Bldg 3330W
300 Highway 361
Crane, IN 47522-5001
Ph: 812-854-1985
DSN: 482-1985
Fax: 812-854-1109
Email: paul(dot)hager(at)navy(dot)mil
SIPR: paul(dot)hager(at)navy(dot)smil(dot)mil
http://www.navsea.navy.mil/nswc/crane/Lists/customerfeedback/NewForm.aspx

-----Original Message-----
From: pgadmin-support-owner(at)postgresql(dot)org [mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of Dave Page
Sent: Wednesday, September 04, 2013 12:41 PM
To: Hager, Paul CIV NAVSEA Crane, NAVSEA; pgAdmin Support
Subject: Re: [pgadmin-support] Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"

[Please keep the mailing list CCd on any replies]

On Wed, Sep 4, 2013 at 1:50 PM, Hager, Paul CIV NAVSEA Crane, NAVSEA <paul(dot)hager(at)navy(dot)mil> wrote:
> I don't have matching table spaces and roles (whatever they are) on the XP machine. I've attached my translation of the procedures I was given. If the "-s" option is wrong for the second file (and I must admit, using the same option twice seemed very strange to me), what is the correct one?

Well I guess the second file for each database should use "--inserts"
(use INSERT statements) or something like that instead of -s (schema
only) - so you end up with one file for the schema and one for the data.

> I'm assuming your suggestion won't work because I have nothing on the target machine. Given pgAdmin III on XP, Linux on the legacy system, and the need to move a Postgres database to Windows, how do I do it.

If there aren't any non-standard roles or tablespaces, it'll probably just work. Try it.

> Option one would be to correct the directions. If there is an easy way to do it, that would be great. Remember, I don't know anything about databases and less about Postgres. The people who will be doing the necessary database updates know even less than I do. Eventually - probably sooner rather than later - the legacy Linux system will be going away and the XP system will replace it.

I don't know enough about your environment or application to be able to correct the instructions for you. It *looks* like a long winded and partially incorrect way of doing:

pg_dump –s development-pgs –f dsYYYYMMDD pg_dump --inserts development-pgs –f dALLYYYYMMDD pg_dump –s production-pgs –f dsYYYYMMDD pg_dump --inserts production-pgs –f dALLYYYYMMDD

On the original server, followed

psql -h localhost development-pgs < dALLYYYYMMDD psql -h localhost production-pgs < dALLYYYYMMDD

On the new machine. The -s dumps and much of the other mucking around that not related to becoming the right user or transferring the files seems redundant to me.

HOWEVER: bear in mind I know nothing at all about your application - there may be details that I don't know about, that I'm not able to infer from the instructions you have.

> Appreciate your help. Please keep it as simple as possible. For example, when you say, "add any non-standard options you may need", I haven't a clue what the options are or what they do. I'm afraid when it comes to databases, I'm operating at the trained orangutan level.

I can't tell you what non-standard options you may need, because I don't know anything about your environment or application. I don't know for example, if you need to use the -p <port> option to psql because PostgreSQL is listening on a non-standard port number on one or both of your machines. That's something you'd have to figure out.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

--
Sent via pgadmin-support mailing list (pgadmin-support(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Bartosz Dmytrak 2013-09-09 21:13:40 PgAdmin 1.18 possible bug in DROP USER MAPPING
Previous Message Dave Page 2013-09-09 08:00:32 Re: Parallel Jobs option feature for backup