Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I would like to convert from PG 32 bit to 64 bit. I am testing with pg_upgrade (in several scenarios) but I think it cannot do that.

With pg_upgrade, I can upgrade PG version 8.5 to v.9 (both of them run in 32 bit or 64 bit).

Until now, I haven't found how to change from a 32 bit install to 64 bit. How can this be done?

share|improve this question
1  
There is no PG version 8.5... +D –  MatheusOl Jun 22 '13 at 16:35
add comment

1 Answer

You can't use pg_upgrade for this, as it can only upgrade clusters from versions that are built with the same options on the same architecture. You must either:

  • dump and reload, with the associated down-time; or

  • Run both the 32-bit and 64-bit versions concurrently and set up a 3rd party replication tool like Bucardo, Londiste or Slony-I to stream rows across. Once they're in sync, stop the 32-bit DB and remove the replication.

Also, there's no PostgreSQL 8.5. Did you mean 8.4? "v9" isn't very specific either - PostgreSQL 9.0, 9.1, and 9.2 are all quite distinct releases. See the version policy, which outlines PostgreSQL's quirky versioning.

share|improve this answer
    
Many thanks. I done ^_^ –  luannnh Jun 21 '13 at 7:09
    
@LuanHuynh I'm not sure I understand. If that helped, please accept the answer with the green tick. If not, please explain further. –  Craig Ringer Jun 21 '13 at 7:26
    
Another "replication" option would be to pipe the output of pg_dump from the 32bit version to the 64bit version (although that does require to stop all write transactions on the source). –  a_horse_with_no_name Jun 21 '13 at 7:49
    
@CraigRinger: you know, I have two computers: one is running centos 32bit & installed PG 9.0, another isred hat 64bit & installed PG 9.1 . I used pg_dump to dump data from 32bit and copy-paste to 64bits (of course, two database is the same structure). But, with replication, I haven't tested yet, because I dont know three tools you listed, I am researching. –  luannnh Jun 21 '13 at 9:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.