Re: [ADMIN] pg_dump/restore problems

2010-02-20 Thread Scott Marlowe
On Sat, Feb 20, 2010 at 6:59 PM, Kevin Grittner wrote: > Glen Brown  wrote: > >> I am using Ubuntu 8LTS on both systems. How can tell where the >> space is going? > > Maybe someone has a more sophisticated way, but I'd be poking around > with "du -shx" requests against the contents of various dire

Re: [ADMIN] Backups

2010-02-20 Thread Scott Marlowe
On Sat, Feb 20, 2010 at 6:57 PM, Nilesh Govindarajan wrote: > On 02/20/2010 11:23 PM, Scott Marlowe wrote: >> >> On Sat, Feb 20, 2010 at 10:11 AM, Nilesh Govindarajan >>  wrote: >>> >>> I want a script to backup all databases table by table in different .sql >>> files. >> >> Why?  It may be that p

Re: [ADMIN] Backups

2010-02-20 Thread Kevin Grittner
Nilesh Govindarajan wrote: > I can prevent the changes to the database when the > backup is going on, but how do I grant the permissions ? I don't > want to key in the password for the superuser in the script. There are so many ways to deal with that that it's hard to make a suggestion without

Re: [ADMIN] Backups

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 11:14 PM, Kevin Grittner wrote: Nilesh Govindarajan wrote: I want a script to backup all databases table by table in different .sql files. My first question would be whether they all need to be from the same point in time? Is it a requirement that if they were all restored the

Re: [ADMIN] Backups

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 11:23 PM, Scott Marlowe wrote: On Sat, Feb 20, 2010 at 10:11 AM, Nilesh Govindarajan wrote: I want a script to backup all databases table by table in different .sql files. Why? It may be that pg_dump / pg_restore already provide the functionality you are looking for. How to d

Re: [ADMIN] pg_dump/restore problems

2010-02-20 Thread Kevin Grittner
Glen Brown wrote: > I am using Ubuntu 8LTS on both systems. How can tell where the > space is going? Maybe someone has a more sophisticated way, but I'd be poking around with "du -shx" requests against the contents of various directories during the run. Maybe run "vmstat 1" in another shell,

Re: [ADMIN] upgrading, but learned about pg_dumpall too late

2010-02-20 Thread Greg Stark
On Sat, Feb 20, 2010 at 10:42 PM, Andrzej Zawadzki wrote: > Downgrade to 7.4 > Dump > Upgrade > Restore > Actually that's not the best way. The best way is to install 7.4 and 8.1.19 (not 8.1.11 which has known bugs) at the same time. Use the pg_dump *from* *8.1.19* to connect to the 7.4 server

Re: [ADMIN] upgrading, but learned about pg_dumpall too late

2010-02-20 Thread Andrzej Zawadzki
On 20.02.2010 22:26, Richard O. Hammer wrote: > Hello, > Hi! > I hope someone can tell me how to recover my database tables. I > recently upgraded to a new Linux server. First I saved a copy of my > /var/lib/pgsql/data/*, which was created with PG version 7.4. On the > new Linux server I have PG

[ADMIN] upgrading, but learned about pg_dumpall too late

2010-02-20 Thread Richard O. Hammer
Hello, I hope someone can tell me how to recover my database tables. I recently upgraded to a new Linux server. First I saved a copy of my /var/lib/pgsql/data/*, which was created with PG version 7.4. On the new Linux server I have PG version 8.1.11. But now, trying use my old tables, I d

Re: [ADMIN] pg_dump/restore problems

2010-02-20 Thread Glen Brown
I am using Ubuntu 8LTS on both systems. How can tell where the space is going? thanks for the help -glen Glen Brown On Sat, Feb 20, 2010 at 9:52 AM, Kevin Grittner wrote: > Glen Brown wrote: > > > When I dump this table using pg_dump -Fc it creates a 15 gb file. I > > am trying to restore in

Re: [ADMIN] Backups

2010-02-20 Thread Scott Marlowe
On Sat, Feb 20, 2010 at 10:11 AM, Nilesh Govindarajan wrote: > I want a script to backup all databases table by table in different .sql > files. Why? It may be that pg_dump / pg_restore already provide the functionality you are looking for. > How to do this ? pg_dump -t tablename dbname rinse

Re: [ADMIN] pg_dump/restore problems

2010-02-20 Thread Kevin Grittner
Glen Brown wrote: > When I dump this table using pg_dump -Fc it creates a 15 gb file. I > am trying to restore in into a database that has 100gb of free disk > space and it consumes it all and fails to finish the restore. What is the platform? (I remember having problems with large file handl

Re: [ADMIN] Backups

2010-02-20 Thread Kevin Grittner
Nilesh Govindarajan wrote: > I want a script to backup all databases table by table in different > .sql files. My first question would be whether they all need to be from the same point in time? Is it a requirement that if they were all restored they would provide a database with referential

[ADMIN] Backups

2010-02-20 Thread Nilesh Govindarajan
I want a script to backup all databases table by table in different .sql files. How to do this ? Also since it is a script, there has to be some role having read access to all tables on all databases. How to grant that ? -- Nilesh Govindarajan Site & Server Adminstrator www.itech7.com -- Se

Re: [ADMIN] C trigger problem : conversion of CString to Datum

2010-02-20 Thread Tom Lane
Guy Deleeuw writes: > I cannot convert properly a cstring to a Datum : Well, CStringGetDatum would be the proper thing to use if you meant to produce a Datum of type "cstring". But what you need here is a Datum of the same type as the target column, which evidently isn't cstring. Most likely you

[ADMIN] C trigger problem : conversion of CString to Datum

2010-02-20 Thread Guy Deleeuw
Hello, I cannot convert properly a cstring to a Datum : Here my code : int attColNumber; Datum new_barcode; bool isnull= 0; char barcode[14]; elog(INFO, "gd_trigfunc_before_article_insert() : bar_code = %s",