On Thu, Nov 23, 2017 at 1:28 AM, Alexander Pyhalov <alp@xxxxxx> wrote: > On 11/22/17 07:24 PM, Magnus Hagander wrote: >> What is your postgres version, and what's the "version history" of >> upgrades >> from it (talking pg_upgrade upgrades, not dump/reload upgrades). This >> might >> be fallout from old bugs thaat have been known to cause this type of >> problem. >> > > It's PostgreSQL 9.5.10 (64bit), running on Ubuntu 16.04. > Last major update was done as full dump/restore. You may as well be facing what is called the freeze-the-dead bug, where a VACUUM FREEZE brings back dead tuples: https://www.postgresql.org/message-id/E5711E62-8FDF-4DCA-A888-C200BF6B5742@xxxxxxxxxx There is a patch in the works for it that should land in the next round of minor releases. -- Michael