| From: | "Tristan Partin" <tristan(at)partin(dot)io> |
|---|---|
| To: | "Peter Eisentraut" <peter(at)eisentraut(dot)org> |
| Cc: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, "Japin Li" <japinli(at)hotmail(dot)com> |
| Subject: | Re: Add counted_by attribute |
| Date: | 2026-10-06 20:41:12 |
| Message-ID: | DLY1OPBXGI77.UTU2G1WQ0IN1@partin.io |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon Oct 5, 2026 at 7:52 PM UTC, Peter Eisentraut wrote:
> Ok, all the infrastructure is in place now. I'm working through the
> attribute additions now.
>
> One thing to think about is that adding these attributes to server
> header files would also affect extensions. I think we might want to do
> some research about that. Like, is the normal API to fill in the
> structure yourself, or are there wrapper functions that are mandatory to
> use? I'm going to park that for the moment and work through the
> attribute additions in .c files first.
I have to think that extensions testing with
-fsanitize=bounds/_FORTIFY_SOURCE=3 is pretty rare. In any case, I did
some analysis (grepping and reading) on the list of structs exposed in
header files against 9 popular extensions (not in contrib), and I didn't
find any potential issues.
List of extensions that I looked at:
- PostGIS
- Citus
- TimescaleDB
- pgvector
- pg_cron
- pg_hint_plan
- pgaudit
- pg_repack
- pglogical
It seems like core does a good job of providing helper functions/macros
for creating objects of variable size, and downstream extensions do
a good job of making use of them.
If you have ideas that you would like me to try to help make you more
confident in committing, let me know.
Attached is a list of structs, in header files, that I added the
counted_by attribute to.
--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)
| Attachment | Content-Type | Size |
|---|---|---|
| counted_by_header_structs.csv | text/csv | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-10-06 20:55:50 | Re: Incremental backups report progress as if they were full backups |
| Previous Message | Matheus Alcantara | 2026-10-06 20:33:39 | Re: PG19: two RI fast-path issues found while testing the batching revert |