Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLC48-007ipY-25 for pgsql-general@arkaria.postgresql.org; Tue, 18 Nov 2025 03:07:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vLC46-003a7s-0E for pgsql-general@arkaria.postgresql.org; Tue, 18 Nov 2025 03:07:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLC45-003a7g-2P for pgsql-general@lists.postgresql.org; Tue, 18 Nov 2025 03:07:34 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLC43-0005yO-0q for pgsql-general@lists.postgresql.org; Tue, 18 Nov 2025 03:07:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=srAkWP/vVzRAc5sAByvTnbvwoNnxi+D6UQgiIf6oXdg=; b=ICKj8tIYqYDA5xMFGdOzpuzmTi n/R3Ec6iAdTSD2QfJM1ebkdjF8+12KBRmbKPuiEU81sUQU02rl7xAHym3JtSCXKYBxt4babqURUrP hN0lVYEILh1wxcEubiy4eTywWCuSsYA0vKxR41dIRO6y1FWGUa5EhvBGZv9crQJwYEHh6pooAus2h zFWGR80vWwNBc0naNR0/n4YYCrtVCxo2ym2ENT6sZ5w6Rs3LCh5vCQuvMWiOrmg0zQ3hDRumyhVUE QI8YY2xpu2SbX1LVYYS3LPaV/HjYV9FZCdh7CphuIy++mpnDd8CzMlUa6FVUoQWl6YgWi78OTa8Lx Dc53knww==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1vLC42-00000007mZF-2YDj; Mon, 17 Nov 2025 22:07:30 -0500 Date: Mon, 17 Nov 2025 22:07:30 -0500 From: Bruce Momjian To: Laurenz Albe Cc: Marc Millas , "pgsql-general@lists.postgresql.org" Subject: Re: postgres in swap space Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 17, 2025 at 09:49:59PM +0100, Laurenz Albe wrote: > On Mon, 2025-11-17 at 18:25 +0100, Marc Millas wrote: > > Can someone point me to any doc describing why and how much space postgres uses on the swap of a debian machine ? > > it's an old postgres 10, because it is used by a product for which only this version is certified. > > (no comment on that, please) > > I'm biting down a comment. > > PostgreSQL itself doesn't use any swap space. > > The kernel can decide to swap out memory used by PostgreSQL. How much that is depends > on how you configured the Linux kernel and how much memory PostgreSQL uses. The latter > is mostly determined by "shared_buffers", "work_mem", "maintenance_work_mem" and > "max_connections". I wrote a blog entry about swap space: https://momjian.us/main/blogs/pgblog/2012.html#July_25_2012 -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.