| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Remove unused struct fields |
| Date: | 2025-11-26 14:54:48 |
| Message-ID: | aScUuBSawPWogUxs@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
Here are a few fields that are not used.
1) username in scram_state:
Added and used in 818fd4a67d61.
Usage removed in f3049a603a7.
2) mask in PgAioWorkerSubmissionQueue:
Added in and not used since 247ce06b883d.
3) write_page in SharedTuplestoreAccessor:
Added in and not used since ab9e0e718acb.
Those have been found with a coccinelle script [1].
Note that it generates a lot of false positives and requires careful manual
review. I'll try to improve it if time permits.
[1]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/misc/unused_struct_fields.cocci
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Remove-unused-struct-fields.patch | text/x-diff | 2.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2025-11-26 15:01:07 | Re: Remove unused struct fields |
| Previous Message | Andres Freund | 2025-11-26 14:44:51 | Re: macOS - Sequoia CI task is stuck on the Postgres Github CI |