pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Relax overly strict assertion
6+ messages / 1 participants
[nested] [flat]

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/45ed482f1a899dbf5b0db13686d817718ae8cf97

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
REL_10_STABLE

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

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
REL_11_STABLE

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

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/350cdcd5e6dd505454435af8d7640a4b5042fcfd

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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

* pgsql: Relax overly strict assertion
@ 2019-02-12 21:59  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-02-12 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Relax overly strict assertion

Ever since its birth, ReorderBufferBuildTupleCidHash() has contained an
assertion that a catalog tuple cannot change Cmax after acquiring one.  But
that's wrong: if a subtransaction executes DDL that affects that catalog
tuple, and later aborts and another DDL affects the same tuple, it will
change Cmax.  Relax the assertion to merely verify that the Cmax remains
valid and monotonically increasing, instead.

Add a test that tickles the relevant code.

Diagnosed by, and initial patch submitted by: Arseny Sher
Co-authored-by: Arseny Sher
Discussion: https://postgr.es/m/874l9p8hyw.fsf@ars-thinkpad

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8c67d29fd51c0381d8bce41d35d7726725924616

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 13 +++++++++++++
src/backend/replication/logical/reorderbuffer.c | 14 +++++++++-----
3 files changed, 40 insertions(+), 5 deletions(-)



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


end of thread, other threads:[~2019-02-12 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-02-12 21:59 pgsql: Relax overly strict assertion Alvaro Herrera <alvherre@alvh.no-ip.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