pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Don't shut down Gather[Merge] early under Limit.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Don't shut down Gather[Merge] early under Limit.
@ 2019-11-26 04:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Amit Kapila @ 2019-11-26 04:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't shut down Gather[Merge] early under Limit.

Revert part of commit 19df1702f5.

Early shutdown was added by that commit so that we could collect
statistics from workers, but unfortunately, it interacted badly with
rescans.  The problem is that we ended up destroying the parallel context
which is required for rescans.  This leads to rescans of a Limit node over
a Gather node to produce unpredictable results as it tries to access
destroyed parallel context.  By reverting the early shutdown code, we
might lose statistics in some cases of Limit over Gather [Merge], but that
will require further study to fix.

Reported-by: Jerry Sievers
Diagnosed-by: Thomas Munro
Author: Amit Kapila, testcase by Vignesh C
Backpatch-through: 9.6
Discussion: https://postgr.es/m/87ims2amh6.fsf@jsievers.enova.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f7ae68aacd9d9cd18a62575b927491d56e57a555

Modified Files
--------------
src/backend/executor/nodeLimit.c              | 14 ++++-----
src/test/regress/expected/select_parallel.out | 41 ++++++++++++++++++++++++++-
src/test/regress/sql/select_parallel.sql      | 22 +++++++++++++-
3 files changed, 67 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't shut down Gather[Merge] early under Limit.
@ 2019-11-26 04:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Amit Kapila @ 2019-11-26 04:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't shut down Gather[Merge] early under Limit.

Revert part of commit 19df1702f5.

Early shutdown was added by that commit so that we could collect
statistics from workers, but unfortunately, it interacted badly with
rescans.  The problem is that we ended up destroying the parallel context
which is required for rescans.  This leads to rescans of a Limit node over
a Gather node to produce unpredictable results as it tries to access
destroyed parallel context.  By reverting the early shutdown code, we
might lose statistics in some cases of Limit over Gather [Merge], but that
will require further study to fix.

Reported-by: Jerry Sievers
Diagnosed-by: Thomas Munro
Author: Amit Kapila, testcase by Vignesh C
Backpatch-through: 9.6
Discussion: https://postgr.es/m/87ims2amh6.fsf@jsievers.enova.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d0ccfa9d6a3da0a47ee02947f54dd36f9f90972c

Modified Files
--------------
src/backend/executor/nodeLimit.c              | 14 ++++-----
src/test/regress/expected/select_parallel.out | 41 ++++++++++++++++++++++++++-
src/test/regress/sql/select_parallel.sql      | 22 +++++++++++++-
3 files changed, 67 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't shut down Gather[Merge] early under Limit.
@ 2019-11-26 04:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Amit Kapila @ 2019-11-26 04:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't shut down Gather[Merge] early under Limit.

Revert part of commit 19df1702f5.

Early shutdown was added by that commit so that we could collect
statistics from workers, but unfortunately, it interacted badly with
rescans.  The problem is that we ended up destroying the parallel context
which is required for rescans.  This leads to rescans of a Limit node over
a Gather node to produce unpredictable results as it tries to access
destroyed parallel context.  By reverting the early shutdown code, we
might lose statistics in some cases of Limit over Gather [Merge], but that
will require further study to fix.

Reported-by: Jerry Sievers
Diagnosed-by: Thomas Munro
Author: Amit Kapila
Backpatch-through: 9.6
Discussion: https://postgr.es/m/87ims2amh6.fsf@jsievers.enova.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1ad0df67c7904ff64166d7a453c53943f069ee52

Modified Files
--------------
src/backend/executor/nodeLimit.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't shut down Gather[Merge] early under Limit.
@ 2019-11-26 04:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Amit Kapila @ 2019-11-26 04:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't shut down Gather[Merge] early under Limit.

Revert part of commit 19df1702f5.

Early shutdown was added by that commit so that we could collect
statistics from workers, but unfortunately, it interacted badly with
rescans.  The problem is that we ended up destroying the parallel context
which is required for rescans.  This leads to rescans of a Limit node over
a Gather node to produce unpredictable results as it tries to access
destroyed parallel context.  By reverting the early shutdown code, we
might lose statistics in some cases of Limit over Gather [Merge], but that
will require further study to fix.

Reported-by: Jerry Sievers
Diagnosed-by: Thomas Munro
Author: Amit Kapila, testcase by Vignesh C
Backpatch-through: 9.6
Discussion: https://postgr.es/m/87ims2amh6.fsf@jsievers.enova.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/080313f8296fb0bcc74bd70fc8e15cd64f45945e

Modified Files
--------------
src/backend/executor/nodeLimit.c              | 14 ++++-----
src/test/regress/expected/select_parallel.out | 41 ++++++++++++++++++++++++++-
src/test/regress/sql/select_parallel.sql      | 22 +++++++++++++-
3 files changed, 67 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't shut down Gather[Merge] early under Limit.
@ 2019-11-26 04:25  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Amit Kapila @ 2019-11-26 04:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't shut down Gather[Merge] early under Limit.

Revert part of commit 19df1702f5.

Early shutdown was added by that commit so that we could collect
statistics from workers, but unfortunately, it interacted badly with
rescans.  The problem is that we ended up destroying the parallel context
which is required for rescans.  This leads to rescans of a Limit node over
a Gather node to produce unpredictable results as it tries to access
destroyed parallel context.  By reverting the early shutdown code, we
might lose statistics in some cases of Limit over Gather [Merge], but that
will require further study to fix.

Reported-by: Jerry Sievers
Diagnosed-by: Thomas Munro
Author: Amit Kapila, testcase by Vignesh C
Backpatch-through: 9.6
Discussion: https://postgr.es/m/87ims2amh6.fsf@jsievers.enova.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1cc3a90c7551cf1f33611152eba2bca56e0b721e

Modified Files
--------------
src/backend/executor/nodeLimit.c              | 14 ++++-----
src/test/regress/expected/select_parallel.out | 41 ++++++++++++++++++++++++++-
src/test/regress/sql/select_parallel.sql      | 22 +++++++++++++-
3 files changed, 67 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-11-26 04:25 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 04:25 pgsql: Don't shut down Gather[Merge] early under Limit. Amit Kapila <akapila@postgresql.org>
2019-11-26 04:25 pgsql: Don't shut down Gather[Merge] early under Limit. Amit Kapila <akapila@postgresql.org>
2019-11-26 04:25 pgsql: Don't shut down Gather[Merge] early under Limit. Amit Kapila <akapila@postgresql.org>
2019-11-26 04:25 pgsql: Don't shut down Gather[Merge] early under Limit. Amit Kapila <akapila@postgresql.org>
2019-11-26 04:25 pgsql: Don't shut down Gather[Merge] early under Limit. Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox