Re: A failure in 031_recovery_conflict.pl on Debian/s390x

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: A failure in 031_recovery_conflict.pl on Debian/s390x
Date: 2023-08-08 17:23:57
Message-ID: CA+hUKGJ99MKTS3DkX8XO4TNebGXDTXCMk883jy8R=EHj_9pw0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 9, 2023 at 2:01 AM Christoph Berg <myon(at)debian(dot)org> wrote:
> Putting that patch on top of v8 made it pass 294 times before exiting
> like this:
>
> [08:52:34.134](0.032s) ok 1 - buffer pin conflict: cursor with conflicting pin established
> Waiting for replication conn standby's replay_lsn to pass 0/3430000 on primary
> done
> timed out waiting for match: (?^:User was holding shared buffer pin for too long) at t/031_recovery_conflict.pl line 318.

Can you reproduce that with logging like this added on top?

diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 5b663a2997..72f5274c95 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -629,6 +629,7 @@ SetStartupBufferPinWaitBufId(int bufid)
/* use volatile pointer to prevent code rearrangement */
volatile PROC_HDR *procglobal = ProcGlobal;

+ elog(LOG, "XXX SetStartupBufferPinWaitBufId(%d)", bufid);
procglobal->startupBufferPinWaitBufId = bufid;
}

@@ -640,8 +641,11 @@ GetStartupBufferPinWaitBufId(void)
{
/* use volatile pointer to prevent code rearrangement */
volatile PROC_HDR *procglobal = ProcGlobal;
+ int bufid;

- return procglobal->startupBufferPinWaitBufId;
+ bufid = procglobal->startupBufferPinWaitBufId;
+ elog(LOG, "XXX GetStartupBufferPinWaitBufId() -> %d", bufid);
+ return bufid;
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-08-08 17:41:10 Re: pgsql: Some refactoring to export json(b) conversion functions
Previous Message Alvaro Herrera 2023-08-08 16:34:58 Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?