Drop tables but space not claimed in postgres 12 I have upgraded Postgresql 9.5 to Postgresql 12.4 a few days back using pg_upgrade utility with link  (-k) option.
So basically I am having two data directories i.e. One is old data directory (v9.5) and the current one in running state (v12.4).
Yesterday I have dropped two tables of size 700GB and 300GB.
After connecting to postgres using psql utility I can see database size whose tables was dropped got decreased (with \l+ ) but what is making me worry is that only a few ~50GBs have been freed from storage partition.
I have run vacuumdb only on that database but no luck. I have checked if any deleted open file is there on OS level using lsof but there is none.
Note : Still I have not deleted old data directory (v9.5). I am not sure if deleting will impact my running postgres 12 as I have used 'link' option in pg_upgrade.
Looking for the solution.
You can use TRUNCATE first before dropping and that'll automatically reclaim the space for you. See more information in this StackOverflow: PostgreSQL drop table command is not reducing DB size
Though this shouldn't have to be your process normally with dropping tables, it might help clue you in on why the space isn't being reclaimed.