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 1wEJHH-003sGw-2T for pgsql-performance@arkaria.postgresql.org; Sun, 19 Apr 2026 03:57:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEJHE-00ED55-31 for pgsql-performance@arkaria.postgresql.org; Sun, 19 Apr 2026 03:56:56 +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 1wEJHE-00ED4w-1W for pgsql-performance@lists.postgresql.org; Sun, 19 Apr 2026 03:56:56 +0000 Received: from smtp97.iad3b.emailsrvr.com ([146.20.161.97]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wEJHC-00000001ilp-0jOI for pgsql-performance@lists.postgresql.org; Sun, 19 Apr 2026 03:56:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=g001.emailsrvr.com; s=feedback; t=1776571013; bh=xMNic/mdRnWW6Gkwy0W5z1DHHOTulAv5I4Y1RTvAjg0=; h=Subject:From:Date:To:From; b=l8PjAtWQLhVGdwW3dJTcp4vsn+zW4+7IWOJBJz0dPDwCsXWwHhj7jRi/5M/DCNHHe y+/NUfG+z5sK/OuPpQABk80RKNqVADZf1Y+8TECuKEdbTCB9zdm7/xffJJA22KArPK ZtKwW5jDzj2Y9PotixuGrLCpmZXoODLS0zsAoCqU= X-Auth-ID: xof@thebuild.com Received: by smtp21.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 223732029B; Sat, 18 Apr 2026 23:56:53 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.8\)) Subject: Re: table bloat very fast and free space can not be reused From: Christophe Pettus In-Reply-To: Date: Sat, 18 Apr 2026 20:56:52 -0700 Cc: pgsql-performance@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <6EEE234B-D3DC-48D9-97EE-0A86D63554BC@thebuild.com> References: To: James Pang X-Mailer: Apple Mail (2.3776.700.51.11.8) X-Classification-ID: a4324212-aa66-465a-a1ac-9dd79b090d48-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 18, 2026, at 18:28, James Pang wrote: >=20 > experts: > source database v14 , pglogical extension 2.4.5 replication to = new 17, source table very frequent UPDATEs /DELETES /INSERTS and has two = text and jsonb. in source database, application update/delete/insert = through SQL, table size did not increased quickly. but in target pg v17 = , by pglogical apply, we found table increased very quickly , table size = got doubled in days. =20 > Vacuum analyze did not help , only vacuum full can help. = pgstattuple show most of space are free space , that much more than = source. it looks like these replicate DML always asking new pages = instead of reuse existing freespace.=20 > Thanks, >=20 > James Hello, 1. First, are you *sure* that the free space is the source of the bloat, = and not dead tuples? Could you share the queries you ran to detrmine = this? 2. Have you set fillfactor to anything besides 100 on either the source = or the destination? 3. You might consider using in-core logical replication rather than = pglogical for this. By PostgreSQL v14, in-core logical replication is = likely a better choice. Best, -- Christophe=