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 1tDeBr-002G01-BF for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 06:27:51 +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 1tDeBp-002a6a-Vg for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 06:27:49 +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 1tDeBp-002a57-DY for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 06:27:49 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tDeBm-002pUl-EX for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 06:27:48 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3e607556c83so1006250b6e.1 for ; Tue, 19 Nov 2024 22:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1732084066; x=1732688866; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uA0u+965Oc8XO+ENK0LAvEU4Q8GuF1jb8+CUfAOEu90=; b=BBVkRZw/tMK/H0l4RY003tb1d5GULKal9hvtg8MDAtW9RNHpqqx0d19x8D5L6/lwkG D1epHa3ksKUKm15k2dK45bKXHqlMS8pHh25z5F2cW+RqCEVcvE+47y8t0OyYbgbCuGJt kM648qzQrHF1ktk8kG/ZYhoNoMqi2F27KLDVg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732084066; x=1732688866; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uA0u+965Oc8XO+ENK0LAvEU4Q8GuF1jb8+CUfAOEu90=; b=M4eu9O1aCROPELu5dxHNHWrhqllxeXZ7Naxbc8c2uxckEbvngETNP6TwWI2LtBMZJl pMFbZpLDocQT8q21ouS54nVPl3EiIwn6874ZgzF/f74uCIX/cSu/91nBhO+prrjAQs1Q q14Uwsz9d/kw3BJLUAzqP7yrwoe0peZC1E5DgX1r0hwCoo0bAuLU7R0ASSLaFsZWvYe9 4bPpae0SwSUou2YVheDtjhaIZ+DtCpW150M1+1wckM1KnXMOORLoJ73b2coxp2OWh6No gWWENag7B+PpuTKf8319tLsLI+8RTS9IYQBjrmqjP6o0cVBsfq9taPnvY3GH+Tk1Jvm2 yrVA== X-Gm-Message-State: AOJu0YzzpUtBehKpWAOekpF8or5i5oBfjtU8Ti/2VAvpnzKxWcjIXmbD F3JmunTpzH3H4gs1oJr34VZSqAEeX/ORXN+3ZMtnePV2LR82Qc/gvwD8C0QpZQ== X-Google-Smtp-Source: AGHT+IFRzBhGsx+s7pu7vwyJbtQMHzi9t6UH9vxGrbmsemWMy8usuHQVvxkGSm6hs7cfb2IArRNXcg== X-Received: by 2002:a05:6808:2e88:b0:3e5:fd08:d020 with SMTP id 5614622812f47-3e7eb7ca93amr1429124b6e.42.1732084065637; Tue, 19 Nov 2024 22:27:45 -0800 (PST) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3e7bcd93efdsm4066858b6e.51.2024.11.19.22.27.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2024 22:27:44 -0800 (PST) Date: Tue, 19 Nov 2024 22:27:42 -0800 From: Noah Misch To: "Aya Iwata (Fujitsu)" Cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: 'WARNING: you don't own a lock of type ExclusiveLock' is printed during the GRANT command on PostgreSQL16.5 Message-ID: <20241120062742.b0.nmisch@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 20, 2024 at 05:11:07AM +0000, Aya Iwata (Fujitsu) wrote: > During our tests on November release, > we discovered a "WARNING: you don't own a lock of type ExclusiveLock" that occurred at a strange time in GRANT command. > > [Details] > Version: > 16.5 > 1. Set binaries bin and lib path > 2. Initiate the server using initdb command > 3. create folder for tablespace > 4. start the server usaing pg_ctl command > 5. execute the following commands: > > This is only possible when psql executes each command individually. > $ psql -d postgres -c "CREATE USER nmluser1;" > CREATE ROLE > $ psql -d postgres -c "CREATE TABLESPACE test_tblspace LOCATION '/xxx /xxx/pgsql16.5/tbs';" > CREATE TABLESPACE > $ psql -d postgres -c "CREATE DATABASE enc_testdb;" > CREATE DATABASE > $ psql -d postgres -c "GRANT ALL PRIVILEGES ON DATABASE postgres TO nmluser1;" > GRANT > $ psql -d postgres -c "GRANT ALL PRIVILEGES ON DATABASE enc_testdb TO nmluser1;" > GRANT > $ psql -d postgres -c "GRANT CREATE ON TABLESPACE test_tblspace TO nmluser1;" > WARNING:  you don't own a lock of type ExclusiveLock > GRANT > > > [Investigated] > - This WARNING did not occur when tested with FEP16.4 using the same "Reproduction procedure:" > - This WARNING did not occur when running CREATE ROLE through GRANT in a single session connected to psql. > - Also, it did not happen when running 'psql -f' with an .sql file > - We have run similar tests in the November releases of v12 through v17, but this is not reported by the tester in those releases. > -- Therefore, we have not tried this "Reproduction procedure:" on versions other than 16.5 and 16.4. > - This WARNING message appears in several places, and after modifying the source code to know which elog it is, > seemed to come from ReleaseSysCache() in ExecGrant_common() Thanks for the report. This seems reasonably likely to come from a defect in commit 51ff46d. I will look into it.