incomplete_array_type_in_single_user_mode_v2.patch

application/octet-stream

Filename: incomplete_array_type_in_single_user_mode_v2.patch
Type: application/octet-stream
Part: 0
Message: Re: [bug] Table not have typarray when created by single user mode

Patch

Format: unified
Series: patch v2
File+
src/backend/catalog/heap.c 3 1
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index e393c93..ba5716b 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -1272,8 +1272,10 @@ heap_create_with_catalog(const char *relname,
 	 * do not create any array types for system catalogs (ie, those made
 	 * during initdb). We do not create them where the use of a relation as
 	 * such is an implementation detail: toast tables, sequences and indexes.
+	 *
+	 * Only the Bootstrap mode is limited.
 	 */
-	if (IsUnderPostmaster && (relkind == RELKIND_RELATION ||
+	if (!IsBootstrapProcessingMode() && (relkind == RELKIND_RELATION ||
 							  relkind == RELKIND_VIEW ||
 							  relkind == RELKIND_MATVIEW ||
 							  relkind == RELKIND_FOREIGN_TABLE ||