Re: GetSubscriptionRelations declares too many scan keys

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(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-11 07:50:46
Message-ID: YJo3VscSxCQnoy1h@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 10, 2021 at 10:14:08AM -0400, Tom Lane wrote:
> Yeah, there's no real consensus about that. But in this case there's
> a strong reason to use skey[1]: it makes the patch a very safe one-liner.
> To convert to the other pattern would require touching more code.

FWIW, what Peter S has done looks fine to me, even if it is true that
CountDBSubscriptions() uses one scan key but does not use an array.

And that makes the code slightly easier to follow.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-05-11 08:08:43 Re: pgsql: autovacuum: handle analyze for partitioned tables
Previous Message Julien Rouhaud 2021-05-11 07:49:47 Re: compute_query_id and pg_stat_statements