Re: pgbench - allow to create partitioned tables

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Asif Rehman <asifr(dot)rehman(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - allow to create partitioned tables
Date: 2019-09-26 20:57:54
Message-ID: alpine.DEB.2.21.1909262244440.7473@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Alvaro,

> pgbench's main() is overly long already, and the new code being added
> seems to pollute it even more. Can we split it out into a static
> function that gets placed, say, just below disconnect_all() or maybe
> after runInitSteps?

I agree that refactoring is a good idea, but I do not think it belongs to
this patch. The file is pretty long too, probably some functions could be
moved to distinct files (eg expression evaluation, variable management,
...).

> (Also, we seem to be afraid of function prototypes. Why not move the
> append_fillfactor() to *below* the functions that use it?)

Because we avoid one more line for the function prototype? I try to put
functions in def/use order if possible, especially for small functions
like this one.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2019-09-26 21:02:51 Re: Standby accepts recovery_target_timeline setting?
Previous Message Peter Eisentraut 2019-09-26 20:48:30 Re: Standby accepts recovery_target_timeline setting?