-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replication woes #713
Comments
I'll start with a big warning; Physical replication between different OS is very unsupported. First of all, PostgreSQL makes no guarantees that the binary format on disk is compatible for different systems. It is architecture dependent. In practice it seems to work, but it is unsupported. Second, when using physical replication, you need to ensure the systems behave the same way. A major issue are collations: If you have indices on text columns, you will run into issues. The indices will be corrupted. If you are just doing it for migration/backup, you can reindex the database to fix this, but when using physical replication this is not possible That being said, I don't see why (2) shouldn't work. Postgres.app checks for the PG_VERSION file to see if a database directory is initialized or not. I haven't use pg_basebackup myself, but according to the docs it should recreate all files in the data directory. So it's odd that the new data directory would not contain this file. Furthermore, initdb should fail if the data dir isn't empty. |
Ok thanks very much for the reply Jakob, it's very helpful, especially the info around the collations -- I have a lot of indices on text columns to deal with so I may have to rethink my approach here. It did recreate the PG_VERSION file when I did the basebackup but I also just realized that my setup has a version mismatch right now, going from 14 on linux to 15 on macos. I'll just do a dump and restore to make the initial move and figure something out for my replication strategy moving forward. |
Hi there ... having a really hard time replicating from a Linux postgres setup to Postgress.app. I've tried a few different approaches but none have worked so far, so looking for advice or possibly documentation ... here's the methods I've tried:
pg_basebackup: error: directory "/Users/mguertin/Library/Application Support/Postgres/v15_production" exists but is not empty
)Is there any known way to make these two play nicely together for replication? I'm looking to migrate my current production (linux) over to PostrgresApp on macos, and after that migration still have PostgressApp replicate back to the linux instance. If it matters I'm using log shipping replication right now between multiple linux hosts. If it's possible to do what I'm looking to do it would be awesome to have a bit of documentation on how this could all work, even if it's just a basic overview!
Thanks in advance and love this app, makes life a lot easier. Hoping I can use this and not have to go back to homebrew on macos.
The text was updated successfully, but these errors were encountered: