-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'd love for pg_easy_replicate to support blob sync. I feel like that'd really bring it home when it comes to supporting a full replication. While its hard to do that while replication is ongoing - I am wonder we can do something where the blobs are synced over post switchover.
The benefit of post switchover is that the source database would be in ready only mode. The trade off here is that the blobs sync would be delay, so as long as your application can tolerate the delay its fine. Not the perfect solution but at least you won't have write custom tooling to perform the sync yourself.
It could work something like this
pg_easy_replicatecan take in an additional flag--copy-blob-post-sync- Makes use of
lo_importandlo_exportto perform an export of large objects from source DB on to file system - Create a temporary table to store OID mappings. Update this table for exported data.
- Import the large object file and get the new OID and update it in the temp table.
- Update the referencing tables as needed based on the mapping
Open questions
- Will need to handle bytea?
- Easy way to figure out which OIDs map to what tables
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request