Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE
Date: 2026-11-09 04:51:28
Message-ID: CABPTF7UsS6O-=ruPHQep8QOvo0aKinG6xdp2ARurnNd-4GXSAQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 9, 2026 at 11:42 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Mon, Nov 09, 2026 at 11:37:22AM +0800, Xuneng Zhou wrote:
> >> There may be something with threading here, actually, we've
> >> mentioned that as we could not rely on PIDs anymore, should the switch
> >> to threads happen, then a concept of session number would be required.
> >> If it is 8-byte wide, the PID rotation concern is moot.
> >
> > I don't follow this well. Does this mean that this is not a problem
> > after threading?
>
> Under a threading infrastructure, PIDs have no meaning. So, assuming
> that a concept of session IDs is used to replace how we internally
> track each thread for the SQL interface, and assuming that this is 8
> byte wide, then the PID wraparound concerns would be entirely gone.
> This relies on three ifs.

Thanks. It's clear to me now.

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Jadhav 2026-11-09 05:10:16 Re: Reporting WAL replay progress during pre-consistency standby reovery
Previous Message Masahiko Sawada 2026-11-09 04:46:50 Re: Proposal: Conflict log history table for Logical Replication