IntersectMBO / cardano-db-sync

A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL
Apache License 2.0
293 stars 160 forks source link

Migration for address table of existing data #1887

Open Cmdv opened 1 week ago

Cmdv commented 1 week ago

It was asked on our discord

Does turning on use_address_table config option require full resync?

The current answer is yes but we could provide some form of migration if the database is already populated.

Investigate if this is possible to do as part of the schema variation when using use_address_table config

kderme commented 1 week ago

One possible way to implement this is to follow steps

It's not trivial at all and the migration will still take some time.

rdlrt commented 1 week ago

Wouldnt this anyways touch each and every tx_out entry, making timeline similar (as in maybe 50-60%) to synching from scratch

Cmdv commented 1 day ago

yeah I've mad a quick attempt but I think you are right that it might be just as quick to sync from scratch. What do you think @kderme ?