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 1kD3ef-0001wf-OS for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 10:36:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kD3ee-0008MN-NW for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 10:36:44 +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 1kD3ee-0008MG-CN for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2020 10:36:44 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kD3eZ-0006fo-Vy for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2020 10:36:43 +0000 Received: from mail.postgrespro.ru (cyclops.postgrespro.ru [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 2B26621C03DF; Tue, 1 Sep 2020 13:36:38 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1598956598; bh=qM4r5EnWMAGV0069n39HwJcsXYYxutunWAO7MO5FrUs=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ILEqNED2JDLr2wMrOnOovpkjxw+LeBx3tbYtJQ7b/ztCE/ESTU7B4Mb0zdr0/qm0L akNmWlTQSpIkNxxtCaIfPBXgg4yjXEMMexljCXYqaf+vjEnmd3vhYD9FpZ3kU9RJQW Il5X7udR94Y6dygN/6wTrldWrImozx7q+4FXZqxk= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 01 Sep 2020 13:36:38 +0300 From: Alexey Kondratov To: Justin Pryzby Cc: Michael Paquier , Masahiko Sawada , Steve Singer , pgsql-hackers@lists.postgresql.org, Alvaro Herrera , Robert Haas , Alexander Korotkov , Masahiko Sawada , Jose Luis Tallon Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly In-Reply-To: <20200901101219.GB5450@telsasoft.com> References: <20200406184406.GF2228@telsasoft.com> <9b6a6cec134451550b74aa2ffd1446d0@postgrespro.ru> <20200407204406.GR2228@telsasoft.com> <20200412013352.GA2491@telsasoft.com> <20200426175614.GT28974@telsasoft.com> <20200809110252.GD17986@paquier.xyz> <20200810022443.GI20473@telsasoft.com> <20200811053945.GG17986@paquier.xyz> <20200811070922.GP20473@telsasoft.com> <20200901101219.GB5450@telsasoft.com> User-Agent: Roundcube Webmail/1.4.0 Message-ID: X-Sender: a.kondratov@postgrespro.ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-09-01 13:12, Justin Pryzby wrote: > This patch seems to be missing a call to RelationAssumeNewRelfilenode() > in > reindex_index(). > > That's maybe the related to the cause of the crashes I pointed out > earlier this > year. > > Alexey's v4 patch changed RelationSetNewRelfilenode() to accept a > tablespace > parameter, but Michael seemed to object to that. However that seems > cleaner > and ~30 line shorter. > > Michael, would you comment on that ? The v4 patch and your comments > are here. > https://www.postgresql.org/message-id/attachment/105574/v4-0001-Allow-REINDEX-and-REINDEX-CONCURRENTLY-to-change-tablespace.patch > https://www.postgresql.org/message-id/20191127035416.GG5435%40paquier.xyz > Actually, the last time we discussed this point I only got the gut feeling that this is a subtle place and it is very easy to break things with these changes. However, it isn't clear for me how exactly. That way, I'd be glad if Michael could reword his explanation, so it'd more clear for me as well. BTW, I've started doing a review of the last patch set yesterday and will try to post some comments later. Regards -- Alexey Kondratov Postgres Professional https://www.postgrespro.com Russian Postgres Company