Thread: pgsql: Tweak indexscan machinery to avoid taking an AccessShareLock on

pgsql: Tweak indexscan machinery to avoid taking an AccessShareLock on

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Tweak indexscan machinery to avoid taking an AccessShareLock on an index
if we already have a stronger lock due to the index's table being the
update target table of the query.  Same optimization I applied earlier
at the table level.  There doesn't seem to be much interest in the more
radical idea of not locking indexes at all, so do what we can ...

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        tuptoaster.c (r1.56 -> r1.57)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/tuptoaster.c.diff?r1=1.56&r2=1.57)
    pgsql/src/backend/access/index:
        genam.c (r1.51 -> r1.52)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/genam.c.diff?r1=1.51&r2=1.52)
        indexam.c (r1.86 -> r1.87)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/indexam.c.diff?r1=1.86&r2=1.87)
    pgsql/src/backend/catalog:
        catalog.c (r1.64 -> r1.65)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/catalog.c.diff?r1=1.64&r2=1.65)
    pgsql/src/backend/commands:
        cluster.c (r1.142 -> r1.143)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/cluster.c.diff?r1=1.142&r2=1.143)
    pgsql/src/backend/executor:
        execUtils.c (r1.130 -> r1.131)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execUtils.c.diff?r1=1.130&r2=1.131)
        nodeBitmapIndexscan.c (r1.13 -> r1.14)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeBitmapIndexscan.c.diff?r1=1.13&r2=1.14)
        nodeIndexscan.c (r1.108 -> r1.109)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeIndexscan.c.diff?r1=1.108&r2=1.109)
    pgsql/src/backend/storage/large_object:
        inv_api.c (r1.113 -> r1.114)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/large_object/inv_api.c.diff?r1=1.113&r2=1.114)
    pgsql/src/include/access:
        genam.h (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/genam.h.diff?r1=1.53&r2=1.54)
        relscan.h (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/relscan.h.diff?r1=1.42&r2=1.43)
    pgsql/src/include/executor:
        executor.h (r1.122 -> r1.123)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/executor.h.diff?r1=1.122&r2=1.123)