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 1hCFBI-0004Fl-6F for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 03:06:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCFBG-0005LE-Cz for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 03:06:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCFBF-0005L7-Ux for pgsql-hackers@lists.postgresql.org; Fri, 05 Apr 2019 03:06:14 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCFBB-000500-Ah for pgsql-hackers@postgresql.org; Fri, 05 Apr 2019 03:06:12 +0000 Received: by mail-qt1-x843.google.com with SMTP id d13so5838131qth.5 for ; Thu, 04 Apr 2019 20:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=n/dULfc895BsTGjxgLQkjTTzv3tx9yVsVV07Kcsx+d8=; b=zL9qobzUCI8LMvgddS6QxlkauHiJPrwZcs/SAiRiHCjSCoh6na4ya1ul/wjc+4JfmP TFUfUB27p3FJb4atiiBcsCJx5T1OGvBpKs2QAgITUCAx3L3Jnpm/yyF4Hi3vGaMi5FEv 1YqBZi1YzGjlabcd83yMSD0gYWwb/+m8vpvK9SBe4cVg3AVHOJ/4LBGwaOqAIKzeFXSP fJTapnE7twNQGVN103ayBlaKERmQ+G6vhWqePOKML+3rWfhtiM54n5UN/SkZOgeykQvc 9F8Sy7m0Eo5Ol9TxTqS63uG4SC+npcBYNyFScS7eW4P2Jsb/cbSUYAe0+jO09Z5g9feA EC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=n/dULfc895BsTGjxgLQkjTTzv3tx9yVsVV07Kcsx+d8=; b=qX4vAzS4jjDNDVDHdvwy2Ui6hyXup9oONT1JerQOswzpFVPDFTa91gICmpyoGLqXrm y+NeVZHrid5y1f57KxLJ/qNzFc+n8yJECXwF2aXlh6d/LvwqwV2Efp+PvxkVrhLhQE+N M+Eb/bVtsGPeubw0M9/CY7GfbzS7J6TGo/YZ1A1VzvSfCDcNPVjD/rskBu7bh3Zqkw5b tKO5g++eZn7MUyVkxqBKp7yLdUPVkIHawp5KXwA0PeTpRnQpUT8JGZM9Jm6hXzjJv+np 9EIdkZ4aRX95kniP/jOqnWvjL3pEHq++UGFng1tqPuW0R7/iVJYCOXHgGFRJ7Oc26+yF 1HeA== X-Gm-Message-State: APjAAAVTdUAjOjAlq+CfFmOLUKyOVFLUobH4hXMdclumrEdOXmGXNGI1 E62h8KGsiKuOjUfo2YonLto9AA== X-Google-Smtp-Source: APXvYqzq88KMkd22GuztzA/kEgBWYtruQmdBp12z99WsjRZSyEoLoYc3aSHafjjUpoiqEoBvPzFRug== X-Received: by 2002:aed:35b0:: with SMTP id c45mr8716392qte.144.1554433567096; Thu, 04 Apr 2019 20:06:07 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id u16sm11645188qkj.50.2019.04.04.20.06.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 20:06:06 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 35C9B1203A8; Fri, 5 Apr 2019 00:06:04 -0300 (-03) Date: Fri, 5 Apr 2019 00:06:04 -0300 From: Alvaro Herrera To: Andres Freund 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: <20190405030604.GA3360@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190404214520.7rfufsubxekodypr@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-04, Andres Freund wrote: > 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. Hmm, isn't there already a critical section in visibilitymap_set itself? > I still think this is the wrong architecture. Hmm. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services