postgresql/src/backend
Tom Lane 895a94de6d Avoid incrementing the CommandCounter when CommandCounterIncrement is called
but no database changes have been made since the last CommandCounterIncrement.
This should result in a significant improvement in the number of "commands"
that can typically be performed within a transaction before hitting the 2^32
CommandId size limit.  In particular this buys back (and more) the possible
adverse consequences of my previous patch to fix plan caching behavior.

The implementation requires tracking whether the current CommandCounter
value has been "used" to mark any tuples.  CommandCounter values stored into
snapshots are presumed not to be used for this purpose.  This requires some
small executor changes, since the executor used to conflate the curcid of
the snapshot it was using with the command ID to mark output tuples with.
Separating these concepts allows some small simplifications in executor APIs.

Something for the TODO list: look into having CommandCounterIncrement not do
AcceptInvalidationMessages.  It seems fairly bogus to be doing it there,
but exactly where to do it instead isn't clear, and I'm disinclined to mess
with asynchronous behavior during late beta.
2007-11-30 21:22:54 +00:00
..
access Avoid incrementing the CommandCounter when CommandCounterIncrement is called 2007-11-30 21:22:54 +00:00
bootstrap pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
catalog Install a lookaside cache to speed up repeated lookups of the same operator 2007-11-28 18:47:56 +00:00
commands Avoid incrementing the CommandCounter when CommandCounterIncrement is called 2007-11-30 21:22:54 +00:00
executor Avoid incrementing the CommandCounter when CommandCounterIncrement is called 2007-11-30 21:22:54 +00:00
lib pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
libpq Fix typo 2007-11-28 13:30:16 +00:00
main pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
nodes Re-run pgindent with updated list of typedefs. (Updated README should 2007-11-15 22:25:18 +00:00
optimizer Save another little bit of planner overhead on simple queries, by having 2007-11-24 19:08:51 +00:00
parser Install a lookaside cache to speed up repeated lookups of the same operator 2007-11-28 18:47:56 +00:00
po Translation updates 2007-11-29 08:50:36 +00:00
port Re-run pgindent with updated list of typedefs. (Updated README should 2007-11-15 22:25:18 +00:00
postmaster Reduce routine successful-archiving message from LOG to DEBUG1 grade, 2007-11-24 21:37:04 +00:00
regex pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
rewrite Small comment spacing improvement. 2007-11-16 01:51:22 +00:00
snowball Re-run pgindent with updated list of typedefs. (Updated README should 2007-11-15 22:25:18 +00:00
storage Avoid incrementing the CommandCounter when CommandCounterIncrement is called 2007-11-30 21:22:54 +00:00
tcop Re-run pgindent with updated list of typedefs. (Updated README should 2007-11-15 22:25:18 +00:00
tsearch Make a cleanup pass over error reports in tsearch code. Use ereport 2007-11-28 21:56:30 +00:00
utils Avoid incrementing the CommandCounter when CommandCounterIncrement is called 2007-11-30 21:22:54 +00:00
Makefile Tsearch2 functionality migrates to core. The bulk of this work is by 2007-08-21 01:11:32 +00:00
nls.mk Add _ to gettext triggers. Must have been forgotten here when it was introduced. 2005-10-04 11:14:03 +00:00