Re: High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table - Mailing list pgsql-performance

From Peter Geoghegan
Subject Re: High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table
Date
Msg-id CAH2-WzmZEQn7jH3iYZvsgMJ93Z=POaGcgu4BSF73_vSgoZUKcg@mail.gmail.com
Whole thread Raw
In response to High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table  (Joshua Banton <bantonj@gmail.com>)
Responses Re: High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table
List pgsql-performance
On Fri, Jan 31, 2025 at 5:28 PM Joshua Banton <bantonj@gmail.com> wrote:
> The issue mostly manifests near the end of the "scanning heap" phase of vacuuming of one of our largest tables, we'll
calltable1. RDS Performance Insights reports that selects on table1 start to wait on cpu, where previously it didn't
evenshow up in the top 25 queries by wait. It doesn't always happen, but if there is a larger than usual number of
selectson table1 it is more likely to happen. 

Does this database also have many tables? As in thousands of tables?

I am reminded of this issue:

https://www.postgresql.org/message-id/flat/da3205c4-5b07-a65c-6c26-a293c6464fdb%40postgrespro.ru

I've heard of this happening when an aggressive VACUUM updates
relfrozenxid on a larger table.

--
Peter Geoghegan



pgsql-performance by date:

Previous
From: Joshua Banton
Date:
Subject: High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table
Next
From: Joshua Banton
Date:
Subject: Re: High System CPU Usage on Selects Seemingly Caused By Vacuum of Same Table