upgrade - Postgresql's pg_dump and pg_restore across different major versions? -
recently came across (maybe known problem) when postgre's versions differ in major number (always upgrade, no downgrade), example field types.
in case, there little conflicting data changed hand, wanted know more, in case come across problem again more data.
in concrete case (but can extended other possible problems in future), created backup using data inserts, had table structure saved.
the problem came when upgrading 8.x 9.x money
type, got errors because inserts had value like
insert foo(...) values (...,'eur300',...);
so postgres refusing insert in 9.1
my idea, , tried convert field decimal , redoing dump, worked, in future, there mechanism, using newer pg_dump connecting old database, instead of current one? (did not tested this)
when going etween different versions, should use new version of pg_dump
. meaning when go 8.x 9.1, should use pg_dump
version 9.1. should take care of conversions necessary.
Comments
Post a Comment