forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitef12f32
committed
Use elog, not Assert, to report failure to provide an outer snapshot.
As of commit84f5c29, executing SQL commands (via SPI or otherwise)requires having either an active Portal, or a caller-establishedactive snapshot. We were simply Assert'ing that that's the case.But we've now had a couple different reports of people testingextensions that didn't meet this requirement, and were confused bythe resulting crash. Let's convert the Assert to a test-and-elog,in hopes of making the issue clearer for extension authors.Per gripes from Liu Huailing and RekGRpth. Back-patch to v11,like the prior commit.Discussion:https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.comDiscussion:https://postgr.es/m/17035-14607d308ac8643c@postgresql.org1 parent89404a0 commitef12f32
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1758 | 1758 |
| |
1759 | 1759 |
| |
1760 | 1760 |
| |
1761 |
| - | |
| 1761 | + | |
| 1762 | + | |
1762 | 1763 |
| |
1763 | 1764 |
| |
1764 | 1765 |
| |
|
0 commit comments
Comments
(0)