Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b2c8d56

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

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
@@ -416,6 +416,16 @@ SPI_rollback_and_chain(void)
416416
_SPI_rollback(true);
417417
}
418418

419+
/*
420+
* SPICleanup is a no-op, kept for backwards compatibility. We rely on
421+
* AtEOXact_SPI to cleanup. Extensions should not (need to) fiddle with the
422+
* internal SPI state directly.
423+
*/
424+
void
425+
SPICleanup(void)
426+
{
427+
}
428+
419429
/*
420430
* Clean up SPI state at transaction commit or abort.
421431
*/

src/include/executor/spi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ extern void SPI_commit_and_chain(void);
167167
extern void SPI_rollback(void);
168168
extern void SPI_rollback_and_chain(void);
169169

170+
extern void SPICleanup(void);
170171
extern void AtEOXact_SPI(bool isCommit);
171172
extern void AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid);
172173
extern bool SPI_inside_nonatomic_context(void);

0 commit comments

Comments
 (0)