最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

postgresql - Greenplum DB: How to rebuild "pg_aoblkdir_" meta data of an AO table? - Stack Overflow

programmeradmin5浏览0评论

We are using a an Append-optimised(AO) columnar table in Greenplum(v6) which frequently receives both UPDATE and INSERTS. AO tables are not well suited for UPDATES but the columnar orientation make query execution considerably faster in comparison to the row model and also gives column level compression benefits.

However in order to make fast UPDATES I have created an index on the table. Greenplum creates a meta data structure prefixed with pg_ao_blkdir_* during index creation for AO table and this meta data contains mapping info which aids index to find the required row to update.

But on the long run I see this meta data table is growing at an unexpected rate where my data size ≈80 GB but pg_ao_blkdir_ is more than 450GB for the same table. I am trying to find a way to rebuild or recreate this meta data without recreating the table. I have tried below things,

  1. Reindex/drop/recreate index- meta data exists even after dropping the index
  2. Tried to drop meta data itself after dropping the index- Wasn't successful
  3. Lazy vacuum - no change
  4. VACUUM FULL - works on testing setup, but on actual server taking so long

We are using a an Append-optimised(AO) columnar table in Greenplum(v6) which frequently receives both UPDATE and INSERTS. AO tables are not well suited for UPDATES but the columnar orientation make query execution considerably faster in comparison to the row model and also gives column level compression benefits.

However in order to make fast UPDATES I have created an index on the table. Greenplum creates a meta data structure prefixed with pg_ao_blkdir_* during index creation for AO table and this meta data contains mapping info which aids index to find the required row to update.

But on the long run I see this meta data table is growing at an unexpected rate where my data size ≈80 GB but pg_ao_blkdir_ is more than 450GB for the same table. I am trying to find a way to rebuild or recreate this meta data without recreating the table. I have tried below things,

  1. Reindex/drop/recreate index- meta data exists even after dropping the index
  2. Tried to drop meta data itself after dropping the index- Wasn't successful
  3. Lazy vacuum - no change
  4. VACUUM FULL - works on testing setup, but on actual server taking so long
Share Improve this question edited Mar 25 at 2:09 goodfella asked Mar 18 at 4:22 goodfellagoodfella 14311 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The only way to do this is by recreating the AO table . A vacuum full on base AO table also rebuilds meta data but it's slower in comparison to recreating it.

To keep the size in control frequently VACUUM FULL auxiliary table directly .

发布评论

评论列表(0)

  1. 暂无评论