Re: Emit namespace in post-copy output - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Emit namespace in post-copy output
Date
Msg-id YQH8+rqjOkoaY3Ia@paquier.xyz
Whole thread Raw
In response to Re: Emit namespace in post-copy output  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
On Wed, Jul 28, 2021 at 04:15:19PM +0200, Daniel Gustafsson wrote:
> Since get_namespace_name() returns a palloced string, this will lead to a 2x
> leak of the namespace length as opposed to the 1x of today.  While hardly a big
> deal, it seems prudent to cap this by storing the returned string locally now
> that we need it twice.

I don't think this matters much.  A quick read of the code shows that
this memory should be allocated within the transaction context running
CLUSTER/VACUUM FULL, and that gets free'd in the internal calls of
CommitTransactionCommand().
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep
Next
From: Ranier Vilela
Date:
Subject: Re: Out-of-memory error reports in libpq