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 1hBtr4-0003xK-Lm for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 04:19:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBtr2-0003nA-8J for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 04:19:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBtr1-0003gq-Tv for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2019 04:19:55 +0000 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBtqy-0005Rk-RQ for pgsql-hackers@postgresql.org; Thu, 04 Apr 2019 04:19:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1554351592; x=1585887592; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jRwn7kMB/gxV0TRUfOBg7Ek6bEVr+2+WKU3LZZr9ErY=; b=jSTb1g0LKj7QjgZyLjBAknNoAUDvzq/5LmwwpAamR3kNh3E3Oki2NEDr WDzngrxYLzFKpJX6Nhf9Bgxx94z/q6G/77QaERCFUDJlEf9UVpUMDGFqR iy4DwImWM8SbCn7jAagPMzjsBazerj7ARmvh0Qdc0Qdi5/HdqcUimVzXl Y=; X-IronPort-AV: E=Sophos;i="5.60,306,1549929600"; d="scan'208";a="394679552" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-821c648d.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Apr 2019 04:19:49 +0000 Received: from EX13MTAUWC001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-821c648d.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x344Jk8L115483 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 4 Apr 2019 04:19:48 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; Thu, 4 Apr 2019 04:19:47 +0000 Received: from f01898859afd.ant.amazon.com (10.43.162.34) by EX13D05UWC002.ant.amazon.com (10.43.162.92) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 4 Apr 2019 04:19:47 +0000 Date: Wed, 3 Apr 2019 21:19:45 -0700 From: Shawn Debnath To: Thomas Munro CC: Robert Haas , Tom Lane , "Andres Freund" , Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL-development Subject: Re: Refactoring the checkpointer's fsync request queue Message-ID: <20190404041945.GA16205@f01898859afd.ant.amazon.com> References: <20190313010007.GB8301@f01898859afd.ant.amazon.com> <20190326164758.GA78630@f01898859afd.ant.amazon.com> <20190403214423.GA45392@f01898859afd.ant.amazon.com> 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.162.34] X-ClientProxiedBy: EX13D03UWA001.ant.amazon.com (10.43.160.141) To EX13D05UWC002.ant.amazon.com (10.43.162.92) Precedence: Bulk List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Apr 04, 2019 at 02:01:14PM +1300, Thomas Munro wrote: > On Thu, Apr 4, 2019 at 11:39 AM Thomas Munro wrote: > > ... Perhaps > > that is an argument for putting the sync handler number *inside* the > > FileTag, since we currently intend to do that with smgr IDs in > > BufferTag (stealing space from ForkNumber). > > Here is a version like that. I like it better this way, and the extra > space can be clawed back by using 16 bit types to hold the fork number > and sync handler number. +typedef struct FileTag +{ + int16 handler; /* SyncRequstHandler value, saving space */ + int16 forknum; /* ForkNumber, saving space */ + RelFileNode rnode; + BlockNumber segno; +} FileTag; Definitely makes sense. v16 looks good to me. Thanks! -- Shawn Debnath Amazon Web Services (AWS)