aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/toasting.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/toasting.c')
-rw-r--r--src/backend/catalog/toasting.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c
index c8e7ea852cb..160f006ecdf 100644
--- a/src/backend/catalog/toasting.c
+++ b/src/backend/catalog/toasting.c
@@ -259,7 +259,11 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
else
namespaceid = PG_TOAST_NAMESPACE;
- /* Use binary-upgrade override for pg_type.oid, if supplied. */
+ /*
+ * Use binary-upgrade override for pg_type.oid, if supplied. We might
+ * be in the post-schema-restore phase where we are doing ALTER TABLE
+ * to create TOAST tables that didn't exist in the old cluster.
+ */
if (IsBinaryUpgrade && OidIsValid(binary_upgrade_next_toast_pg_type_oid))
{
toast_typid = binary_upgrade_next_toast_pg_type_oid;