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 1krPD1-0006e5-6I for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2020 17:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krPCz-00055A-NT for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2020 17:42:57 +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 1krPCx-00054Z-SM for pgsql-hackers@lists.postgresql.org; Mon, 21 Dec 2020 17:42:57 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krPCu-0006CH-VN for pgsql-hackers@postgresql.org; Mon, 21 Dec 2020 17:42:54 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A05AB5C01C7; Mon, 21 Dec 2020 12:42:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Dec 2020 12:42:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to:from; s=fm3; bh=W0vCx7G4t7L1uQ47wWyq/W oYdkZoUIvRbFWL1R91mhU=; b=V7EZ90Tya5jxe+01ddZGVTVIUUTunY0VBvMh6c BoSht6klfavk1H5c83VT4PcdJeB4+RyzNyjCMitIea4H6ZSflktEVGgtwlMNqe2d 7965RC67M/CL7hIoh+OO9PEvQE8RQpzO5E5SgeMr30vDEPuSyYs569HXcD0htpf5 remWotR4jDf4AbgzdXwFt23uscbzqxBnw81s1DC270C1qqAl5p64uNhqgA3K5pJb V3vaZUDbSlgld9nybjdo125MHHcnangMIi7nwH3HjyeadNu1hOPCArc2ijWLNd3w JFC04ayqG0E4GmgsddbjCIziGb9yOOPvlJh1cIFrfZ1By3ZA== 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=fm1; bh=W0vCx7 G4t7L1uQ47wWyq/WoYdkZoUIvRbFWL1R91mhU=; b=Ri/1HgbjK2W3tmO9gw7ZSp 9T0v9lN/k+HVmjHdldvzXnWw/jkrJs+RLq7NBoDR/qwmWANTdGvIfuWMYjLfwXEz GiqVsbqfdzf9OjVcLaPCbLG9h+8AxQ9QZdYNLsmI4aoYGd5SLhuLVTQp6yjrwWIx 6mMbUWUB07lLZk+OhJklcnOF4apLTzHobiqY/GnyOwNxMqaN1wEi6qD0B0H5XNXk bunca98ShacvoJ9askMftNuSR34MFl8kFKIiITzvtHkl6bQ9oJa2pxVCwQseo6Vn yXU8x0Tubdd54HVLR8Ka1MID4uU249Pup/s1FbZJCmpVSYy5VXMC2++HBiB1EL6g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtvddguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffvffukfhfgggtuggjhfesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepkeelheeguedvhfffgeegkefgteeuueelffdvvddtieevgeejkeejgfek teevvddtnecukfhppeeijedrudeitddrvddujedrvdehtdenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghl rdguvg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id C9C6E108005C; Mon, 21 Dec 2020 12:42:48 -0500 (EST) Date: Mon, 21 Dec 2020 09:42:47 -0800 To: Peter Geoghegan , Robert Haas Cc: Noah Misch , Peter Eisentraut , Alvaro Herrera , Marco Nenciarini , Petr Jelinek , Thomas Munro , Simon Riggs , PostgreSQL-development Subject: Re: [PATCH] Logical decoding of TRUNCATE Message-ID: <20201221174247.67pnoem5dtscocv4@alap3.anarazel.de> 65;6201;1cFrom: Andres Freund References: <20180405170712.av633jvnnizmd5sn@alvherre.pgsql> <1baed811-47b2-5b7d-c641-4b7eb01d650f@2ndquadrant.com> <20201220041319.GA3602688@rfd.leadboat.com> <20201220231308.yi4t3xj2btpanxs5@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: From: Andres Freund List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2020-12-20 15:54:31 -0800, Peter Geoghegan wrote: > On Sun, Dec 20, 2020 at 3:13 PM Andres Freund wrote: > > Hm. Do I understand correctly that this problem is hit solely because > > the parallel mode code relies on there already have been a transaction > > snapshot set, thus avoiding the error? And that the code normally only > > works because GetTransactionSnapshot() will already have been called > > somewhere, before EnterParallelMode()? > > It seems unlikely that InitializeParallelDSM() was ever intended to be > run in a background worker. IDK, the environment in a bgworker shouldn't be that different from the normal query environment in a normal connection. And it's far from insane to want to be able to run a paralell query in a bgworker (and I *think* I have seen that work before). This case here seems more like an accidental dependency than anything to me, once that could perhaps even hint at problems in normal backends too. Greetings, Andres Freund