Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCRbp-00030T-Ds for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 16:22:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCRbo-00023a-24 for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 16:22:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCRbn-0001zN-Kk for pgsql-hackers@lists.postgresql.org; Fri, 05 Apr 2019 16:22:27 +0000 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCRbY-00061j-T8 for pgsql-hackers@postgresql.org; Fri, 05 Apr 2019 16:22:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1554481332; x=1586017332; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=M4QreJXKCCYpYhj4tMrNsJ4qSR/mn3BGa9+e7yDen34=; b=O4jMdUBwXWNDXIdqCotyF/G0Bo926R0ORqfp+xs+uCjcUjRFXljD+qs8 C6FO1SGdzhTQR+BXyHiSO/naV6oqf3iFKlro28b+a7MRl3GNTXQfOHyo6 FB8QUzE1mb5Dy89HTLd1pCN5dXF6xA4kHGipB9UhJH8XRodjx3MmleFbh I=; X-IronPort-AV: E=Sophos;i="5.60,313,1549929600"; d="scan'208";a="389473756" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-1968f9fa.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Apr 2019 16:22:10 +0000 Received: from EX13MTAUWC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2c-1968f9fa.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id x35GM8jX076431 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 5 Apr 2019 16:22:08 GMT Received: from EX13D05UWC002.ant.amazon.com (10.43.162.92) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Apr 2019 16:22:08 +0000 Received: from f01898859afd.ant.amazon.com (10.43.161.88) by EX13D05UWC002.ant.amazon.com (10.43.162.92) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Apr 2019 16:22:07 +0000 Date: Fri, 5 Apr 2019 09:22:06 -0700 From: Shawn Debnath To: Thomas Munro CC: Alvaro Herrera , Andres Freund , Robert Haas , Tom Lane , Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL-development Subject: Re: Refactoring the checkpointer's fsync request queue Message-ID: <20190405162206.GA23763@f01898859afd.ant.amazon.com> References: <20190404130258.GA7320@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Originating-IP: [10.43.161.88] X-ClientProxiedBy: EX13d09UWC001.ant.amazon.com (10.43.162.60) To EX13D05UWC002.ant.amazon.com (10.43.162.92) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Apr 05, 2019 at 10:53:53AM +1300, Thomas Munro wrote: > On Fri, Apr 5, 2019 at 2:03 AM Alvaro Herrera wrote: > > On 2019-Apr-04, Thomas Munro wrote: > > > I don't think it's project policy to put a single typedef into its own > > > header like that, and I'm not sure where else to put it. > > > > shrug. Looks fine to me. I suppose if we don't have it anywhere, it's > > just because we haven't needed that particular trick yet. Creating a > > file with a lone typedef seems better than using uint32 to me. > > It was commit 9fac5fd7 that gave me that idea. > > Ok, here is a patch that adds a one-typedef header and uses > SegmentIndex to replace all cases of BlockNumber and int holding a > segment number (where as an "index" or a "count"). Looks good to me. -- Shawn Debnath Amazon Web Services (AWS)