Skip to content

"relation is not distributed" on worker after upgrade #6934

Answered by crabhi
crabhi asked this question in Q&A
Discussion options

You must be logged in to vote

OK, so the issue was that I misread the PostgreSQL upgrade instructions and ran citus_prepare_pg_upgrade() only on the coordinator node. This resulted in empty pg_dist_... tables.

This is how I fixed it:

  1. Restore all workers to a point just before upgrade.

  2. Run SELECT citus_prepare_pg_upgrade() on each restored node.

  3. Create a fixup script (on each restored node).

    (          
    cat <<EOF    
        -- copied from citus_prepare_pg_upgrade()
        DELETE FROM pg_depend WHERE
            objid IN (SELECT oid FROM pg_proc WHERE proname = 'array_cat_agg') AND
            refobjid IN (select oid from pg_extension where extname = 'citus');
    
        DROP AGGREGATE IF EXISTS array_cat_agg(anyarray);
        DROP AGGR…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by crabhi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant