Skip to content

Remove Get/SetZenithCurrentClusterSize from Postgres core #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/backend/access/transam/xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,6 @@ typedef struct XLogCtlData
/* neon: copy of startup's RedoStartLSN for walproposer's use */
XLogRecPtr RedoStartLSN;

/*
* size of a timeline in zenith pageserver.
* used to enforce timeline size limit.
*/
uint64 zenithCurrentClusterSize;

slock_t info_lck; /* locks shared variables shown above */
} XLogCtlData;

Expand Down Expand Up @@ -6431,28 +6425,6 @@ GetRedoStartLsn(void)
return XLogCtl->RedoStartLSN;
}


uint64
GetZenithCurrentClusterSize(void)
{
uint64 size;
SpinLockAcquire(&XLogCtl->info_lck);
size = XLogCtl->zenithCurrentClusterSize;
SpinLockRelease(&XLogCtl->info_lck);

return size;
}


void
SetZenithCurrentClusterSize(uint64 size)
{
SpinLockAcquire(&XLogCtl->info_lck);
XLogCtl->zenithCurrentClusterSize = size;
SpinLockRelease(&XLogCtl->info_lck);
}


/*
* GetFlushRecPtr -- Returns the current flush position, ie, the last WAL
* position known to be fsync'd to disk. This should only be used on a
Expand Down
4 changes: 0 additions & 4 deletions src/include/access/xlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ extern XLogRecPtr GetLastWrittenLSN(RelFileLocator relfilenode, ForkNumber forkn
extern void SetRedoStartLsn(XLogRecPtr RedoStartLSN);
extern XLogRecPtr GetRedoStartLsn(void);

extern void SetZenithCurrentClusterSize(uint64 size);
extern uint64 GetZenithCurrentClusterSize(void);


extern void SetWalWriterSleeping(bool sleeping);

/*
Expand Down