mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Revert: Custom reloptions for table AM
This commit reverts9bd99f4c26and422041542fper review by Andres Freund. Discussion: https://postgr.es/m/20240410165236.rwyrny7ihi4ddxw4%40awork3.anarazel.de
This commit is contained in:
@@ -750,7 +750,7 @@ table_block_relation_estimate_size(Relation rel, int32 *attr_widths,
|
||||
* The other branch considers it implicitly by calculating density
|
||||
* from actual relpages/reltuples statistics.
|
||||
*/
|
||||
fillfactor = HeapGetFillFactor(rel, HEAP_DEFAULT_FILLFACTOR);
|
||||
fillfactor = RelationGetFillFactor(rel, HEAP_DEFAULT_FILLFACTOR);
|
||||
|
||||
tuple_width = get_rel_data_width(rel, attr_widths);
|
||||
tuple_width += overhead_bytes_per_tuple;
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
|
||||
#include "access/tableam.h"
|
||||
#include "access/xact.h"
|
||||
#include "catalog/pg_am.h"
|
||||
#include "commands/defrem.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/guc_hooks.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -100,29 +98,6 @@ GetTableAmRoutine(Oid amhandler)
|
||||
return routine;
|
||||
}
|
||||
|
||||
/*
|
||||
* GetTableAmRoutineByAmOid
|
||||
* Given the table access method oid get its TableAmRoutine struct, which
|
||||
* will be palloc'd in the caller's memory context.
|
||||
*/
|
||||
const TableAmRoutine *
|
||||
GetTableAmRoutineByAmOid(Oid amoid)
|
||||
{
|
||||
HeapTuple ht_am;
|
||||
Form_pg_am amrec;
|
||||
const TableAmRoutine *tableam = NULL;
|
||||
|
||||
ht_am = SearchSysCache1(AMOID, ObjectIdGetDatum(amoid));
|
||||
if (!HeapTupleIsValid(ht_am))
|
||||
elog(ERROR, "cache lookup failed for access method %u",
|
||||
amoid);
|
||||
amrec = (Form_pg_am) GETSTRUCT(ht_am);
|
||||
|
||||
tableam = GetTableAmRoutine(amrec->amhandler);
|
||||
ReleaseSysCache(ht_am);
|
||||
return tableam;
|
||||
}
|
||||
|
||||
/* check_hook: validate new default_table_access_method */
|
||||
bool
|
||||
check_default_table_access_method(char **newval, void **extra, GucSource source)
|
||||
|
||||
Reference in New Issue
Block a user