Cannot run pysync after updating to the latest commit.
nik13 opened this issue ยท 11 comments
PGSync version: 2.3.3
Postgres version: 13
Elasticsearch version: 8.4
Redis version: 7.0.5
Python version: 3.10
Problem Description: I was installing the pysync from master branch. Today when I updated my latest version, I cannot run the pgsync as its showing me following error to all my syncs.
Error Message (if any):
Traceback (most recent call last):
File "/usr/local/bin/bootstrap", line 69, in <module>
main()
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/bin/bootstrap", line 58, in main
sync: Sync = Sync(
File "/usr/local/lib/python3.10/site-packages/pgsync/singleton.py", line 17, in __call__
cls._instances[key] = super(Singleton, cls).__call__(
File "/usr/local/lib/python3.10/site-packages/pgsync/sync.py", line 101, in __init__
self.validate(repl_slots=repl_slots)
File "/usr/local/lib/python3.10/site-packages/pgsync/sync.py", line 180, in validate
raise RuntimeError(
RuntimeError: Required materialized view columns not present on _view. Please re-run bootstrap.
It is showing me same error if I try to run bootstrap command. A validation was added in the latest commit. It seems that its not working as expected.
I also tried installing from commit ca76e53 and its working fine.
+1 I'm seeing the same issue
This was due to a major change.
Can you please run the two commands below first
bootstrap -c schema.json -t
bootstrap -c schema.json
This was due to a major change.
Can you please run the two commands below first
bootstrap -c schema.json -t
bootstrap -c schema.json
I was also facing the same issue and tried your solution but it's not working for me.
Hi, I am facing the exact same issue, I keep getting this error despite trying teardown and bootstrapping again.
are you sure you:
- pulled the main branch from GitHub
- ran
bootstrap -c schema.json -t
- followed by
bootstrap -c schema.json
- Can you share more details about the stack trace?
- alternatively are you running under docker?
@toluaina facing the same issue with:
- pgsync 2.5.0
- OpenSearch 1.3
I did this and the problem persists:
- ran
bootstrap -c schema.json -t
- followed by
bootstrap -c schema.json
However, this version works just fine with PostgreSQL 14.5
@toluaina facing the same issue with:
- pgsync 2.5.0
- OpenSearch 1.3
I did this and the problem persists:
- ran
bootstrap -c schema.json -t
- followed by
bootstrap -c schema.json
However, this version works just fine with PostgreSQL 14.5
I try to run: drop materialized view _view;
to drop the materialized view (_view
). And it worked fine.
are you sure you:
- pulled the main branch from GitHub
- ran
bootstrap -c schema.json -t
- followed by
bootstrap -c schema.json
- Can you share more details about the stack trace?
- alternatively are you running under docker?
I'm also having the same error.
PGSync version: 2.5.0
Postgres version: 13
Elasticsearch version: 7.13.4
Redis version: 5.0
Python version: 3.7
I'm running under docker. The error occurred after I changed the name of a column in the database, I updated the schema.json
to reflect the change but the error is still appearing.
I am assuming the error you keep getting is
"RuntimeError: Required materialized view columns not present on _view. Please re-run bootstrap."
Can you try this:
psql> DROP MATERIALIZED VIEW _view;
bootstrap -c schema.json -t
bootstrap -c schema.json
Let me know if this resolves the issue. Seems the teardown is not removing all objects entirely.
@toluaina Dropping the materialized view resolved the issue. Thank you!
Finally fixed in the main branch. Thanks and closing this issue