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 1lrxhP-0001kH-7r for pgsql-admin@arkaria.postgresql.org; Sat, 12 Jun 2021 07:04:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrxhO-0008N1-5g for pgsql-admin@arkaria.postgresql.org; Sat, 12 Jun 2021 07:04:54 +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 1lrxhN-0008Ix-Qg for pgsql-admin@lists.postgresql.org; Sat, 12 Jun 2021 07:04:53 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lrxhL-0001Fh-6e for pgsql-admin@postgresql.org; Sat, 12 Jun 2021 07:04:52 +0000 Received: by mail-il1-x132.google.com with SMTP id z1so7309260ils.0 for ; Sat, 12 Jun 2021 00:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R5b3OgZQCto9ov5tqXsE5C0CZ1425P5iXGN/by8hipc=; b=XCqn1APigsdUXoXjCPJI55EYrlVC8lMgsiLNME7TVxyMYeaAHKeh4osj7AJ8sg7/9i Saq8P+Fk/6txELRr6BeI/VCueKGIukpc5RTpq/bsqCmuk9zzF1JHEoj+tacO/iBfIOXL gRQZM39Q/1SUkQv4L5yufjYDFalLem+ta7zvd4WuQozNOwhB9eDaWn9LbPsqYJIQVOrW CtXnHBwa2GdylaEiZvs+EeZ5cngXbaO2obOTnTGpZJ/wN60pYL0tN6uzgSqDAXHMY8N0 n+3k9Agwvw2Vqb8K9zfkCfGF79riqniF992s4J8cLSmHN4RvldTQRoBrc3Xl/QjOsCb+ QnCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R5b3OgZQCto9ov5tqXsE5C0CZ1425P5iXGN/by8hipc=; b=CHKM8kjVnLNHK5LL8cXXo3X8+E8nx+w90GAb2RNPscja7/sX1xZELHucaXHRbcs6h+ nkxgR4/VbKlaKkvlq+sBlUqQF/p3BBfdVIKN8ytpXXkpiWv0l8Uo3Cw2sLuRO290YASP U7VaOt/R05SPQuWGCZvfoKJLrBrvTZHmm8tKU8G09uhwEJIvq+uvTtdEOzz1ED+Tn0W/ 7wjZ9eCUgF3r5perIjGenbah1myMiKsxeHJKsvqM6CTTCuWkAPukwS6QlxHTgR7LQ0qn FqigmCLngVp8x3veV/iLTbvRTVSEBxj/czkxloYrkYY8N4LCk4m2EikjklSJTBRV6M0F g3kA== X-Gm-Message-State: AOAM533xMBQpRBRXKznUNn9b/41w33swc2N9piZx2lBqAkVHxPb9xagH z17pMvjEGvgwhehJCxOrtlRjIBP3h5DqEbMxQGY= X-Google-Smtp-Source: ABdhPJzPtd1P4ZVL6sAxB/xdxeW2ZCpbAtfgIPSztN3cVeg1MsAzdyZ325+dCeIaWOgrGjSNIgleR3zPFhrSCanNobk= X-Received: by 2002:a92:b0b:: with SMTP id b11mr5994889ilf.301.1623481489756; Sat, 12 Jun 2021 00:04:49 -0700 (PDT) MIME-Version: 1.0 References: <1972046.1623436429@sss.pgh.pa.us> In-Reply-To: <1972046.1623436429@sss.pgh.pa.us> From: Nikhil Shetty Date: Sat, 12 Jun 2021 12:34:38 +0530 Message-ID: Subject: Re: vacuumdb idle processes To: Tom Lane Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary="0000000000007f165205c48c3d9d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007f165205c48c3d9d Content-Type: text/plain; charset="UTF-8" Hi Tom, Apparently not all that well, if it failed to keep us out of an > autovacuum-to-prevent-wraparound situation. I suppose you had autovacuum > disabled because you thought this lashup was sufficient? No, autovacuum was enabled but seems it was not able to catch up with the amount of transaction or it might have been delayed due to postgres favouring other txns that conflict -- Need to check this though Perhaps this is the last remaining table so vacuumdb has nothing > else for them to do. > Does this mean vacuumdb will release all db connections(jobs - 8 in this case) only after all connections have performed their vacuum and then disconnected? Even if one is pending the others will be still connected but in idle state? Is my understanding correct? Thanks and Regards, Nikhil On Sat, Jun 12, 2021 at 12:03 AM Tom Lane wrote: > Nikhil Shetty writes: > > I have done a setup to run vacuumdb with 8 parallel jobs daily. It has > been > > running quite well. > > Apparently not all that well, if it failed to keep us out of an > autovacuum-to-prevent-wraparound situation. I suppose you had autovacuum > disabled because you thought this lashup was sufficient? > > > Just today I saw there is an aggressive autovacuum process running(to > > prevent wraparound) on one of the table. vacuumdb which started later > > spawned the 8 connections. One connection (doing vacuum on the table on > > which an aggressive autovacuum is running) is waiting for "autovacuum(to > > prevent wraparound)" to complete while the other 7 connections are just > > sitting idle. > > > I am okay that one connection is waiting since an aggressive autovacuum > is > > running on that table but how come other connections have not released > the > > sesion yet? Any reason for this? > > Perhaps this is the last remaining table so vacuumdb has nothing > else for them to do. > > regards, tom lane > --0000000000007f165205c48c3d9d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tom,=

Apparently not all that well, if it f= ailed to keep us out of an
autovacuum-to-prevent-wraparound situation.= =C2=A0 I suppose you had autovacuum
disabled because you thought this la= shup was sufficient?

=C2=A0No, autovacuum w= as enabled but seems it was not able to catch up with the amount of transac= tion or it might have been delayed due to postgres favouring other txns tha= t conflict -- Need to check this though

Perhaps this is the last remaining table so vacuumdb has nothing
else = for them to do.

Does this mean vacuumdb= will release all db connections(jobs - 8 in this case) only =C2=A0after al= l connections have performed their vacuum and then disconnected? Even if on= e is pending the others will be still connected but in idle state? Is my un= derstanding correct?

Thanks and Regards,
Nikhil

On Sat, Jun 12, 2021 at 12:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
=
Nikhil Shetty <nikhil.dba04@gmail.com> writes:
> I have done a setup to run vacuumdb with 8 parallel jobs daily. It has= been
> running quite well.

Apparently not all that well, if it failed to keep us out of an
autovacuum-to-prevent-wraparound situation.=C2=A0 I suppose you had autovac= uum
disabled because you thought this lashup was sufficient?

> Just today I saw there is an aggressive autovacuum process running(to<= br> > prevent wraparound) on one of the table. vacuumdb which started later<= br> > spawned the 8 connections. One connection (doing vacuum on the table o= n
> which an aggressive autovacuum is running) is waiting for "autova= cuum(to
> prevent wraparound)" to complete while the other 7 connections ar= e just
> sitting idle.

> I am okay that one connection is waiting since an aggressive autovacuu= m is
> running on that table but how come other connections have not released= the
> sesion yet? Any reason for this?

Perhaps this is the last remaining table so vacuumdb has nothing
else for them to do.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane
--0000000000007f165205c48c3d9d--