table bloat very fast and free space can not be reused
James Pang <jamespang886@gmail.com>
From: James Pang <jamespang886@gmail.com>
To: pgsql-performance@lists.postgresql.org
Date: 2026-04-19T01:28:31Z
Lists: pgsql-performance
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.
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.
Thanks,
James