Re: abort-time portal cleanup - Mailing list pgsql-hackers

From Andres Freund
Subject Re: abort-time portal cleanup
Date
Msg-id 20191008181041.rjxv7afowfrz5ztk@alap3.anarazel.de
Whole thread Raw
In response to Re: abort-time portal cleanup  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: abort-time portal cleanup
List pgsql-hackers
Hi,

On 2019-10-07 12:14:52 -0400, Robert Haas wrote:
> > - if (portal->status == PORTAL_READY)
> > - MarkPortalFailed(portal);
> >
> > Why it is safe to remove this check?  It has been explained in commit
> > 7981c342 why we need that check.  I don't see any explanation in email
> > or patch which justifies this code removal.  Is it because you removed
> > PortalCleanup?  If so, that is still called from PortalDrop?
>
> All MarkPortalFailed() does is change the status to PORTAL_FAILED and
> call the cleanup hook. PortalDrop() calls the cleanup hook, and we
> don't need to change the status if we're removing it completely.

Note that currently PortalCleanup() behaves differently depending on
whether the portal is set to failed or not...

- Andres



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: v12 and pg_restore -f-
Next
From: Robert Haas
Date:
Subject: Re: Transparent Data Encryption (TDE) and encrypted files