From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pointless check in RelationBuildPartitionDesc |
Date: | 2018-09-05 00:53:15 |
Message-ID: | 5a60c5c4-6d19-4803-31d6-58e9dbeb0ac9@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018/09/05 1:50, Alvaro Herrera wrote:
> Proposed patch. Checking isnull in a elog(ERROR) is important, because
> the column is not marked NOT NULL. This is not true for other columns
> where we simply do Assert(!isnull).
Looks good. Thanks for taking care of other sites as well.
@@ -14705,7 +14705,9 @@ ATExecDetachPartition(Relation rel, RangeVar *name)
(void) SysCacheGetAttr(RELOID, tuple, Anum_pg_class_relpartbound,
&isnull);
- Assert(!isnull);
+ if (isnull)
+ elog(ERROR, "null relpartbound for relation %u",
+ RelationGetRelid(partRel));
In retrospect, I'm not sure why this piece of code is here at all; maybe
just remove the SycCacheGetAttr and Assert?
Regards,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2018-09-05 02:55:15 | Re: pg_verify_checksums failure with hash indexes |
Previous Message | Andres Freund | 2018-09-05 00:51:30 | Re: Bug fix for glibc broke freebsd build in REL_11_STABLE |