Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMPq5-0007l9-R8 for pgsql-admin@arkaria.postgresql.org; Wed, 18 Sep 2013 22:03:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VMPq5-0006E8-Aj for pgsql-admin@arkaria.postgresql.org; Wed, 18 Sep 2013 22:03:13 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMPq4-0006E2-CL for pgsql-admin@postgresql.org; Wed, 18 Sep 2013 22:03:12 +0000 Received: from nm31-vm7.bullet.mail.bf1.yahoo.com ([72.30.239.15]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMPq0-0002Ca-07 for pgsql-admin@postgresql.org; Wed, 18 Sep 2013 22:03:10 +0000 Received: from [98.139.215.142] by nm31.bullet.mail.bf1.yahoo.com with NNFMP; 18 Sep 2013 22:03:06 -0000 Received: from [98.139.212.216] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 18 Sep 2013 22:03:06 -0000 Received: from [127.0.0.1] by omp1025.mail.bf1.yahoo.com with NNFMP; 18 Sep 2013 22:03:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 938619.86784.bm@omp1025.mail.bf1.yahoo.com Received: (qmail 21892 invoked by uid 60001); 18 Sep 2013 22:03:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1379541786; bh=9NJs0FvGgl8hOg5t7GY8GRY6wohoY92c1GQxlk9eao4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ihh0DmdYde35b9hKdSrG+luY1zH9U6rC2nFy4EFExbeBMhz0OVapmbyTACKq1YKoPYVq+P4hFIvJtzanz0PmXdpAXc7qkNW6VwIHMHfPDWYO952IZSLZqvHkzbjwc8Dk+Lqx2T08hmzKGDssngiMiJ9m4AHHvAtVpU8RrQxedcY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tKKkAPN7/EWAyCH0K3F0nBKFWOcHFsOIA0yZbTb66eSHOHgCqsLwiWfPm4gwQZXrt2Vku4VhIWMMlmAgLQ8WG3ZcC1xjkhM/XF7UbRcDvqIXUPjy7se+nVJKgs9ZyFciF6e6We/nKIXh24WDEm36Ca21594+NnzhwU+4Qsw24OM=; X-YMail-OSG: bAYrFH4VM1kKnQqK_PLZYWEl8JSmlSewscAH0nvUo1pLR1w oZFQVJ.pNr44eEDE_WGEn5PqR5f8OtgN8bcQaHSKY4cDbpu93JOEerms1IYw 0.uWT0KA_LpzuhsiuW2LksDOmjQYnb8GrV8X95t53zfiU1nje_tbeC1VMqG4 t9URWhxZVcVMrqjbEnRwITyk5EdtJfzmfiPXNdqIXEFBPZ7VREXbFAwE4cjV bfzQLgdaUdmtwk3oWdqy0MlkBtQ0e1StHb.2OTgboXeSw0_BcsCO9GYjj.xW 17R7atRCO54D8qFuip_j_FzhYzDp6YemkDX2PbxpnTBsRt0av6_1y.h0c3Hv dhc323WPNIx7Q.p6Z5X8hLS38mGp.BtV1q7veBDZmwx0x_S9.sefLOq3l.gS Nf_QOKiPzzBbZhyc4pl_6pUUpabIcMsl0Ji782lAUJnfKkp3iL32cTa56guU 9PUDxylifIbjhOCzTtLyD.u0KUnx8k3RP6L64pTPqF8MEUA4i.qQdqfRHipA RoCatFu_3BtNbmYRaFtBqASv7.Vv4XPXR8ZtVHz6R3TtV3E.MlDGjFnt4Ny1 xXtXJ9kZyJU6GWwOdlNEKd02WOg2LZ9aqng1yYcLDxOytOf9RwxeJdKpuD32 3nM0WpqDRBhiOHGFhgvW_KPIg4LDuR__jjKtseh2EurJoT6lOE3azMqRSAtP Jq7VPLX5i1RZvD8Cwj4g- Received: from [76.255.18.237] by web162901.mail.bf1.yahoo.com via HTTP; Wed, 18 Sep 2013 15:03:06 PDT X-Rocket-MIMEInfo: 002.001, TmF0YWxpZSBXZW56IDxuYXRhbGlld2VuekBlYnVyZWF1LmNvbT4gd3JvdGU6Cgo.Pj4gYXV0b3ZhY3V1bV9mcmVlemVfbWF4X2FnZcKgwqDCoMKgwqDCoCB8IDgwMDAwMDAwMAoKPiBXZSB0YWxrZWQgYSBsaXR0bGUgYml0IGFib3V0IGxvd2VyaW5nIHRoZQo.IGF1dG92YWN1dW1fbWF4X2ZyZWV6ZV9hZ2UsIGF0IGxlYXN0IHNvbWUsIGJ1dCB0aGVyZSB3YXMgY29uY2Vybgo.IHRoYXQgaXQgd291bGQgZW5kIHVwIGRvaW5nIGEgbG90IG1vcmUgbGVuZ3RoeSBmdWxsLXRhYmxlIHNjYW5zLgo.IElzIHRoYXQgYSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.157.561 References: <1379421830.30619.YahooMailNeo@web162902.mail.bf1.yahoo.com> <1379450777.26197.YahooMailNeo@web162906.mail.bf1.yahoo.com> <9EB0F71A-0C2A-4ED1-A700-D9C52CBDAD4E@ebureau.com> Message-ID: <1379541786.19671.YahooMailNeo@web162901.mail.bf1.yahoo.com> Date: Wed, 18 Sep 2013 15:03:06 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Dumping a database that is not accepting commands? To: Natalie Wenz Cc: "pgsql-admin@postgresql.org" In-Reply-To: <9EB0F71A-0C2A-4ED1-A700-D9C52CBDAD4E@ebureau.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Natalie Wenz wrote: >>> autovacuum_freeze_max_age=A0=A0=A0=A0=A0=A0 | 800000000 > We talked a little bit about lowering the > autovacuum_max_freeze_age, at least some, but there was concern > that it would end up doing a lot more lengthy full-table scans. > Is that a legitimate concern? It will cause full-table scans to occur more often, but possibly not as much as you fear if your baseline is based on how it behaved before recent bug fixes.=A0 It will tend to flush "hot" data from the caches, at least to some degree.=A0 The up side of doing it more often is that it will have fewer writes to do each time it is run, which might avoid write gluts that hurt performance more than the reads. > Would it be prudent to change any of the other values back to > their defaults at the same time? For example, we have the > autovacuum_vacuum_cost_delay set to 0, with the idea that we > don't mind if we take a hit on performance while the autovacuum > is running; our priority is that it be able to finish as quickly > as possible. If we start the vacuum earlier, though, maybe that > should be bumped up too? Maybe, but you do have a lot of machine there.=A0 You might not notice the hit very much. > Does the autovacuum do different work when it is vacuuming to > prevent wraparound (and that's triggered when a table passes the > autovacuum_max_freeze_age, right?) and a vacuum triggered by the > table changing in size by a certain amount, or a manually-invoked > vacuum? A "normal" vacuum just visits pages which need work based on the visibility map, so those really are almost a fixed amount of work per week regardless of the frequency of runs.=A0 It's just a matter of whether you wait until a lot of work needs to be done and do it all at once, or do smaller runs that nibble away at it.=A0 The latter usually has less noticeable impact. > (Are there any books, or articles, that cover "Vacuuming and > Autovacuuming: the gory details"?) The best book I know of for this is Greg Smith's "PostgreSQL 9.0 High Performance": http://www.postgresql.org/docs/books/ (Full disclosure, I was one of the technical editors, but don't get money from sales.) > Rereading the Routine Vacuuming page in the docs, this sentence > caught my eye: > > "However, for static tables (including tables that receive > inserts, but no updates or deletes), there is no need to vacuum > for space reclamation, so it can be useful to try to maximize the > interval between forced autovacuums on very large static tables. > Obviously one can do this either by increasing > autovacuum_freeze_max_age or decreasing vacuum_freeze_min_age." > > We generally never delete from this database at all. This case > was unusual; I was migrating the data from one table to another > because we added some columns, and changed the datatype of many > of the columns from text to more appropriate types (timestamp, > int, uuid, inet, etc). Ideally, even then we wouldn't have > preferred to delete anything until the whole table was migrated, > but disk space became an issue. Bleh. That might be a reason to tweak the settings, but since recent versions of vacuum skip heap pages that won't benefit from vacuum, I probably wouldn't. > With that in mind, would you still recommend putting the > autovacuum_max_freeze_age back to 200 million? Where possible, I'm a big fan of incremental change.=A0 I might nudge it in that direction a little at a time and watch the behavior.=A0 I do think that periodic VACUUM ANALYZE statements (weekly?) of the database might be a good supplement to the autovacuum jobs, especially if you have a time when load tends to be lower to schedule that in. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin