| From: | Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | [patch] bufmgr Half state CAS |
| Date: | 2026-10-08 20:03:15 |
| Message-ID: | CAE8JnxN3SPJxvAQZ7doESAHrfayx+AXUVr4c3RadApPONz00zQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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.
Regards,
Alexandre.
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0002-Using-half-state-CAS.patch | application/octet-stream | 11.9 KB |
| v1-0001-half-compare-exchange.patch | application/octet-stream | 6.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Corey Huinker | 2026-10-08 20:07:55 | Re: Credits For v19 |
| Previous Message | Daniel Gustafsson | 2026-10-08 20:03:01 | Re: [PG19]pg_verifybackup never finishes on a gzip-compressed tar backup |