Thread: doc for pg_dump
I'm writing to this address because the links for mail lists fail and said to write here if looking for docs and such... I have some problem that is keeping me from being able to use pg_dump or pg_dumpall on a 6.4 version. What I have found mentioned about the error indicates either that my pg_xxxx applications are the wrong versions for the database (very possible) or that there is a problem with one or more table values (possibly but all databases and tables on the machine fail to dump). Trying to move to a 7.0 version and simply moving the data dir from the old machine also will not seem to work on the new... SOOoooo - I guess I have to write my own pg_dump in order to get the old data out --- but I don't know exactly what the format of pg_dump and pg_dumpall might be --- nor which tables will actually be dumped (for example, I can the the various pg_whatever tables in a base, but I also see a bunch of tables named "regf12" and I have no idea what those are or whether I should dump them in my pg_dump program) Thanks for any pointers and/or docs to help me get this right -- there's a BUNCH of data that can be lost if I cannot get it out of the old database. -- Wishing you an "OOBA OOBA" 21st Century!! Horace ...once known as "Kicker" :-) ================================================================ Horace Vallas hav.Software http://www.hav.com/ P.O. Box 354 hav@hav.com Richmond, Tx. 77406-0354 voice: 281-341-5035 USA fax: 281-341-5087 Thawte Web Of Trust Notary in SW Houston, Tx. http://www.hav.com/?content=/thawteWOTnotary.htm ================================================================ ...drop by and chat if I'm online http://www.hav.com/chat/ === === === === === === === === === === ==== What is a Vet? ... He is the barroom loudmouth, dumber than five wooden planks, whose overgrown frat-boy behavior is outweighed a hundred times in the cosmic scales by four hours of exquisite bravery near the 38th parallel. ... - Unknown ================================================================
Attachment
Horace A. Vallas, Jr. writes: > I'm writing to this address because the links for mail lists fail and > said to write here if looking for docs and such... This is the list for writing docs. > I have some problem that is keeping me from being able to use > pg_dump or pg_dumpall on a 6.4 version. What I have found mentioned > about the error indicates either that my pg_xxxx applications are > the wrong versions for the database (very possible) or that there > is a problem with one or more table values (possibly but all databases > and tables on the machine fail to dump). It would be more helpful to say what the error was rather than saying what you think it meant. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Hi Peter - sorry if this is the wrong place to ask - but I was looking for some documentation of the pg_dump/pg_dumpall output format AND/OR some pointers on how to recognize and correctly handle index relations when grabbing all tables in a database. Anyway - the error I get when using pg_dump (or pg_dumpall) is... SET TRANSACTION command failed. Explanation from backend: \ 'ERROR: parser: parse error at or near "transaction"'. ... which, from what I have found searching the postgresql site, seems to indicate a mismatch in the version of pg_dump used - OR funky values in one or more tables. Either is certainly possible in my case, and I HAVE found some funky values (even a col type of "_text") in the exercise of writing a home-grown pg_dump. I think I have been able to correct such bad cases in the output I'm producing but I do not know the actual format of the pg_dump (or pg_dumpall) output and I cannot find any documentation for that format? Perhaps none exists? But I thought this was a good place to ask?? What I do now is just output a bunch of \connect/CREATE record pairs and then a bunch of "COPY ... from stdin" sections. I'm pretty much for sure that I need to include some handling of the index relations that exist in the current databases (really really don't want to think about having to redo all of those by hand 8-], but, at the moment, I'm recognizing them based on exceptions and simply skipping them because I'm not sure how to snarf them. Any pointers to docs or how-to's would be greatly appreciated. -- Wishing you an "OOBA OOBA" 21st Century!! Horace ...once known as "Kicker" :-) ================================================================ Horace Vallas hav.Software http://www.hav.com/ P.O. Box 354 hav@hav.com Richmond, Tx. 77406-0354 voice: 281-341-5035 USA fax: 281-341-5087 Thawte Web Of Trust Notary in SW Houston, Tx. http://www.hav.com/?content=/thawteWOTnotary.htm ================================================================ ...drop by and chat if I'm online http://www.hav.com/chat/ === === === === === === === === === === ==== What is a Vet? ... He is the barroom loudmouth, dumber than five wooden planks, whose overgrown frat-boy behavior is outweighed a hundred times in the cosmic scales by four hours of exquisite bravery near the 38th parallel. ... - Unknown ================================================================ Peter Eisentraut wrote: > > Horace A. Vallas, Jr. writes: > > > I'm writing to this address because the links for mail lists fail and > > said to write here if looking for docs and such... > > This is the list for writing docs. > > > I have some problem that is keeping me from being able to use > > pg_dump or pg_dumpall on a 6.4 version. What I have found mentioned > > about the error indicates either that my pg_xxxx applications are > > the wrong versions for the database (very possible) or that there > > is a problem with one or more table values (possibly but all databases > > and tables on the machine fail to dump). > > It would be more helpful to say what the error was rather than saying what > you think it meant. > > -- > Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Attachment
"Horace A. Vallas, Jr." <hav@hav.com> writes: > Anyway - the error I get when using pg_dump (or pg_dumpall) is... > SET TRANSACTION command failed. Explanation from backend: \ > 'ERROR: parser: parse error at or near "transaction"'. It would seem that you are trying to use a 6.5-or-later pg_dump against a pre-6.5 database server. Use the version of pg_dump that came with your server, instead. regards, tom lane