postgresql/src/backend/commands
Tom Lane 8f9f198603 Restructure subtransaction handling to reduce resource consumption,
as per recent discussions.  Invent SubTransactionIds that are managed like
CommandIds (ie, counter is reset at start of each top transaction), and
use these instead of TransactionIds to keep track of subtransaction status
in those modules that need it.  This means that a subtransaction does not
need an XID unless it actually inserts/modifies rows in the database.
Accordingly, don't assign it an XID nor take a lock on the XID until it
tries to do that.  This saves a lot of overhead for subtransactions that
are only used for error recovery (eg plpgsql exceptions).  Also, arrange
to release a subtransaction's XID lock as soon as the subtransaction
exits, in both the commit and abort cases.  This avoids holding many
unique locks after a long series of subtransactions.  The price is some
additional overhead in XactLockTableWait, but that seems acceptable.
Finally, restructure the state machine in xact.c to have a more orthogonal
set of states for subtransactions.
2004-09-16 16:58:44 +00:00
..
Makefile Tablespaces. Alternate database locations are dead, long live tablespaces. 2004-06-18 06:14:31 +00:00
aggregatecmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
alter.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
analyze.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
async.c Renumber SnapshotNow and the other special snapshot codes so that 2004-09-11 18:28:34 +00:00
cluster.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
comment.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
conversioncmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
copy.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
dbcommands.c Dept. of second thoughts: it'd be a good idea to flush buffers 2004-08-30 03:50:24 +00:00
define.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
explain.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
functioncmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
indexcmds.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
lockcmds.c Update copyright to 2004. 2004-08-29 04:13:13 +00:00
opclasscmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
operatorcmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
portalcmds.c Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
prepare.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
proclang.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
schemacmds.c Remove obsolete comment. 2004-09-02 00:22:16 +00:00
sequence.c Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
tablecmds.c Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
tablespace.c Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
trigger.c Fire non-deferred AFTER triggers immediately upon query completion, 2004-09-10 18:40:09 +00:00
typecmds.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
user.c Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
vacuum.c Redesign query-snapshot timing so that volatile functions in READ COMMITTED 2004-09-13 20:10:13 +00:00
vacuumlazy.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
variable.c Code review for various recent GUC hacking. Don't elog(ERROR) when 2004-08-31 19:28:51 +00:00
view.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00