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 1nghmu-0007j9-Ky for pgsql-general@arkaria.postgresql.org; Tue, 19 Apr 2022 06:56:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nghms-000786-G4 for pgsql-general@arkaria.postgresql.org; Tue, 19 Apr 2022 06:56:34 +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 1nghmr-00077q-U3 for pgsql-general@lists.postgresql.org; Tue, 19 Apr 2022 06:56:34 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nghmk-0002OG-Qg for pgsql-general@lists.postgresql.org; Tue, 19 Apr 2022 06:56:32 +0000 Received: by mail-pj1-x1032.google.com with SMTP id j8-20020a17090a060800b001cd4fb60dccso1452226pjj.2 for ; Mon, 18 Apr 2022 23:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=cI0P1cSms3r+oY9NZ319VaQNiCK36JNyWnoKBTFrrmw=; b=HzlgmLswAqbKVjYWZEFG+6KU8j96vS7wQeR2H/lvnpRJ3FAAEryHJijNBD6Lkf+TtB oE/2zqhhq5JGM+CSPTcUrQjeR8N81rIiQnw9ERvCXgxQEMyTKFLHMqjm8LmC3sAOh2we yYslE5RGI8UXEwGsr0BMu8jkU+QTc+g5hIbb4ppdIK4b4/51C22yo10QAzk5KnftjkPZ Z/31cqrfnp6wPl0b7+jVo3F/tJGY3Q0GEzCCTqa+QkU53FUbfbMJ1HJ9TtnJMytY1QxL slb6cqsowBNDkdObvuxjRC3MruQD8BiEFeJ7v++/1PgpAILXMsIGVUo/iBuolneqOQx0 dlww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=cI0P1cSms3r+oY9NZ319VaQNiCK36JNyWnoKBTFrrmw=; b=xvHUK/VOEjbEa7U5BUWojxTLCsdwsotpGDK1VRntmAVQgJ9vNxsVPAVSsH69lPZCqv p/YKZ4FDpLmYvcihfoNmGyxIhHDsvu6wjqOIdfU4TkfQNTVe3V0/PvSTHhMYLbknkDz3 6qWkNd1p85kiOq2i/UaNCkXjzelwG0iJYMgMrf2XirUkMsalz5Xyz6+RfeAyuFfEKv7Q 5LfoOD2uZxt29Ucq6YoJNesVKSaMoO3qjYxKnjzZXIr/jGtnFykb2J7zWC/tmWxT5hFt S2PPhmsWpJCKQwVZ7go4Zpy8PwRxkOqaRMiMAOR3TN25JxxvK50k6rek0T2Pq4W/w1Z5 BXag== X-Gm-Message-State: AOAM530ueYm30Osr12t6WEMl9bfIAWR883HiMIsW9o5FHJB2q4sZcMBI 13202+MV8mxFOMJjgy9gNLGG/3J0HHg= X-Google-Smtp-Source: ABdhPJy97XwgWTE8hp8f8S2l5jsAEhlTbmtySekYfHMu+4IiQ6TLnmn/D83mUzabRoXFwa4T00gENg== X-Received: by 2002:a63:fa17:0:b0:3a9:ab5e:229 with SMTP id y23-20020a63fa17000000b003a9ab5e0229mr9176713pgh.400.1650351384887; Mon, 18 Apr 2022 23:56:24 -0700 (PDT) Received: from [10.128.71.194] ([155.98.131.2]) by smtp.gmail.com with ESMTPSA id j19-20020a056a00235300b0050a858af58fsm4765238pfj.145.2022.04.18.23.56.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Apr 2022 23:56:24 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------BFY975MPlZZR82beijgNhp0P" Message-ID: <9b2148e7-0925-9516-9dad-228c22163a1d@gmail.com> Date: Tue, 19 Apr 2022 00:56:23 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: oldest xmin is far in the past :: BUT xmin is not available in system Content-Language: en-CA To: pgsql-general@lists.postgresql.org References: From: Rob Sargent In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------BFY975MPlZZR82beijgNhp0P Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/19/22 00:06, David G. Johnston wrote: > > > On Monday, April 18, 2022, bhargav kamineni wrote: > > Hi Team, > > It seems vacuum is behaving somewhat weird on postgres database , > observing below HINTS on the vacuum logs > > WARNING:  oldest xmin is far in the past > > HINT:  Close open transactions soon to avoid wraparound problems. > > You might also need to commit or roll back old prepared > transactions, or drop stale replication slots. > > > What version? > > What other databases are present? > > Others can give better (more detailed/nuanced) guidance but if you can > just start vacuuming every table in every database manually, you > probably should just do that.  Vacuum freeze specifically. > > David J. > |This site has lots of useful queries for this sort of issue: https://www.shanelynn.ie/postgresql-find-slow-long-running-and-blocked-queries. I think you're looking for a very old transaction that is probably not going to finish, must be terminated. | --------------BFY975MPlZZR82beijgNhp0P Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 4/19/22 00:06, David G. Johnston wrote:


On Monday, April 18, 2022, bhargav kamineni <kbn98406@gmail.com> wrote:
Hi Team,

It seems vacuum is behaving somewhat weird on postgres database , observing below HINTS on the vacuum logs

WARNING:  oldest xmin is far in the past

HINT:  Close open transactions soon to avoid wraparound problems.

You might also need to commit or roll back old prepared transactions, or drop stale replication slots.


What version?

What other databases are present?

Others can give better (more detailed/nuanced) guidance but if you can just start vacuuming every table in every database manually, you probably should just do that.  Vacuum freeze specifically.

David J.

This site has lots of useful queries for this sort of issue:
https://www.shanelynn.ie/postgresql-find-slow-long-running-and-blocked-queries.  I think you're looking for a very old transaction that is probably not going to finish, must be terminated.

--------------BFY975MPlZZR82beijgNhp0P--