Re: old_snapshot_threshold bottleneck on replica

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: old_snapshot_threshold bottleneck on replica
Date: 2023-01-25 13:52:28
Message-ID: CA+TgmoZZt21bLDg9=s9n9e4XE_pu4gxXYWBgKYBpw1wkT9m6yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 25, 2023 at 3:52 AM Maxim Orlov <orlovmg(at)gmail(dot)com> wrote:
> But in TransactionIdLimitedForOldSnapshots these variable is using conjointly. So, I'm not
> sure, is it completely safe to remove mutex.

Well, that's something we - and ideally you, as the patch author -
need to analyze and figure out. We can't just take a shot and hope for
the best.

> Actually, removing mutex and switch to atomics
> was my first choice. I've run all the tests and no problems were found

Unfortunately, that kind of testing is not very likely to find a
subtle synchronization problem. That's why a theoretical analysis is
so important.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2023-01-25 13:59:44 More pgindent tweaks
Previous Message Robert Haas 2023-01-25 13:47:14 Re: CREATE ROLE bug?