Registry Mirror
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2a6ee8d
Track per-relation cumulative time spent in [auto]vacuum and [auto]an…
michaelpq Jan 28, 2025
954176f
Add is_analyze parameter to vacuum_delay_point().
nathan-bossart Feb 11, 2025
fc2b88e
Measure cost-based vacuum delay for progress reporting.
nathan-bossart Feb 11, 2025
6fd2aff
Measure cost-based vacuum delay
nathan-bossart Feb 11, 2025
464707f
Measure append-optimized vacuum active-phase time
Alena0704 Sep 20, 2026
dc4b9b4
Accumulate vacuum timing for indexes and databases
Alena0704 Oct 1, 2026
6c0b00e
Count vacuums that enter wraparound failsafe mode
Alena0704 Oct 1, 2026
56a0b26
Count vacuums interrupted by errors
Alena0704 Oct 1, 2026
e2a492f
Track table VM stability.
Alena0704 Mar 30, 2026
50a4ff8
Report core vacuum timing for append-optimized tables
Alena0704 Oct 1, 2026
826213f
Document cost-based VACUUM delay timing
Alena0704 Oct 7, 2026
57e9549
Report AO active-phase time to cumulative statistics
Alena0704 Oct 7, 2026
84ced56
Expose maintenance timing and visibility-map statistics in catalogs
Alena0704 Oct 7, 2026
01941a0
Test native VACUUM cluster timing without the extension
Alena0704 Oct 9, 2026
6d12b7b
Fix GIN analyze delay attribution and AO timing test configuration
Alena0704 Nov 1, 2026
da51df8
Collect cumulative frozen-page vacuum statistics
Alena0704 Nov 1, 2026
47f5123
Collect cumulative all-visible-page vacuum statistics
Alena0704 Nov 1, 2026
82f160f
Count only errors escaping table vacuum as interruptions
Alena0704 Nov 1, 2026
23ed5dc
Use ASF license headers for native maintenance statistics tests
Alena0704 Nov 16, 2026
7cfaa1b
Address native maintenance statistics review
Alena0704 Dec 3, 2026
File filter
Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ jobs:
"src/bin/scripts:installcheck",
"src/interfaces/libpq:installcheck",
"src/test/postmaster:installcheck",
"src/test/modules/test_misc:installcheck-vacuum",
"src/test/modules/ssl_passphrase_callback:install installcheck",
"src/test/modules/test_custom_rmgrs:install installcheck",
"src/test/modules/test_escape:all installcheck",
Expand Down
4 changes: 2 additions & 2 deletions contrib/bloom/blvacuum.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
*itupPtr,
*itupEnd;

vacuum_delay_point();
vacuum_delay_point(false);

buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
RBM_NORMAL, info->strategy);
Expand Down Expand Up @@ -191,7 +191,7 @@ blvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
Buffer buffer;
Page page;

vacuum_delay_point();
vacuum_delay_point(false);

buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
RBM_NORMAL, info->strategy);
Expand Down
2 changes: 1 addition & 1 deletion contrib/file_fdw/file_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
for (;;)
{
/* Check for user-requested abort or sleep */
vacuum_delay_point();
vacuum_delay_point(true);

/* Fetch next row */
MemoryContextReset(tupcontext);
Expand Down
30 changes: 30 additions & 0 deletions contrib/pg_surgery/expected/heap_surgery.out
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,36 @@ DETAIL: This operation is not supported for views.
select heap_force_freeze('vw'::regclass, ARRAY['(0, 1)']::tid[]);
ERROR: cannot operate on relation "vw"
DETAIL: This operation is not supported for views.
-- Killing tuples on a frozen page clears both VM marks exactly once.
create temp table vm_surgery (a int);
insert into vm_surgery values (1), (2);
vacuum freeze vm_surgery;
select heap_force_kill('vm_surgery'::regclass, ARRAY['(0, 1)']::tid[]);
heap_force_kill
-----------------

(1 row)

select heap_force_kill('vm_surgery'::regclass, ARRAY['(0, 2)']::tid[]);
heap_force_kill
-----------------

(1 row)

select pg_stat_force_next_flush();
pg_stat_force_next_flush
--------------------------

(1 row)

select visible_page_marks_cleared, frozen_page_marks_cleared
from pg_stat_all_tables where relid = 'vm_surgery'::regclass;
visible_page_marks_cleared | frozen_page_marks_cleared
----------------------------+---------------------------
1 | 1
(1 row)

drop table vm_surgery;
-- cleanup.
drop view vw;
drop extension pg_surgery;
4 changes: 2 additions & 2 deletions contrib/pg_surgery/heap_surgery.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ heap_force_common(FunctionCallInfo fcinfo, HeapTupleForceOption heap_force_opt)
if (PageIsAllVisible(page))
{
PageClearAllVisible(page);
visibilitymap_clear(rel, blkno, vmbuf,
VISIBILITYMAP_VALID_BITS);
visibilitymap_clear_rel(rel, blkno, vmbuf,
VISIBILITYMAP_VALID_BITS);
did_modify_vm = true;
}
}
Expand Down
11 changes: 11 additions & 0 deletions contrib/pg_surgery/sql/heap_surgery.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ create view vw as select 1;
select heap_force_kill('vw'::regclass, ARRAY['(0, 1)']::tid[]);
select heap_force_freeze('vw'::regclass, ARRAY['(0, 1)']::tid[]);

-- Killing tuples on a frozen page clears both VM marks exactly once.
create temp table vm_surgery (a int);
insert into vm_surgery values (1), (2);
vacuum freeze vm_surgery;
select heap_force_kill('vm_surgery'::regclass, ARRAY['(0, 1)']::tid[]);
select heap_force_kill('vm_surgery'::regclass, ARRAY['(0, 2)']::tid[]);
select pg_stat_force_next_flush();
select visible_page_marks_cleared, frozen_page_marks_cleared
from pg_stat_all_tables where relid = 'vm_surgery'::regclass;
drop table vm_surgery;

-- cleanup.
drop view vw;
drop extension pg_surgery;
31 changes: 31 additions & 0 deletions doc/src/sgml/config.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -8155,6 +8155,37 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
</listitem>
</varlistentry>

<varlistentry id="guc-track-cost-delay-timing" xreflabel="track_cost_delay_timing">
<term><varname>track_cost_delay_timing</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>track_cost_delay_timing</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Enables timing of cost-based vacuum delay (see
<xref linkend="runtime-config-resource-vacuum-cost"/>). This parameter
is off by default, as it will repeatedly query the operating system for
the current time, which may cause significant overhead on some
platforms. You can use the <xref linkend="pgtesttiming"/> tool to
measure the overhead of timing on your system. Cost-based vacuum delay
timing information is displayed in
<link linkend="vacuum-progress-reporting"><structname>pg_stat_progress_vacuum</structname></link>
and
<link linkend="analyze-progress-reporting"><structname>pg_stat_progress_analyze</structname></link>.
Only superusers and users with the appropriate <literal>SET</literal>
privilege can change this setting.
</para>
<para>
In Cloudberry this setting is local to each instance. A session
<command>SET</command> on the coordinator is not propagated to segments.
To measure segment delays, configure the setting on those instances,
for example with <command>gpconfig -c track_cost_delay_timing -v on</command>
followed by <command>gpstop -u</command>.
</para>
</listitem>
</varlistentry>

<varlistentry id="guc-track-io-timing" xreflabel="track_io_timing">
<term><varname>track_io_timing</varname> (<type>boolean</type>)
<indexterm>
Expand Down
Loading
Loading