Thread: pg_dumps

pg_dumps

From
"Pichelman, Scott"
Date:

Hi,

 

I was wondering how to use pg_dump, been having problems no matter what I use for options.

 

[admin@holt /root]$ pg_dump -h 127.0.0.1 -p 5432 admin -f holt_admin_db.dump

Connection to database 'admin' failed.

FATAL 1:  Database "admin" does not exist in the system catalog.

 

[admin@holt /root]$ pg_dump -h 127.0.0.1 -p 5432 ADMIN -f holt_admin_db.dump

Connection to database 'ADMIN' failed.

FATAL 1:  Database "ADMIN" does not exist in the system catalog.

 

[admin@holt /root]$ pg_dump -h 127.0.0.1 -p 5432 template0 -f holt_admin_db.dump

Connection to database 'template0' failed.

FATAL 1:  Database "template0" is not currently accepting connections

 

[admin@holt /root]$ pg_dump -h 127.0.0.1 -p 5432 template1 -f holt_admin_db.dump

getAggregates(): SELECT failed.  Explanation from backend: 'ERROR:  Attribute 'aggtransfn1' not found

 

I am the “admin” unix user and connect as pgsql user admin…

 

admin=> \c

You are now connected to database admin as user admin.

admin=> \l

  List of databases

 Database  |  Owner  

-----------+----------

 admin     | postgres

 template0 | postgres

 template1 | postgres

 test      | postgres

 

I have tried pg_dumpall as well w/ no luck.

Please help me understand what I am doing wrong!

Any help is appreciated.

 

TIA!

 

SP

 

 

 

Re: pg_dumps

From
"Anis W. Nugroho"
Date:
Hi Scott,

You don't need to host and port argument because you are on the
local system. Just type
    pg_dump admin > holt_admin_db.dump

If you need to use TCP/IP connection, you must ever tweak .conf
files in the directory /var/lib/pgsql/data to enable port 5432
for that purpose.

To do that you must login/su using root account.

Good luck,
Anis WN
________________________________
15 Mbytes Free Web-based and  POP3
Sign up now: http://www.gawab.com

Re: pg_dumps

From
"Anis W. Nugroho"
Date:
Hi Scott,

You didn't need to use host and port argument since you are on
the
local system. So just type
    pg_dump admin > holt_admin_db.dump

If insist to use TCP/IP connection, you must tweak the *.conf
files
in the directory /var/lib/pgsql/data. Use root account to do
that.

Good luck,
Anis WN
________________________________
15 Mbytes Free Web-based and  POP3
Sign up now: http://www.gawab.com

Set Session Date

From
"kbass"
Date:
Newby question. It is possible to set the date within a session to a certain
format?

Kevin


Re: Set Session Date

From
"kbass"
Date:
----- Original Message -----
From: "kbass" <kbass@midsouth.rr.com>
To: "Postgre Admin" <pgsql-admin@postgresql.org>
Sent: Sunday, October 12, 2003 6:58 AM
Subject: [ADMIN] Set Session Date


> Newby question. It is possible to set the date within a session to a
certain
> format?
>
> Kevin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

After reading through the Postgres documentation a little more, I have found
how to set the session date to a couple of formats using the 'SET datastyle
TO' command.  Thanks!


Re: pg_dumps

From
Tom Lane
Date:
"Pichelman, Scott" <scott.pichelman@berbee.com> writes:
> [admin@holt /root]$ pg_dump -h 127.0.0.1 -p 5432 template1 -f
> holt_admin_db.dump

> getAggregates(): SELECT failed.  Explanation from backend: 'ERROR:
> Attribute 'aggtransfn1' not found

You seem to be using a really ancient version of pg_dump there --- one
older than (and not compatible with) your server.  Check your PATH ...

            regards, tom lane