Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35152 - Enhanced PostgreSQL ebuild
Summary: Enhanced PostgreSQL ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-05 13:19 UTC by Arthur Ward
Modified: 2007-09-22 23:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New ebuild (postgresql-7.4-r2.ebuild,7.94 KB, text/plain)
2003-12-05 13:22 UTC, Arthur Ward
Details
pg_autovacuum, for /etc/conf.d (pg_autovacuum.conf-7.4,225 bytes, text/plain)
2003-12-05 13:23 UTC, Arthur Ward
Details
pg_autovacuum - /etc/init.d (pg_autovacuum.init-7.4,405 bytes, text/plain)
2003-12-05 13:24 UTC, Arthur Ward
Details
Vacuum inter-page delay patch (postgresql-7.4-vacuum-delay.patch,8.71 KB, text/plain)
2003-12-05 13:25 UTC, Arthur Ward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Ward 2003-12-05 13:19:30 UTC
I finally took the time to get my local PostgreSQL 7.4 series ebuilds back in
sync with the portage tree. I've attached an ebuild for 7.4-r2 which builds off
of 7.4-r1. My additions include:

- pg_autovacuum init-script (highly recommended!)

- USE=pg-vacuumdelay adds in the vacuum inter-page delay feature and
configuration options which were discussed on the postgresql-hackers mailing
list last month. This patch allows you to configure short pauses in the vacuum
process which will reduce the IO rate of a vacuum command. If you're using
pg_autovacuum, you probably want this patch. pg_autovacuum will issue vacuums
right at inopportune moments on your database, precisely when the server doesn't
need any more additional load. Configuring the vacuum page delay with this patch
reduces the performance impact of vacuuming at a bad moment. See the
postgresql-hackers mailing list archives for a lengthy discussion of this patch
and why it's useful. (Note that the patch does not enable the delay by default;
you must also turn the delay on. Read the patch file for directions.)

- USE=pg-intdatetime enables the --enable-integer-datetimes configure option,
which changes PG to use 64-bit integers for timestamp storage, instead of 64-bit
doubles. I use this option, but most people probably don't. (int64 is less
tested than the traditional double, but might be faster. Benchmark your own app
and decide for yourself. initdb is required when changing this option.)


Reproducible: Always
Steps to Reproduce:
Comment 1 Arthur Ward 2003-12-05 13:22:16 UTC
Created attachment 21758 [details]
New ebuild

The new ebuild, derived from 7.4-r1. Adds pg_autovacuum init script and
optionally vacuum inter-page delay and integer-datetimes.
Comment 2 Arthur Ward 2003-12-05 13:23:51 UTC
Created attachment 21760 [details]
pg_autovacuum, for /etc/conf.d

Tuning parameters for pg_autovacuum can be adjusted in this file.
Comment 3 Arthur Ward 2003-12-05 13:24:21 UTC
Created attachment 21761 [details]
pg_autovacuum - /etc/init.d

Init-script for pg_autovacuum.
Comment 4 Arthur Ward 2003-12-05 13:25:29 UTC
Created attachment 21762 [details]
Vacuum inter-page delay patch

The vacuum inter-page delay patch, discussed on pgsql-hackers.
Comment 5 Arthur Ward 2003-12-05 13:28:21 UTC
Dang, I always forget that bugzille eats the filenames.
The ebuild is postgresql-7.4-r2.ebuild, obviously.
The others all belong in the files subdirectory:
pg_autovacuum.conf-7.4
pg_autovacuum.init-7.4
postgresql-7.4-vacuum-delay.patch
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2003-12-22 11:52:33 UTC
great job :) 
I'll include them after resolving this problem.

# /etc/init.d/pg_autovacuum start
 * Starting pg_autovacuum...           [ !! ]

This is log file:
Dec 22 19:42:38 [pg_autovacuum] [2003-12-22 07:42:38 PM] Error: GUC variable stats_row_level must be enabled.
Dec 22 19:42:38 [pg_autovacuum] [2003-12-22 07:42:38 PM]        Please fix the problems and try again.

The postgresql is emerged in USE="-doc +java +libg++ +nls +pam +perl -pg-hier -pg-intdatetime +pg-vacuumdelay -python +readline +ssl +tcltk +zlib"

I'm not familiar with pg_autovaccum.
What do you think?
Comment 7 Arthur Ward 2003-12-22 13:34:16 UTC
As the error message and the pg_autovacuum docs say, you must have stats_row_level enabled in postgresql.conf for pg_autovacuum to work. GUC = Global User Configuration; in other words, settings in postgresql.conf and the "SET" command for per-connection adjustments.

FYI, on pgsql-hackers, the announcement was made yesterday that 7.4.1 has been tagged & bundled for an expected release some time today. I'm unsure about the state of the vacuum-delay patch; previous discussion on that list left me confused as to whether it was accepted for 7.4.1. My "real job" needs the upgrade, so I should be on top of it this week.
Comment 8 Masatomo Nakano (RETIRED) gentoo-dev 2003-12-24 20:51:49 UTC
OK. I just included them in postgresql-7.4.1.ebuild
Thanks
Comment 9 Andrei Ivanov 2003-12-25 03:42:39 UTC
[2003-12-25 01:33:32 PM] Failed connection to database template1 with error: fe_sendauth: no password supplied
.
[2003-12-25 01:33:32 PM] Failed connection to database template1 with error: fe_sendauth: no password supplied
.
[2003-12-25 01:33:32 PM] Error: Cannot connect to template1, exiting.

How do I configure authentication for pg_autovacuum in a safe way ?
What privileges does a user for pg_autovacuum require ?

Right now, the authentication method used for unix-domain sockets and tcp/ip sockets is md5.
Comment 10 Arthur Ward 2003-12-26 11:32:33 UTC
shadow, this is not a Gentoo problem. I suggest reading /usr/share/doc/postgresql-7.4.1/contrib/README.pg_autovacuum . You probably need a '.pgpass' file. Search the PostgreSQL docs and/or archive for more info on libpq and .pgpass. For installations using local trust authentication, pg_autovacuum works out of the box.