SET max_parallel_maintenance_workers TO4; SET min_parallel_index_scan_size TO'128kB';
-- Bug #17245: Make sure that we don't totally fail to VACUUM individual indexes that -- happen to be below min_parallel_index_scan_size during parallel VACUUM: CREATETABLE parallel_vacuum_table (a int) WITH (autovacuum_enabled = off); INSERTINTO parallel_vacuum_table SELECT i from generate_series(1, 10000) i;
-- Parallel VACUUM will never be used unless there are at least two indexes -- that exceed min_parallel_index_scan_size. Create two such indexes, and -- a third index that is smaller than min_parallel_index_scan_size. CREATEINDEX regular_sized_index ON parallel_vacuum_table(a); CREATEINDEX typically_sized_index ON parallel_vacuum_table(a); -- Note: vacuum_in_leader_small_index can apply deduplication, making it ~3x -- smaller than the other indexes CREATEINDEX vacuum_in_leader_small_index ON parallel_vacuum_table((1));
-- Verify (as best we can) that the cost model for parallel VACUUM -- will make our VACUUM run in parallel, while always leaving it up to the -- parallel leader to handle the vacuum_in_leader_small_index index: SELECTEXISTS ( SELECT1 FROM pg_class WHERE oid = 'vacuum_in_leader_small_index'::regclass AND
pg_relation_size(oid) <
pg_size_bytes(current_setting('min_parallel_index_scan_size'))
) as leader_will_handle_small_index; SELECT count(*) as trigger_parallel_vacuum_nindexes FROM pg_class WHERE oid in ('regular_sized_index'::regclass, 'typically_sized_index'::regclass) AND
pg_relation_size(oid) >=
pg_size_bytes(current_setting('min_parallel_index_scan_size'));
-- Since vacuum_in_leader_small_index uses deduplication, we expect an -- assertion failure with bug #17245 (in the absence of bugfix): INSERTINTO parallel_vacuum_table SELECT i FROM generate_series(1, 10000) i;
-- Deliberately don't drop table, to get further coverage from tools like -- pg_amcheck in some testing scenarios
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.11Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.