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 1uMyq1-008pmU-9c for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 00:52:09 +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 1uMypz-001bhZ-Bi for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 00:52:08 +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 1uMypy-001bfU-Vg for pgsql-general@lists.postgresql.org; Thu, 05 Jun 2025 00:52:07 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uMypx-000GGO-2X for pgsql-general@postgresql.org; Thu, 05 Jun 2025 00:52:06 +0000 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-3a525eee2e3so274331f8f.2 for ; Wed, 04 Jun 2025 17:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1749084723; x=1749689523; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=2Iqek8Olr9DcsQ8gTJCg7+2FwnDr4HSPTPfsIoctiL0=; b=XvMo9lb7aITCjCFVan7cysK+5QcOVzAkxoe0FDkPzNuBsORfGkLQum5mh9M9ZJH1xV FbPnaQ20yTajnZYxKzRC7lccAtAIQ3AoZhlwuFboFm9Bl4z4r/3AtdHB8AAxWiIdtSRM aPt5w7IP7pzaqitz8bN4qgWGpxQQUqfOcYfJ4fbYNGofu8hWqwgyBCKDXtzDDyZP8x6Z RH0owEJMTbH6uzTacLSs5gbJkv26fqoXjQ3+fiJ1BXLPBEmon3EzjKf9g3LjWPtP2Ln9 sfAdTrIgVzB2dZ/2OUiKTUEMOISf4ivbJ1X+GyNOh0w31qd48IXxI4W9RStOM9YMaWRS FjDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749084723; x=1749689523; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2Iqek8Olr9DcsQ8gTJCg7+2FwnDr4HSPTPfsIoctiL0=; b=ojdd+FBKwu7mGqewfXV3IXq9AsiaaJFenw/PVuuXx6kZg3DkQOB31u7W9MlGl9t88M yq5qwi1w4Ib+JrTg7/2lK3kaFetQl0ZE/zMJdldgmLnSP1ISlgcnKVavfLdQOEu4B8cQ mxrD8/1Inmq95w5KbD0N1dTCwuYOHINgHXLVi3N2qp0BQEHGgW5/FaWCNuCQjNiaBiK2 s0k9lT59T3fgEHqmElluNLB1nxJKNw7+zDSoBkTf6dsTseIWhJ3YlisSitb2bILoBlPU +1blAfv7zSXlIfU7+nnyzLLzl2knO3INKJo80N/qo66IRhC0uww9cHTBYI3GvJcfPFza xwhg== X-Forwarded-Encrypted: i=1; AJvYcCXclmsXaLOuG9mzy0GvTKiNBZ5lV2yb2BeEFKq6eY6TqODpUilfxTOUU8lMwJF/9dGxjpCuKWrVwVj9QLEt@postgresql.org X-Gm-Message-State: AOJu0Yx2fIXpZeBFTHzNVx30QnkmuGLA6E+e/zjy4YXgfMVy1lPHHhyP eaNNycOVqqFesOouoAEj2J4Er+TfcUK+YpnExLCX6t+oVnVB5WYhhCPAg4y8q+ViK0Y= X-Gm-Gg: ASbGncuaptHVQo1lSxjbXZuQGaU8ElKK0KcVgscodJdWdUvekUgA5q8TVqnXuGTiBwh rMxMdCHO1a0d/nGJnntoNNvfq/qpXFgNvgUnyUsnVfKWA4kzCBzxm+ySJCh8GzkW0guy6xsEs/s kyYNjVBMot5tgmQp6lBaPgBzPwGiKCX1/CW61nI0PIzcyV6i6evG0UISqbd6CrknJOB2NHGhH8B aA7xShKK5oR5tX1h9YoGDI2AW1Ape/9sTVFF2qYIjzDMrq7xdAKUqYFYX9sLPijcHE71h6o7B3D ZLa+JO0So30TNQeM7RngKwwgn/N5xUSlRY9SLCA4/fV0dbvnglKJbdGhZckCA/TQAi1knEAi6dh L X-Google-Smtp-Source: AGHT+IGhiIqVPxpUAW1cPLYxNAn3QQ6FxFVgSJ45fGNgd3WMWHPT7r/v0AORdSLG30k9LUdTPm16Cg== X-Received: by 2002:a05:6000:2204:b0:3a4:d3ff:cef2 with SMTP id ffacd0b85a97d-3a51d961912mr4096342f8f.27.1749084723044; Wed, 04 Jun 2025 17:52:03 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([12.0.89.245]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4fdd7ed8132sm3036274173.79.2025.06.04.17.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jun 2025 17:52:02 -0700 (PDT) Message-ID: <793a7752e64b95d267f73e1e4ee6c12c620da5dd.camel@cybertec.at> Subject: Re: Yet more ROLE changes in v18 beta1??? From: Laurenz Albe To: Dominique Devienne , Tom Lane Cc: Robert Haas , pgsql-general@postgresql.org Date: Wed, 04 Jun 2025 19:52:01 -0500 In-Reply-To: References: <1026415.1749051290@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-06-04 at 18:42 +0200, Dominique Devienne wrote: > On Wed, Jun 4, 2025 at 5:34=E2=80=AFPM Tom Lane wrote= : > > Dominique Devienne writes: > > > In any case, if anyone else knows about changes in this area, I'm int= erested. > >=20 > > Digging through the commit log didn't find much, but conceivably > >=20 > > https://git.postgresql.org/gitweb/?p=3Dpostgresql.git&a=3Dcommitdiff&h= =3D01463e1cc > > Ensure that AFTER triggers run as the instigating user. >=20 > Thanks Tom. We don't drop ROLEs in trigger (yet, we'll get there). > So that particular commit is probably not the reason. > Thanks a bunch for looking into it. --DD That change is not about dropping roles, but: - before, if you had a deferred constraint trigger that was triggered while you temporarily assumed a different role (e.g., the DML statement is exec= uted in a SECURITY DEFINER function), the trigger was executed as the current = user at commit time - from v18 on, the trigger gets executed as the user that ran the DML state= ment I would be somewhat surprised if you hit this rather exotic case that went unnoticed for many years, but it is possible. Do you have deferred constraint triggers? Yours, Laurenz Albe