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 1khd8B-0003Un-U7 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Nov 2020 18:33:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1khd89-0003fb-IF for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Nov 2020 18:33:33 +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 1khd89-0003fU-Bh for pgsql-hackers@lists.postgresql.org; Tue, 24 Nov 2020 18:33:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khd87-0003vN-4O for pgsql-hackers@lists.postgresql.org; Tue, 24 Nov 2020 18:33:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0AOIXUCS293168; Tue, 24 Nov 2020 13:33:30 -0500 From: Tom Lane To: Andrew Gierth cc: pgsql-hackers@lists.postgresql.org, kes-kes@yandex.ru Subject: Re: mark/restore failures on unsorted merge joins In-reply-to: <87k0ua4p4u.fsf@news-spur.riddles.org.uk> References: <87o8jn50be.fsf@news-spur.riddles.org.uk> <125707.1606161260@sss.pgh.pa.us> <87k0ua4p4u.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Tue, 24 Nov 2020 18:07:59 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <293166.1606242810.1@sss.pgh.pa.us> Date: Tue, 24 Nov 2020 13:33:30 -0500 Message-ID: <293167.1606242810@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Uh, why would you not just look to see if the ammarkpos/amrestrpos > Tom> fields are non-null? > We don't (in the back branches) seem to have a pointer to the > IndexAmRoutine handy, only the oid? Oh, sorry, I misread your comment to be that you wanted to add a field to IndexAmRoutine. You're right, the real issue here is that ExecSupportsMarkRestore lacks any convenient access to the needed info, and we need to add a bool to IndexOptInfo to fix that. I don't see any compelling reason why you couldn't add the field at the end in the back branches; that's what we usually do to avoid ABI breaks. Although actually (counts fields...) it looks like there's at least one pad byte after amcanparallel, so you could add a bool there without any ABI consequence, resulting in a reasonably natural field order in all branches. regards, tom lane