diff options
author | Amit Kapila <akapila@postgresql.org> | 2022-10-21 12:33:47 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2022-10-21 12:33:47 +0530 |
commit | 36fc013fabd94f159553973f55afecc6cd115d60 (patch) | |
tree | bcbf4742ae452150ff84ca37ed405b44ff91e5a3 | |
parent | 4fbe6096b954092abc460adaddd365d5049d40f1 (diff) | |
download | postgresql-36fc013fabd94f159553973f55afecc6cd115d60.tar.gz postgresql-36fc013fabd94f159553973f55afecc6cd115d60.zip |
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding.
Previously in commit 42681dffaf, we added CFI during decoding changes but
missed another similar case that can happen while restoring changes
spilled to disk back into memory in a loop.
Reported-by: Robert Haas
Author: Amit Kapila
Backpatch-through: 10
Discussion: https://postgr.es/m/CA+TgmoaLObg0QbstbC8ykDwOdD1bDkr4AbPpB=0DPgA2JW0mFg@mail.gmail.com
-rw-r--r-- | src/backend/replication/logical/reorderbuffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index d55782e0106..271a74c6908 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -4103,6 +4103,8 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, int readBytes; ReorderBufferDiskChange *ondisk; + CHECK_FOR_INTERRUPTS(); + if (*fd == -1) { char path[MAXPGPATH]; |