Re: pgbench - refactor init functions with buffers - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgbench - refactor init functions with buffers
Date
Msg-id 20200328015226.GA4711@alvherre.pgsql
Whole thread Raw
In response to Re: pgbench - refactor init functions with buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgbench - refactor init functions with buffers  (David Steele <david@pgmasters.net>)
List pgsql-hackers
On 2020-Mar-27, Tom Lane wrote:

> That being the case, I'd think a better design principle is "make your
> new code look like the code around it", which would tend to weigh against
> introducing StringInfo uses into pgbench when there's none there now and
> a bunch of PQExpBuffer instead.  So I can't help thinking the advice
> you're being given here is suspect.

+1 for keeping it PQExpBuffer-only, until such a time when you need a
StringInfo feature that's not in PQExpBuffer -- and even at that point,
I think you'd switch just that one thing to StringInfo, not the whole
program.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM
Next
From: James Coleman
Date:
Subject: Re: Make mesage at end-of-recovery less scary.