From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP
Date: Sat, 27 Jun 2020 14:07:31 -0400
Message-ID: <145169.1593281251@sss.pgh.pa.us> (raw)
In-Reply-To: <20200627175229.GA4739@sh4-5.1blu.de>
References: <20200625111137.GA15798@sh4-5.1blu.de>
<20200625125402.GA27634@sh4-5.1blu.de>
<bdddf16b-b9df-4092-d8e7-78604736b8a3@aklaver.com>
<20200625180329.GA19346@sh4-5.1blu.de>
<fae083a8-dfc6-a133-aaa3-95af8011f70f@aklaver.com>
<aeb27c70-db81-4012-b6c8-2bbc54f45013@unixarea.de>
<2291754.1593116700@sss.pgh.pa.us>
<20200627083722.GA14793@sh4-5.1blu.de>
<4652643d-d6a1-afc0-ff46-0316b2216bf8@aklaver.com>
<20200627175229.GA4739@sh4-5.1blu.de>
Matthias Apitz <guru@unixarea.de> writes:
> El día Samstag, Juni 27, 2020 a las 07:21:21 -0700, Adrian Klaver escribió:
>>> 2020-06-27 10:23:02.631 CEST [18302] ERROR: canceling autovacuum task
>>> 2020-06-27 10:23:02.631 CEST [18302] CONTEXT: automatic analyze of table "testdump.public.idm_tasktab"
>> From what I understand they are occurring because the machine is to busy
>> doing the restore to get to the autovacuum task in a timely manner. So I
>> would say ignore and check back later to see that the autovacuum is working.
>> Given that it is ANALYZE that is being cancelled I would run a manual
>> ANALYZE after the restore is done to update the database statistics.
> The machine is a development server and no one was working on it (today
> is Saturday) apart of me. It has 4 modern and fast CPU,
I think more likely is this:
1. The restore run loads a lot of data into a table.
2. The autovacuum daemon notices all the inserts and starts an
auto-analyze run.
3. The restore run gets to the part where it tries to create indexes on
the table. This requires a ShareLock if memory serves, which conflicts
with the ShareUpdateExclusive lock that ANALYZE is holding. Rather than
making a foreground process wait for autovacuum, we kick autovacuum off
its lock by aborting the auto-analyze. Hence the message(s).
4. The un-analyzed inserts are still there, so some future autovacuum
cycle will try again.
In short, yeah, you should just ignore these log messages.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, guru@unixarea.de
Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP
In-Reply-To: <145169.1593281251@sss.pgh.pa.us>
References: <20200625111137.GA15798@sh4-5.1blu.de> <20200625125402.GA27634@sh4-5.1blu.de> <bdddf16b-b9df-4092-d8e7-78604736b8a3@aklaver.com> <20200625180329.GA19346@sh4-5.1blu.de> <fae083a8-dfc6-a133-aaa3-95af8011f70f@aklaver.com> <aeb27c70-db81-4012-b6c8-2bbc54f45013@unixarea.de> <2291754.1593116700@sss.pgh.pa.us> <20200627083722.GA14793@sh4-5.1blu.de> <4652643d-d6a1-afc0-ff46-0316b2216bf8@aklaver.com> <20200627175229.GA4739@sh4-5.1blu.de> <145169.1593281251@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox