Re: Re: Declarative partitioning optimization for largeamount of partitions - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Re: Declarative partitioning optimization for largeamount of partitions
Date
Msg-id 4d4de6f0-de34-000c-1524-98935ae8685a@sigaev.ru
Whole thread Raw
In response to Re: Re: Declarative partitioning optimization for largeamount of partitions  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
Responses Re: Re: Declarative partitioning optimization for largeamount of partitions
List pgsql-hackers
> 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@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Generic type subscripting
Next
From: David Steele
Date:
Subject: Re: Supporting huge pages on Windows