diff --git a/contrib/pg_visibility/expected/pg_visibility.out b/contrib/pg_visibility/expected/pg_visibility.out
index 315633bfea6..0a15133246a 100644
--- a/contrib/pg_visibility/expected/pg_visibility.out
+++ b/contrib/pg_visibility/expected/pg_visibility.out
@@ -242,6 +242,14 @@ select * from pg_check_frozen('copyfreeze');
 --------
 (0 rows)
 
+create table vacuum_test as select 42 i;
+vacuum (disable_page_skipping) vacuum_test;
+select count(*) > 0 from pg_check_visible('vacuum_test');
+ ?column? 
+----------
+ f
+(1 row)
+
 -- cleanup
 drop table test_partitioned;
 drop view test_view;
@@ -252,3 +260,4 @@ drop foreign data wrapper dummy;
 drop materialized view matview_visibility_test;
 drop table regular_table;
 drop table copyfreeze;
+drop table vacuum_test;
diff --git a/contrib/pg_visibility/sql/pg_visibility.sql b/contrib/pg_visibility/sql/pg_visibility.sql
index ff3538f9964..e644818239d 100644
--- a/contrib/pg_visibility/sql/pg_visibility.sql
+++ b/contrib/pg_visibility/sql/pg_visibility.sql
@@ -170,6 +170,10 @@ commit;
 select * from pg_visibility_map('copyfreeze');
 select * from pg_check_frozen('copyfreeze');
 
+create table vacuum_test as select 42 i;
+vacuum (disable_page_skipping) vacuum_test;
+select count(*) > 0 from pg_check_visible('vacuum_test');
+
 -- cleanup
 drop table test_partitioned;
 drop view test_view;
@@ -180,3 +184,4 @@ drop foreign data wrapper dummy;
 drop materialized view matview_visibility_test;
 drop table regular_table;
 drop table copyfreeze;
+drop table vacuum_test;
