postgresql/src/backend
Peter Eisentraut 2e78c5b522 Fix assert in nested SQL procedure call
When executing CALL in PL/pgSQL, we need to set a snapshot before
invoking the to-be-called procedure.  Otherwise, the to-be-called
procedure might end up running without a snapshot.  For LANGUAGE SQL
procedures, this would result in an assertion failure.  (For most other
languages, this is usually not a problem, because those use SPI and SPI
sets snapshots in most cases.)  Setting the snapshot restores the
behavior of how CALL worked when it was handled as a generic SQL
statement in PL/pgSQL (exec_stmt_execsql()).

This change revealed another problem:  In SPI_commit(), we popped the
active snapshot before committing the transaction, to avoid "snapshot %p
still active" errors.  However, there is no particular reason why only
at most one snapshot should be on the stack.  So change this to pop all
active snapshots instead of only one.
2018-07-06 23:25:44 +02:00
..
access Prevent references to invalid relation pages after fresh promotion 2018-07-05 10:46:18 +09:00
bootstrap Message wording and pluralization improvements 2018-05-17 23:05:27 -04:00
catalog Enable failure to rename a partitioned index 2018-06-26 11:54:45 -04:00
commands Allow CALL with polymorphic type arguments 2018-07-06 22:40:16 +02:00
executor Fix assert in nested SQL procedure call 2018-07-06 23:25:44 +02:00
foreign Remove bogus "extern" annotations on function definitions. 2018-02-19 12:07:44 -05:00
jit Remove duplicated return statement from llvmjit code. 2018-06-26 23:16:50 -07:00
lib Add missing files to src/backend/lib/README. 2018-05-22 13:25:28 +03:00
libpq Make capitalization of term "OpenSSL" more consistent 2018-06-29 09:45:44 +09:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Assorted cosmetic cleanup of run-time-partition-pruning code. 2018-06-10 18:24:34 -04:00
optimizer Remove dead code for temporary relations in partition planning 2018-07-04 10:37:40 +09:00
parser Consider syntactic form when disambiguating function vs column reference. 2018-06-18 11:39:33 -04:00
partitioning Consistently use the term 'partitioned rel' in partprune comments 2018-06-20 11:43:01 -04:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Remove investigative code for can't-reattach-to-shared-memory errors. 2018-05-01 13:06:31 -04:00
postmaster Add wait event for fsync of WAL segments 2018-07-02 22:19:46 +09:00
regex Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
replication Allow replication slots to be dropped in single-user mode 2018-07-06 16:38:30 -04:00
rewrite Simplify view-expansion code in rewriteHandler.c. 2018-04-14 21:01:03 -04:00
snowball Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
statistics Fix bogus code for extracting extended-statistics data from syscache. 2018-05-02 12:23:00 -04:00
storage Improve the performance of relation deletes during recovery. 2018-07-05 02:23:46 +09:00
tcop pgindent run prior to branching 2018-06-30 12:25:49 -04:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Print DEBUG2 like that rather than as DEBUG 2018-07-06 07:29:12 -04:00
.gitignore
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00