definition of CalculateMaxmumSafeLSN
Hello
I just spotted in src/include/access/xlog.h:
extern XLogRecPtr CalculateMaxmumSafeLSN(void);
This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line.
Was added in c6550776394e25c1620bc8258427c8f1d448080d "Allow users to limit storage reserved by replication slots"
regards, Sergei
At Mon, 28 Feb 2022 17:01:10 +0300, Sergei Kornilov <sk@zsrv.org> wrote in
Hello
I just spotted in src/include/access/xlog.h:
extern XLogRecPtr CalculateMaxmumSafeLSN(void);This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line.
Was added in c6550776394e25c1620bc8258427c8f1d448080d "Allow users to limit storage reserved by replication slots"
Hmm. I think I remember of that name. You're right, it is a function
that was once added during development of the commit but eventually
gone.
So it should be removed.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Hi,
On Tue, Mar 01, 2022 at 10:11:03AM +0900, Kyotaro Horiguchi wrote:
At Mon, 28 Feb 2022 17:01:10 +0300, Sergei Kornilov <sk@zsrv.org> wrote in
Hello
I just spotted in src/include/access/xlog.h:
extern XLogRecPtr CalculateMaxmumSafeLSN(void);This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line.
Was added in c6550776394e25c1620bc8258427c8f1d448080d "Allow users to limit storage reserved by replication slots"Hmm. I think I remember of that name. You're right, it is a function
that was once added during development of the commit but eventually
gone.So it should be removed.
+1. I'm Ccing �lvaro as he's the committer.
On Mon, Feb 28, 2022 at 7:31 PM Sergei Kornilov <sk@zsrv.org> wrote:
Hello
I just spotted in src/include/access/xlog.h:
extern XLogRecPtr CalculateMaxmumSafeLSN(void);This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line.
Was added in c6550776394e25c1620bc8258427c8f1d448080d "Allow users to limit storage reserved by replication slots"
+1 to remove. Although the change is straightforward, I attached the
patch just for the sake of convention. I've marked it as RfC
https://commitfest.postgresql.org/38/3616/.
Just for the record - there's another thread
/messages/by-id/CALj2ACVoQ7NEf43Xz0rfxsGOKYTN5r4VZp2DO2_5p+CMzsRPFw@mail.gmail.com
Regards,
Bharath Rupireddy.
Attachments:
v1-0001-Remove-an-undefined-function-CalculateMaxmumSafeL.patchapplication/octet-stream; name=v1-0001-Remove-an-undefined-function-CalculateMaxmumSafeL.patchDownload
From dec60642c4f7985ffba99011f4d2680ad890559c Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Sat, 21 May 2022 07:18:29 +0000
Subject: [PATCH v1] Remove an undefined function CalculateMaxmumSafeLSN
---
src/include/access/xlog.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index d9f2487a96..cd674c3c23 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -233,7 +233,6 @@ extern void ShutdownXLOG(int code, Datum arg);
extern void CreateCheckPoint(int flags);
extern bool CreateRestartPoint(int flags);
extern WALAvailability GetWALAvailability(XLogRecPtr targetLSN);
-extern XLogRecPtr CalculateMaxmumSafeLSN(void);
extern void XLogPutNextOid(Oid nextOid);
extern XLogRecPtr XLogRestorePoint(const char *rpName);
extern void UpdateFullPageWrites(void);
--
2.25.1
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
On Mon, Feb 28, 2022 at 7:31 PM Sergei Kornilov <sk@zsrv.org> wrote:
I just spotted in src/include/access/xlog.h:
extern XLogRecPtr CalculateMaxmumSafeLSN(void);
This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line.
+1 to remove.
Right, done.
regards, tom lane