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.94.2) (envelope-from ) id 1spZBs-002SBU-3c for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2024 20:16:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1spZBq-003WkL-I4 for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2024 20:16:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spZBo-003WkB-U8 for pgsql-general@lists.postgresql.org; Sat, 14 Sep 2024 20:16:18 +0000 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spZBj-001Cew-NS for pgsql-general@postgresql.org; Sat, 14 Sep 2024 20:16:16 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7AFBD1140073; Sat, 14 Sep 2024 16:16:10 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Sat, 14 Sep 2024 16:16:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1726344970; x=1726431370; bh=z7DnLAl8ekRfvLQ2MKx+zNSyr/qIgb+zP2ePavoZwFE=; b= QrLNfM0vmm3ekHCTw6heMoXar7SrCxImo6uANqviLXjYD6DxAYVJeY9VO8Ir4dCo VGs4mZE9yOD6AGY2jo3foGt+gWbu7pZuw6WPQSvYfuUuq3ranLN9GAYqlLRdNOTV 1yxRTPc8MTaKVoSFS6S7XcXPfSHGSGF2eT+dIjCz6WP42Bc4zmlm4JDGFdVji9Re tJc1BfTlExGPdoChIsU19bTwUA0mU+aV9bKmJaxK+/RIk4jCuR6au9TnMviuD1q+ r7B8NO15JdoGdS9pughJa09pOYAm97HGKqPdU11PGQ1QzTMvg71o0OFWEulA5VuP mBPUWcjPKys7OHXRAveF1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726344970; x= 1726431370; bh=z7DnLAl8ekRfvLQ2MKx+zNSyr/qIgb+zP2ePavoZwFE=; b=Z f7nEU/+KkTH4W0/7GHstsRAc0NvjjP9NHg3/IOl2tlxKXwN5XNxYbZVEDORBBJfm +3IPwOB2UX4tZqmVhaSFZbw2XcWCzGTrVLX64wFbQDDZjf6RSt1BCe2Zr4kv8Tyk a1ns6owq9BbRfqJ2KhZiIBg+sA2NUNMkS7eYK/Un8aki1e0SrbDyMgKT2KD95XOv VH5RO42Df6GkYBn76NZyVoa5QAGteoUm0NtCUuGzftRYEYF9o/DtKMdyMZ+n5iv5 2GDzQim+O9TcKcMAfIPWN9MVHqa8g7ubHxQ+vL3J/oHtD/IZPsuPzFyjwixTu8j1 AZJhegD2tPJRKcJbJ2+YQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudektddgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeefgeefieeutdfggfet gefgheekjeehteeileeigfetieekjedvieeviefgheevtdenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegr khhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopeholhhivhhinhgrhiehgedusehgmhgrihhlrdgtohhmpdhrtghpthht ohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 14 Sep 2024 16:16:09 -0400 (EDT) Message-ID: <5dce838e-a08d-4095-8b03-5e1230505bd0@aklaver.com> Date: Sat, 14 Sep 2024 13:16:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reg: Size difference To: Vinay Oli Cc: pgsql-general@postgresql.org References: <65a64890-17b9-45ec-8ac4-afb61794806c@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/14/24 11:10, Vinay Oli wrote: > Hi > >  I've checked the database size by meta command \l+ and even I checked > from file system level du -sh 49181 folder. 49181 is the db oid. Minimal information is not going to solve this issue. Provide the exact output of commands from: 1) The Primary database. 2) The Standby database. 3) Per post from Laurenz Albe, any objects in 49181/ that differ in size between the primary and standby. Also: 1) Describe the exact type of replication you are using? 2) The replication settings you are using. 3) The exact Postgres versions on both sides. 4) The OS and version on both sides. 5) Have you checked the Postgres logs on the standby side to see if the server is showing any relevant errors? > > Pgwal directory is same 40gb at primary and standby servers. > > All the directories are of same size,  49181 folder (oid)  is only > having different size. > > > > Thanks, > Vinay kumar > > On Sat, Sep 14, 2024, 10:59 PM Adrian Klaver > wrote: > > On 9/14/24 10:19, Vinay Oli wrote: > > Hi Team > > > > I have been using PostgreSQL for the past 6 years. PostgreSQL has > > significantly impacted my life, providing me with great > opportunities > > for knowledge and self-development. > > > > I'm currently facing a strange issue with PostgreSQL 15.0. I have a > > primary-standby setup that is in sync, with a replication slot in > place. > > There are 18 databases, and one of the databases on the primary > side is > > 104 GB, while the same database on the standby side is 216 GB. > Both are > > in sync with zero delay. > > How are you measuring the size? > > If you are measuring on the files system what is the size of the base/ > and pg_wal/ sub-directories in the %PG_DATA directoty? > > > > > Could this be a bug? If so, has it been resolved in newer > releases? If > > it is not a bug, how can this issue be fixed? Is there a solution > or any > > supporting documentation available? > > > > WAL and log files are being rotated properly. The issue is with a > > database named services_mfs. On the primary cluster, the > services_mfs > > database is 104GB, but on the standby cluster, it is 216GB, even > though > > both cluster are in sync. The standby database is only used in > case of a > > crash, which is managed by a Patroni cluster with etcd. > > > > > > > > Thanks, > > > > Vinay Kumar > > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com