Skip site navigation (1) Skip section navigation (2)

Re: pgbench internal contention

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench internal contention
Date: 2011-08-01 15:26:59
Message-ID: 25472.1312212419@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> If I'm reading the code right, it only modifies __libc_drand48_data on
> first call, so as long as we called erand48() at least once before
> spawning the child threads, it would probably work.  That seems pretty
> fragile in the face of the fact that they explicitly state that
> they're modifying the global random generator state and that you
> should use erand48_r() if you want reentrant behavior.  So I think if
> we're going to go the erand48() route we probably ought to force
> pgbench to always use our version rather than any OS-supplied version.

Or add erand48_r() to our version and use that.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-08-01 15:33:45
Subject: Re: pgbench internal contention
Previous:From: Simon RiggsDate: 2011-08-01 15:25:01
Subject: Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group