summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorPeter Eisentraut2020-11-07 11:11:40 +0000
committerPeter Eisentraut2020-11-07 11:26:24 +0000
commitb4c9695e79f79d39d55853acac4c1493ac70a529 (patch)
treeb37ed8dd8bcaba8989a6ade98ce52265fc6f50f0 /src/backend
parent623644f02cbde7ad3812b201bd36213a206c3341 (diff)
Move catalog toast table declarations
Move the system catalog toast table declarations from catalog/toasting.h to the respective parent tables' catalog/pg_*.h files. The original reason for having it split was that the old genbki system produced the output in the order of the catalog files it read, so all the toasting stuff needed to come separately. But this is no longer the case, and keeping it together makes more sense. Reviewed-by: John Naylor <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/catalog/Makefile5
-rw-r--r--src/backend/catalog/catalog.c3
-rw-r--r--src/backend/catalog/toasting.c2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 93cf6d43685..be88eb1be61 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -72,11 +72,8 @@ CATALOG_HEADERS := \
GENERATED_HEADERS := $(CATALOG_HEADERS:%.h=%_d.h) schemapg.h
-# In the list of headers used to assemble postgres.bki, indexing.h needs
-# be last, and toasting.h just before it. This ensures we don't try to
-# create indexes or toast tables before their catalogs exist.
POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
- $(CATALOG_HEADERS) toasting.h indexing.h \
+ $(CATALOG_HEADERS) indexing.h \
)
# The .dat files we need can just be listed alphabetically.
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 7d6acaed92c..9be6423e449 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -40,7 +40,6 @@
#include "catalog/pg_subscription.h"
#include "catalog/pg_tablespace.h"
#include "catalog/pg_type.h"
-#include "catalog/toasting.h"
#include "miscadmin.h"
#include "storage/fd.h"
#include "utils/fmgroids.h"
@@ -268,7 +267,7 @@ IsSharedRelation(Oid relationId)
relationId == SubscriptionObjectIndexId ||
relationId == SubscriptionNameIndexId)
return true;
- /* These are their toast tables and toast indexes (see toasting.h) */
+ /* These are their toast tables and toast indexes */
if (relationId == PgAuthidToastTable ||
relationId == PgAuthidToastIndex ||
relationId == PgDatabaseToastTable ||
diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c
index c40d25b3012..f1850436bd7 100644
--- a/src/backend/catalog/toasting.c
+++ b/src/backend/catalog/toasting.c
@@ -391,7 +391,7 @@ needs_toast_table(Relation rel)
/*
* Ignore attempts to create toast tables on catalog tables after initdb.
* Which catalogs get toast tables is explicitly chosen in
- * catalog/toasting.h. (We could get here via some ALTER TABLE command if
+ * catalog/pg_*.h. (We could get here via some ALTER TABLE command if
* the catalog doesn't have a toast table.)
*/
if (IsCatalogRelation(rel) && !IsBootstrapProcessingMode())