aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/regexp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-12 20:12:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-12 20:12:48 +0000
commit0d52d7a71efd0f090b62f3bfa77bd0060aa560d5 (patch)
tree8584b5bac7f46d29387f88931a4ce5bdbb985857 /src/backend/utils/adt/regexp.c
parent25a87d0f07f8db8c600e66dac84b97203fda8ef9 (diff)
downloadpostgresql-0d52d7a71efd0f090b62f3bfa77bd0060aa560d5.tar.gz
postgresql-0d52d7a71efd0f090b62f3bfa77bd0060aa560d5.zip
Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by postponing
pg_listener modifications commanded by LISTEN and UNLISTEN until the end of the current transaction. This allows us to hold the ExclusiveLock on pg_listener until after commit, with no greater risk of deadlock than there was before. Aside from fixing the race condition, this gets rid of a truly ugly kludge that was there before, namely having to ignore HeapTupleBeingUpdated failures during NOTIFY. There is a small potential incompatibility, which is that if a transaction issues LISTEN or UNLISTEN and then looks into pg_listener before committing, it won't see any resulting row insertion or deletion, where before it would have. It seems unlikely that anyone would be depending on that, though.
Diffstat (limited to 'src/backend/utils/adt/regexp.c')
0 files changed, 0 insertions, 0 deletions