Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCABL-0003tF-Gl for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 21:46:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCABJ-00006O-Ir for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 21:45:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCABI-00004w-Bp for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2019 21:45:57 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCAAq-0004ND-Ll for pgsql-hackers@postgresql.org; Thu, 04 Apr 2019 21:45:55 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 58DAA61E7; Thu, 4 Apr 2019 17:45:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 04 Apr 2019 17:45:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=hGj2+z0RQvO10vYtbx3eHhWnt59 xd1LpkmHMysotZa4=; b=Dutpt1zCTYCXibCWdh0nRVNhnUYq8ApjfTMgLa51F1h dIA+VQPXUpuw3eaIRNDxlbhb3m5r9yvBvFEbOzTzsSe0d0Vu80/O137udc6ARoTh yLenL+7EzJsBa6P7XRqwpuzQMaBHWdMtZjYyVzlj77CGS3G7t2ghTHEzI/GR78WI ZGjfcNvxyLbL1NluHT1IaN5NA/BegWwYGAqHIW66IjjTXuMhHLzTJ19t0YAd298i O2FAklnFexRmlrbGuz29wu+ojc4q/GLv8TLac/y0gAJVfkD6IdBfAotJoSv7kiot PbcbO6p5cFRKNUp2QdakwZMP9ojG+6ieiN2nETKUdwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hGj2+z 0RQvO10vYtbx3eHhWnt59xd1LpkmHMysotZa4=; b=B9y70V65Iv2ppkox8KhTFS l9XHWXkZBCpI/hcFC/FgSBghyrxbMN3uplC/nJdNAYq9u4oBbRamdVIUylS7x1qg 8dd5d001mNIS3MDKSM7BAgmtQk0xGBc9poziLs9Gu4nI3vAFQEJLVIWBgeuFtgAR dEJOh7mn5c6Bixc0PAAWyQ3RurVpGTjnxJYYK3cwld5Hg0h2duUgon5HCARpAFsD vetpA3h2xlvXR79+NBpoqZrBFvbW999YeSgNU1NvoWdeWSrSOvlItqn6TLhIoY4+ DwPyxcZ2q4BF3aVbc4OikNXMdPNyk7S8rF8EvJ+uAFQRYYA8BNZ5ua6sxMOqzfVw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdehgdduieefucdltddurdeguddtrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvffukfhfgggtuggjsehttdertddttddv necuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgrii gvlhdruggvqeenucfkphepleekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgenucevlhhushhtvghruf hiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id A2FD5E456D; Thu, 4 Apr 2019 17:45:24 -0400 (EDT) Date: Thu, 4 Apr 2019 14:45:20 -0700 From: Andres Freund To: Alvaro Herrera Cc: Pavan Deolasee , Masahiko Sawada , pgsql-hackers , Jeff Janes , Simon Riggs , Tomas Vondra Subject: Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits Message-ID: <20190404214520.7rfufsubxekodypr@alap3.anarazel.de> References: <20190404172417.gua2xmn754uoxzto@alap3.anarazel.de> <20190404191554.GA7161@alvherre.pgsql> <20190404192308.mumsbtmccqyuebdh@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404192308.mumsbtmccqyuebdh@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-04-04 12:23:08 -0700, Andres Freund wrote: > Also, how is this code even close to correct? > CheckAndSetPageAllVisible() modifies the buffer in a crucial way, and > there's no WAL logging? Without even a comment arguing why that's OK (I > don't think it is)? Peter Geoghegan just reminded me over IM that there's actually logging inside log_heap_visible(), called from visibilitymap_set(). Still lacks a critical section though. I still think this is the wrong architecture. Greetings, Andres Freund PS: We're going to have to revamp visibilitymap_set() soon-ish - the fact that it directly calls heap routines inside is bad, means that additional AMs e.g. zheap has to reimplement that routine.