Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vfp-0004f0-Mb for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:36:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5Vfn-0007x8-LU for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:36:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vfl-0007wy-SR for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 17:36:03 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vfi-0007Fg-Qs for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 17:36:00 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 249733200684; Wed, 14 Dec 2022 12:35:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 14 Dec 2022 12:35:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1671039355; x=1671125755; bh=6sVVgH6IxY cBknDk0vmd+9eohNzItI268fDBIBhcdt4=; b=vQVgupNyzk0K4/TzdAf/rZXKEN ki9f02scFBNaTwc+WhAGaKrVLXURPXKMGTY9MuTXa/J1G5UhMHoiZALVlHOq8AgV XgkmKwToYMsHX3pPCYguUmc4ua0hayZWLGhQ/Si2eSOBMJgkgy6+OWk0A75TGW1/ SwmMqsWrJDGnRQrFnMoeX0Zp2HYLCKyQgqC+1/U1IW26oyWNOyrUrEOXlDQOounu QgBGQs/kOO3ahc7eHiZWcj4jn/gwLS6Jsg9PZfNiwPiWf81WuNUI/33OkU84RgKM FBC2O8wqW8VO8KBU2cTyT5DhwY/+JrTEYUgLN7eOxB8qW2DZJih8DNb/Ytdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1671039355; x=1671125755; bh=6sVVgH6IxYcBknDk0vmd+9eohNzI tI268fDBIBhcdt4=; b=HAB6EeYVnXzd6JqvwkeKz/GBInG8r0KoJhm2ABQyBWvE Id6+A9vA+ZH40iqx52URfDe4jPIjC9GDzce2L64YutAO6ICG3mCBDaAQSEarUI4e 6oB9Ptt6TAGbpSwmLjJfTGo3tNI/e4MguG+FCcPj9jAFicYkMpbXDFlia5IhASil 6a29FqEOlsy9twCb4/QVx409V7pKGCc9bTcMOqavDDxSqiN3SvJ/V39bO9uSsn1H shkJAB6s3qD9IGhrOiU8kOmMkf0Td1QqIMmxU6XF5GKq5hYoRAody/2VoLIMPUHZ jdmlotTri0TVDA4Ck5CKTnyYQMAbqruBWtaUCL2/UQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Dec 2022 12:35:55 -0500 (EST) Date: Wed, 14 Dec 2022 09:35:52 -0800 From: Andres Freund To: Robert Haas Cc: "Drouvot, Bertrand" , Alvaro Herrera , Ibrar Ahmed , Amit Khandekar , fabriziomello@gmail.com, tushar , Rahila Syed , pgsql-hackers Subject: Re: Minimal logical decoding on standbys Message-ID: <20221214173552.sshklqvwezeo52h3@alap3.anarazel.de> References: <4b19419f-2e7c-a76b-c948-26d10af6693d@gmail.com> <20221207175824.apmc5clnj2fdjkaq@awork3.anarazel.de> <09c26df0-c5f9-eae0-5a6a-10fb00b0522e@gmail.com> <9f0a021e-40e1-0ae6-8086-a4457c99749e@gmail.com> <0ae83e69-bda0-0eb8-ef4a-d169292e3f66@gmail.com> <47f5faf0-6a6d-602a-5d5b-9449ca74c6ad@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-12-14 10:55:31 -0500, Robert Haas wrote: > I read through 0001 again and I noticed this: > > typedef struct xl_heap_prune > { > TransactionId snapshotConflictHorizon; > uint16 nredirected; > uint16 ndead; > + bool onCatalogAccessibleInLogicalDecoding; > /* OFFSET NUMBERS are in the block reference 0 */ > } xl_heap_prune; > > I think this is unsafe on alignment-picky machines. I think it will > cause the offset numbers to be aligned at an odd address. > heap_xlog_prune() doesn't copy the data into aligned memory, so I > think this will result in a misaligned pointer being passed down to > heap_page_prune_execute. I think the offset numbers are stored separately from the record, even though it doesn't quite look like that in the above due to the way the 'OFFSET NUMBERS' is embedded in the struct. As they're stored with the block reference 0, the added boolean shouldn't make a difference alignment wise? Or am I misunderstanding your point? Greetings, Andres Freund