pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. @ 2023-03-06 03:49 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Thomas Munro @ 2023-03-06 03:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in SetNewSxactGlobalXmin(), so the problem was hidden, explaining the lack of field reports. Add a new isolation test to exercise that case. 2. Remove an assertion that the DOOMED flag can't be set on a partially released SERIALIZABLEXACT. Instead, ignore the flag (our transaction was already determined to be read-only safe, and DOOMED is in fact set during partial release, and there was already an assertion that it wasn't set sooner). Improve an existing isolation test so that it reaches that case (previously it wasn't quite testing what it was supposed to be testing; see discussion). Back-patch to 12. Bug #17116. Defects in commit 47a338cf. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17116-d6ca217acc180e30%40postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/47c0accbe05b5774a8a30e42e56e8d6026c9a858 Modified Files -------------- src/backend/storage/lmgr/predicate.c | 20 ++++- .../isolation/expected/serializable-parallel-2.out | 57 ++++--------- .../isolation/expected/serializable-parallel-3.out | 97 ++++++++++++++++++++++ src/test/isolation/isolation_schedule | 1 + .../isolation/specs/serializable-parallel-2.spec | 12 ++- .../isolation/specs/serializable-parallel-3.spec | 47 +++++++++++ 6 files changed, 184 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. @ 2023-03-06 03:50 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Thomas Munro @ 2023-03-06 03:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in SetNewSxactGlobalXmin(), so the problem was hidden, explaining the lack of field reports. Add a new isolation test to exercise that case. 2. Remove an assertion that the DOOMED flag can't be set on a partially released SERIALIZABLEXACT. Instead, ignore the flag (our transaction was already determined to be read-only safe, and DOOMED is in fact set during partial release, and there was already an assertion that it wasn't set sooner). Improve an existing isolation test so that it reaches that case (previously it wasn't quite testing what it was supposed to be testing; see discussion). Back-patch to 12. Bug #17116. Defects in commit 47a338cf. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17116-d6ca217acc180e30%40postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/055990904a179416453e024ae0be8791ba70a235 Modified Files -------------- src/backend/storage/lmgr/predicate.c | 20 ++++- .../isolation/expected/serializable-parallel-2.out | 57 ++++--------- .../isolation/expected/serializable-parallel-3.out | 97 ++++++++++++++++++++++ src/test/isolation/isolation_schedule | 1 + .../isolation/specs/serializable-parallel-2.spec | 12 ++- .../isolation/specs/serializable-parallel-3.spec | 47 +++++++++++ 6 files changed, 184 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. @ 2023-03-06 03:50 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Thomas Munro @ 2023-03-06 03:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in SetNewSxactGlobalXmin(), so the problem was hidden, explaining the lack of field reports. Add a new isolation test to exercise that case. 2. Remove an assertion that the DOOMED flag can't be set on a partially released SERIALIZABLEXACT. Instead, ignore the flag (our transaction was already determined to be read-only safe, and DOOMED is in fact set during partial release, and there was already an assertion that it wasn't set sooner). Improve an existing isolation test so that it reaches that case (previously it wasn't quite testing what it was supposed to be testing; see discussion). Back-patch to 12. Bug #17116. Defects in commit 47a338cf. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17116-d6ca217acc180e30%40postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e9051ecd58e9f171c5c92f28c1bbd8f42fa243c1 Modified Files -------------- src/backend/storage/lmgr/predicate.c | 20 ++++- .../isolation/expected/serializable-parallel-2.out | 57 ++++--------- .../isolation/expected/serializable-parallel-3.out | 97 ++++++++++++++++++++++ src/test/isolation/isolation_schedule | 1 + .../isolation/specs/serializable-parallel-2.spec | 12 ++- .../isolation/specs/serializable-parallel-3.spec | 47 +++++++++++ 6 files changed, 184 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. @ 2023-03-06 03:50 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Thomas Munro @ 2023-03-06 03:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in SetNewSxactGlobalXmin(), so the problem was hidden, explaining the lack of field reports. Add a new isolation test to exercise that case. 2. Remove an assertion that the DOOMED flag can't be set on a partially released SERIALIZABLEXACT. Instead, ignore the flag (our transaction was already determined to be read-only safe, and DOOMED is in fact set during partial release, and there was already an assertion that it wasn't set sooner). Improve an existing isolation test so that it reaches that case (previously it wasn't quite testing what it was supposed to be testing; see discussion). Back-patch to 12. Bug #17116. Defects in commit 47a338cf. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17116-d6ca217acc180e30%40postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a0f55fc86ab7adde027351f5c9596a3814ddea83 Modified Files -------------- src/backend/storage/lmgr/predicate.c | 20 ++++- .../isolation/expected/serializable-parallel-2.out | 57 ++++--------- .../isolation/expected/serializable-parallel-3.out | 97 ++++++++++++++++++++++ src/test/isolation/isolation_schedule | 1 + .../isolation/specs/serializable-parallel-2.spec | 12 ++- .../isolation/specs/serializable-parallel-3.spec | 47 +++++++++++ 6 files changed, 184 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. @ 2023-03-06 03:50 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Thomas Munro @ 2023-03-06 03:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in SetNewSxactGlobalXmin(), so the problem was hidden, explaining the lack of field reports. Add a new isolation test to exercise that case. 2. Remove an assertion that the DOOMED flag can't be set on a partially released SERIALIZABLEXACT. Instead, ignore the flag (our transaction was already determined to be read-only safe, and DOOMED is in fact set during partial release, and there was already an assertion that it wasn't set sooner). Improve an existing isolation test so that it reaches that case (previously it wasn't quite testing what it was supposed to be testing; see discussion). Back-patch to 12. Bug #17116. Defects in commit 47a338cf. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17116-d6ca217acc180e30%40postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/afa122e41c651edfaa17b47652025ea48085eb94 Modified Files -------------- src/backend/storage/lmgr/predicate.c | 20 ++++- .../isolation/expected/serializable-parallel-2.out | 57 ++++--------- .../isolation/expected/serializable-parallel-3.out | 97 ++++++++++++++++++++++ src/test/isolation/isolation_schedule | 1 + .../isolation/specs/serializable-parallel-2.spec | 12 ++- .../isolation/specs/serializable-parallel-3.spec | 47 +++++++++++ 6 files changed, 184 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-03-06 03:50 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-03-06 03:49 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. Thomas Munro <tmunro@postgresql.org> 2023-03-06 03:50 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. Thomas Munro <tmunro@postgresql.org> 2023-03-06 03:50 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. Thomas Munro <tmunro@postgresql.org> 2023-03-06 03:50 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. Thomas Munro <tmunro@postgresql.org> 2023-03-06 03:50 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY. Thomas Munro <tmunro@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