Re: Centralizing protective copying of utility statements
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-06-17T19:23:00Z
Lists: pgsql-hackers
Hi, On 2021-06-16 21:39:49 -0400, Tom Lane wrote: > Although this adds some overhead in the form of copying of > utility node trees that won't actually mutate during execution, > I think that won't be too bad because those trees tend to be > small and hence cheap to copy. The statements that can have > a lot of substructure usually contain expression trees or the > like, which do have to be copied for safety. Moreover, we buy > back a lot of cost by removing pointless copying when we're > not executing on a cached plan. Have you evaluated the cost in some form? I don't think it a relevant cost for most utility statements, but there's a few exceptions that *do* worry me. In particular, in some workloads transaction statements are very frequent. Greetings, Andres Freund
Commits
-
Avoid scribbling on input node tree in CREATE/ALTER DOMAIN.
- f172438ef6ff 10.18 landed
- b2c740c426da 12.8 landed
- 4b8b3562e1e6 11.13 landed
- 1a3d30255a4e 9.6.23 landed
- 102f31a208b8 13.4 landed
-
Centralize the logic for protective copying of utility statements.
- 7c337b6b527b 14.0 landed