Re: Thinko in pgstat_build_snapshot()

2025-04-06 Thread Etsuro Fujita
On Sun, Mar 30, 2025 at 10:47 PM Gurjeet Singh wrote: > On Sun, Mar 30, 2025 at 4:31 AM Heikki Linnakangas wrote: > > On 30/03/2025 13:23, Etsuro Fujita wrote: > > > While working on something else I noticed $SUBJECT: we are allocating > > > more memory than necessary and copying more data than n

Re: Thinko in pgstat_build_snapshot()

2025-03-30 Thread Gurjeet Singh
On Sun, Mar 30, 2025 at 4:31 AM Heikki Linnakangas wrote: > > On 30/03/2025 13:23, Etsuro Fujita wrote: > > 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 mem

Re: Thinko in pgstat_build_snapshot()

2025-03-30 Thread Heikki Linnakangas
On 30/03/2025 13:23, Etsuro Fujita wrote: 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 b