This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
synapse_port_db errors porting sqlite3 database (Pending background updates exist in the SQLite3 database.) #15219
Labels
A-Database
DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db
A-Portdb
Script for exporting sqlite data into postgres
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Major functionality / product severely impaired, no satisfactory workaround.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
X-Release-Blocker
Must be resolved before making a release
Description
The
synapse_port_db
script is unable to port my (old, and large) sqlite3 database to postgres. It errors due to finding background updates still pending, however I have confirmed through both the synapse admin API (while synapse is running) and by checking for any rows in thebackground_updates
table (with synapse stopped) that there are no background updates left to run. So I'm not sure why this is erroring here:synapse/synapse/_scripts/synapse_port_db.py
Lines 689 to 699 in adac949
In any case, I modified that script by commenting out that entire check. This allows the script to complete (surprisingly quickly, for a 6.3G database...). Yet, on the postgres side, only the schema and tables have been created, and none of my data has been carried over.
It seems that there are two issues here, perhaps related. One being it finding background updates when there were none, and the other being that either the rest of my db's data is never discovered or the script is not properly copying it over to the postgres db. Only the migration script appears to have these problems; synapse itself works well with the sqlite3 db.
Steps to reproduce
Homeserver
zettaport.com
Synapse Version
1.78.0
Installation Method
pip (from PyPI)
Database
SQLite
Workers
Single process
Platform
OpenBSD/amd64 7.2
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: