Thinko in pgstat_build_snapshot() - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Thinko in pgstat_build_snapshot()
Date
Msg-id CAPmGK15eTRCZTnfgQ4EuBNo=QLYGFEbXS_7m2dXqtkcT7L8qrQ@mail.gmail.com
Whole thread Raw
Responses Re: Thinko in pgstat_build_snapshot()
List 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

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw
Next
From: Etsuro Fujita
Date:
Subject: Typo in comment for pgstat_database_flush_cb()