Re: Emit namespace in post-copy output

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Mike Fiedler <miketheman(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Emit namespace in post-copy output
Date: 2021-07-29 00:57:30
Message-ID: YQH8+rqjOkoaY3Ia@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-07-29 01:03:29 Re: Out-of-memory error reports in libpq
Previous Message Michael Paquier 2021-07-29 00:52:08 Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep