bucardo icon indicating copy to clipboard operation
bucardo copied to clipboard

Filtering specific rows from table

Open srinivasan554 opened this issue 1 year ago • 3 comments

I have two questions to clarify regarding moving specific rows only to target table

  1. 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?

  2. 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

srinivasan554 avatar May 06 '24 12:05 srinivasan554

@jonjensen could you please help on this?

srinivasan554 avatar May 07 '24 08:05 srinivasan554

@srinivasan554 Sorry, I don't have any quick answers for you.

jonjensen avatar May 07 '24 15:05 jonjensen

@srinivasan554 here are some concerns:

  1. For this, if it's only rows you want to filter, you can try that with PostgreSQL native Logical Replication instead of Bucardo. Documentation can be found here, with information on row filters here
  2. 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 customcodes here

swastik1990 avatar Jul 26 '24 03:07 swastik1990