pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Shawn Debnath <sdn@amazon.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Refactoring the checkpointer's fsync request queue
Date: Wed, 3 Apr 2019 22:41:07 -0700
Message-ID: <20190404054107.GA22298@f01898859afd.ant.amazon.com> (raw )
In-Reply-To: <CA+hUKGKwjTgaBF020sJ+MuEcWcOubmuoaS36xpJfWxuPY6AMpA@mail.gmail.com >
References: <CA+Tgmob19umNQogKHknsG+smLUZeHihNAk-h+KxPd82SDi10WQ@mail.gmail.com >
<20190326164758.GA78630@f01898859afd.ant.amazon.com >
<CA+hUKG+=vJEEFYG_OyGScdPVy2Lw+MEk9aNHPCSiaa58QoxjJA@mail.gmail.com >
<CA+hUKG+1k+sWCPVgBe0M9BR9e4hBva5ODWCydY7R8v02C6KOAQ@mail.gmail.com >
<20190403214423.GA45392@f01898859afd.ant.amazon.com >
<CA+hUKG+=-p4oiNC=U6yjtDigAvTXxGbe2__c=cVSxdxZYBxTPQ@mail.gmail.com >
<CA+hUKG+2Uri6dzddX3_K2mpWT3dRz-3Dzoja3-a3=3EYrvGEYg@mail.gmail.com >
<20190404041945.GA16205@f01898859afd.ant.amazon.com >
<20190404043559.syfy3v57ygma2bs4@alap3.anarazel.de >
<CA+hUKGKwjTgaBF020sJ+MuEcWcOubmuoaS36xpJfWxuPY6AMpA@mail.gmail.com >
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@anarazel.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)
view thread (87+ messages) latest in thread
Message-ID: <20190404054107.GA22298@f01898859afd.ant.amazon.com>
Permalink: ../20190404054107.GA22298@f01898859afd.ant.amazon.com/
Also on: postgresql.org/message-id/20190404054107.GA22298@f01898859afd.ant.amazon.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: sdn@amazon.com, thomas.munro@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, 9erthalion6@gmail.com
Subject: Re: Refactoring the checkpointer's fsync request queue
In-Reply-To: <20190404054107.GA22298@f01898859afd.ant.amazon.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox