Re: Attempt to consolidate reading of XLOG page - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: Attempt to consolidate reading of XLOG page
Date
Msg-id 9308.1556813856@localhost
Whole thread Raw
In response to Re: Attempt to consolidate reading of XLOG page  (Antonin Houska <ah@cybertec.at>)
Responses Re: Attempt to consolidate reading of XLOG page
List pgsql-hackers
Antonin Houska <ah@cybertec.at> wrote:

> Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> 
> > Not sure about the walsize; maybe it can be a member in XLogReadPos, and
> > given to XLogReadInitPos()?  (Maybe rename XLogReadPos as
> > XLogReadContext or something like that, indicating it's not just the
> > read position.)
> 
> As pointed out by others, XLogReadPos is not necessary. So if XLogRead()
> receives XLogReaderState instead, it can get the segment size from there.

Eventually I found out that it's good to have a separate structure for the
read position because walsender calls the XLogRead() function directly, not
via the XLOG reader. Currently the structure name is XLogSegment (maybe
someone can propose better name) and it's a member of XLogReaderState. No
field of the new structure is duplicated now.

The next version of the patch is attached.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: New vacuum option to do only freezing
Next
From: Jeff Janes
Date:
Subject: Re: pg_upgrade --clone error checking