citusdata / citusdata/cstore_fdw

Server with cstore_fdw extension can not be upgraded

Open
#167 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.8k
Forks
169
PR merge metrics
No merged PRs in 30d

Description

When the server with cstore extension (2.0 version) and a foreign table on it upgraded, upgrade process errors out with the following logs :

command: "/usr/local/pgsql_10/bin/pg_dump" --host /Users/usname --port 50432 --username usname --schema-only --quote-all-identifiers --binary-upgrade --format=custom --file="pg_upgrade_dump_16384.custom" 'dbname=usname' >> "pg_upgrade_dump_16384.log" 2>&1

command: "/usr/local/pgsql_10/bin/pg_restore" --host /Users/usname --port 50432 --username usname --exit-on-error --verbose --dbname 'dbname=usname' "pg_upgrade_dump_16384.custom" >> "pg_upgrade_dump_16384.log" 2>&1
pg_restore: connecting to database for restore
pg_restore: creating pg_largeobject "pg_largeobject"
pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"
pg_restore: creating EXTENSION "citus"
pg_restore: creating COMMENT "EXTENSION "citus""
pg_restore: creating SCHEMA "citus"
pg_restore: creating SCHEMA "public"
pg_restore: creating COMMENT "SCHEMA "public""
pg_restore: creating EXTENSION "cstore_fdw"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3; 3079 16713 EXTENSION cstore_fdw
pg_restore: [archiver (db)] could not execute query: ERROR: could not open relation with OID 0
Command was: -- For binary upgrade, create an empty extension and insert objects into it
DROP EXTENSION IF EXISTS "cstore_fdw";
SELECT pg_catalog.binary_upgrade_create_empty_extension('cstore_fdw', 'public', true, '2.0', NULL, NULL, ARRAY[]::pg_catalog.text[]);

If the cstore version is below 2.0, you can upgrade the server but can not read the tuples from the new server (According to Murat it is expected considering that these cstore versions do not use the postgres internal storage for foreign tables)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.