diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-04-08 11:23:28 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-04-08 11:23:28 +0300 |
commit | 9bd99f4c26fe37b8ee2f199aa868a0e2fdba4c43 (patch) | |
tree | acbadc21922045fa7f729f5c199e4e33c30e2541 /src/backend/access/heap/rewriteheap.c | |
parent | 6f3d8d5e7cc2f2e2367cd6da6f8affe98d1f5729 (diff) | |
download | postgresql-9bd99f4c26fe37b8ee2f199aa868a0e2fdba4c43.tar.gz postgresql-9bd99f4c26fe37b8ee2f199aa868a0e2fdba4c43.zip |
Custom reloptions for table AM
Let table AM define custom reloptions for its tables. This allows specifying
AM-specific parameters by the WITH clause when creating a table.
The reloptions, which could be used outside of table AM, are now extracted
into the CommonRdOptions data structure. These options could be by decision
of table AM directly specified by a user or calculated in some way.
The new test module test_tam_options evaluates the ability to set up custom
reloptions and calculate fields of CommonRdOptions on their base.
The code may use some parts from prior work by Hao Wu.
Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com
Discussion: https://postgr.es/m/AMUA1wBBBxfc3tKRLLdU64rb.1.1683276279979.Hmail.wuhao%40hashdata.cn
Reviewed-by: Reviewed-by: Pavel Borisov, Matthias van de Meent, Jess Davis
Diffstat (limited to 'src/backend/access/heap/rewriteheap.c')
-rw-r--r-- | src/backend/access/heap/rewriteheap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c index 473f3aa9bef..2bbf121146e 100644 --- a/src/backend/access/heap/rewriteheap.c +++ b/src/backend/access/heap/rewriteheap.c @@ -641,8 +641,8 @@ raw_heap_insert(RewriteState state, HeapTuple tup) len, MaxHeapTupleSize))); /* Compute desired extra freespace due to fillfactor option */ - saveFreeSpace = RelationGetTargetPageFreeSpace(state->rs_new_rel, - HEAP_DEFAULT_FILLFACTOR); + saveFreeSpace = HeapGetTargetPageFreeSpace(state->rs_new_rel, + HEAP_DEFAULT_FILLFACTOR); /* Now we can check to see if there's enough free space already. */ page = (Page) state->rs_buffer; |