Re: [PATCHES] autovacuum integration attempt #3
I am having problem applying this. I don't think we can just move pg_autovacuum.[ch] right into the backend code. There are issues with include files and there is no definition for autovacuum_vacuum_base and other variables, and there is no AutoVacMain(). I can try guessing on those but I think I need a more complete patch or more complete instructions to get this applied. Also, it uses the gcc-ism __attribute__ that isn't portable to other compilers. --- Matthew T. O'Connor wrote: Ok, here is a new patch for to integrate pg_autovacuum into the backend. This patch adds the following to that last patch: * updated to latest CVS * changed GUC vars from autovac_* to autovacuum_* * changed autovac_enabled GUC variable to autovacuum * changed autovacuum GUC variable default to false * improved autovacuum failure when row level stats aren't enabled As before, this patch requires pg_autovacuum.c and .h get moved from contrib to src/backend/postmaster and src/include/postmaster respectively. In addition, the attached pg_autovacuum.h file must be put in src/include/catelog/ for the new pg_autovacuum system table. Please apply to CVS or tell me what I need to change to get it applied. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [PATCHES] autovacuum integration attempt #3
Sorry, perhaps my initial instructions weren't clear. You have to move the pg_autovacuum.[ch] files then apply the patch. The patch alters them considerably. Should I submit the patch in a different way? Thanks, Matthew I am having problem applying this. I don't think we can just move pg_autovacuum.[ch] right into the backend code. There are issues with include files and there is no definition for autovacuum_vacuum_base and other variables, and there is no AutoVacMain(). I can try guessing on those but I think I need a more complete patch or more complete instructions to get this applied. Also, it uses the gcc-ism __attribute__ that isn't portable to other compilers. --- Matthew T. O'Connor wrote: Ok, here is a new patch for to integrate pg_autovacuum into the backend. This patch adds the following to that last patch: * updated to latest CVS * changed GUC vars from autovac_* to autovacuum_* * changed autovac_enabled GUC variable to autovacuum * changed autovacuum GUC variable default to false * improved autovacuum failure when row level stats aren't enabled As before, this patch requires pg_autovacuum.c and .h get moved from contrib to src/backend/postmaster and src/include/postmaster respectively. In addition, the attached pg_autovacuum.h file must be put in src/include/catelog/ for the new pg_autovacuum system table. Please apply to CVS or tell me what I need to change to get it applied. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [PATCHES] autovacuum integration attempt #3
Ack! I sent the wrong patch... Sorry I will resend it tonight. Matthew T. O'Connor wrote: Sorry, perhaps my initial instructions weren't clear. You have to move the pg_autovacuum.[ch] files then apply the patch. The patch alters them considerably. Should I submit the patch in a different way? I don't see any modifications to pg_autovacuum.[ch] in the patch in the patches queue: http://momjian.postgresql.org/cgi-bin/pgpatches -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] autovacuum integration attempt #3
Patch withdrawn by author. Will resubmit. --- Matthew T. O'Connor wrote: Ok, here is a new patch for to integrate pg_autovacuum into the backend. This patch adds the following to that last patch: * updated to latest CVS * changed GUC vars from autovac_* to autovacuum_* * changed autovac_enabled GUC variable to autovacuum * changed autovacuum GUC variable default to false * improved autovacuum failure when row level stats aren't enabled As before, this patch requires pg_autovacuum.c and .h get moved from contrib to src/backend/postmaster and src/include/postmaster respectively. In addition, the attached pg_autovacuum.h file must be put in src/include/catelog/ for the new pg_autovacuum system table. Please apply to CVS or tell me what I need to change to get it applied. Matthew [ Attachment, skipping... ] [ Attachment, skipping... ] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[PATCHES] autovacuum integration attempt #3
Ok, here is a new patch for to integrate pg_autovacuum into the backend. This patch adds the following to that last patch: * updated to latest CVS * changed GUC vars from autovac_* to autovacuum_* * changed autovac_enabled GUC variable to autovacuum * changed autovacuum GUC variable default to false * improved autovacuum failure when row level stats aren't enabled As before, this patch requires pg_autovacuum.c and .h get moved from contrib to src/backend/postmaster and src/include/postmaster respectively. In addition, the attached pg_autovacuum.h file must be put in src/include/catelog/ for the new pg_autovacuum system table. Please apply to CVS or tell me what I need to change to get it applied. Matthew /*- * * pg_autovacuum.h * definition of the system autovacuum relation (pg_autovacuum) * * NOTE: an object is identified by the OID of the row that primarily * defines the object, plus the OID of the table that that row appears in. * For example, a function is identified by the OID of its pg_proc row * plus the pg_class OID of table pg_proc. This allows unique identification * of objects without assuming that OIDs are unique across tables. * * Since attributes don't have OIDs of their own, we identify an attribute * comment by the objoid+classoid of its parent table, plus an objsubid * giving the attribute column number. objsubid must be zero in a comment * for a table itself, so that it is distinct from any column comment. * Currently, objsubid is unused and zero for all other kinds of objects, * but perhaps it might be useful someday to associate comments with * constituent elements of other kinds of objects (arguments of a function, * for example). * * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * $PostgreSQL: pgsql-server/src/include/catalog/pg_autovacuum.h,v 1.20 2003/11/29 22:40:58 pgsql Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki * information from the DATA() statements. * * XXX do NOT break up DATA() statements into multiple lines! * the scripts are not as smart as you might think... * *- */ #ifndef PG_AUTOVACUUM_H #define PG_AUTOVACUUM_H /* * postgres.h contains the system type definitions and the * CATALOG(), BOOTSTRAP and DATA() sugar words so this file * can be read by both genbki.sh and the C compiler. * */ /* * pg_autovacuum definition. cpp turns this into * typedef struct FormData_pg_autovacuum * */ CATALOG(pg_autovacuum) BKI_WITHOUT_OIDS { Oid table_oid; /* OID of table */ int4 analyze_base_threshold; /* Base Threshold value */ float4 vacuum_base_threshold; /* Base Threshold value */ int4 analyze_scaling_factor; /* Threshold of ins/upd/del's before analyze */ float4 vacuum_scaling_factor; /* Threshold of ins/upd/del's before vacuuum */ int8 analyze_threshold; /* Threshold of ins/upd/del's before analyze */ int8 vacuum_threshold; /* Threshold of ins/upd/del's before vacuuum */ int8 cnt_at_last_analyze; /* equal to: inserts + updates as * of the last analyze or initial * values at startup */ int8 cnt_at_last_vacuum; /* equal to: deletes + updates as * of the last vacuum or initial * values at startup */ } FormData_pg_autovacuum; /* * Form_pg_autovacuum corresponds to a pointer to a tuple with * the format of pg_autovacuum relation. * */ typedef FormData_pg_autovacuum *Form_pg_autovacuum; /* * compiler constants for pg_autovacuum * */ #define Natts_pg_autovacuum9 #define Anum_pg_autovacuum_table_oid 1 #define Anum_pg_autovacuum_analyze_base_threshold 2 #define Anum_pg_autovacuum_vacuum_base_threshold 3 #define Anum_pg_autovacuum_analyze_scaling_factor 4 #define Anum_pg_autovacuum_vacuum_scaling_factor 5 #define Anum_pg_autovacuum_analyze_threshold 6 #define Anum_pg_autovacuum_vacuum_threshold 7 #define Anum_pg_autovacuum_cnt_at_last_analyze 8 #define Anum_pg_autovacuum_cnt_at_last_vacuum 9 /* * initial contents of pg_autovacuum * */ /* * Because the contents of this table are taken from the other *.h files, * there is no initialization here. The initial contents are extracted * by genbki.sh and loaded during initdb. */ #endif /* PG_AUTOVACUUM_H */ ? GNUmakefile ? config.log ? config.status ? cp.origs ? src/Makefile.global ? src/pg_autovacuum_devel.kdevelop ? src/pg_autovacuum_devel.kdevelop.filelist ? src/pg_autovacuum_devel.kdevelop.pcs ? src/pg_autovacuum_devel.kdevses ? src/pgsql_cs.kdevelop ? src/backend/postgres ? src/backend/catalog/postgres.bki ?