From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Thinko in pgstat_build_snapshot() |
Date: | 2025-03-30 10:23:29 |
Message-ID: | CAPmGK15eTRCZTnfgQ4EuBNo=QLYGFEbXS_7m2dXqtkcT7L8qrQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While working on something else I noticed $SUBJECT: we are allocating
more memory than necessary and copying more data than necessary
because we specify the wrong PgStat_KindInfo member as the size
argument for MemoryContextAlloc and memcpy. This could become
problematic if snapshotting a very large number of variables stats, so
I fixed it. Attached is a patch for that.
Best regards,
Etsuro Fujita
Attachment | Content-Type | Size |
---|---|---|
fix-thinko-in-pgstat_build_snapshot.patch | application/octet-stream | 788 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2025-03-30 10:28:07 | Typo in comment for pgstat_database_flush_cb() |
Previous Message | Etsuro Fujita | 2025-03-30 10:14:01 | Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw |