summaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-04-11 15:46:35 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2024-04-11 15:46:35 +0300
commitbc1e2092ebb857802a9713d0d3588079e2f0216a (patch)
treef55adc80b07150bcd7f5cbd50a9bfc89b3f301d6 /src/backend/tcop/utility.c
parent87840b9741864dfdb9f63b0056e2783cdb49b8a5 (diff)
Revert: Custom reloptions for table AM
This commit reverts 9bd99f4c26 and 422041542f per review by Andres Freund. Discussion: https://postgr.es/m/20240410165236.rwyrny7ihi4ddxw4%40awork3.anarazel.de
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index c6bb3e45da4..fa66b8017ed 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -65,7 +65,6 @@
#include "utils/acl.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
-#include "access/relation.h"
/* Hook for plugins to get control in ProcessUtility() */
ProcessUtility_hook_type ProcessUtility_hook = NULL;
@@ -1157,9 +1156,6 @@ ProcessUtilitySlow(ParseState *pstate,
CreateStmt *cstmt = (CreateStmt *) stmt;
Datum toast_options;
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;
- const TableAmRoutine *tableam = NULL;
- Oid accessMethodId;
- Relation rel;
/* Remember transformed RangeVar for LIKE */
table_rv = cstmt->relation;
@@ -1189,27 +1185,9 @@ ProcessUtilitySlow(ParseState *pstate,
validnsps,
true,
false);
-
- /*
- * Get toast table AM to validate its options.
- * Only relevant if table itself has a table AM.
- * We don't need to place the lock given that
- * DefineRelation() already placed the
- * AccessExclusiveLock.
- */
- rel = relation_open(address.objectId, NoLock);
- accessMethodId = rel->rd_tableam ?
- table_relation_toast_am(rel) : InvalidOid;
- relation_close(rel, NoLock);
-
- if (OidIsValid(accessMethodId))
- {
- tableam = GetTableAmRoutineByAmOid(accessMethodId);
- (void) tableam_reloptions(tableam, RELKIND_TOASTVALUE,
- toast_options,
- NULL,
- true);
- }
+ (void) heap_reloptions(RELKIND_TOASTVALUE,
+ toast_options,
+ true);
NewRelationCreateToastTable(address.objectId,
toast_options);