From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: Declarative partitioning optimization for large amount of partitions |
Date: | 2017-03-24 15:46:05 |
Message-ID: | a81a57ca-bee5-a658-ea04-1c817acd2731@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Sorry, 1) and 4) is my fault, comment in hsearch.h:
* ... The hash key
* is expected to be at the start of the caller's hash entry data structure.
Ops, forgot that.
Teodor Sigaev wrote:
>> things in order I'm attaching the previous patch as well.
>
> Patches look good, but I have some notices:
>
> 1 step1 Why do you need TabStatHashEntry at all? TabStatHashEntry.t_id is never
> used for read, so entry for hash could be just a pointer to PgStat_TableStatus.
>
> 2 step1 In pgstat_report_stat() you remove one by one entries from hash and
> remove them all. Isn't it better to hash_destroy/hash_create or even let hash
> lives in separate memory context and just resets it?
>
> 3 step1 Again, pgstat_report_stat(), all-zero entries aren't deleted from hash
> although they will be free from point of view of pgStatTabList.
>
>
> 4 step 2. The same as 1) about SeenRelsEntry->rel_id but it even isn't
> initialized anywhere.
>
>
>
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-03-24 15:53:05 | Re: exposing wait events for non-backends (was: Tracking wait event for latches) |
Previous Message | Arthur Zakirov | 2017-03-24 15:42:18 | Re: [PATCH] Generic type subscripting |