Skip to content

Commit 8657946

Browse files
committed
Re-add SPICleanup for ABI compatibility in stable branch
This fixes an ABI break introduced by 6046518. Author: Markus Wanner <markus.wanner@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/defd749a-8410-841d-1126-21398686d63d@enterprisedb.com
1 parent 9293589 commit 8657946

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/backend/executor/spi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,16 @@ SPI_rollback_and_chain(void)
422422
_SPI_rollback(true);
423423
}
424424

425+
/*
426+
* SPICleanup is a no-op, kept for backwards compatibility. We rely on
427+
* AtEOXact_SPI to cleanup. Extensions should not (need to) fiddle with the
428+
* internal SPI state directly.
429+
*/
430+
void
431+
SPICleanup(void)
432+
{
433+
}
434+
425435
/*
426436
* Clean up SPI state at transaction commit or abort.
427437
*/

src/include/executor/spi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ extern void SPI_commit_and_chain(void);
205205
extern void SPI_rollback(void);
206206
extern void SPI_rollback_and_chain(void);
207207

208+
extern void SPICleanup(void);
208209
extern void AtEOXact_SPI(bool isCommit);
209210
extern void AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid);
210211
extern bool SPI_inside_nonatomic_context(void);

0 commit comments

Comments
 (0)