Re: assert pg_class.relnatts is consistent
От | Amit Langote |
---|---|
Тема | Re: assert pg_class.relnatts is consistent |
Дата | |
Msg-id | CA+HiwqGit=b-VsEhEX_Mx_meJPvcuWN8mFMJrOkqPHLD+1rEtQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: assert pg_class.relnatts is consistent (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: assert pg_class.relnatts is consistent
|
Список | pgsql-hackers |
On Fri, Feb 14, 2020 at 1:04 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Amit Langote <amitlangote09@gmail.com> writes: > > On Thu, Feb 13, 2020 at 4:51 PM Amit Langote <amitlangote09@gmail.com> wrote: > >> I know I have made the mistake of not updating relnatts when I added > >> relispartition, etc. to pg_class, only to be bitten by it in the form > >> of seemingly random errors/crashes. Is that why? > > > Sorry for not having read the patch properly. > >> + /* Check that pg_class data is consistent now, rather than failing obscurely later */ > > That seems to be it. > > I've been burnt by this too :-(. However, I think this patch is > completely the wrong way to go about improving this. What we should > be doing, now that we have all that perl code generating postgres.bki, > is eliminating the problem at the source. That is, drop the hand-coded > relnatts values from pg_class.dat altogether, and let the perl code fill > it in --- compare the handling of pg_proc.pronargs for instance. I can't write Perl myself (maybe Justin), but +1 to this idea. Thanks, Amit
В списке pgsql-hackers по дате отправления: