Re: Fluctuating performance of updates on small table with trigger

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Mikkel Lauritsen <renard(at)tala(dot)dk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Fluctuating performance of updates on small table with trigger
Date: 2022-06-29 19:52:33
Message-ID: 20220629195233.GR28130@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Jun 29, 2022 at 09:31:58PM +0200, Mikkel Lauritsen wrote:
> In short I'm running PostgreSQL 14.1 on Linux on a small test machine with

should try to upgrade to 14.4, for $reasons

> Is there any feasible way to find out what it is that causes Postgres to
> start doing slow updates? My guess would be a buffer filling up or something
> similar, but the regularity between runs paired with the irregular lengths
> of the fast and slow phases in each run doesn't really seem to fit with
> this.

Set log_checkpoints=on, log_autovacuum_min_duration=0, log_lock_waits=on, and
enable autoexplain with auto_explain.log_nested_statements=on.

Then see what's in the logs when that happens.

@hackers: the first two of those are enabled by default in 15dev, and this
inquiry seems to support that change.

--
Justin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message James Pang (chaolpan) 2022-07-01 08:30:40 RE: partition pruning only works for select but update
Previous Message Mikkel Lauritsen 2022-06-29 19:31:58 Fluctuating performance of updates on small table with trigger