From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Adding facility for injection points (or probe points?) for more advanced tests |
Date: | 2025-04-14 04:24:30 |
Message-ID: | Z_yN_gaLw-pE2ul-@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 05, 2025 at 09:19:22AM +0900, Michael Paquier wrote:
> On Mon, Feb 03, 2025 at 09:30:33PM -0800, Jeff Davis wrote:
>> One extra benefit of supporting arguments is that it would be a more
>> flexible way to change the local state around the injection point.
>> Right now the only way is by using IS_INJECTION_POINT_ATTACHED(), which
>> doesn't permit callback-defined conditions, etc.
>
> Agreed. The line I'm drawing here (mentioned upthread as well) is
> that any changes done in the core backend for injection_point.c should
> have one or more use cases in the tree.
As a matter of fact, this argument is now void on HEAD as of
93bc3d75d8e1 (addition of test_aio) and more specifically da7226993fd4
(core AIO infra). See pgaio_inj_io_get() that is used in a injection
point callback to retrieve a specific value that had better be given
as an argument of the callback at runtime. There is also
pgaio_inj_cur_handle at the top of aio.c with a comment on the matter.
So the AIO testing is using a set of hacks to go through the current
limitations.
IMO, we ought to clean up the way the AIO code does its tests with
injection point with something like the patch of this thread. And
perhaps even do it in v18 to have the code in a cleaner state at
release. I'll start a new thread after hacking my way through that.
The core injection point patch still needs a bit of work compared to
what was sent previously.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2025-04-14 04:39:57 | Re: Fix replica identity checks for MERGE command on published table. |
Previous Message | Ashutosh Bapat | 2025-04-14 03:32:19 | Re: New committer: Jacob Champion |