postgrespro/pg_pathman

the parent table size is not reduced when I type '\d+' after migration

zhuying412 opened this issue · 1 comments

Problem description

  1. the parent table size is not reduced when I type '\d+' after I run 'select partition_table_concurrently('parent_table',10000,1.0);' .
  2. I got 207G before the migration but I still got 207G after migration when I type '\d+'.
  3. It takes 10 minutes and return 0 records when I run the command with ‘select id from parent_table limit 10’ .

Is this the correct result? should I ‘TRUNCATE parent_table’?

Environment

extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
------------+----------+--------------+----------------+------------+-------------------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
pg_pathman | 1030850 | 2200 | f | 1.5 | {1031004,1031015} | {"",""}

PostgreSQL 11.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (EulerOS 4.8.5-4), 64-bit

I got 207G before the migration but I still got 207G after migration when I type '\d+'.

That's quite normal until you vacuum the parent table (of course you can do that in progress, while partitioning bgw is still running).

It takes 10 minutes and return 0 records when I run the command with ‘select id from parent_table limit 10’

This is definitely not normal; table should always be accessible with all its rows. Examining server logs might help.

should I ‘TRUNCATE parent_table’?

No, worker deletes moved data itself.