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 1kmCBX-0001A4-NQ for pgsql-admin@arkaria.postgresql.org; Mon, 07 Dec 2020 08:47:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmCBW-0002OB-8b for pgsql-admin@arkaria.postgresql.org; Mon, 07 Dec 2020 08:47: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 1kmCBV-0002O3-TL for pgsql-admin@lists.postgresql.org; Mon, 07 Dec 2020 08:47:54 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kmCBS-0001jC-R5 for pgsql-admin@postgresql.org; Mon, 07 Dec 2020 08:47:52 +0000 Received: by mail-ej1-x629.google.com with SMTP id a16so18342333ejj.5 for ; Mon, 07 Dec 2020 00:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=sdrjitF0ss6/lEZqyEbLqasjwa4HpB3ueY/pds7Ro98=; b=xWjim8RvywdwxDnRCVdHWUD6fZuT0vp8OXryjUttSLBmcpB1dp/Qj5jgmaKMzwt64y frSHhAyJ3YMsoalbKOo2BHedBDK24VKXKRAGmpPwfGRoFx0mDSH1V79aKD2brBp0kL+v emky0311n/+MZBdO3J7fVGOjK7lcNqbiVAjrDe6kTCIezeqBT5Nq5ZZEnROvPqh+MmAF 98G6jxY/oiHz4MbqEthjw6DV/ujlIP312uJZzBmXJEvaVpMutcAaNtLmLfC8IA7thw57 G3LMJKK6W2z0X7GKwp1kja4VCjPVWOivhUalcNHv6yS6WW+tSUuxXOsiw/EgdXarV1qs Z0fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=sdrjitF0ss6/lEZqyEbLqasjwa4HpB3ueY/pds7Ro98=; b=DpDXFBDRfCRgJkUXz/8Z8YAkxjlJDS8BKeQIfcd8s8iElAANzLPXHIlZKt+n8SU10S AyFFEyWDkSD5wH/kBg9qwGqO3wLcNYh72QE2I6OAuDzeAEvsAIgL5tAPCybDknSqc20i xl5eRDFTu28/qeOf+hlXIQkxnqLSgdj7WkwPW1Cz0cFVbQyA+X5I22WuLbIMvolO4T8H e0b5zJysZhu7YqZavTEZnGz7C1ukhv0CdMOW7wPSo8JtE3aqVgp81YWWSGyGtJ9GShNE NMcYpmwGlooWhm2dm3xaP5BdxtZPF0KpinUpE1Ohnrvaf36HlSPp5fhUAtwwH1EsKKJE Pv3w== X-Gm-Message-State: AOAM5309zjtVbrta/dTNUVMGZrD0VcTEqn6OuFmmeO+0FcnlYH5X9zHH rEIibcvLtsSx1r8VBpQ+HqDhLA== X-Google-Smtp-Source: ABdhPJxSnCVGg7xAs/3EunFBfvyCwBVJ9K5yZ4gPx24dV7DbVh4JUr25JuotQPdfBSctRP8ECGOcPw== X-Received: by 2002:a17:906:9441:: with SMTP id z1mr18695228ejx.288.1607330868333; Mon, 07 Dec 2020 00:47:48 -0800 (PST) Received: from localhost.localdomain (217-149-172-51.nat.highway.telekom.at. [217.149.172.51]) by smtp.gmail.com with ESMTPSA id s6sm11227234ejb.122.2020.12.07.00.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 00:47:47 -0800 (PST) Message-ID: Subject: Re: idle transactions vs memory From: Laurenz Albe To: Atul Kumar , pgsql-admin Date: Mon, 07 Dec 2020 09:47:46 +0100 In-Reply-To: References: <10CEA2EF-210C-48F3-AC4C-F035292E6CAD@elevated-dev.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-12-07 at 11:04 +0530, Atul Kumar wrote: > The transactions state is 'idle' from more than 15 minutes, so my > question is that are they occupying any amount of RAM? > > are these 'idle' transactions are using CPU ? They are not using any CPU, and they are using very little RAM. They make starting a query (taking a snapshot) a little slower, but you probably won't notice that. Their biggest danger is that there is no guarantee that they remain idle, and if you have too many active sessions, your database might have more work than it can handle. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com