aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/common.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-12-23 14:06:52 -0500
committerRobert Haas <rhaas@postgresql.org>2015-12-23 14:06:52 -0500
commitbc7fcab5e36b9597857fa7e3fa6d9ba54aaea167 (patch)
treef4ad237cbb7a2e9dd153bbe02444c8812cc51de8 /src/bin/scripts/common.c
parent51d152f18e124cc07c293756cc16014ba218b2df (diff)
downloadpostgresql-bc7fcab5e36b9597857fa7e3fa6d9ba54aaea167.tar.gz
postgresql-bc7fcab5e36b9597857fa7e3fa6d9ba54aaea167.zip
Read from the same worker repeatedly until it returns no tuple.
The original coding read tuples from workers in round-robin fashion, but performance testing shows that it works much better to read enough to empty one queue before moving on to the next. I believe the reason for this is that, with the old approach, we could easily wake up a worker repeatedly to write only one new tuple into the shm_mq each time. With this approach, by the time the process gets scheduled, it has a decent chance of being able to fill the entire buffer in one go. Patch by me. Dilip Kumar helped with performance testing.
Diffstat (limited to 'src/bin/scripts/common.c')
0 files changed, 0 insertions, 0 deletions