From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: GetSubscriptionRelations declares too many scan keys |
Date: | 2021-05-10 08:56:40 |
Message-ID: | 20210510085640.p7y5c7px5mtsi55y@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 10, 2021 at 01:39:31PM +0530, Bharath Rupireddy wrote:
> On Mon, May 10, 2021 at 12:36 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > The function GetSubscriptionRelations was declaring ScanKeyData
> > skey[2]; but actually
> > only uses 1 scan key. It seems like the code was cut/paste from other
> > nearby functions
> > which really are using 2 keys.
> >
> > PSA a trivial patch to declare the correct number of keys for this function.
>
> +1 for the change. It looks like a cut/paste type introduced by the
> commit 7c4f52409a.
>
> A comment on the patch: why do we need to declare an array of 1
> element ScanKeyData skey[1];? Instead, can we just do ScanKeyData
> skey;?
+1, there are already many places where it's done this way if there's only 1
key.
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-05-10 08:57:21 | Re: Race condition in recovery? |
Previous Message | David Rowley | 2021-05-10 08:52:44 | Re: PG 14 release notes, first draft |