[PATCH] Use wait_classes.h in pg_prewarm

From: Dongpo Liu <poe(dot)liu(at)pm(dot)me>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] Use wait_classes.h in pg_prewarm
Date: 2026-06-27 11:15:59
Message-ID: C2oCigh8yeAPYky-U6iG8TYgjRo2HOpJ9e2I6ytjayngiuMv8dJRDMtb9b9fzzAhcb5T95-xMspjBvBY7wbwaQ6xqRukdQit5Wk_SIq-d2M=@pm.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

While reading contrib/pg_prewarm/autoprewarm.c, I noticed that it includes
broader wait-event/statistics headers than it appears to need.

autoprewarm.c only uses PG_WAIT_EXTENSION for WaitLatch(). That macro is
defined in utils/wait_classes.h, so the attached patch includes that header
directly instead of pulling in pgstat.h and utils/wait_event.h.

This is my first patch to PostgreSQL, so please let me know if I missed
anything or if the patch should be handled differently.

Tests: meson test -C build pg_prewarm/regress pg_prewarm/001_basic

Regards,

Dongpo Liu

Attachment Content-Type Size
0001-Use-wait_classes.h-in-pg_prewarm.patch application/octet-stream 1.1 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-06-27 12:00:37 Re: Move FOR PORTION OF checks out of analysis
Previous Message Tatsuya Kawata 2026-06-27 10:55:53 Re: Add per-backend lock statistics