Filtering specific rows from table
I have two questions to clarify regarding moving specific rows only to target table
-
I need to migrate some rows only from public schema's table into target schema's table within a database. I had tried customcols ( https://bucardo.org/Bucardo/operations/customselect ) with where clause but it doesn't work. How can I do this using bucardo?
-
Alternatively i tried adding constraint check in target table. In that, the row is not getting added in source table itself if target table constraint fails. Any idea on this too?
Thanks in advance
@jonjensen could you please help on this?
@srinivasan554 Sorry, I don't have any quick answers for you.
@srinivasan554 here are some concerns:
- For this, if it's only rows you want to filter, you can try that with PostgreSQL native
Logical Replicationinstead of Bucardo. Documentation can be found here, with information on row filters here - For this, could you explain your scenario a bit more? I wonder if you need multi-way sync to achieve this, or you could try writing your own perl script for exception or conflict resolution. Check out
Custom conflict strategies with customcodeshere