Em sex., 26 de jun. de 2020 às 18:24, Tom Lane escreveu:
> Ranier Vilela writes:
> > 1.Assertion check
> > /* Caller messed up if we have neither a ready query nor held data. */
> > Assert(queryDesc || portal->holdStore);
>
> > But in release, if QueryDesc is NULL and portal->holdStore is NULL t
Ranier Vilela writes:
> 1.Assertion check
> /* Caller messed up if we have neither a ready query nor held data. */
> Assert(queryDesc || portal->holdStore);
> But in release, if QueryDesc is NULL and portal->holdStore is NULL too,
> when Call PushActiveSnapshot *deference* NULL check can happen.
Hi,
Per Coverity.
Perhaps it is excessive caution.
Probably assertion check has already caught all possible errors.
But, redundancy may not cost as much and is worth it.
1.Assertion check
/* Caller messed up if we have neither a ready query nor held data. */
Assert(queryDesc || portal->holdStore)