pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Stop demanding that top xact must be seen before subxact in deco
6+ messages / 1 participants
[nested] [flat]

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
REL_11_STABLE

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

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
master

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

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/59112f235549171dfc8418edf5184c104e14610c

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/59c1a03f07361daf78c66f343f113fca902b9fda

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/05555f7aaa08a3b795265c99ac98e685aa8b4771

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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

* pgsql: Stop demanding that top xact must be seen before subxact in deco
@ 2020-02-19 03:41  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2020-02-19 03:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Stop demanding that top xact must be seen before subxact in decoding.

Manifested as

ERROR:  subtransaction logged without previous top-level txn record

this check forbids legit behaviours like
 - First xl_xact_assignment record is beyond reading, i.e. earlier
   restart_lsn.
 - After restart_lsn there is some change of a subxact.
 - After that, there is second xl_xact_assignment (for another subxact)
   revealing the relationship between top and first subxact.

Such a transaction won't be streamed anyway because we hadn't seen it in
full.  Saying for sure whether xact of some record encountered after
the snapshot was deserialized can be streamed or not requires to know
whether it wrote something before deserialization point --if yes, it
hasn't been seen in full and can't be decoded. Snapshot doesn't have such
info, so there is no easy way to relax the check.

Reported-by: Hsu, John
Diagnosed-by: Arseny Sher
Author: Arseny Sher, Amit Kapila
Reviewed-by: Amit Kapila, Dilip Kumar
Backpatch-through: 9.5
Discussion: https://postgr.es/m/AB5978B2-1772-4FEE-A245-74C91704ECB0@amazon.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
contrib/test_decoding/Makefile                     |  2 +-
.../test_decoding/expected/subxact_without_top.out | 39 ++++++++++++++
.../test_decoding/specs/subxact_without_top.spec   | 63 ++++++++++++++++++++++
src/backend/replication/logical/reorderbuffer.c    |  3 --
4 files changed, 103 insertions(+), 4 deletions(-)



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


end of thread, other threads:[~2020-02-19 03:41 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco Amit Kapila <akapila@postgresql.org>
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco Amit Kapila <akapila@postgresql.org>
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco Amit Kapila <akapila@postgresql.org>
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco Amit Kapila <akapila@postgresql.org>
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco Amit Kapila <akapila@postgresql.org>
2020-02-19 03:41 pgsql: Stop demanding that top xact must be seen before subxact in deco 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