Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhuying412 opened this issue Sep 9, 2019 · 1 comment

Comments

@zhuying412
Copy link

zhuying412 commented Sep 9, 2019

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

@zhuying412 zhuying412 changed the title e parent table size is not reduced when I type '\d+' after migration the parent table size is not reduced when I type '\d+' after migration Sep 9, 2019
@arssher
Copy link
Contributor

arssher commented Dec 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants