diff options
Diffstat (limited to 'src/backend/access/heap')
-rw-r--r-- | src/backend/access/heap/heapam.c | 4 | ||||
-rw-r--r-- | src/backend/access/heap/heapam_handler.c | 13 | ||||
-rw-r--r-- | src/backend/access/heap/heaptoast.c | 9 | ||||
-rw-r--r-- | src/backend/access/heap/hio.c | 4 | ||||
-rw-r--r-- | src/backend/access/heap/pruneheap.c | 4 | ||||
-rw-r--r-- | src/backend/access/heap/rewriteheap.c | 4 |
6 files changed, 9 insertions, 29 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 4607505106d..08f6a10ac3d 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -2279,8 +2279,8 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples, Assert(!(options & HEAP_INSERT_NO_LOGICAL)); needwal = RelationNeedsWAL(relation); - saveFreeSpace = HeapGetTargetPageFreeSpace(relation, - HEAP_DEFAULT_FILLFACTOR); + saveFreeSpace = RelationGetTargetPageFreeSpace(relation, + HEAP_DEFAULT_FILLFACTOR); /* Toast and set header data in all the slots */ heaptuples = palloc(ntuples * sizeof(HeapTuple)); diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 30095d88b09..2c423286d72 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -23,7 +23,6 @@ #include "access/heapam.h" #include "access/heaptoast.h" #include "access/multixact.h" -#include "access/reloptions.h" #include "access/rewriteheap.h" #include "access/syncscan.h" #include "access/tableam.h" @@ -2162,17 +2161,6 @@ heapam_relation_toast_am(Relation rel) return rel->rd_rel->relam; } -static bytea * -heapam_reloptions(char relkind, Datum reloptions, - CommonRdOptions *common, bool validate) -{ - Assert(relkind == RELKIND_RELATION || - relkind == RELKIND_TOASTVALUE || - relkind == RELKIND_MATVIEW); - - return heap_reloptions(relkind, reloptions, common, validate); -} - /* ------------------------------------------------------------------------ * Planner related callbacks for the heap AM @@ -2734,7 +2722,6 @@ static const TableAmRoutine heapam_methods = { .relation_needs_toast_table = heapam_relation_needs_toast_table, .relation_toast_am = heapam_relation_toast_am, .relation_fetch_toast_slice = heap_fetch_toast_slice, - .reloptions = heapam_reloptions, .relation_estimate_size = heapam_estimate_rel_size, diff --git a/src/backend/access/heap/heaptoast.c b/src/backend/access/heap/heaptoast.c index cffee7e1b7a..a420e165304 100644 --- a/src/backend/access/heap/heaptoast.c +++ b/src/backend/access/heap/heaptoast.c @@ -32,13 +32,6 @@ #include "access/toast_internals.h" #include "utils/fmgroids.h" -/* - * HeapGetToastTupleTarget - * Returns the heap relation's toast_tuple_target. Note multiple eval of argument! - */ -#define HeapGetToastTupleTarget(relation, defaulttarg) \ - ((HeapRdOptions *) (relation)->rd_options ? \ - ((HeapRdOptions *) (relation)->rd_options)->toast_tuple_target : (defaulttarg)) /* ---------- * heap_toast_delete - @@ -181,7 +174,7 @@ heap_toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup, hoff += BITMAPLEN(numAttrs); hoff = MAXALIGN(hoff); /* now convert to a limit on the tuple data size */ - maxDataLen = HeapGetToastTupleTarget(rel, TOAST_TUPLE_TARGET) - hoff; + maxDataLen = RelationGetToastTupleTarget(rel, TOAST_TUPLE_TARGET) - hoff; /* * Look for attributes with attstorage EXTENDED to compress. Also find diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index ed731179b45..7c662cdf46e 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -536,8 +536,8 @@ RelationGetBufferForTuple(Relation relation, Size len, len, MaxHeapTupleSize))); /* Compute desired extra freespace due to fillfactor option */ - saveFreeSpace = HeapGetTargetPageFreeSpace(relation, - HEAP_DEFAULT_FILLFACTOR); + saveFreeSpace = RelationGetTargetPageFreeSpace(relation, + HEAP_DEFAULT_FILLFACTOR); /* * Since pages without tuples can still have line pointers, we consider diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 20142dd2144..d2eecaf7ebc 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -235,8 +235,8 @@ heap_page_prune_opt(Relation relation, Buffer buffer) * important than sometimes getting a wrong answer in what is after all * just a heuristic estimate. */ - minfree = HeapGetTargetPageFreeSpace(relation, - HEAP_DEFAULT_FILLFACTOR); + minfree = RelationGetTargetPageFreeSpace(relation, + HEAP_DEFAULT_FILLFACTOR); minfree = Max(minfree, BLCKSZ / 10); if (PageIsFull(page) || PageGetHeapFreeSpace(page) < minfree) diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c index 2bbf121146e..473f3aa9bef 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 = HeapGetTargetPageFreeSpace(state->rs_new_rel, - HEAP_DEFAULT_FILLFACTOR); + saveFreeSpace = RelationGetTargetPageFreeSpace(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; |