mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +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:
@@ -2674,22 +2674,19 @@ static AutoVacOpts *
|
||||
extract_autovac_opts(HeapTuple tup, TupleDesc pg_class_desc)
|
||||
{
|
||||
bytea *relopts;
|
||||
CommonRdOptions common;
|
||||
AutoVacOpts *av;
|
||||
|
||||
Assert(((Form_pg_class) GETSTRUCT(tup))->relkind == RELKIND_RELATION ||
|
||||
((Form_pg_class) GETSTRUCT(tup))->relkind == RELKIND_MATVIEW ||
|
||||
((Form_pg_class) GETSTRUCT(tup))->relkind == RELKIND_TOASTVALUE);
|
||||
|
||||
fill_default_common_reloptions(&common);
|
||||
relopts = extractRelOptions(tup, pg_class_desc,
|
||||
GetTableAmRoutineByAmOid(((Form_pg_class) GETSTRUCT(tup))->relam),
|
||||
NULL, &common);
|
||||
if (relopts)
|
||||
pfree(relopts);
|
||||
relopts = extractRelOptions(tup, pg_class_desc, NULL);
|
||||
if (relopts == NULL)
|
||||
return NULL;
|
||||
|
||||
av = palloc(sizeof(AutoVacOpts));
|
||||
memcpy(av, &(common.autovacuum), sizeof(AutoVacOpts));
|
||||
memcpy(av, &(((StdRdOptions *) relopts)->autovacuum), sizeof(AutoVacOpts));
|
||||
pfree(relopts);
|
||||
|
||||
return av;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user