postgresql/src/backend
Tom Lane 9513918c6c Fix up flushing of composite-type typcache entries to be driven directly by
SI invalidation events, rather than indirectly through the relcache.

In the previous coding, we had to flush a composite-type typcache entry
whenever we discarded the corresponding relcache entry.  This caused problems
at least when testing with RELCACHE_FORCE_RELEASE, as shown in recent report
from Jeff Davis, and might result in real-world problems given the kind of
unexpected relcache flush that that test mechanism is intended to model.

The new coding decouples relcache and typcache management, which is a good
thing anyway from a structural perspective.  The cost is that we have to
search the typcache linearly to find entries that need to be flushed.  There
are a couple of ways we could avoid that, but at the moment it's not clear
it's worth any extra trouble, because the typcache contains very few entries
in typical operation.

Back-patch to 8.2, the same as some other recent fixes in this general area.
The patch could be carried back to 8.0 with some additional work, but given
that it's only hypothetical whether we're fixing any problem observable in
the field, it doesn't seem worth the work now.
2010-09-02 03:16:46 +00:00
..
access Fix oversight in RelFileNodeBackend patch: CreateFakeRelcacheEntry needs to 2010-08-30 16:46:23 +00:00
bootstrap CREATE TABLE IF NOT EXISTS. 2010-07-25 23:21:22 +00:00
catalog Fix typo. Pointed out by Kevin Grittner. 2010-09-02 02:52:14 +00:00
commands Rewrite comment code for better modularity, and add necessary locking. 2010-08-27 11:47:41 +00:00
executor Fix ExecMakeTableFunctionResult to verify that all rows returned by a SRF 2010-08-26 18:54:37 +00:00
foreign Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
lib pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
libpq Document the existence of the socket lock file under unix_socket_directory, 2010-08-26 22:00:19 +00:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Small refactoring of makeVar() from a TargetEntry 2010-08-27 20:30:08 +00:00
optimizer Small refactoring of makeVar() from a TargetEntry 2010-08-27 20:30:08 +00:00
parser Small refactoring of makeVar() from a TargetEntry 2010-08-27 20:30:08 +00:00
po Translation updates for 9.0beta3 2010-07-08 21:32:28 +00:00
port Improve hint message for ENOMEM failure from shmget(). 2010-08-25 20:10:55 +00:00
postmaster Add vacuum and analyze counters to pg_stat_*_tables views. 2010-08-21 10:59:17 +00:00
regex Tweak a couple of macros in the regex code to suppress compiler warnings 2010-08-02 02:29:39 +00:00
replication Add missing function prototype. 2010-07-22 13:03:11 +00:00
rewrite Standardize get_whatever_oid functions for other object types. 2010-08-05 15:25:36 +00:00
snowball Remove extra newlines at end and beginning of files, add missing newlines 2010-08-19 05:57:36 +00:00
storage Cosmetic fixes for KnownAssignedXidsGetOldestXmin, per Fujii Masao. 2010-08-30 17:30:44 +00:00
tcop Fix failure of "ALTER TABLE t ADD COLUMN c serial" when done by non-owner. 2010-08-18 18:35:21 +00:00
tsearch Remove extra newlines at end and beginning of files, add missing newlines 2010-08-19 05:57:36 +00:00
utils Fix up flushing of composite-type typcache entries to be driven directly by 2010-09-02 03:16:46 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
Makefile Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00