> > The patch that Amul and I wrote both achieve the same result. > > The approach that Amul took builds a list of constraint OIDs, > > which could grow with the number of partitions and foreign keys > > on those partitions. Maybe not a big deal?
> Nope, not a big deal. It would be a big deal if we were talking about > 268 million partitions (>1GB palloc size), but that's impractical for > other reasons. that's fair. Patch looks good to me, but I am not sure about this part of the comment: "Only the topmost one is to be considered here; the child constraints must be left alone," In this case, none of the pg_constraint entries are actually considered. right? Regards, Sami