toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.11k stars 174 forks source link

Cannot run bootstrap #410

Closed nik13 closed 1 year ago

nik13 commented 1 year ago

PGSync version: 2.3.3

Postgres version: 13

Elasticsearch version: 8.4

Redis version: 7.0.5

Python version: 3.10

Problem Description: I'm trying to run bootstrap command normally, but its giving me following exception

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 64, in main
    sync.setup()
  File "/usr/local/lib/python3.10/site-packages/pgsync/sync.py", line 282, in setup
    self.create_view(
  File "/usr/local/lib/python3.10/site-packages/pgsync/base.py", line 492, in create_view
    create_view(
  File "/usr/local/lib/python3.10/site-packages/pgsync/view.py", line 228, in create_view
    for table_name, primary_keys, foreign_keys, indices in fetchall(
ValueError: not enough values to unpack (expected 4, got 3)

I'm using the latest commit https://github.com/toluaina/pgsync/commit/ca76e53ba68d7e2da437e95d8256af241ef0b835 .

toluaina commented 1 year ago

This was due to a major change. Can you please run the two commands below first

vivek-online commented 1 year ago

@toluaina Can you please share the reason behind using twice with and without -t

bootstrap -c schema.json -t bootstrap -c schema.json

toluaina commented 1 year ago
toluaina commented 1 year ago

I believe this has now been resolved ?