aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-09-30 23:32:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-09-30 23:32:23 -0400
commit8c8a834b14712de5252858aebbd4c5900c105c78 (patch)
tree6149a23adfc79e9fdb7cbf72e0627fb6f031e3da /src/backend/regex/regexec.c
parent91d97f03ca2a9ed56b322b69dde0392db835f722 (diff)
downloadpostgresql-8c8a834b14712de5252858aebbd4c5900c105c78.tar.gz
postgresql-8c8a834b14712de5252858aebbd4c5900c105c78.zip
Improve LISTEN startup time when there are many unread notifications.
If some existing listener is far behind, incoming new listener sessions would start from that session's read pointer and then need to advance over many already-committed notification messages, which they have no interest in. This was expensive in itself and also thrashed the pg_notify SLRU buffers a lot more than necessary. We can improve matters considerably in typical scenarios, without much added cost, by starting from the furthest-ahead read pointer, not the furthest-behind one. We do have to consider only sessions in our own database when doing this, which requires an extra field in the data structure, but that's a pretty small cost. Back-patch to 9.0 where the current LISTEN/NOTIFY logic was introduced. Matt Newell, slightly adjusted by me
Diffstat (limited to 'src/backend/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions