Postgres source ignores changes
MattExact opened this issue · 1 comments
MattExact commented
The following lines are used to determine whether to add a change to the queue.
Instead of return
when the table is not in self.tables
, it should be continue
.
Otherwise if the first change's table is not in the list of tables, it will ignore all other changes.
meilisync/meilisync/source/postgres.py
Lines 94 to 98 in e144418
For example if self.tables = ["bar"]
, then the following replication message would be ignored:
changes = [
{
"kind": "update",
"schema": "public",
"table": "foo",
"columnnames": ["id", "attributes"],
"columntypes": ["integer", "hstore"],
"columnvalues": [123456, '"foo"=>"bar"'],
"oldkeys": {"keynames": ["id"], "keytypes": ["integer"], "keyvalues": [123456]},
},
{
"kind": "update",
"schema": "public",
"table": "bar",
"columnnames": ["id", "content"],
"columntypes": ["integer", "text"],
"columnvalues": [456789, "Lorem ipsum"],
"oldkeys": {"keynames": ["id"], "keytypes": ["integer"], "keyvalues": [456789]},
},
]
long2ice commented
Thanks for report! Could you please make a PR?