Re: Persist injection points across server restarts

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Maksim(dot)Melnikov" <m(dot)melnikov(at)postgrespro(dot)ru>
Subject: Re: Persist injection points across server restarts
Date: 2025-05-29 23:30:54
Message-ID: aDjuLp9B3pgzzMRP@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 29, 2025 at 01:17:21PM +0530, Rahila Syed wrote:
> After applying the v3-patches, I see failure like these:
> macOS - Sonoma - Meson - Cirrus CI
> <https://cirrus-ci.com/task/4589192849653760>
> Windows - Server 2019, VS 2019 - Meson & ninja - Cirrus CI
> <https://cirrus-ci.com/task/5715092756496384>
> Linux - Debian Bookworm - Meson - Cirrus CI
> <https://cirrus-ci.com/task/6629886430806016>

These tasks complain about the following:
[07:22:58.931] ../src/include/utils/injection_point.h:62:28: note:
'InjectionPointList' declared here [07:22:58.931] 62 | extern
InjectionPointData *InjectionPointList(uint32 *num_points);

The latest version of the patch (v3) posted on this thread includes
the following:
./v3-0001-Add-InjectionPointList-to-retrieve-list-of-inject.patch:
+extern List *InjectionPointList(void);
./v3-0001-Add-InjectionPointList-to-retrieve-list-of-inject.patch:
+InjectionPointList(void)
./v3-0002-injection_points-Add-function-to-flush-injection-.patch:
+ inj_points = InjectionPointList();

How is it possible for what you have applied to include changes that
are not part of the patch set posted? Manual mistake on your side
perhaps where versions of the patches have been mixed?

The CF bot is green:
https://commitfest.postgresql.org/patch/5731/

> Should we also consider unlinking the target file INJ_DUMP_FILE in case of
> an error during renaming?

I don't think that this is worth caring for the sake of tests. If an
error happens before the atomic rename is done to the final file,
leaving around a temporary file, the next flush would just recreate a
new file from scratch with the new contents.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2025-05-29 23:32:01 Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them
Previous Message Noboru Saito 2025-05-29 23:06:39 Re: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths