Re: BUG #13791: postgresql 9.5 beta2 brin bug (cann't auto update)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: digoal(at)126(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13791: postgresql 9.5 beta2 brin bug (cann't auto update)
Date: 2015-12-03 21:07:30
Message-ID: 20151203210730.GT2763@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

digoal(at)126(dot)com wrote:

> ostgres=# create unlogged table test(id serial8, info text, crt_time
> timestamp);
> CREATE TABLE
> postgres=# alter sequence test_id_seq cache 10000000;
> ALTER SEQUENCE
> postgres=# create index idx_test on test using brin (id) with
> (pages_per_range =1);
> CREATE INDEX
>
> $vi test.sql
> insert into test (info) select null from generate_series(1,10000000);
>
> $pgbench -M prepared -n -r -P 1 -f ./test.sql -c 1 -j 1 -t 1000
>
> the brin index cann't auto update, when i create it 224k. and when test some
> times elapse, it's also 224k.

Yeah, index summarization is not immediate for block ranges that are not
already summarized. You can invoke summarization by running VACUUM on
the table, or by using the brin_summarize_new_values() function. That
would improve query execution too.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2015-12-03 21:10:47 Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Previous Message Tom Lane 2015-12-03 20:19:47 Re: BUG #13792: Weird querry planner behavior