upgrade from postgresql 9.3 to 9.5

1806
2
03-30-2017 01:41 PM
Highlighted
New Contributor

hi i want to upgrade my enterprise  geodatabse from postgresql 9.3 to 9.5 , install postgresql 9.5.6 and client library version 11.1.0.1094 when i use pg_restore  to restore dump file from 9.3 postgresql to 9.5 postgresql 

pg_restore.exe -U sde -p 5432 -d gdbdatabase -j 5 --disable-triggers  d:\gdbdatabase \gdbdatabase -02-26_02-00-01.dump

I'm getting this error for some tables . When this error occurs for a table the rest of the data in this table will not be imported

pg_restore: [archiver (db)] COPY failed for table "lyr_parcel": ERROR:  Invalid geometry HINT:  "000100002600000004000C00807F0000A803000001000000A187BCDCB303B1E7B4BC9508C2AB129EF610F4DB338AEC68FEA40DA49C19DECB02B0A105DEFF09AEA814D0D704989C0AD898079AD90FCC930BA89E1AD8AA01829B02A2D703AAE10280BC349C84379AFC329CBB35A4D41FAF9A2196DF0C87AF0DB6BB09C7AF0D94860FFB9F15B49A4AD0E46884AD18DCC12098D44AFEFE6BE2A209C60AF6D20BC27BECC50BE6E801F69709DEA401E28309EA9002D4E508E2FA02DCBD08CAE103CA8C08EAC304C2D207C8A105DE8F07F6F805C4C506C0CA06C0BA09E48C0AD4810AF8C509E6C40ACEFB08DE830BF8AC08F6BD0BC6DB07DCF30BCA8607F09D43F6EE11" <-- error in parsing the source string CONTEXT:  COPY lyr_parcel, line 16, column shape: "000100002600000004000C00807F0000A803000001000000A187BCDCB303B1E7B4BC9508C2AB129EF610F4DB338AEC68FEA4..."

please help me thanks.

2 Replies
Highlighted
Occasional Contributor II

Hello Jipcik, 

  I would recommend you (and anyone else experiencing this issue) to reach out to Esri Support Services (Geodata support team) and see if they can offer some additional assistance regarding this issue. I believe a recent defect may be relevant to what you are experiencing- however, further troubleshooting would be needed to confirm the relevance. 

BUG-000102962: The "invalid geometry" error occurs when using pg_restore method to move data to a new PostgreSQL instance version.


The current suggested workaround which you can try is to: 

  1. Create a new, empty geodatabase on a 9.5 PostgreSQL instance
  2. Connect to the original 10.3.1 geodatabase on the 9.3 PG instance, and then the new 10.5 (or version equivalent) geodatabase on the 9.5 instance from the same ArcCatalog session.
  3. Copy and paste the data from the old instance into the new instance. If any geometry errors are identified int he process they can be addressed by repairing the geometry. 

I hope this is helpful for you in analyzing the pg_restore issues you are experiencing-

Best,

Rex R 

Highlighted
New Contributor

Thank you for your advise,

I got the same problem, but I can not copy the information via ArcCatalog. The 9.3 GDB is versioned and has history tables, that information will be lost in that way.

Thanks.

0 Kudos