| From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
|---|---|
| To: | Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [patch] bufmgr Half state CAS |
| Date: | 2026-10-09 22:39:55 |
| Message-ID: | 5ba2846d-cb1c-4411-868a-357f0d9391ea@iki.fi |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 08/10/2026 23:03, Alexandre Felipe wrote:
> Currently Buffer header state is a 64-bit, but it is conceptually a bit
> field structure.
> The CAS loops care about only some of those bits, however by operating
> on a 64-bit structure unrelated field changes will cause a retry.
>
> The atomic operations don't support a comparison mask, but in this case
> we can at least CAS 32-bit, low and high half separately, reducing the
> likelihood
> of retrial.
Got benchmarks? I seriously doubt that you'd see any performance benefit
from this. I wouldn't be surprised if this was even slower.
- Heikki
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ahmed | 2026-10-09 22:42:02 | Re: Use instr_time for pg_stat_database block read/write time counters |
| Previous Message | Heikki Linnakangas | 2026-10-09 22:21:38 | Re: Fix a wal_debug crash with the new shmem allocation API |