| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Remove unused function parameters, part 2: replication |
| Date: | 2025-12-02 14:28:48 |
| Message-ID: | aS73oLgiNc3Wvzrd@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Tue, Dec 02, 2025 at 09:31:34AM +0100, Daniel Gustafsson wrote:
> > On 2 Dec 2025, at 08:32, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> > Simple example I have seen in the past: a Relation argument not used
> > (I think there has been at least one such example in tablecmds.c,
> > whatever). Removing this argument also meant that we don't require
> > function callers to open a Relation, removing the need to think about
> > the lock it would require at open.
Yeah, that's a strong argument.
> I think this is the really interesting case and the angle to focus on. If we
> can simplify callers to perhaps even avoid locks then that's a stronger case
> when considering potential API breaks. It might still be more value in not
> breaking API, but that would have to be considered on a case by case basis.
I fully agree. That said I'm still skeptical that we need to provide a strong
justification (as the one above) to remove an unused parameter.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2025-12-02 14:35:48 | Re: Consistently use the XLogRecPtrIsInvalid() macro |
| Previous Message | Bertrand Drouvot | 2025-12-02 14:26:08 | Re: Remove unused function parameters, part 2: replication |