citusdata / citusdata/pg_shard
Unable to restore from backup made with pg_dump
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Though `pg_shard` correctly [marks its metadata tables](http://www.postgresql.org/docs/9.4/static/extend-extensions.html#AEN57402) so they are included in the output of `pg_dump`, these dumps are unusable because the `relation_id` column of `pg_shard`'s metadata tables is of type `oid`. Because there is no guarantee a given relation will have identical `oid`s, the `oid`s in the metadata tables will not match any relations, rendering the dump unusable.
I found an [old thread](http://www.postgresql.org/message-id/flat/CD484DE0-137E-47EC-BF83-F4749EA57A61@pixpo.com) that insinuates `pg_dump` will produce a textual representation of tables that works across a restore boundary if the column is of type `regclass` instead of `oid`. As far as lower-level code is concerned, these two types are identical (so we will not need to change any implementation). By switching to `regclass` we can give users the ability to rebuild a master in an identical fashion to restoring a normal PostgreSQL instance from backup.
Contributor guide
Assessment
This issue has not been assessed yet.