pgsql: Fix interference between cavering indexes and partitioned tables

Started by Teodor Sigaevover 8 years ago6 messagescomitters
Jump to latest
#1Teodor Sigaev
teodor@sigaev.ru

Fix interference between cavering indexes and partitioned tables

The bug is caused due to the original IndexStmt that DefineIndex receives
being overwritten when processing the INCLUDE columns. Use separate list of
index params to propagate to child tables. Add tests covering this case.

Amit Langote and Alexander Korotkov.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5c6110c6a960ad6fe1b0d0fec6ae36ef4eb913f5

Modified Files
--------------
src/backend/commands/indexcmds.c | 27 ++++++++++++++-------------
src/test/regress/expected/indexing.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/indexing.sql | 19 +++++++++++++++++++
3 files changed, 57 insertions(+), 13 deletions(-)

#2Teodor Sigaev
teodor@sigaev.ru
In reply to: Teodor Sigaev (#1)
Re: pgsql: Fix interference between cavering indexes and partitioned tables

Seems, something is wrong here, investigating...

Teodor Sigaev wrote:

Fix interference between cavering indexes and partitioned tables

The bug is caused due to the original IndexStmt that DefineIndex receives
being overwritten when processing the INCLUDE columns. Use separate list of
index params to propagate to child tables. Add tests covering this case.

Amit Langote and Alexander Korotkov.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5c6110c6a960ad6fe1b0d0fec6ae36ef4eb913f5

Modified Files
--------------
src/backend/commands/indexcmds.c | 27 ++++++++++++++-------------
src/test/regress/expected/indexing.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/indexing.sql | 19 +++++++++++++++++++
3 files changed, 57 insertions(+), 13 deletions(-)

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

#3Teodor Sigaev
teodor@sigaev.ru
In reply to: Teodor Sigaev (#2)
Re: pgsql: Fix interference between cavering indexes and partitioned tables

Seems, something is wrong here, investigating...

pg_upgrade test fails only with -O2 on my box. Assert, debug could be any.

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

#4Andres Freund
andres@anarazel.de
In reply to: Teodor Sigaev (#3)
Re: pgsql: Fix interference between cavering indexes and partitioned tables

On 2018-04-11 19:04:53 +0300, Teodor Sigaev wrote:

Seems, something is wrong here, investigating...

pg_upgrade test fails only with -O2 on my box. Assert, debug could be any.

Several of the failing animals aren't using optimization, so it can't be
just that. I think it might make sense considering reverting and trying
to figure this out, without turning half the buildfarm red?

Greetings,

Andres Freund

#5Teodor Sigaev
teodor@sigaev.ru
In reply to: Andres Freund (#4)
Re: pgsql: Fix interference between cavering indexes and partitioned tables

Andres Freund wrote:

On 2018-04-11 19:04:53 +0300, Teodor Sigaev wrote:

Seems, something is wrong here, investigating...

pg_upgrade test fails only with -O2 on my box. Assert, debug could be any.

Several of the failing animals aren't using optimization, so it can't be
just that. I think it might make sense considering reverting and trying

Yep, but on my notebook - only with -02

to figure this out, without turning half the buildfarm red?Agree, five minutes

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

In reply to: Teodor Sigaev (#5)
Re: pgsql: Fix interference between cavering indexes and partitioned tables

On Wed, Apr 11, 2018 at 9:17 AM, Teodor Sigaev <teodor@sigaev.ru> wrote:

Several of the failing animals aren't using optimization, so it can't be
just that. I think it might make sense considering reverting and trying

Yep, but on my notebook - only with -02

I suggest using Valgrind to make sure that a patch + tests don't have
a problem like this before pushing. That's not perfect, of course, but
it's an easy way to save yourself some trouble.

--
Peter Geoghegan