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 1g0s7U-0007Qx-IS for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 17:43:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0s7S-0000dT-JQ for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 17:43:02 +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 1g0s7S-0000dE-7J for pgsql-general@lists.postgresql.org; Fri, 14 Sep 2018 17:43:02 +0000 Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g0s7P-0008QC-Kb for pgsql-general@lists.postgresql.org; Fri, 14 Sep 2018 17:43:00 +0000 Received: by mail-io1-xd44.google.com with SMTP id q5-v6so6694577iop.3 for ; Fri, 14 Sep 2018 10:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:cc:date:in-reply-to:references:to:message-id :subject; bh=BriAXO1crWWsQu/cik9ecSjE2iUjx1Mb3bz5Eu7478Q=; b=bIhKTEzVxJhn2k0PPDVzeQNVCteojZUiJdfClcTRNAfaONQPVprfdWadeAgtccnp0Z 799ZJqXj0Az/jN5jR0Hw38Ehl2BMehQJ90q/2zHc4+VJGbZ+cSRLeSlpyn4XXN0AUQCW +A0dH/eNCCF04O5EKwJw03lcVypx8JIvj09rqhkNIUqHQ6DHtIpNlX0ventH9lxojma8 XraWSvfUolGnEAPpaAVkx6cZ53W8floOUpu6jgqRpu3qjZ3gOBJ7nCw3KWXP2t8PLiaf vmYPN3a+5w6owkX8kMVIdKKgmBUvHD6t76euof4BkaN+hKNCFs+8s3i6k+6WPIwCQ85A 0WDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:cc:date:in-reply-to:references :to:message-id:subject; bh=BriAXO1crWWsQu/cik9ecSjE2iUjx1Mb3bz5Eu7478Q=; b=Foc8xBQ2p1lkISxr7X41qcn5x/5oXaSwoxPP1FEmsPEPRywYWLfV/6j2xezlULY5r5 NPOYGCGol2G/xnOrBkpSF+w4tkYb4bOMtHvDEU824EiZsMKxGJbCoiNKJK+J0pbbLXwQ WQJ3xsVcqSXrBp8FJ7E5heaEJ3BUTtwIZPDSN+EYmCm2GDFxP9hQDSUKu13bMepF4OHT ugBORb7ErutiTjJAi9RIHVpvEF8scBUH2R9YDDxTBf9+a6+HccHnXjKzDgOHczpv4gup UfY0VYOR1TH+wt4/C6oXA6AI5dcwXwQEWGXZV+x7iN9awZnRpmrsZU7JPo4OkGm42Hi4 ExMw== X-Gm-Message-State: APzg51ArT+TFo1Y+ee4YbBAwwkvv0m5lz7jzlyBaZk2te7YsN8COagoC ED1ZPvZ3ZWpFoT5qYc4nBM9RCnXk X-Google-Smtp-Source: ANB0VdauTeO5iZQMe99J8C0/ACQHS0flps2FCyk9AgHTsZgLo/Zyk0Yok/2BBxvA2/epjYI+EwBb2Q== X-Received: by 2002:a6b:f919:: with SMTP id j25-v6mr10923768iog.280.1536946978589; Fri, 14 Sep 2018 10:42:58 -0700 (PDT) Received: from localhost (48.158.155.104.bc.googleusercontent.com. [104.155.158.48]) by smtp.gmail.com with ESMTPSA id u68-v6sm995724ita.36.2018.09.14.10.42.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 10:42:58 -0700 (PDT) Mime-Version: 1.0 From: =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?= Cc: "Tom Lane" , "David G. Johnston" , "pgsql-generallists.postgresql.org" Date: Fri, 14 Sep 2018 10:42:47 -0700 In-Reply-To: <20180914154106.7nvug4lgfjphuz27@alvherre.pgsql> References: <20180914154106.7nvug4lgfjphuz27@alvherre.pgsql> X-Mailer: Polymail To: "Alvaro Herrera" Message-ID: <5b9bf2dfc9ae3a390b000002@polymail.io> Subject: Re: Behaviour when autovacuum is canceled Content-Type: multipart/alternative; boundary=113f4b5b76332f91e5f76ea7fce40b75dd03eb3929ce1e0e3f9ca6ce4f1f List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --113f4b5b76332f91e5f76ea7fce40b75dd03eb3929ce1e0e3f9ca6ce4f1f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Alvaro, Thanks for the insight, was really helpful! Best, Mart=C3=ADn On Fri, Sep 14th, 2018 at 12:41 PM, Alvaro Herrera wrote: >=20 >=20 >=20 > On 2018-Sep-13, Mart=C3=ADn Fern=C3=A1ndez wrote: >=20 > > By performing this changes we are going to start relying more heavily > > on the autovacuum work and the concern of "lost work" caused by > > autovacuum canceling itself when locking contention happen showed up. > > I'm guessing that we might be over thinking this and the canceling is > > not going to happen as frequently as we think it will. >=20 > Any DDL run on a table will cancel an autovacuum over that table (except > for-wraparound autovacuums). If these are rare, you don't need to worry > about that too much. If they are frequent enough that autovacuum will > be cancelled regularly in one table, you'll be sad. >=20 > If you're running vacuum by hand, you'd probably see your DDL blocking > behind VACUUM, which would be very noticeable. I think if you don't > have trouble today without having tuned the system carefully to avoid > such trouble, you're not likely to have trouble with autovacuum either. >=20 > -- > =C3=81lvaro Herrera https://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >=20 >=20 >=20 > --113f4b5b76332f91e5f76ea7fce40b75dd03eb3929ce1e0e3f9ca6ce4f1f Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 3D""
Alvaro= ,

Thanks for the insight, wa= s really helpful!

Best,
<= /div>
Mart=C3=ADn

On Fri, = Sep 14th, 2018 at 12:41 PM, Alvaro Herrera <alvherre@2ndquadrant.com>= wrote:

On 2018-Sep-13, Mart=C3=ADn Fern=C3=A1ndez wrote:

> By performing this changes we are going to start relying more heav= ily
> on the autovacuum work and the concern of "lost work" caused by
> autovacuum canceling itself when locking contention happen showed = up.
> I'm guessing that we might be over thinking this and the canceling= is
> not going to happen as frequently as we think it will.

Any DDL run on a table will cancel an autovacuum over that table (excep= t
for-wraparound autovacuums). If these are rare, you don't need to worr= y
about that too much. If they are frequent enough that autovacuum will
be cancelled regularly in one table, you'll be sad.

If you're running vacuum by hand, you'd probably see your DDL blocking
behind VACUUM, which would be very noticeable. I think if you don't
have trouble today without having tuned the system carefully to avoid
such trouble, you're not likely to have trouble with autovacuum either.

--=20
=C3=81lvaro Herrera https://www.2nd= Quadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Servic= es


--113f4b5b76332f91e5f76ea7fce40b75dd03eb3929ce1e0e3f9ca6ce4f1f--