Re: Flush some statistics within running transactions

From: Andres Freund <andres(at)anarazel(dot)de>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Subject: Re: Flush some statistics within running transactions
Date: 2026-01-30 15:10:34
Message-ID: rdx2jm7bulyprifss2myiehhxaipxuydb2gixnxuumkpidfjl5@5hx5iyvbrlk7
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-01-30 15:37:57 +0100, Álvaro Herrera wrote:
> I'm now wondering if CheckDeadLockAlert() really needed to have this in
> the first place, or it was just an exercise in paranoia ... it was added
> by commit 6753333f55e1, with the discussion in [1], and it's not clear
> to me that there was any theoretical or experimental evidence that it
> was necessary; the thread didn't discuss it, and the commit message
> doesn't either. Added Andres to CC as committer to this thread, maybe
> he remembers.

I don't remember. But back then way more complicated things were still running
in signal handlers, and some signal handlers were capable of interrupting
other signal handlers. Including doing crazy things like starting transactions
in signal handlers (e.g. to process notify interrupts), which in turn could
clear latches. So there was a lot more potential to stomp on each others work.

WRT the subject of this thread: I hope we aren't just enabling a timer to fire
once a second forever but only when there actually is outstanding work?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-01-30 15:28:14 Re: Wake up backends immediately when sync standbys decrease
Previous Message Pierre Ducroquet 2026-01-30 15:01:52 Re: [PATCH] llvmjit: always add the simplifycfg pass