summaryrefslogtreecommitdiff
path: root/contrib/pg_autovacuum
Commit message (Collapse)AuthorAgeFilesLines
* Fix display of database name during autovacuum.Bruce Momjian2005-06-151-3/+3
| | | | Cosimo Streppone
* a small tweak to enable display in the log fileBruce Momjian2005-05-111-3/+3
| | | | | | | of database name before table name when VACUUMing or ANALYZing a table. Cosimo Streppone
* Fix pg_autovacuum -s flag to handle values > 2000 by using sleep()Bruce Momjian2005-05-111-2/+11
| | | | | | instead of pg_usleep. Backpatch to 8.0.X.
* Tag 1000000L as long for compuation.Bruce Momjian2005-05-111-2/+2
|
* The following patch should allow UPDATE_INTERVAL to be specified on theBruce Momjian2005-04-193-6/+18
| | | | | | | | | | | | | | | command line. We find this useful because we frequently deal with thousands of tables in an environment where neither the databases nor the tables are updated frequently. This helps allow us to cut down on the overhead of updating the list for every other primary loop of pg_autovacuum. I chose -i as the command-line argument and documented it briefly in the README. The patch was applied to the 7.4.7 version of pg_autovacuum in contrib. Thomas F.O'Connell
* Put back code mistakenly removed from copy of postmaster'sTom Lane2005-04-031-5/+12
| | | | | daemonize routine, namely forcing stdin/stdout/stderr to point to /dev/null. Per Karl Denninger.
* Document that the "-P" option to pg_autovacuum is insecure on manyNeil Conway2005-03-301-5/+8
| | | | platforms, and suggest using ~/.pgpass instead.
* Have libpgport link before libpq so that PG client applications are moreBruce Momjian2005-03-251-1/+1
| | | | immunte to changes in libpq's usage of pgport between major versions.
* Adjust Windows autovacuum service to retry for up to 5 minutes waitingTom Lane2005-01-261-23/+50
| | | | for the postmaster to start. Dave Page
* Fix typo.Neil Conway2005-01-241-1/+1
|
* pg_autovacuum fixes from Dave Page:Neil Conway2005-01-241-17/+21
| | | | | | | | | | | - Dependency services may not be correctly registered when installing as a Windows Service. - The sleep time is changed from milliseconds to seconds as it should be. - Error messages during service installation/removal are logged to stderr.
* > > 8.0beta3 has pg_autovacuum included, when I want to run this as aBruce Momjian2004-12-023-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > Windows service, it says you can use the -I and -R options. > > > > When I do that and I specify a password with '-P' > (uppercase) then in > > the registry it's saved as '-p' (lowercase) in the > service-commandline > > (ImagePath). This was fixed in v1.21 of pg_autovacuum.c, That rev is tagged for beta3, so you should not be seeing this issue unless you actually have an older version for some reason. http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pg_autovacuum/p g_autovacuum.c.diff?r1=1.20;r2=1.21;f=h > > Also it removes the quotes I added and I'm not so sure it > would work > > the way it's supposed to, without it. It's not so much that it strips them (that happens automagically), more that it doesn't re-add them when it writes the command line in the registry. The attached patch fixes that by simply quoting all options that may need it. > > If you add DependOnService (a REG_MULTI_SZ an > array-like-thingie) and > > have the name (in this case: pgsql-8.0-beta2-dev3) of a service it > > depends on, it will not fail to start (it will not even try, as > > PostgreSQL is not running), when PostgreSQL already failed. > > > > Maybe it's an idea to specify it on the commandline (what > service to > > depend on). A -E <service> option is added in the attached patch. Dave Page
* Prevent pg_autovacuum -D from needing an argument.Bruce Momjian2004-12-021-2/+2
| | | | Kenneth Marshall
* Rename vacuum_cost_limit switch from -N to -l to avoid conflict withTom Lane2004-11-172-6/+6
| | | | existing Windows-only switch.
* Add options to pg_autovacuum to support setting the cost-based-vacuumTom Lane2004-11-173-62/+185
| | | | parameters differently from their default values. Matthew T. O'Connor
* Fix a bunch of 'old-style parameter declaration' warnings induced byTom Lane2004-10-251-6/+6
| | | | writing 'foo()' rather than 'foo(void)'.
* Include dllist.c directly instead of assuming that libpq will provide it.Tom Lane2004-10-163-89/+92
| | | | Whack some semblance of project-conventions-conformance into pg_autovacuum.h.
* Fix some minor issues with the new Win32 service code for autovacuum,Tom Lane2004-09-142-21/+32
| | | | and add documentation. Dave Page
* Add Win32 service capability to pg_autovacuum.Bruce Momjian2004-08-302-78/+548
| | | | Dave Page
* Pgindent run for 8.0.Bruce Momjian2004-08-291-89/+90
|
* > Please find enclose a submission to fix these problems.Bruce Momjian2004-08-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | > > The patch adds missing the "libpgport.a" file to the installation under > "install-all-headers". It is needed by some contribs. I install the > library in "pkglibdir", but I was wondering whether it should be "libdir"? > I was wondering also whether it would make sense to have a "libpgport.so"? > > It fixes various macros which are used by contrib makefiles, especially > libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are > needed to > > It adds the ability to test and use PGXS with contribs, with "make > USE_PGXS=1". Without the macro, this is exactly as before, there should be > no difference, esp. wrt the vpath feature that seemed broken by previous > submission. So it should not harm anybody, and it is useful at least to me. > > It fixes some inconsistencies in various contrib makefiles > (useless override, ":=" instead of "="). Fabien COELHO
* Fix problems in pg_autovacuum:Bruce Momjian2004-05-262-198/+215
| | | | | | | | 1) temp table crash 2) Check send_query() function call return value. Backpatch to 7.4.X.
* The attached patch for contrib/pg_autovacuum/README.pg_autovacuum fixesBruce Momjian2004-04-191-5/+5
| | | | | | | one apparent error and makes a minor stylistic change that makes it more consistent and makes clear something that confused me :-) Andrew Dunstan
* Fix portability issues with functions that don't match their declaration.Tom Lane2004-04-011-28/+32
|
* Standardize output buffer size and display format for strftime;Tom Lane2004-03-221-4/+3
| | | | followup to complaint from Korean User's Group.
* In working through a pg_autovacuum problem with Joe Conway (which turnedBruce Momjian2004-03-222-12/+26
| | | | | | | | | | | | | | out to be the same problem reported by Cott Lang which the previous patch resolved) a new bug was uncovered when running with a debug level of greater than 1. This patch resolves this new found bug and fixes some of the other debugging output to be more consistent. Please apply to both HEAD and the 7.4 branch. Matthew T. O'Connor
* Handle OID's and unsigned values better in pg_autovacuum.Bruce Momjian2004-03-152-27/+30
| | | | Matthew T. O'Connor
* Minor autovacuum fixes from Matthew O'Connor.Tom Lane2003-12-081-2/+2
|
* Add fflush() before sleeping, per Matthew O'Connor.Tom Lane2003-12-081-0/+1
|
* Replace unportable and overflow-prone use of 'long long' with saferTom Lane2003-12-071-4/+4
| | | | 'double' arithmetic, per recent discussion.
* I've run across a pretty serious problem with pg_autovacuum.Bruce Momjian2003-12-012-9/+9
| | | | | | | | | | | | | | pg_autovacuum looses track of any table that's ever been truncated (possibly other situations too). When i truncate a table it gets a new relfilenode in pg_class. This is a problem because pg_autovacuum assumes pg_class.relfilenode will join to pg_stats_all_tables.relid. pg_stats_all_tables.relid is actallly the oid from pg_class, not the relfilenode. These two values start out equal so pg_autovacuum works initially, but it fails later on because of this incorrect assumption. This patch fixes that problem. Applied to HEAD and 7.4.X. Brian Hirt
* I noticed in the 7.4 release that in contrib/pg_autovacuum, args->logfile isBruce Momjian2003-12-011-0/+5
| | | | | | | | | | | | | | not initialized if a log file is not specified on the command line. This causes an immediate segfault on systems that fill allocated memory with some value other than zero (my FreeBSD machine uses 0xD0). Several crashes later I discovered that args->user, password, host, and port are also used without being initialized. This doesn't appear to be fixed in CVS and I came up empty on a mailing list search -- hope it hasn't been reported already. Craig Boston
* Fix typo on autovacuum readme.Bruce Momjian2003-11-091-2/+2
|
* I have run pg_autovacuum on AIX, so that can, at least loosely, beBruce Momjian2003-10-161-7/+14
| | | | | | | | | considered "tested." And I have turned all of the 7.4 HISTORY material into DocBook for release.sgml Christopher Browne
* Fix core dump on root starting pg_autovacuum.Bruce Momjian2003-10-101-58/+60
| | | | | | Change conditionals to be more constent with our code if (const == var) => if (var == const).
* Change some awkward wording in the pg_autovacuum README file. I reallyBruce Momjian2003-10-081-1/+1
| | | | | | only read this because of Niel :-) Robert Treat
* pgindent C file, per patch request.Bruce Momjian2003-09-131-15/+20
|
* > OK, well as we wait on the fix for the stats system, let me submit myBruce Momjian2003-09-133-84/+120
| | | | | | | | | | | | | | | | | | | | | | > patch for pg_autovacuum. This patch assumes that the stats system will > be fixed so that all inserts, updates and deletes performed on shared > tables reguardless of what database those commands were executed from, > will show up in the stats shown in each database. I had to make a further change to this to take quotes off the 'last ANALYZE' in order for it to not overquote the relation name, so there's a _little_ work left to get it to play well. I have deployed it onto several boxes that should be doing some vacuuming over the weekend, and it is now certainly hitting pg_ tables. I would like to present a CVS-oriented patch; unfortunately, I had to change the indentation patterns when editing some of it :-(. The following _may_ be good; not sure... Matthew T. O'Connor Christopher Browne
* > It quotes table names for vacuum and analyze, and uppercases theBruce Momjian2003-09-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | > keywords for clarity. Yeah, this is basically what I meant, sorry I didn't get to it quicker. However, I tested it out a little and the patch you made doesn't work because it produces commands like: VACUUM ANALYZE "public.FooBar" Which doesn't work, so I made my own patch that creates commands like: VACUUM ANALYZE "public"."FooBar" This allows for mixed case schema names as well as tables. Adam, can you please give this a test as you are the person who caught the bug in the first place. Thanks, Matthew T. O'Connor
* Add quotes to vacuum/analyze for upper/lowercase table names, perBruce Momjian2003-09-101-4/+4
| | | | Matthew T. O'Connor.
* Don't assume that struct option is available just because we can find aTom Lane2003-08-071-1/+1
| | | | | | | getopt_long(). This is more or less the same problem as we saw earlier with getaddrinfo() and struct addrinfo, and for the same reason: random user-added libraries might contain the subroutine, but there's no guarantee we will find the matching header files.
* pgindent run.Bruce Momjian2003-08-042-908/+1082
|
* Add missing #include.Tom Lane2003-08-011-0/+1
|
* This patch updates pg_autovacuum in several ways:Bruce Momjian2003-06-124-656/+1049
| | | | | | | | | | | | | | | | | | | | | | | | | * A few bug fixes * fixes solaris compile and crash issue * decouple vacuum analyze and analyze thresholds * detach from tty (dameonize) * improved logging layout * more conservative default configuration * improved, expanded and updated README please apply and 1st convenience, or before code freeze which ever comes first :-) At this point I think I have brought pg_autovacuum and its client side design as far as I think it should go. It works, keeping file sizes in check, helps performance and give the administrator a fair amount flexibility in configuring it. Next up is to do the FSM based design that is integrated into the back end. p.s. Thanks to Christopher Browne for his help. Matthew T. O'Connor
* Fix various recent build and regression-test problems in contrib/.Tom Lane2003-05-141-7/+3
| | | | Includes fixes from Joe Conway.
* Rename README in autovacuum code to match Makefile.Bruce Momjian2003-03-231-0/+0
|
* I have updated my pg_autovacuum program (formerly pg_avd, the nameBruce Momjian2003-03-205-0/+949
changed as per discussion on the patches list). This version should be a good bit better. It addresses all the issues pointed out by Neil Conway. Vacuum and Analyze are now handled separately. It now monitors for xid wraparound. The number of database connections and queries has been significantly reduced compared the previous version. I have moved it from bin to contrib. More detail on the changes are in the TODO file. I have not tested the xid wraparound code as I have to let my AthlonXP 1600 run select 1 in a tight loop for approx. two days in order to perform the required 500,000,000 xacts. Matthew T. O'Connor