Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-19 Thread Teodor Sigaev
Thank you, both patches are pushed. Alexander Korotkov wrote: On Wed, Apr 18, 2018 at 9:21 PM, Peter Geoghegan > wrote: On Wed, Apr 18, 2018 at 11:12 AM, Fujii Masao > wrote: > On Thu, Apr 5,

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-19 Thread Alexander Korotkov
On Thu, Apr 19, 2018 at 9:19 AM, Teodor Sigaev wrote: > Another thing that I noticed is that the metapage stores >> btm_last_cleanup_num_heap_tuples as a float4, even though >> xl_btree_metadata stores it as a double. I suggest that both places >> store it as

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-19 Thread Teodor Sigaev
Another thing that I noticed is that the metapage stores btm_last_cleanup_num_heap_tuples as a float4, even though xl_btree_metadata stores it as a double. I suggest that both places store it as float8, to be consistent. (It should not be double because we always avoid using

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-18 Thread Alexander Korotkov
On Wed, Apr 18, 2018 at 9:21 PM, Peter Geoghegan wrote: > On Wed, Apr 18, 2018 at 11:12 AM, Fujii Masao > wrote: > > On Thu, Apr 5, 2018 at 1:29 AM, Teodor Sigaev wrote: > >> Skip full index scan during cleanup of B-tree indexes when

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-18 Thread Fujii Masao
On Thu, Apr 5, 2018 at 1:29 AM, Teodor Sigaev wrote: > Skip full index scan during cleanup of B-tree indexes when possible This commit added XLOG_BTREE_META_CLEANUP, so btree_desc() and btree_identify() should be updated so that they handle XLOG_BTREE_META_CLEANUP. But ISTM

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-05 Thread Alexander Korotkov
On Thu, Apr 5, 2018 at 3:24 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Apr 5, 2018 at 2:26 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Thu, Apr 5, 2018 at 6:28 AM, Tom Lane wrote: >> >>> Peter Geoghegan writes:

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-05 Thread Alexander Korotkov
On Thu, Apr 5, 2018 at 2:26 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Apr 5, 2018 at 6:28 AM, Tom Lane wrote: > >> Peter Geoghegan writes: >> >>> TRAP: FailedAssertion("!(metad->btm_version == 3)", File: >> >>>

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-05 Thread Alexander Korotkov
On Thu, Apr 5, 2018 at 6:28 AM, Tom Lane wrote: > Peter Geoghegan writes: > >>> TRAP: FailedAssertion("!(metad->btm_version == 3)", File: > >>> "/home/pg/postgresql/root/build/../source/src/backend/ > access/nbtree/nbtpage.c", > >>> Line: 619) > > >> Hm,

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-05 Thread Alexander Korotkov
On Thu, Apr 5, 2018 at 1:32 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Wed, Apr 4, 2018 at 7:29 PM, Teodor Sigaev wrote: > >> Skip full index scan during cleanup of B-tree indexes when possible >> > > Thank you for committing this. > > It appears that patch

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Peter Geoghegan
On Wed, Apr 4, 2018 at 8:28 PM, Tom Lane wrote: >> This was discovered while testing/reviewing the latest version of the >> INCLUDE covering indexes patch. It now seems to be unrelated. > > Oh, wait ... I wonder if you saw that because you were running a new > backend without

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Tom Lane
Peter Geoghegan writes: >>> TRAP: FailedAssertion("!(metad->btm_version == 3)", File: >>> "/home/pg/postgresql/root/build/../source/src/backend/access/nbtree/nbtpage.c", >>> Line: 619) >> Hm, buildfarm's not complaining --- what's the test case? > This was discovered while

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Peter Geoghegan
On Wed, Apr 4, 2018 at 5:58 PM, Tom Lane wrote: >> TRAP: FailedAssertion("!(metad->btm_version == 3)", File: >> "/home/pg/postgresql/root/build/../source/src/backend/access/nbtree/nbtpage.c", >> Line: 619) > > Hm, buildfarm's not complaining --- what's the test case? This was

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Michael Paquier
On Wed, Apr 04, 2018 at 08:58:14PM -0400, Tom Lane wrote: > Peter Geoghegan writes: > > I also see an assertion failure within _bt_getrootheight(): > > > TRAP: FailedAssertion("!(metad->btm_version == 3)", File: > >

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Tom Lane
Peter Geoghegan writes: > I also see an assertion failure within _bt_getrootheight(): > TRAP: FailedAssertion("!(metad->btm_version == 3)", File: > "/home/pg/postgresql/root/build/../source/src/backend/access/nbtree/nbtpage.c", > Line: 619) Hm, buildfarm's not complaining ---

Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

2018-04-04 Thread Peter Geoghegan
On Wed, Apr 4, 2018 at 3:32 PM, Alexander Korotkov wrote: > Hi! > > On Wed, Apr 4, 2018 at 7:29 PM, Teodor Sigaev wrote: >> >> Skip full index scan during cleanup of B-tree indexes when possible > > > Thank you for committing this. > > It appears that