Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date
Msg-id alpine.DEB.2.20.1707141400480.20175@lancre
Whole thread Raw
In response to Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors  (Marina Polyakova <m.polyakova@postgrespro.ru>)
Responses Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
List 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.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Next
From: Mithun Cy
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.