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 1m9rZk-0002fW-2w for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Jul 2021 16:11:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9rZi-000359-NJ for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Jul 2021 16:10:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9rZh-000350-PV for pgsql-hackers@lists.postgresql.org; Sat, 31 Jul 2021 16:10:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9rZd-00042r-V7 for pgsql-hackers@postgresql.org; Sat, 31 Jul 2021 16:10:57 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7EFE4320077A; Sat, 31 Jul 2021 12:10:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 31 Jul 2021 12:10:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=dGh+tfGl6c0q2zxnizXx4PwRQzFodQ6bV1Uio49bSKU=; b=tTFWNyRr EeOXaTByq6xLi6MAMXe86Z8dqLNS01JxTii3ucSDGjtfbrdNZUdlCnlOl59wxAf0 YRb6sZsxdkvV3CRUWReat5XvItrH2ieiOw+5oErpxc4Ute3+E6Upiz8oiy2kQgaW dHBSxJUHVd4EGh2Nhh4EA7s0sN7Y3uIe3X+SMW0WxllZEC2/EFDtcpd/A95CMktQ F+jImD3y0NPN3eH8CWqphpFe5GzRN3R/3v+XT4AKJPavspMG74dfT1PHhYwF+18/ Z/NcZ8AR4D9YdzzTaoluyrqW39QE7WOKwhbt56Tt9ZOu543EdjXpouiCeIUAjqfj R18PbAsSYKs+zA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrheejgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 31 Jul 2021 12:10:47 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8BC832A09BA; Sat, 31 Jul 2021 12:10:44 -0400 (-04) Date: Sat, 31 Jul 2021 12:10:44 -0400 From: Alvaro Herrera To: "Bossart, Nathan" Cc: Kyotaro Horiguchi , "x4mmm@yandex-team.ru" , "a.lubennikova@postgrespro.ru" , "hlinnaka@iki.fi" , "matsumura.ryo@fujitsu.com" , "masao.fujii@gmail.com" , "pgsql-hackers@postgresql.org" Subject: Re: archive status ".ready" files may be created too early Message-ID: <202107311610.jbpvq7kgmwc3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7782D697-3F76-4E2A-A223-BA6E2B91A7FD@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-31, Bossart, Nathan wrote: > On 7/30/21, 4:52 PM, "Alvaro Herrera" wrote: > > I noticed that XLogCtl->lastNotifiedSeg is protected by both the > > info_lck and ArchNotifyLock. I think it it's going to be protected by > > the lwlock, then we should drop the use of the spinlock. > > That seems reasonable to me. This means that the lock is acquired at > the end of every XLogWrite(), Uhh, actually that there sounds really bad; it's going to be a serious contention point. Another option might be to make it an atomic. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/