Deduplicate min restart_lsn calculation code

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Deduplicate min restart_lsn calculation code
Date: 2022-01-06 16:43:35
Message-ID: CALj2ACVXESfjbsVt83SrpmGcqFYC_tdrFgTvnBV=nkW4S0tpBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

It seems like the two functions ReplicationSlotsComputeRequiredLSN and
ReplicationSlotsComputeLogicalRestartLSN more or less does the same
thing which makes me optimize (saving 40 LOC) it as attached. I'm
pretty much okay if it gets rejected on the grounds that it creates a
lot of diff with the older versions and the new API may not look
nicer, still I want to give it a try.

Thoughts?

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-deduplicate-min-restart_lsn-calculation-code.patch application/octet-stream 8.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2022-01-06 16:47:48 Re: pl/pgsql feature request: shorthand for argument and local variable references
Previous Message Andrew Dunstan 2022-01-06 16:35:52 Re: SQL/JSON: functions