Re: Lock tag of relation extend lock - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Lock tag of relation extend lock
Date
Msg-id lmswr7x5nz722a7z36obkkjezl744hqyg2hkee2almpi4skgjh@lmgs6g4iphvx
Whole thread Raw
In response to Lock tag of relation extend lock  (Jingtang Zhang <mrdrivingduck@gmail.com>)
List pgsql-hackers
Hi,

On 2025-10-06 19:39:18 +0800, Jingtang Zhang wrote:
> In a recent debug I found two process conflict on relation extension lock,
> one is holding it for MAIN fork extension, while the other one is trying to
> do FSM extension. It seems that the extension lock is using the logical relid
> of a table as lock tag, but smgrextend is independant among each fork.
>
> LockRelationForExtension is used to lock out concurrent extension to get an
> accurate smgrnblocks (of MAIN fork, mostly) for where to extend the fork from.
> Except for that in bufmgr.c, where the forknum is passed in as parameter,
> so main/fsm/vm extension shares the code.

What workload actually has significant enough extension workload on the VM/FSM
to make this a problem?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Eager aggregation, take 3
Next
From: Bruce Momjian
Date:
Subject: Re: split func.sgml to separated individual sgml files