| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | shihao zhong <zhong950419(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jan Nidzwetzki <jan(at)planetscale(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Subject: | Re: Standby writes pages past minRecoveryPoint after crash recovery |
| Date: | 2026-12-04 02:52:11 |
| Message-ID: | axIq23NQskrhgmCf@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Dec 03, 2026 at 11:32:20PM +0900, Fujii Masao wrote:
> With this change, checkpointer (probably and also bgwriter ?) would acquire
> ControlFileLock with LW_EXCLUSIVE mode on every call to
> UpdateMinRecoveryPoint() during crash recovery, instead of returning
> early after the first call. Could this have a performance impact,
> or is it not worth worrying about?
>
> ISTM that we could avoid this by taking ControlFileLock with LW_SHARED mode
> when LocalMinRecoveryPoint is invalid, before proceeding to the existing path:
>
> Is this worthwhile, or overkill?
I agree that this is worth caring for. UpdateMinRecoveryPoint() has
always been written so as it is not a point of contention, so we
should about any unnecessary LWLock acquisitions if we can.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-12-04 02:59:05 | Re: Reapply graceful socket shutdown on Windows (revert 29992a6a509) |
| Previous Message | Shinya Kato | 2026-12-04 02:40:29 | Re: Speed up binary COPY TO by not allocating 1 kB per datum |