Re: Avoid memory leaks during base backups - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Avoid memory leaks during base backups
Date
Msg-id 20221020174707.hlx4mfz4lzm66o5y@alvherre.pgsql
Whole thread Raw
In response to Re: Avoid memory leaks during base backups  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On 2022-Oct-20, Bharath Rupireddy wrote:

> I think elsewhere in the code we reset dangling pointers either ways -
> before or after deleting/resetting memory context. But placing them
> before would give us extra safety in case memory context
> deletion/reset fails. Not sure what's the best way. However, I'm
> nullifying the dangling pointers after deleting/resetting memory
> context.

I agree that's a good idea, and the patch looks good to me, but I don't
think asserting that they are null afterwards is useful.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Avoid memory leaks during base backups
Next
From: Jeff Davis
Date:
Subject: Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation