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

From Dave Page
Subject Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"
Date
Msg-id CA+OCxowT+UBh9vUWQoa1Gh92Bw3doGQAy-6ePFCJZ7ubFgB38w@mail.gmail.com
Whole thread Raw
In response to Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"  ("Hager, Paul CIV NAVSEA Crane, NAVSEA" <paul.hager@navy.mil>)
Responses Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"
List pgadmin-support
[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.hager@navy.mil> wrote:
> I don't have matching table spaces and roles (whatever they are) on the XP machine.  I've attached my translation of
theprocedures I was given.  If the "-s" option is wrong for the second file (and I must admit, using the same option
twiceseemed 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
onthe 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'tknow anything about databases and less about Postgres.  The people who will be doing the necessary database
updatesknow even less than I do.  Eventually - probably sooner rather than later - the legacy Linux system will be
goingaway 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 by:

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
optionsyou may need", I haven't a clue what the options are or what they do.  I'm afraid when it comes to databases,
I'moperating 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



pgadmin-support by date:

Previous
From: David Greco
Date:
Subject: Transactions in PGAgent Jobs
Next
From: Marta Mihoff
Date:
Subject: PGADMIN III: backup bug report