pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: feichanghong <feichanghong@qq.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit
Date: Wed, 24 Jan 2024 08:26:48 +0900
Message-ID: <ZbBLODpC44kSSv2I@paquier.xyz> (raw)
In-Reply-To: <f5eb802a-e98d-438e-9fa8-1694f767e5ea@iki.fi>
References: <tencent_A3CE810F59132D8E230475A5F0F7A08C8307@qq.com>
	<053bc845-3cb5-445e-8ea4-00f6c678ee25@iki.fi>
	<tencent_0F9D2F03B4F3E2C3DE4483E31B4147C9F605@qq.com>
	<d8f0b068-0e6e-4b2c-8932-62507eb7e1c6@iki.fi>
	<tencent_BEFB72867BA7CF879B492487284296D2F606@qq.com>
	<f8fa079c-c88c-4a4f-9c36-3854d12ddf70@iki.fi>
	<Za78YVcqNA8nAnn-@paquier.xyz>
	<f5eb802a-e98d-438e-9fa8-1694f767e5ea@iki.fi>

On Tue, Jan 23, 2024 at 09:12:25AM +0200, Heikki Linnakangas wrote:
> I can see that being useful in general. It requires a bespoken callback
> function, though. One nice thing about this test was that I didn't need to
> write a new C module, only that snippet at the injection point and some SQL.
> In more complicated tests a new C module is warranted, but I think a lot of
> tests - like this gin test - can be written without it.

FWIW, I don't mind if src/test/modules/injection_points/ is used as a
single point across the tree as a library storing a large set of
callbacks.  All these don't have to be generic, and I think that we
should remain a maximum flexible for bug fixing and advanced testing.
I'm OK to leave the call up to the committer because it comes down to
invasiveness in src/backend/ vs invasiveness in the number of
callbacks or the logic inside the callbacks (sometimes it makes sense
to me to also complicate more the backend), and I'm OK with what you
are doing here for this thread.

> Perhaps if the argument was uint64 instead of a pointer, so that the
> 'injection_point' module could contain ready-made functions that do things
> with the argument.

I am not exactly sure to understand what you mean here.

> Overall I feel we should not bother with injection point arguments for now,
> though. Let's wait until we have a few more tests that would benefit from
> that, and then we'll have more information on what the ideal interface would
> look like.

Yeah, I am not sure if that's worth having for now, but that's always
good to keep in mind that the infra can be extended to handle such
cases even for stable branches.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (14+ messages)  latest in thread

Message-ID: <ZbBLODpC44kSSv2I@paquier.xyz>
Permalink:  ../ZbBLODpC44kSSv2I@paquier.xyz/
Also on:    postgresql.org/message-id/ZbBLODpC44kSSv2I@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, hlinnaka@iki.fi, feichanghong@qq.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit
  In-Reply-To: <ZbBLODpC44kSSv2I@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox