Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpFFI-0004uS-Qa for pgsql-general@arkaria.postgresql.org; Sat, 27 Jun 2020 18:08:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpFEl-0004Im-6M for pgsql-general@arkaria.postgresql.org; Sat, 27 Jun 2020 18:07:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpFEk-0004If-V0 for pgsql-general@lists.postgresql.org; Sat, 27 Jun 2020 18:07:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpFEi-0003F2-KP for pgsql-general@lists.postgresql.org; Sat, 27 Jun 2020 18:07:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 05RI7VVd145170; Sat, 27 Jun 2020 14:07:31 -0400 From: Tom Lane To: Matthias Apitz cc: pgsql-general@lists.postgresql.org Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP In-reply-to: <20200627175229.GA4739@sh4-5.1blu.de> References: <20200625111137.GA15798@sh4-5.1blu.de> <20200625125402.GA27634@sh4-5.1blu.de> <20200625180329.GA19346@sh4-5.1blu.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> Comments: In-reply-to Matthias Apitz message dated "Sat, 27 Jun 2020 19:52:29 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <145168.1593281251.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 27 Jun 2020 14:07:31 -0400 Message-ID: <145169.1593281251@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Matthias Apitz writes: > El d=C3=ADa Samstag, Juni 27, 2020 a las 07:21:21 -0700, Adrian Klaver e= scribi=C3=B3: >>> 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 ta= ble "testdump.public.idm_tasktab" >> From what I understand they are occurring because the machine is to bus= y >> 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 wor= king. >> 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