Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4TbC-004MGm-K4 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 22:47:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s4Tb9-005iS0-RL for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 22:47:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4Tb9-005iRs-Hi for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 22:47:48 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s4Tb7-001wKV-Vz for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 22:47:47 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2e2b468ea12so2316901fa.1 for ; Tue, 07 May 2024 15:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715122064; x=1715726864; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5RH3jyp8asdimMFFZqev+rvBQ5XnDs0RFPXsX4y6JTY=; b=isGnNQWMROFkfwTEqQsZ5pI06GJaCj4VBLfzHqr/xX4lwzLx9WjRkdj8+6QPpDrQop LgiTbW3zcwZBdLUjVVMqJv3Pholx1DysIpchGu+QsAZIoeuGIJviY1vOCN5U8wDK6CqE DXPXv7vgw4lDTGaj4kyp1KzIzvKBgRNJiAET9aPrWk9f4E3yONRC0J5AoDZFBx1Ofs8g oaAujmehOa7cBtN820FdNERQib9YgTpwFz+yKHUsK81gVl4Y2+EAt1X1fn0m4hbmVLOW HWPKTOWmC+3h2b1bkjjQd1BUGTiYJ4YzIQm8D2Cumx8YQNQM+/obBJFFSM45aGYfNZVy gRAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715122064; x=1715726864; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5RH3jyp8asdimMFFZqev+rvBQ5XnDs0RFPXsX4y6JTY=; b=quxnFge1hJSkhOr4hZ4R32etrQii0O5V3FBVK5PYPWo63MCFoy52uOfmvaDGXfLbr5 F2XY6TdmgP5dx6lU4qv2NcUUc9MeceMcFPlP5kzltobw9nth9LmURsWhIRcqGnD9JFrK um8vB3WmPu/ZKGKIbajGcFeOUkyTGyvYKDbZk+7DoL/KlvUbI3o4Ry+GuN886VvZXObE 4CgPwBLEl9oeGnZB9awKROyjSQAIG+dYtV45wnfJh5bahmLCHYxgN3dpc+7rzCvG5tMs tw4psvxUYHKE34CI5PizgL04OfbdjrELVBuMnApI5vAvqcdvb0LuF4flr5p8c3rXgLbc p1Hg== X-Forwarded-Encrypted: i=1; AJvYcCUQqq+Rt//9BLfreDeZYYq9fRWdGs+PJxemPk2UK8HRzeC2uUU/NtWxEGy8DYXqvgCGtv5JOEnxI91tCjT/gMlV1fLVp/0EN/FK3I2EJrq/x/RH X-Gm-Message-State: AOJu0Yy3CX/qLuj6W1rxWzYMCSPpsan6ZfYprzZURsxSmYsbBS1S/g57 BtHQatskfFU5OTzz3OpJuyDqT/7WeFAjmqRmAgJe9Q1FCT24ELQE/y4arEw5v7PMDAJ+nQNPECA 0BpA5vy5ZWYGQH7dXHRlsPXwoSo0= X-Google-Smtp-Source: AGHT+IEGW+BUuWmjtbX8nLOMtnUYLr/BGJK1RrU3CPK7SoymNkB1s+ima2mEJ+FVMSYhOpwFisxfIrICtY+pAJl51NU= X-Received: by 2002:a2e:3a08:0:b0:2e2:a6ee:3c15 with SMTP id 38308e7fff4ca-2e3d9cb3b45mr12216431fa.23.1715122064102; Tue, 07 May 2024 15:47:44 -0700 (PDT) MIME-Version: 1.0 References: <1e6ca7b3-98e6-46b2-9982-97f92c7523d8@dunslane.net> <76910.1715106055@sss.pgh.pa.us> <276516.1715121616@sss.pgh.pa.us> In-Reply-To: <276516.1715121616@sss.pgh.pa.us> From: David Rowley Date: Wed, 8 May 2024 10:47:32 +1200 Message-ID: Subject: Re: Revert: Remove useless self-joins *and* -DREALLOCATE_BITMAPSETS make server crash, regress test fail. To: Tom Lane Cc: Andrew Dunstan , Richard Guo , jian he , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 8 May 2024 at 10:40, Tom Lane wrote: > > David Rowley writes: > > We could make the policy copy-on-modify. If you put bms_copy around > > the bms_del_member() calls in remove_rel_from_query(), does it pass > > then? > > Didn't test, but that route seems awfully invasive and fragile: how > will we find all the places to modify, or ensure that the policy > is followed by future patches? REALLOCATE_BITMAPSETS was invented for this and IMO, it found exactly the problem it was invented to find. Copy-on-modify is our policy for node mutation. Why is it ok there but awfully fragile here? David