Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0aNH-0000fb-Ul for pgsql-general@arkaria.postgresql.org; Thu, 13 Sep 2018 22:46:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0aNF-0004mf-T9 for pgsql-general@arkaria.postgresql.org; Thu, 13 Sep 2018 22:46:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0aNF-0004mY-H6 for pgsql-general@lists.postgresql.org; Thu, 13 Sep 2018 22:46:09 +0000 Received: from mail-it0-x243.google.com ([2607:f8b0:4001:c0b::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g0aN8-0007UO-O6 for pgsql-general@lists.postgresql.org; Thu, 13 Sep 2018 22:46:08 +0000 Received: by mail-it0-x243.google.com with SMTP id h1-v6so166320itj.4 for ; Thu, 13 Sep 2018 15:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:message-id:subject:from:to; bh=BMb1Qj4rH/GrhOiQ+Iz/D/As1U722JploPHj5NYjKL0=; b=cNoCbgIdCTD5LyGpZcM9UfWkrD+2opydPG5Z4iadVreO9jnlt418yc5zTyFjSPjrsu djDhL0t7nX57ZnJzfVeTxxE+XOJuU76iwH4KnNBkGRPAjr9FuX2t9GtMm7QzmQlApjG6 UBisEPsTKubNI/poWlmmFcnsw+bm78H+O6juzmIf0iXfnx00wOUHHFWMIFM0vj7KjrlZ jNZlmT3euyHW/C43kr7olf/YFr0b9gFRuqUt6iYT5KRHV/cwmVYsT8XdZdMS7qQLIfs0 oeK6rnY2R2DH3QOUa8sclsVxQBfZd1f5ZWeJn9ZraTI5JlPy5Sw5v/aqy9jAh1mWobuz VEqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=BMb1Qj4rH/GrhOiQ+Iz/D/As1U722JploPHj5NYjKL0=; b=ET0diPajL1bgqDT0jxb3vJVBWFfqGNmzEU5DrsTfAu7Az9r6/6atEFZcHtQtL92bFU jkHRd2/IKBb5oWCJ+jLEPqM5YjyJfxKRdEc1sxwzKh2mNpu3ZRd3Q66rceiM4hJieQpD TLsr86QGD+Grq1cF92juNlI/NBUIGMkK/gD53Ob4/YffTVFQsm4OkU5D750UX6kKhWqs VscKAt3dEYhBrAnd8SB7/AKvkQNDL8eDZ8JdkTMKMbZMdo2KVq+trSLVBHtqcB9tYbk1 xMfwWdIxpqqtGuGwmMvKk+pFoKWScgZ/5m0xff+DE2aXAiVx+JiUKMr06JAqzbznOKHs iCpQ== X-Gm-Message-State: APzg51A2jt57mxJvn8MNlQZrdz38M6HaIe/4vZYvgYTwkoMvAbBjIsUV pi3mufnzhXqCPD/y1pCz24TLfawk X-Google-Smtp-Source: ANB0VdbRfuYHzwHsIFpumj5mWajSKBP/Vt9oG+04SXi3SpDtTPqyqjwiNqPc3IZj4nqZmsomRCgL5A== X-Received: by 2002:a24:c682:: with SMTP id j124-v6mr149698itg.143.1536878761643; Thu, 13 Sep 2018 15:46:01 -0700 (PDT) Received: from localhost (48.158.155.104.bc.googleusercontent.com. [104.155.158.48]) by smtp.gmail.com with ESMTPSA id t64-v6sm7126ita.13.2018.09.13.15.46.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 15:46:00 -0700 (PDT) Mime-Version: 1.0 Date: Thu, 13 Sep 2018 15:45:51 -0700 X-Mailer: Polymail Message-ID: <5b9ae6b53f8b8f4e0c000001@polymail.io> Subject: Behaviour when autovacuum is canceled From: =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?= To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary=37f1299f49d2367fbccb32d8c95e179b931012ac17ccd18cb3735e03a898 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --37f1299f49d2367fbccb32d8c95e179b931012ac17ccd18cb3735e03a898 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hello, I'm working on a high volume transaction database and we are starting to tu= ne our autovacuum setting to improve our vacuuming performance. Once thing that we know about autovacuum is that is can be automatically ca= nceled if a dependent transaction is blocked by the autovacuum transaction.= In a situation like this one, autovacuum would be canceled.=C2=A0 My question is, what will happen to the work that autovacuum has achieved b= efore being canceled ? Is that work lost ? I tried to look for the answer i= n the code and I'm not completely sure what will happen. From what I could = understand (that can be totally wrong), the vacuum process is split in mult= iple small transactions. If the autovacuum is canceled, could it be possibl= e that only the latest transaction work be lost ? Sorry if my understanding is not the correct one, understanding how to tune= the autovacuum seems really complicated to me. Thanks before hand!=C2=A0 Mart=C3=ADn --37f1299f49d2367fbccb32d8c95e179b931012ac17ccd18cb3735e03a898 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 3D""
Hello,=

I'm working on a high volum= e transaction database and we are starting to tune our autovacuum setting t= o improve our vacuuming performance.

Once thing that we know about autovacuum is that is can be automat= ically canceled if a dependent transaction is blocked by the autovacuum tra= nsaction. In a situation like this one, autovacuum would be canceled. =

My question is, what will h= appen to the work that autovacuum has achieved before being canceled ? Is t= hat work lost ? I tried to look for the answer in the code and I'm not comp= letely sure what will happen. From what I could understand (that can be tot= ally wrong), the vacuum process is split in multiple small transactions. If= the autovacuum is canceled, could it be possible that only the latest tran= saction work be lost ?

Sorry= if my understanding is not the correct one, understanding how to tune the = autovacuum seems really complicated to me.

<= div style=3D"">Thanks before hand! 

Mart=C3=ADn
--37f1299f49d2367fbccb32d8c95e179b931012ac17ccd18cb3735e03a898--