aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-06-07 15:34:30 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-06-07 15:34:30 -0400
commit5c3b5f7db6cee574488dfbb9462f0eb6090315b9 (patch)
tree678ac1a62839da6cdc425589f66651dd4282cd3b /src/tutorial/basics.source
parent32a85ee46b034be7b8bf8f31b24cf6fe3684fe7f (diff)
downloadpostgresql-5c3b5f7db6cee574488dfbb9462f0eb6090315b9.tar.gz
postgresql-5c3b5f7db6cee574488dfbb9462f0eb6090315b9.zip
Fix off-by-one loop termination condition in pg_stat_get_subscription().
pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems quite unlikely though (thanks to the ordering of calls in CreateSharedMemoryAndSemaphores) and we've heard no field reports of it. A more likely misbehavior is one row of garbage data in the function's result, but even that is not real likely because of the check that the pid field matches some live backend. Report and fix by Kuntal Ghosh. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/CAGz5QCJykEDzW6jQK6Yz7Qh_PMtD=95de_7QoocbVR2Qy8hWZA@mail.gmail.com
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions