pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix past pd_upper write in ginRedoRecompress()
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:40 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
master

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

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:43 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:44 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:48 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:50 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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

* pgsql: Fix past pd_upper write in ginRedoRecompress()
@ 2018-09-09 18:51 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Alexander Korotkov @ 2018-09-09 18:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix past pd_upper write in ginRedoRecompress()

ginRedoRecompress() replays actions over compressed segments of posting list
in-place.  However, it might lead to write past pg_upper, because intermediate
state during playing the changes can take more space than both original state
and final state.  This commit fixes that by refuse from in-place modification.
Instead page tail is copied once modification is started, and then it's used
as the source of original segments.  Backpatch to 9.4 where posting list
compression was introduced.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1536091151804.6588%40amazon.com
Author: Alexander Korotkov based on patch from and ideas by Sivasubramanian Ramasubramanian
Review: Sivasubramanian Ramasubramanian
Backpatch-through: 9.4

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/35ea98f79af299fd946d160eabf0a79e033d8115

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 80 +++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 21 deletions(-)



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


end of thread, other threads:[~2018-09-09 18:51 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09 18:40 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 18:43 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 18:44 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 18:48 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 18:50 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 18:51 pgsql: Fix past pd_upper write in ginRedoRecompress() Alexander Korotkov <akorotkov@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