postgrespro / vops

Other
166 stars 22 forks source link

when start a new backend or restart the DB, agg operation will get a null value at first time #2

Closed junfenglu2016 closed 7 years ago

junfenglu2016 commented 7 years ago

[pgrel@centos01 ~]$ psql -h /pgreltmp/ postgres psql (9.6.2) Type "help" for help.

postgres=# select sum(review_rating) from vops_customer_reviews ; sum

(1 row)

postgres=# select sum(review_rating) from vops_customer_reviews ; sum

2602248 (1 row)

knizhnik commented 7 years ago

I think that first result was produced when vops extension is not yet loaded. This problems is explained in VOPS documentation. Two possible workarounds:

  1. Add VOPS to shared_preload_libraries list/.
  2. Call vops_initialize() before any access to table with VOPS tiles.