Re: Attempt to consolidate reading of XLOG page
Haribabu Kommi <kommi.haribabu@gmail.com>
From: Haribabu Kommi <kommi.haribabu@gmail.com>
To: Antonin Houska <ah@cybertec.at>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-04-12T08:48:33Z
Lists: pgsql-hackers
On Fri, Apr 12, 2019 at 2:06 AM Antonin Houska <ah@cybertec.at> wrote: > While working on the instance encryption I found it annoying to apply > decyption of XLOG page to three different functions. Attached is a patch > that > tries to merge them all into one function, XLogRead(). The existing > implementations differ in the way new segment is opened. So I added a > pointer > to callback function as a new argument. This callback handles the specific > ways to determine segment file name and to open the file. > > I can split the patch into multiple diffs to make detailed review easier, > but > first I'd like to hear if anything is seriously wrong about this > design. Thanks. > I didn't check the code, but it is good to combine all the 3 page read functions into one instead of spreading the logic. Regards, Haribabu Kommi Fujitsu Australia
Commits
-
Remove logical_read_local_xlog_page
- 5d0c2d5eba6b 13.0 landed
-
Refactor WAL file-reading code into WALRead()
- 0dc8ead46363 13.0 landed
-
Rework WAL-reading supporting structs
- 709d003fbd98 13.0 landed
-
Make XLogReaderInvalReadState static
- 25dcc9d35dfe 13.0 landed
-
Use pg_pread() and pg_pwrite() for data files and WAL.
- c24dcd0cfd94 12.0 cited