Re: MultiXact\SLRU buffers configuration

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, vignesh C <vignesh21(at)gmail(dot)com>, Andrew Borodin <amborodin86(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Gilles Darold <gilles(at)darold(dot)net>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MultiXact\SLRU buffers configuration
Date: 2024-11-05 15:58:37
Message-ID: CA+TgmoarL2nTionJxAgJcuOWm3S9d0hBMHmQ78-6HoO1JgphHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 29, 2024 at 1:45 PM Thom Brown <thom(at)linux(dot)com> wrote:
> Taking a look at what's happening under the hood, it seems to be
> getting stuck here:
>
> if (nextMXOffset == 0)
> {
> /* Corner case 2: next multixact is still
> being filled in */
> LWLockRelease(MultiXactOffsetSLRULock);
> CHECK_FOR_INTERRUPTS();
> pg_usleep(1000L);
> goto retry;
> }
>
> It clearly checks for interrupts, but when I saw this issue happen, it
> wasn't interruptible.

I don't understand the underlying issue here; however, if a process
holds an lwlock, it's not interruptible, even if it checks for
interrupts. So it could be that at this point in the code we're
holding some other LWLock, such as a buffer content lock, and that's
why this code fails to achieve its objective.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2024-11-05 16:05:14 Re: Making error message more user-friendly with spaces in a URI
Previous Message Robert Haas 2024-11-05 15:55:12 Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)