Re: WIP Patch: Pgbench Serialization and deadlock errors

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors
Date: 2017-07-14 12:06:10
Message-ID: alpine.DEB.2.20.1707141400480.20175@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> Note that there is something for psql (src/bin/psql/variable.c) which
>> may or may not be shared. It should be checked before recoding
>> eventually the same thing.
>
> Thank you very much for pointing this file! As I checked this is another
> structure: here there's a simple list, while in pgbench we should know
> if the list is sorted and the number of elements in the list. How do you
> think, is it a good idea to name a variables structure in pgbench in the
> same way (VariableSpace) or it should be different not to be confused
> (Variables, for example)?

Given that the number of variables of a pgbench script is expected to be
pretty small, I'm not sure that the sorting stuff is worth the effort.

My suggestion is really to look at both implementations and to answer the
question "should pgbench share its variable implementation with psql?".

If the answer is yes, then the relevant part of the implementation should
be moved to fe_utils, and that's it.

If the answer is no, then implement something in pgbench directly.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2017-07-14 12:17:50 Re: Proposal : For Auto-Prewarm.
Previous Message Fabien COELHO 2017-07-14 11:58:21 Re: WIP Patch: Pgbench Serialization and deadlock errors