tablestovacuum()

8.129. tablestovacuum()

Function Properties

Language: PLPGSQL

Return Type: SET OF vactables

Return a list of tables that require frequent vacuuming. The function is used so that the list is not hardcoded into C code.

declare
	prec vactables%rowtype;
begin
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_event';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_confirm';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_setsync';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_seqlog';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_archive_counter';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_components';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := '_schemadoc';
	prec.relname := 'sl_log_script';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := 'pg_catalog';
	prec.relname := 'pg_listener';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;
	prec.nspname := 'pg_catalog';
	prec.relname := 'pg_statistic';
	if ShouldSlonyVacuumTable(prec.nspname, prec.relname) then
		return next prec;
	end if;

   return;
end