On Fri, 2020-08-21 at 18:59 +0200, Thomas Boussekey wrote: > I wrote this BASH script to remove the TOAST table, if it may help anyone: > > [...] > toast_pages="$(psql -U postgres --dbname=${database_name} -At --no-psqlrc -c "select relpages from pg_class where relname = 'pg_toast_2613';" )" > toast_tuples="$(psql -U postgres --dbname=${database_name} -At --no-psqlrc -c "select reltuples from pg_class where relname = 'pg_toast_2613';" )" > [...] That are just the estimates. You need to ascertain that the table is *really* empty. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com