Re: [FEATURE PATCH] pg_stat_statements with plans (v02)

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julian Markwort <julian(dot)markwort(at)uni-muenster(dot)de>, legrand legrand <legrand_legrand(at)hotmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, David Steele <david(at)pgmasters(dot)net>, marius(dot)timmer(at)uni-muenster(dot)de, arne(dot)scheffer(at)uni-muenster(dot)de
Subject: Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Date: 2018-08-20 03:21:07
Message-ID: CAEepm=3D3PZM_514NBiPymtrs9XNYndM5thPw7u4O_yA=5_MjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 20, 2018 at 2:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> As previously noted, that seems like a nice thing to allow ...
>
>> + pgssPlan *planArray[numPlans];
>> Can't use variable length arrays in C89.
>
> ... but I'm less excited about this one. Seems like a great opportunity
> for unexpected stack overflows, and thence at least the chance for
> DOS-causing security attacks. Can we prevent that from being allowed,
> if we start using -std=c99?

-Werror=vla in GCC, apparently.

Another problem with VLAs is that they aren't in C++ and last I heard
they aren't ever likely to be (at least not with that syntax). I'd rather not
introduce obstacles on that path.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuro Yamada 2018-08-20 03:30:29 Re: Fix help option of contrib/oid2name
Previous Message Michael Paquier 2018-08-20 03:13:32 Re: [HACKERS] GnuTLS support