Обсуждение: dumpall prob
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" ); was generated by dumpall. "network_ops" apparently don't exist (not sure what is should be called). Changing to using btree ( "ip" ) was sufficient to fix, but I don't know what it should be to fix dumpall. patrimoine=> create unique index "ethernet_ip_key" on "ethernet" using btree ( "ip" ); CREATE patrimoine=> \d ethernet_ip_key Index "ethernet_ip_key"Attribute | Type -----------+------ip | inet unique btree Cheers, Patrick
Patrick Welche wrote: > > CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" > using btree ( "ip" "network_ops" ); > was generated by dumpall. What version? If your example above is verbatim, then there seems to be a missing comma in the arguments to the USING clause; if you are using a recent/current version of pg_dump, then it is not likely fixed... - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
Thomas Lockhart wrote: > > Patrick Welche wrote: > > > > CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" > > using btree ( "ip" "network_ops" ); > > was generated by dumpall. > > What version? If your example above is verbatim, then there seems to > be a missing comma in the arguments to the USING clause; if you are > using a recent/current version of pg_dump, then it is not likely > fixed... Oops - my fault. Obviously I pg_dump'd before installing the new one, so it's the old one that had the "network_ops" problem. Funnily enough I thought I would pg_dump with the new one and diff it against the new, but % pg_dumpall > db.out2 Connection to database 'List' failed. pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. pg_dump failed on List, exiting ... investigating ... Cheers, Patrick
"Patrick Welche" <prlw1@newn.cam.ac.uk> writes: > CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" ); > was generated by dumpall. "network_ops" apparently don't exist (not sure what > is should be called). Current sources dump this as "inet_ops". I think the problem in 6.5.* was caused by bogus entries in the pg_opclass table (same classname for inet and cidr types). You could try reaching in and changing the system table entries, but it might be safer just to live with manually patching the dump file until the next release. regards, tom lane
> % pg_dumpall > db.out2 > Connection to database 'List' failed. > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > > pg_dump failed on List, exiting > > > ... investigating ... Reason: In pg_dumpall, line 50 is: psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \ which outputs: % psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' List of databases Database Owner darwin prlw1 ... (5 rows) so presumably, it tries to open a connection to "List" as user "of" this implies that "-q" isn't quite as quiet as it could be... I tried changing it to psql -l -A -q -t| tr '|' ' ' | egrep -v '(^template1 |^List of databases|^Database Owner| rows)' | \ as a work around, but then: \connect template1 ERROR: attribute 'prlw1' not found create database darwin; \connect darwin ERROR: attribute 'prlw1' not found etc and this is because line 56 wants to read where usesysid = \'$DBUSERID\'; \" | \ rather than where usesysid = $DBUSERID; \" | \ Cheers, Patrick
> "Patrick Welche" <prlw1@newn.cam.ac.uk> writes: > > CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" ); > > was generated by dumpall. "network_ops" apparently don't exist (not sure what > > is should be called). > > Current sources dump this as "inet_ops". I think the problem in 6.5.* > was caused by bogus entries in the pg_opclass table (same classname for > inet and cidr types). You could try reaching in and changing the system > table entries, but it might be safer just to live with manually patching > the dump file until the next release. Fixed in the current source tree. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026