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 1p3Nmk-0006aj-RN for pgsql-admin@arkaria.postgresql.org; Thu, 08 Dec 2022 20:46:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p3Nmi-0005OQ-8M for pgsql-admin@arkaria.postgresql.org; Thu, 08 Dec 2022 20:46:24 +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 1p3Nmh-0005Mf-O9 for pgsql-admin@lists.postgresql.org; Thu, 08 Dec 2022 20:46:23 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p3Nma-0000w5-Km for pgsql-admin@lists.postgresql.org; Thu, 08 Dec 2022 20:46:22 +0000 Received: by mail-ed1-x52a.google.com with SMTP id v8so489530edi.3 for ; Thu, 08 Dec 2022 12:46:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=bh8P00Jx0ftqcJlavZl1JXazdVecK2gxFu2bGeLxroQ=; b=RmGqfWZynPCGks2JxwbxzWXI0MviiZaRg2Z8NI//1EcsuZqrLrcjJLw6b18oSGOfCE E9bHx62e2eFc0mvvj7smQf/tOsmEafUCGMDI6DX7QENaWVq5Y7DfFAx9xW1JZ/6egcE5 tTGpC30AuqSzGy8q2qqrU0ydKibRiCJ1jYlL9D9AsZxEB6B395mDFb7HMLsIVCXRxeBQ wWLaEfFTMkXdku7HPpUXSsCopIFukYaSQdLJVpiRm+kdFjn75HvWjTfKerQnCYxiADTw Mm/QqAd0vLEshNtboADuzhcMU/1oOP0ty8MwHYb+CJKjG9pqW8K3YlB+1wZLwbTs+sOq TfLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bh8P00Jx0ftqcJlavZl1JXazdVecK2gxFu2bGeLxroQ=; b=8R0/K+hi8r3C+PnbWp6eMKM4NwJmTgw2VFCL4QakEyO1/iGfLvvK1qfM6vNgmS0p9H TG3HVEyPkpUETzO9YE7kivHvRwK7B2uElCxrZFTI+cYGKZr0wKBJ+VgdiyTPah0l7jP8 kTFTrf7Rb55ScnctdMEv/uyAX2omZ6kWviw7qgUh24KQeSgE47GKr1uW0u7yORnmnsB2 D/OzoSfhGR6M0dgKrs9ygwNbpA86HxjC80ov448jxV7v8Hl71t1eF6MREVh7idn1ypzk faNnII6dMooTDh3Ewyk2KW8EgJZ6Q8MlZGYZogZzzC3JTudxkLdidrfnyXjoibFQZa7a aKHQ== X-Gm-Message-State: ANoB5pkHJ5Iley9y1NjyKwSF9B/PvjVwzNi69xIryjtqZyCZm1JaoxDH mJLet8J5V4HJCzJsHCBjKN5zEw== X-Google-Smtp-Source: AA0mqf7L8LYT8fBYb/A2odm0ZEmU04yQGIHvsSt8NAR9QZv3HQTAU1/SqNbVJU2ZQ6ng9C8OyiMsuQ== X-Received: by 2002:a05:6402:4006:b0:46c:d5e8:2fc9 with SMTP id d6-20020a056402400600b0046cd5e82fc9mr3920639eda.13.1670532375111; Thu, 08 Dec 2022 12:46:15 -0800 (PST) Received: from localhost.localdomain (62-46-251-40.adsl.highway.telekom.at. [62.46.251.40]) by smtp.gmail.com with ESMTPSA id s1-20020aa7c541000000b0046dc763479bsm347528edr.35.2022.12.08.12.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 12:46:14 -0800 (PST) Message-ID: <9565562b389eb3c105588d3c218907f84d0a2fa9.camel@cybertec.at> Subject: Re: backend_xid and backend_xmin From: Laurenz Albe To: Satalabaha Postgres , pgsql-admin@lists.postgresql.org Date: Thu, 08 Dec 2022 21:46:12 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2022-12-08 at 21:01 +0530, Satalabaha Postgres wrote: > I would like to understand the possible causes for backend_xmin getting > populated  in pg_stat_activity. Can someone throw some light on this? "backend_xid" is set when the session has an open transaction that has modified data and therefore got a transaction ID. "backend_xmin" is set if there is an active snapshot held by the session: - there is a running query - there is an open transaction with an open cursor - there is an open transaction with isolation level REPEATABLE READ or higher Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com