> On 30 Jul 2021, at 17:06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wonder if we should convert the Assert into an actual test-and-elog, say
> 
> 	/* Otherwise, we'd better have an active Portal */
> 	portal = ActivePortal;
> -	Assert(portal != NULL);
> +	if (unlikely(portal == NULL))
> +		elog(ERROR, "must have an outer snapshot or portal");
> 	Assert(portal->portalSnapshot == NULL);
> 
> Perhaps that would help people to realize that the bug is theirs
> not EnsurePortalSnapshotExists's.
+1, that would probably be quite helpful.
--
Daniel Gustafsson		https://vmware.com/