Commit Graph

16 Commits

Author SHA1 Message Date
Tom Lane 0914ae1c14 Remove the pgstats logic for delaying destruction of stats table entries.
Per recent discussion, this seems to be making the stats less accurate
rather than more so, particularly on Windows where PID values may be
reused very quickly.  Patch by Peter Brant.
2006-04-06 20:38:00 +00:00
Tom Lane e6107da53c Turn off zero_damaged_pages in the right place (ie, in the autovac
process not in the postmaster) and with the right GucSource (needs to
be a nontransactional source since we've not started an xact yet).
2006-03-07 17:32:22 +00:00
Bruce Momjian 8d51c276ca Use SetConfigOption() to turn off "zero_damaged_pages" in autovacuum. 2006-03-07 03:03:09 +00:00
Bruce Momjian 4c63b1f88e Prevent autovacuum from zeroing damaged pages. 2006-03-06 05:14:19 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Tom Lane 413d492d32 Fix thinko in autovacuum's test to skip temp tables: want to skip any
temp table not only our own process' tables.  It's not real important
since vacuum.c will skip temp tables anyway, but might as well make the
code do what it claims to do.
2006-01-20 15:16:56 +00:00
Tom Lane d5db3abfb6 Modify pgstats code to reduce performance penalties from oversized stats data
files: avoid creating stats hashtable entries for tables that aren't being
touched except by vacuum/analyze, ensure that entries for dropped tables are
removed promptly, and tweak the data layout to avoid storing useless struct
padding.  Also improve the performance of pgstat_vacuum_tabstat(), and make
sure that autovacuum invokes it exactly once per autovac cycle rather than
multiple times or not at all.  This should cure recent complaints about 8.1
showing much higher stats I/O volume than was seen in 8.0.  It'd still be a
good idea to revisit the design with an eye to not re-writing the entire
stats dataset every half second ... but that would be too much to backpatch,
I fear.
2006-01-18 20:35:06 +00:00
Tom Lane 349f40b2c2 Rearrange backend startup sequence so that ShmemIndexLock can become
an LWLock instead of a spinlock.  This hardly matters on Unix machines
but should improve startup performance on Windows (or any port using
EXEC_BACKEND).  Per previous discussion.
2006-01-04 21:06:32 +00:00
Alvaro Herrera f1713078c5 Install a more future-proof fix for the snapshot-unset bug just found.
Per suggestion from Tom Lane.
2005-11-28 17:23:11 +00:00
Alvaro Herrera d4fc4ac4c7 Set a snapshot before running analyze on a single table, to avoid a
crash when analyzing tables with expressional indexes.

Per report from Frank van Vugt.
2005-11-28 13:35:09 +00:00
Bruce Momjian 436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.
2005-11-22 18:17:34 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Tom Lane 87808aef05 Allow the pgstat views to show toast tables as well as regular tables
(the stats system has always collected this info, but the views were
filtering it out).  Modify autovacuum so that over-threshold activity
in a toast table can trigger a VACUUM of the parent table, even if the
parent didn't appear to need vacuuming itself.  Per discussion a month
or so back about "short, wide tables".
2005-08-15 16:25:19 +00:00
Tom Lane d90c531188 Autovacuum loose end mop-up. Provide autovacuum-specific vacuum cost
delay and limit, both as global GUCs and as table-specific entries in
pg_autovacuum.  stats_reset_on_server_start is now OFF by default,
but a reset is forced if we did WAL replay.  XID-wrap vacuums do not
ANALYZE, but do FREEZE if it's a template database.  Alvaro Herrera
2005-08-11 21:11:50 +00:00
Tom Lane 5d5f1a79e6 Clean up a number of autovacuum loose ends. Make the stats collector
track shared relations in a separate hashtable, so that operations done
from different databases are counted correctly.  Add proper support for
anti-XID-wraparound vacuuming, even in databases that are never connected
to and so have no stats entries.  Miscellaneous other bug fixes.
Alvaro Herrera, some additional fixes by Tom Lane.
2005-07-29 19:30:09 +00:00
Tom Lane 29094193f5 Integrate autovacuum functionality into the backend. There's still a
few loose ends to be dealt with, but it seems to work.  Alvaro Herrera,
based on the contrib code by Matthew O'Connor.
2005-07-14 05:13:45 +00:00