pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: refactor ExecGrant_*() functions
Date: Tue, 13 Dec 2022 16:03:57 +0100
Message-ID: <3239.1670943837@antos> (raw)
In-Reply-To: <21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com>
References: <22c7e802-4e7d-8d87-8b71-cba95e6f4bcf@enterprisedb.com>
	<24706.1670316118@antos>
	<4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com>
	<3473.1670838279@antos>
	<21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com>

Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:

> On 12.12.22 10:44, Antonin Houska wrote:
> > Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
> > 
> >> On 06.12.22 09:41, Antonin Houska wrote:
> >>> Attached are my proposals for improvements. One is to avoid memory leak, the
> >>> other tries to improve readability a little bit.
> >>
> >> I added the readability improvement to my v2 patch.  The pfree() calls aren't
> >> necessary AFAICT.
> 
> It's something to consider, but since this is a refactoring patch and the old
> code didn't do it either, I think it's out of scope.

Well, the reason I brought this topic up is that the old code didn't even
palloc() those arrays. (Because the were located in the stack.)

> > I see that memory contexts exist and that the amount of memory freed is not
> > huge, but my style is to free the memory explicitly if it's allocated in a
> > loop.
> > v2 looks good to me.
> 
> Committed, thanks.

ok, I'll post rebased "USAGE privilege on PUBLICATION" patch [1] soon.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com

[1] https://commitfest.postgresql.org/41/3641/





view thread (8+ messages)

Message-ID: <3239.1670943837@antos>
Permalink:  ../3239.1670943837@antos/
Also on:    postgresql.org/message-id/3239.1670943837@antos

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at, peter.eisentraut@enterprisedb.com
  Subject: Re: refactor ExecGrant_*() functions
  In-Reply-To: <3239.1670943837@antos>
  References: <22c7e802-4e7d-8d87-8b71-cba95e6f4bcf@enterprisedb.com> <24706.1670316118@antos> <4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com> <3473.1670838279@antos> <21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com> <3239.1670943837@antos>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox