postgresql/src/include/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
..
alter.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
async.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
cluster.h Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
comment.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
conversioncmds.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
copy.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
dbcommands.h Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
defrem.h Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
explain.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
lockcmds.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
portalcmds.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
prepare.h Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
proclang.h First batch of object rename commands. 2003-06-27 14:45:32 +00:00
schemacmds.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
sequence.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
tablecmds.h Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
tablespace.h Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
trigger.h Fire non-deferred AFTER triggers immediately upon query completion, 2004-09-10 18:40:09 +00:00
typecmds.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
user.h Restructure subtransaction handling to reduce resource consumption, 2004-09-16 16:58:44 +00:00
vacuum.h Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
variable.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
version.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00
view.h Update copyright to 2004. 2004-08-29 04:13:13 +00:00