Aha, I see, thanks. Here's a complete fix with included testcase. In
an unpatched assert-enabled build, this crashes this
TRAP: FailedAssertion("!(ActiveSnapshotSet())", File: "/pgsql/source/REL_10_STABLE/src/backend/tcop/postgres.c", Line: 788)
Will push on Monday.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services