Thread: pgsql-server: Invent ResourceOwner mechanism as per my recent proposal,
pgsql-server: Invent ResourceOwner mechanism as per my recent proposal,
From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message: ----------- Invent ResourceOwner mechanism as per my recent proposal, and use it to keep track of portal-related resources separately from transaction-related resources. This allows cursors to work in a somewhat sane fashion with nested transactions. For now, cursor behavior is non-subtransactional, that is a cursor's state does not roll back if you abort a subtransaction that fetched from the cursor. We might want to change that later. Modified Files: -------------- pgsql-server/contrib/userlock: user_locks.c (r1.12 -> r1.13) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/contrib/userlock/user_locks.c.diff?r1=1.12&r2=1.13) pgsql-server/src/backend/access/gist: gistscan.c (r1.52 -> r1.53) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/gist/gistscan.c.diff?r1=1.52&r2=1.53) pgsql-server/src/backend/access/hash: hashscan.c (r1.34 -> r1.35) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/hash/hashscan.c.diff?r1=1.34&r2=1.35) pgsql-server/src/backend/access/nbtree: nbtree.c (r1.118 -> r1.119) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/nbtree/nbtree.c.diff?r1=1.118&r2=1.119) pgsql-server/src/backend/access/rtree: rtscan.c (r1.52 -> r1.53) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/rtree/rtscan.c.diff?r1=1.52&r2=1.53) pgsql-server/src/backend/access/transam: xact.c (r1.170 -> r1.171) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/transam/xact.c.diff?r1=1.170&r2=1.171) pgsql-server/src/backend/bootstrap: bootparse.y (r1.70 -> r1.71) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/bootstrap/bootparse.y.diff?r1=1.70&r2=1.71) bootstrap.c (r1.186 -> r1.187) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/bootstrap/bootstrap.c.diff?r1=1.186&r2=1.187) pgsql-server/src/backend/catalog: pg_proc.c (r1.116 -> r1.117) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/catalog/pg_proc.c.diff?r1=1.116&r2=1.117) pgsql-server/src/backend/commands: portalcmds.c (r1.28 -> r1.29) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/commands/portalcmds.c.diff?r1=1.28&r2=1.29) pgsql-server/src/backend/storage/buffer: bufmgr.c (r1.172 -> r1.173) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/buffer/bufmgr.c.diff?r1=1.172&r2=1.173) localbuf.c (r1.56 -> r1.57) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/buffer/localbuf.c.diff?r1=1.56&r2=1.57) pgsql-server/src/backend/storage/lmgr: lock.c (r1.134 -> r1.135) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/lmgr/lock.c.diff?r1=1.134&r2=1.135) proc.c (r1.149 -> r1.150) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/lmgr/proc.c.diff?r1=1.149&r2=1.150) pgsql-server/src/backend/storage/smgr: smgr.c (r1.76 -> r1.77) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/smgr/smgr.c.diff?r1=1.76&r2=1.77) pgsql-server/src/backend/tcop: postgres.c (r1.423 -> r1.424) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/tcop/postgres.c.diff?r1=1.423&r2=1.424) pquery.c (r1.80 -> r1.81) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/tcop/pquery.c.diff?r1=1.80&r2=1.81) pgsql-server/src/backend/utils: Makefile (r1.22 -> r1.23) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/Makefile.diff?r1=1.22&r2=1.23) pgsql-server/src/backend/utils/cache: catcache.c (r1.113 -> r1.114) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/cache/catcache.c.diff?r1=1.113&r2=1.114) relcache.c (r1.206 -> r1.207) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/cache/relcache.c.diff?r1=1.206&r2=1.207) pgsql-server/src/backend/utils/mmgr: portalmem.c (r1.66 -> r1.67) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/mmgr/portalmem.c.diff?r1=1.66&r2=1.67) pgsql-server/src/include/access: gistscan.h (r1.23 -> r1.24) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/gistscan.h.diff?r1=1.23&r2=1.24) hash.h (r1.55 -> r1.56) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/hash.h.diff?r1=1.55&r2=1.56) nbtree.h (r1.79 -> r1.80) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/nbtree.h.diff?r1=1.79&r2=1.80) rtree.h (r1.33 -> r1.34) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/rtree.h.diff?r1=1.33&r2=1.34) xact.h (r1.64 -> r1.65) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/xact.h.diff?r1=1.64&r2=1.65) pgsql-server/src/include/commands: portalcmds.h (r1.14 -> r1.15) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/commands/portalcmds.h.diff?r1=1.14&r2=1.15) pgsql-server/src/include/storage: bufmgr.h (r1.83 -> r1.84) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/bufmgr.h.diff?r1=1.83&r2=1.84) lock.h (r1.78 -> r1.79) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/lock.h.diff?r1=1.78&r2=1.79) proc.h (r1.68 -> r1.69) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/proc.h.diff?r1=1.68&r2=1.69) smgr.h (r1.45 -> r1.46) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/smgr.h.diff?r1=1.45&r2=1.46) pgsql-server/src/include/utils: catcache.h (r1.49 -> r1.50) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/catcache.h.diff?r1=1.49&r2=1.50) portal.h (r1.49 -> r1.50) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/portal.h.diff?r1=1.49&r2=1.50) rel.h (r1.75 -> r1.76) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/rel.h.diff?r1=1.75&r2=1.76) relcache.h (r1.41 -> r1.42) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/relcache.h.diff?r1=1.41&r2=1.42) pgsql-server/src/test/regress/expected: transactions.out (r1.5 -> r1.6) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/expected/transactions.out.diff?r1=1.5&r2=1.6) pgsql-server/src/test/regress/sql: transactions.sql (r1.5 -> r1.6) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/sql/transactions.sql.diff?r1=1.5&r2=1.6) Added Files: ----------- pgsql-server/src/backend/utils/resowner: Makefile (r1.1) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/resowner/Makefile?rev=1.1&content-type=text/x-cvsweb-markup) README (r1.1) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/resowner/README?rev=1.1&content-type=text/x-cvsweb-markup) resowner.c (r1.1) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/resowner/resowner.c?rev=1.1&content-type=text/x-cvsweb-markup) pgsql-server/src/include/utils: resowner.h (r1.1) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/resowner.h?rev=1.1&content-type=text/x-cvsweb-markup)