Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Update synapse_port_db for new sequences #15965

Closed
wants to merge 1 commit into from

Commits on Jul 20, 2023

  1. teach synapse_port_db about new sequences

    This makes sure we that the port script sets up the
    "application_services_txns" sequence (matrix-org#12209). and the
    "un_partial_stated_event_stream_sequence" sequence (matrix-org#14545), which fixes
    errors like the one below from appearing when trying to connect to the
    postgresql database after running the script:
    
        Postgres sequence 'application_services_txn_id_seq' is inconsistent with associated
        table 'application_services_txns'. This can happen if Synapse has been downgraded and
        then upgraded again, or due to a bad migration.
    
        To fix this error, shut down Synapse (including any and all workers)
        and run the following SQL:
    
            SELECT setval('application_services_txn_id_seq', (
                SELECT GREATEST(MAX(txn_id), 0) FROM application_services_txns
            ));
    
        See docs/postgres.md for more information.
    
    Signed-off-by: Guacamolie <[email protected]>
    vanguacamolie committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    2109233 View commit details
    Browse the repository at this point in the history