Re: Lock on ShmemVariableCache fields?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Zhang Mingli <zmlpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Lock on ShmemVariableCache fields?
Date: 2022-11-01 05:43:07
Message-ID: Y2Cx60QNiZJub97x@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 31, 2022 at 03:14:54PM +0800, Japin Li wrote:
> For example, since SetCommitTsLimit() is only used in BootStrapXLog() and
> StartupXLOG(), we can safely remove the code of acquiring/releasing lock?

Logically yes, I guess that you could go without the LWLock acquired
in this routine at this early stage of the game. Now, perhaps that's
not worth worrying, but removing these locks could impact any external
code relying on SetCommitTsLimit() to actually hold them.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-11-01 05:52:02 Re: Check return value of pclose() correctly
Previous Message Michael Paquier 2022-11-01 05:35:29 Re: Check return value of pclose() correctly