Re: GetSubscriptionRelations declares too many scan keys - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: GetSubscriptionRelations declares too many scan keys
Date
Msg-id YJo3VscSxCQnoy1h@paquier.xyz
Whole thread Raw
In response to Re: GetSubscriptionRelations declares too many scan keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GetSubscriptionRelations declares too many scan keys
List 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

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: compute_query_id and pg_stat_statements
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables