forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6b45e3b
committed
Arrange to generate different random sequences in the different child
processes of a pgbench run, when we are using -j > 1 and are emulatingthreads via fork(). Otherwise the children all inherit the same randomsequence state and produce the same random-number sequence.In the threaded case the different threads will share one RNG state, sothey will produce different subsets of one sequence, which is maybe morecorrelated than a purist would like but will not be "the same". So weleave that case alone.First noticed by Takahiro Itagaki, and is also part of the explanationfor the pgbench misbehavior recently reported by Jaime Casanova.1 parentd8e511f commit6b45e3b
1 file changed
+16
-4
lines changedLines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
1916 | 1916 |
| |
1917 | 1917 |
| |
1918 | 1918 |
| |
1919 |
| - | |
| 1919 | + | |
1920 | 1920 |
| |
1921 | 1921 |
| |
1922 | 1922 |
| |
| |||
2201 | 2201 |
| |
2202 | 2202 |
| |
2203 | 2203 |
| |
| 2204 | + | |
2204 | 2205 |
| |
2205 | 2206 |
| |
2206 | 2207 |
| |
| |||
2211 | 2212 |
| |
2212 | 2213 |
| |
2213 | 2214 |
| |
2214 |
| - | |
| 2215 | + | |
2215 | 2216 |
| |
2216 | 2217 |
| |
2217 | 2218 |
| |
2218 | 2219 |
| |
2219 | 2220 |
| |
2220 | 2221 |
| |
2221 |
| - | |
| 2222 | + | |
2222 | 2223 |
| |
2223 | 2224 |
| |
2224 | 2225 |
| |
2225 | 2226 |
| |
2226 | 2227 |
| |
2227 | 2228 |
| |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
2228 | 2240 |
| |
2229 | 2241 |
| |
2230 | 2242 |
| |
|
0 commit comments
Comments
(0)