Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a4b6u-0005qa-9J for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Dec 2015 21:08:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a4b6t-0005K9-S6 for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Dec 2015 21:08:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4b6H-0004ZR-BN for pgsql-bugs@postgresql.org; Thu, 03 Dec 2015 21:07:37 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a4b6E-00074t-6O for pgsql-bugs@postgresql.org; Thu, 03 Dec 2015 21:07:36 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 12105401182; Thu, 3 Dec 2015 13:07:32 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5C4CC1CDE; Thu, 3 Dec 2015 18:07:30 -0300 (CLT) Date: Thu, 3 Dec 2015 18:07:30 -0300 From: Alvaro Herrera To: digoal@126.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13791: postgresql 9.5 beta2 brin bug (cann't auto update) Message-ID: <20151203210730.GT2763@alvherre.pgsql> References: <20151203012048.5892.94586@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151203012048.5892.94586@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org digoal@126.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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs