From: | Shawn Debnath <sdn(at)amazon(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Refactoring the checkpointer's fsync request queue |
Date: | 2019-04-04 05:41:07 |
Message-ID: | 20190404054107.GA22298@f01898859afd.ant.amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 04, 2019 at 05:39:14PM +1300, Thomas Munro wrote:
> On Thu, Apr 4, 2019 at 5:36 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > On 2019-04-03 21:19:45 -0700, Shawn Debnath wrote:
> > > +typedef struct FileTag
> > > +{
> > > + int16 handler; /* SyncRequstHandler value, saving space */
> > > + int16 forknum; /* ForkNumber, saving space */
> > > + RelFileNode rnode;
> > > + BlockNumber segno;
> > > +} FileTag;
> >
> > Seems odd to me to use BlockNumber for segno.
>
> That is a tradition in md.c code. I had a new typedef SegmentNumber
> in all sync.{c,h} stuff in an earlier version, but had trouble
> figuring out where to define it...
Thomas, this is why I had defined segment.h with the contents below :-)
+++ b/src/include/storage/segment.h
[...]
+/*
+ * Segment Number:
+ *
+ * Each relation and its forks are divided into segments. This
+ * definition formalizes the definition of the segment number.
+ */
+typedef uint32 SegmentNumber;
+
+#define InvalidSegmentNumber ((SegmentNumber) 0xFFFFFFFF)
My last iteration, v12, patch had it. See [1] for comments on removal of
segment.h.
[1]
https://www.postgresql.org/message-id/20190403214423.GA45392%40f01898859afd.ant.amazon.com
--
Shawn Debnath
Amazon Web Services (AWS)
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2019-04-04 05:51:38 | Re: Pluggable Storage - Andres's take |
Previous Message | Andres Freund | 2019-04-04 05:20:00 | Re: COPY FROM WHEN condition |