pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-hackers@postgresql.org, Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date: Wed, 08 Aug 2018 11:02:01 +0300
Message-ID: <58a619e0ba711cda355d152241430d4f@postgrespro.ru> (raw )
In-Reply-To: <alpine.DEB.2.21.1808071814380.13466@lancre >
References: <20180508193621.dphlgwrd5yz67o2z@alvherre.pgsql >
<0569c5309cf536a839e2a3a1433bd113@postgrespro.ru >
<alpine.DEB.2.21.1807091451520.17811@lancre >
<a6299efa310e1d106144f761259f4fd6@postgrespro.ru >
<alpine.DEB.2.21.1807111435250.27883@lancre >
<976a25a46420c93866ada4051976b1be@postgrespro.ru >
<alpine.DEB.2.21.1807112124210.27883@lancre >
<f153ffd55f481d714ee44afc99ecc67e@postgrespro.ru >
<alpine.DEB.2.21.1807121801250.27883@lancre >
<25d7b1f518c218a8c335bdfc6c858ea1@postgrespro.ru >
<alpine.DEB.2.21.1808071814380.13466@lancre >
On 07-08-2018 19:21, Fabien COELHO wrote:
> Hello Marina,
Hello, Fabien!
>> v10-0001-Pgbench-errors-use-the-RandomState-structure-for.patch
>> - a patch for the RandomState structure (this is used to reset a
>> client's random seed during the repeating of transactions after
>> serialization/deadlock failures).
>
> About this v10 part 1:
>
> Patch applies cleanly, compile, global & local make check both ok.
>
> The random state is cleanly separated so that it will be easy to reset
> it on client error handling ISTM that the pgbench side is
> deterministic with
> the separation of the seeds for different uses.
>
> Code is clean, comments are clear.
:-)
> I'm wondering what is the rational for the "xseed" field name? In
> particular, what does the "x" stands for?
I called it "...seed" instead of "data" because perhaps the "data" is
too general a name for use here (but I'm not entirely sure what Alvaro
Herrera meant in [1], see my answer in [2]). I called it "xseed" to
combine it with the arguments of the functions _dorand48 / pg_erand48 /
pg_jrand48 in the file erand48.c. IIUC they use a linear congruential
generator and perhaps "xseed" means the sequence with the name X of
pseudorandom values of size 48 bits (X_0, X_1, ... X_n) where X_0 is the
seed / the start value.
[1]
https://www.postgresql.org/message-id/20180711180417.3ytmmwmonsr5lra7@alvherre.pgsql
> LGTM, though I'd rename the random_state struct members so that it
> wouldn't look as confusing. Maybe that's just me.
[2]
https://www.postgresql.org/message-id/cb2cde10e4e7a10a38b48e9cae8fbd28%40postgrespro.ru
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
view thread (137+ messages) latest in thread
Message-ID: <58a619e0ba711cda355d152241430d4f@postgrespro.ru>
Permalink: ../58a619e0ba711cda355d152241430d4f@postgrespro.ru/
Also on: postgresql.org/message-id/58a619e0ba711cda355d152241430d4f@postgrespro.ru
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: m.polyakova@postgrespro.ru, coelho@cri.ensmp.fr, alvherre@2ndquadrant.com, i.kurbangaliev@postgrespro.ru, teodor@sigaev.ru
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
In-Reply-To: <58a619e0ba711cda355d152241430d4f@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox