| From: | Robert Haas <rhaas(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Read from the same worker repeatedly until it returns no tuple. |
| Date: | 2015-12-23 19:12:38 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/bc7fcab5e36b9597857fa7e3fa6d9ba54aaea167
Modified Files
--------------
src/backend/executor/nodeGather.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2015-12-23 19:26:05 | pgsql: In pg_dump, remember connection passwords no matter how we got t |
| Previous Message | Robert Haas | 2015-12-23 18:43:33 | pgsql: Change Gather not to use a physical tlist. |