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 1rxXvU-009ZjX-PQ for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 20:00:08 +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 1rxXvT-009Mvj-BR for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 20:00:07 +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 1rxXvT-009Mva-2G for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 20:00:07 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rxXvQ-003VKQ-Ps for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 20:00:05 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2db101c11beso14912971fa.0 for ; Thu, 18 Apr 2024 13:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713470402; x=1714075202; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ui/ofZfl2K4MsVWlF2l0ILqEAz6P70iDBQvgSnb934A=; b=DhzAcco7zrpVkevKaitlE36UFPh0nxUM6E0bfQxk6WuddDV+ESVSVUIzs59P0g9c93 +uvm9dXPWGcLvMXkRUSo+n64u3ELp8TAO/zSAYfzmtLxaqTR8mIBUM6Mu4ipSe5Y4GDI jgAcwuHHbG6q0lPc8BQfu0H693QZhyNEnbHcADtMbb/qJChU11zwH2az+iDEH/6mEb1A zW0PyEvwXwAYKQo6Dv5HBd/ZnEN0LZy/Tc/gJEe99R5bs2jYK2SvTzCbKeZPb1unh+AL tE28UqvKLd5BpnCx0r72Uo5Fk6JTlHVOamZYAyhvTkgdCwzQ9fRtwLL5zeek5/sAXKsL XfBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713470402; x=1714075202; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ui/ofZfl2K4MsVWlF2l0ILqEAz6P70iDBQvgSnb934A=; b=cLlSwhgGA9LuJhx9s3nFcxL/69qiarDEdGhRMIwI64puBGHku0vMbxLjoaF66tkoNS FTeIxa+J/SUUVsL9ECcqaCi2EkLz+NN4Arp5qBXQS3EYvso3YIGSZtQt+t752DgLdStv yModvmtX1wC0i5ndWrQPZaIzFkM7uTYchF557TU1lxe76ZOOyEai9tm1nLEcEC0M6wgy t3Iz6bNoIwVQFGFGibT0/SeD7HafiAGwEhe9J12QXnM6F6Mjqe4ZbTDK8mSWf1M1Lmo5 GLZ+HW73s0BAt1LB/+81Hi34P070zpEbN8RNRnL+LvEEEyzx9jdw+V0KVG67fR2K4SLh 1Vwg== X-Forwarded-Encrypted: i=1; AJvYcCUrFLzQRrBOJvyegWeoOya6hmmCtKRcoICh4zmoYEXXrt9nPBC8DlMbWU8eky9iP50TpEi4peF1rt5KZSSIEVETrEh0xJTNssQmwywOst/ZKS/d X-Gm-Message-State: AOJu0YwV3cOPSGaDu0HPbSIQFzxn+kBVukebmvkhzA6hjHQVJjQdxyiV HLi5b/b7l9WrkoG57igkTG+6F7LryziVEcul0QLkvptEcnkY7W4x X-Google-Smtp-Source: AGHT+IGeSwdoYu0nnSNmZ0+bFHm+ezt55/7ETtKUv9SgC93dPpjo7tT9/gPJS8Pj7IgpX0usjDlZxQ== X-Received: by 2002:a2e:880d:0:b0:2d8:7bbf:fd01 with SMTP id x13-20020a2e880d000000b002d87bbffd01mr10994ljh.15.1713470402067; Thu, 18 Apr 2024 13:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.16.75]) by smtp.gmail.com with ESMTPSA id y18-20020a05651c021200b002d9f3bed88dsm307793ljn.77.2024.04.18.13.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 13:00:01 -0700 (PDT) Message-ID: <5b4cd32f-1d5b-c080-c688-31736bbcd739@gmail.com> Date: Thu, 18 Apr 2024 23:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: cataloguing NOT NULL constraints Content-Language: en-US To: Alvaro Herrera Cc: Dean Rasheed , Andrew Bille , Peter Eisentraut , Robert Haas , pgsql-hackers@lists.postgresql.org References: <202404181339.ql3wlpryz6kw@alvherre.pgsql> From: Alexander Lakhin In-Reply-To: <202404181339.ql3wlpryz6kw@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Alvaro, 18.04.2024 16:39, Alvaro Herrera wrote: > I have pushed a fix which should hopefully fix this problem > (d9f686a72e). Please give this a look. Thanks for reporting the issue. Please look at an assertion failure, introduced with d9f686a72: CREATE TABLE t(a int, NOT NULL a NO INHERIT); CREATE TABLE t2() INHERITS (t); ALTER TABLE t ADD CONSTRAINT nna NOT NULL a; TRAP: failed Assert("lockmode != NoLock || IsBootstrapProcessingMode() || CheckRelationLockedByMe(r, AccessShareLock, true)"), File: "relation.c", Line: 67, PID: 2980258 On d9f686a72~1 this script results in: ERROR:  cannot change NO INHERIT status of inherited NOT NULL constraint "t_a_not_null" on relation "t" Best regards, Alexander