Go to file
Tom Lane 48c192c15e Revise pgstat's tracking of tuple changes to improve the reliability of
decisions about when to auto-analyze.

The previous code depended on n_live_tuples + n_dead_tuples - last_anl_tuples,
where all three of these numbers could be bad estimates from ANALYZE itself.
Even worse, in the presence of a steady flow of HOT updates and matching
HOT-tuple reclamations, auto-analyze might never trigger at all, even if all
three numbers are exactly right, because n_dead_tuples could hold steady.

To fix, replace last_anl_tuples with an accurately tracked count of the total
number of committed tuple inserts + updates + deletes since the last ANALYZE
on the table.  This can still be compared to the same threshold as before, but
it's much more trustworthy than the old computation.  Tracking this requires
one more intra-transaction counter per modified table within backends, but no
additional memory space in the stats collector.  There probably isn't any
measurable speed difference; if anything it might be a bit faster than before,
since I was able to eliminate some per-tuple arithmetic operations in favor of
adding sums once per (sub)transaction.

Also, simplify the logic around pgstat vacuum and analyze reporting messages
by not trying to fold VACUUM ANALYZE into a single pgstat message.

The original thought behind this patch was to allow scheduling of analyzes
on parent tables by artificially inflating their changes_since_analyze count.
I've left that for a separate patch since this change seems to stand on its
own merit.
2009-12-30 20:32:14 +00:00
config Python 3 support in PL/Python 2009-12-15 22:59:55 +00:00
contrib Previous fix for temporary file management broke returning a set from 2009-12-29 17:40:59 +00:00
doc Revert makefile refactoring (version 1.123) because it doesn't work 2009-12-30 13:48:52 +00:00
src Revise pgstat's tracking of tuple changes to improve the reliability of 2009-12-30 20:32:14 +00:00
aclocal.m4 Add new auto-detection of thread flags. 2004-04-23 18:15:55 +00:00
configure Python 3 support in PL/Python 2009-12-15 22:59:55 +00:00
configure.in Properly define ENABLE_THREAD_SAFETY in conflgure, per suggestion from Peter. 2009-12-11 02:21:21 +00:00
COPYRIGHT Update copyright for 2009. 2009-01-01 17:24:05 +00:00
GNUmakefile.in Build bzip2 tarball in dist target as well 2009-11-03 21:28:10 +00:00
Makefile Revert brainfart: Of course the wildcard only works in GNU make itself. 2009-12-23 19:42:15 +00:00
README Point to our download URL, rather than listing interface in the README 2008-05-06 22:02:12 +00:00
README.CVS Fix the makefiles to fail cleanly if Perl is needed but not present. This 2009-06-23 03:46:00 +00:00

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains C language bindings.

PostgreSQL has many language interfaces, many of which are listed here:

	http://www.postgresql.org/download

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
http://www.postgresql.org/download/.  For more information look at our
web site located at http://www.postgresql.org/.