From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Move backup-related code to xlogbackup.c/.h |
Date: | 2022-09-28 14:46:08 |
Message-ID: | CALj2ACU=1+7XB2kq89yY9esn0P-Rr1fEBYAHu1LoTCpEaqWOKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
xlog.c currently has ~9000 LOC, out of which ~700 LOC is backup
related, making the file really unmanageable. The commit
7d708093b7400327658a30d1aa1d5e284d37622c added new files
xlogbackup.c/.h for hosting all backup related code eventually. I
propose to move all the backp related code from xlog.c and xlogfuncs.c
to xlogbackup.c/.h. In doing so, I had to add a few Get/Set functions
for XLogCtl variables so that xlogbackup.c can use them.
I'm attaching a patch set where 0001 and 0002 move backup code from
xlogfuncs.c and xlog.c to xlogbackup.c/.h respectively. The advantage
is that all the core's backup code is in one single file making it
more readable and manageable while reducing the xlog.c's file size.
Thoughts?
Thanks Michael Paquier for suggesting to have new files for backup related code.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Move-backup-related-code-from-xlogfuncs.c-to-xlog.patch | application/x-patch | 9.7 KB |
v1-0002-Move-backup-related-code-from-xlog.c-to-xlogbacku.patch | application/x-patch | 60.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2022-09-28 15:02:37 | Re: DROP OWNED BY is broken on master branch. |
Previous Message | Tom Lane | 2022-09-28 14:42:21 | Re: Obsolete comment in ExecInsert() |