postgresql/src/backend/commands
Tom Lane a2e923a652 Fix dynahash.c to suppress hash bucket splits while a hash_seq_search() scan
is in progress on the same hashtable.  This seems the least invasive way to
fix the recently-recognized problem that a split could cause the scan to
visit entries twice or (with much lower probability) miss them entirely.
The only field-reported problem caused by this is the "failed to re-find
shared lock object" PANIC in COMMIT PREPARED reported by Michel Dorochevsky,
which was caused by multiply visited entries.  However, it seems certain
that mdsync() is vulnerable to missing required fsync's due to missed
entries, and I am fearful that RelationCacheInitializePhase2() might be at
risk as well.  Because of that and the generalized hazard presented by this
bug, back-patch all the supported branches.

Along the way, fix pg_prepared_statement() and pg_cursor() to not assume
that the hashtables they are examining will stay static between calls.
This is risky regardless of the newly noted dynahash problem, because
hash_seq_search() has never promised to cope with deletion of table entries
other than the just-returned one.  There may be no bug here because the only
supported way to call these functions is via ExecMakeTableFunctionResult()
which will cycle them to completion before doing anything very interesting,
but it seems best to get rid of the assumption.  This affects 8.2 and HEAD
only, since those functions weren't there earlier.
2007-04-26 23:24:46 +00:00
..
Makefile Rename the newly-added commands for discarding session state. 2007-04-26 16:13:15 +00:00
aggregatecmds.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
alter.c Allow non-superuser database owners to create procedural languages. 2007-03-26 16:58:41 +00:00
analyze.c Silence compiler warnings, per Bruce. 2007-04-19 16:26:44 +00:00
async.c RESET SESSION, plus related new DDL commands. Patch from Marko Kreen, 2007-04-12 06:53:49 +00:00
cluster.c Make CLUSTER MVCC-safe. Heikki Linnakangas 2007-04-08 01:26:33 +00:00
comment.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
conversioncmds.c Fix up foreign-key mechanism so that there is a sound semantic basis for the 2007-02-14 01:58:58 +00:00
copy.c Update docs/error message for CSV quote/escape --- must be ASCII. 2007-04-18 02:28:22 +00:00
dbcommands.c Cancel pending fsync requests during WAL replay of DROP DATABASE, per bug 2007-04-12 15:04:35 +00:00
define.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
discard.c Rename the newly-added commands for discarding session state. 2007-04-26 16:13:15 +00:00
explain.c Expose more cursor-related functionality in SPI: specifically, allow 2007-04-16 01:14:58 +00:00
functioncmds.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
indexcmds.c First phase of plan-invalidation project: create a plan cache management 2007-03-13 00:33:44 +00:00
lockcmds.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
opclasscmds.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
operatorcmds.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
portalcmds.c Expose more cursor-related functionality in SPI: specifically, allow 2007-04-16 01:14:58 +00:00
prepare.c Fix dynahash.c to suppress hash bucket splits while a hash_seq_search() scan 2007-04-26 23:24:46 +00:00
proclang.c Allow non-superuser database owners to create procedural languages. 2007-03-26 16:58:41 +00:00
schemacmds.c Fix plancache so that any required replanning is done with the same 2007-03-23 19:53:52 +00:00
sequence.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
tablecmds.c Make CLUSTER MVCC-safe. Heikki Linnakangas 2007-04-08 01:26:33 +00:00
tablespace.c Allow DROP TABLESPACE to succeed (with a warning) if the pg_tblspc symlink 2007-03-22 19:51:44 +00:00
trigger.c Changes pg_trigger and extend pg_rewrite in order to allow triggers and 2007-03-19 23:38:32 +00:00
typecmds.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
user.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
vacuum.c Add a multi-worker capability to autovacuum. This allows multiple worker 2007-04-16 18:30:04 +00:00
vacuumlazy.c Silence compiler warnings, per Bruce. 2007-04-19 16:26:44 +00:00
variable.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
view.c First phase of plan-invalidation project: create a plan cache management 2007-03-13 00:33:44 +00:00