Re: Postgres is not able to handle more than 4k tables!?

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres is not able to handle more than 4k tables!?
Date: 2020-07-15 14:28:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 15.07.2020 02:17, Alvaro Herrera wrote:
> On 2020-Jul-10, Konstantin Knizhnik wrote:
>> @@ -3076,6 +3080,10 @@ relation_needs_vacanalyze(Oid relid,
>> instuples = tabentry->inserts_since_vacuum;
>> anltuples = tabentry->changes_since_analyze;
>> + rel = RelationIdGetRelation(relid);
>> + oldestXmin = TransactionIdLimitedForOldSnapshots(GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM), rel);
>> + RelationClose(rel);
> *cough*
Sorry, Alvaro.
Can you explain this *cough*
You didn't like that relation is opened  just to call GetOldestXmin?
But this functions requires Relation. Do you suggest to rewrite it so
that it is possible to pass just Oid of relation?

Or you do you think that such calculation of oldestSmin is obscure and
at lest requires some comment?
Actually, I have copied it from vacuum.c and there is a large comment
explaining why it is calculated in this  way.
May be it is enough to add reference to vacuum.c?
Or may be create some special function for it?
I just need to oldestXmin in calculated in the same way in vacuum.c and

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-07-15 15:03:33 Re: Postgres is not able to handle more than 4k tables!?
Previous Message Jehan-Guillaume de Rorthais 2020-07-15 13:52:20 BUG #15285: Query used index over field with ICU collation in some cases wrongly return 0 rows