Re: BUG #16302: too many range table entries - when count partition table(65538 childs)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, digoal(at)126(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16302: too many range table entries - when count partition table(65538 childs)
Date: 2020-03-17 14:42:08
Message-ID: 1032.1584456128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Mar 17, 2020 at 9:49 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> We'd have to widen AttrNumber to int32 and find all the places that
>> assume it's only 16 bits. (Good luck with testing your way to having
>> any confidence in having found them all, so I'm not sure exactly how
>> to acquire such confidence.) Maybe someday that will be a profitable
>> use of developer effort, but I have to say that I think that day is
>> a long way off.

> That sounds like a lot of work, but I think AttrNumber is used to
> store varattno, and I think varno is typically stored using either
> Index or int, both of which are 32 bits. Am I confused?

Argh, -ENOCAFFEINE. You're right, AttrNumber is not the relevant
type here. There's still an issue of whether anyplace has tried
to store a varno in less-than-int, but it seems less likely than
I was thinking earlier.

> (It doesn't seem like we're all that careful about whether we're using
> int, which is signed, or Index, which is unsigned, and we might want
> to go around and tighten that up.

Yeah, I'd be leery of trying to use that last bit. The cost-benefit
ratio on that is *definitely* not attractive.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2020-03-17 15:04:49 Re: BUG #16302: too many range table entries - when count partition table(65538 childs)
Previous Message Robert Haas 2020-03-17 14:33:11 Re: BUG #16302: too many range table entries - when count partition table(65538 childs)