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 1lwKoT-0002LK-5p for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jun 2021 08:34:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lwKoP-00023k-Fm for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jun 2021 08:34:13 +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 1lwKlP-0006OQ-Qn for pgsql-bugs@lists.postgresql.org; Thu, 24 Jun 2021 08:31:07 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwKlM-0007bS-Nm for pgsql-bugs@lists.postgresql.org; Thu, 24 Jun 2021 08:31:06 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id B65192055B; Thu, 24 Jun 2021 11:31:01 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1624523461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5y+vNKoh4ibJs2lRKJvujuhYPYgVAHXbPqqaqInPqKA=; b=nqkNb0WA0G68kiU1o2imoGXqV+NQanNq3c5ESBgTxoEe64zFVJTJ9fp5L1Z4pOYVchZq7a Ai8169D5elkuCPnIVgY3d44QAnPxJePjDaL7hb2/tGVkHx1ldKMrE+ir+VH3HJ/v/CgeHp 7eKCxHjfRcJabHi2BKzPtkODC9ZNrcc= Subject: Re: BUG #17064: Parallel VACUUM operations cause the error "global/pg_filenode.map contains incorrect checksum" To: Thomas Munro Cc: Tom Lane , Alexander Lakhin , PostgreSQL mailing lists References: <17064-bb0d7904ef72add3@postgresql.org> <1715251.1624371066@sss.pgh.pa.us> <19190f79-cf37-ff18-1b40-07a1a66a1d9e@iki.fi> From: Heikki Linnakangas Message-ID: Date: Thu, 24 Jun 2021 11:31:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1624523461; a=rsa-sha256; cv=none; b=ZO7Zfr35lirmuujg4D306ZxNd/LY56zsDkLLTHxBNgImDGKUEH5MYkm9nNHEMJ/v7w61BS Tr6yXOU+dw/2XGiwGTtesqQdcFG5zGXucwJzce1d2aymra/9fi2/dIuQ8qrmP9JG/DlKhn OsgBqH/GGwQwPgEd6FTS03m6jVnOZsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1624523461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5y+vNKoh4ibJs2lRKJvujuhYPYgVAHXbPqqaqInPqKA=; b=D5uuYTm/TAMcpd0BWK8Lt2g8azF/ZapKUm2f2RE6TvmoYuipPrVngF/y0x4rWeQCZk+kkx zxKi9Wm21TeHlR6F4cvz8dLzjehrPUcmTLvSrlukdgeCoDJsM/qGwztEi1ag+dNVvQNnZl X8zYXTi5zjTIu+CEzuATJMvEezCy1zY= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 24/06/2021 11:06, Thomas Munro wrote: > On Thu, Jun 24, 2021 at 7:52 PM Heikki Linnakangas wrote: >> On 23/06/2021 12:45, Thomas Munro wrote: >>> On Wed, Jun 23, 2021 at 7:46 PM Heikki Linnakangas wrote: >>>> Let's just add the lock there. >>> >>> +1, no doubt about that. >> >> Committed that. Thanks for the report, Alexander! > > I think you missed relmap_redo (including a misleading comment). Fixed, thanks! >> If anyone wants a write a patch for that, I'd be happy to review it. And >> if anyone has access to a system with pmem hardware, it would be >> interesting to try to reproduce a torn sector and broken control file by >> pulling the power plug. > > I have been working on a kind of experimental file system for > simulating torn sectors (and other interesting file system phenomena) > as part of some work on recovery scenerio testing, not quite ready to > share yet but it can simulate that exact failure... Cool! We know what happens if pg_control file is torn, though. What I'd like to know is whether it can happen in practice with pmem, an how likely it is. For curiosity mostly, I think we have already established that it can happen, and it would be nice to protect against it in any case, even if it's rare. - Heikki