diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-04-11 15:46:35 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-04-11 15:46:35 +0300 |
commit | bc1e2092ebb857802a9713d0d3588079e2f0216a (patch) | |
tree | f55adc80b07150bcd7f5cbd50a9bfc89b3f301d6 /src/backend/commands/createas.c | |
parent | 87840b9741864dfdb9f63b0056e2783cdb49b8a5 (diff) | |
download | postgresql-bc1e2092ebb857802a9713d0d3588079e2f0216a.tar.gz postgresql-bc1e2092ebb857802a9713d0d3588079e2f0216a.zip |
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/commands/createas.c')
-rw-r--r-- | src/backend/commands/createas.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c index c5df96e374a..afd3dace079 100644 --- a/src/backend/commands/createas.c +++ b/src/backend/commands/createas.c @@ -85,9 +85,6 @@ create_ctas_internal(List *attrList, IntoClause *into) Datum toast_options; static char *validnsps[] = HEAP_RELOPT_NAMESPACES; ObjectAddress intoRelationAddr; - const TableAmRoutine *tableam = NULL; - Oid accessMethodId = InvalidOid; - Relation rel; /* This code supports both CREATE TABLE AS and CREATE MATERIALIZED VIEW */ is_matview = (into->viewQuery != NULL); @@ -128,15 +125,7 @@ create_ctas_internal(List *attrList, IntoClause *into) validnsps, true, false); - rel = relation_open(intoRelationAddr.objectId, AccessShareLock); - accessMethodId = table_relation_toast_am(rel); - relation_close(rel, AccessShareLock); - - 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(intoRelationAddr.objectId, toast_options); |