Re: track_planning causing performance regression - Mailing list pgsql-hackers

From Hamid Akhtar
Subject Re: track_planning causing performance regression
Date
Msg-id 159784114193.7095.7438157679688812860.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: track_planning causing performance regression  (Hamid Akhtar <hamid.akhtar@gmail.com>)
List pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       not tested
Spec compliant:           not tested
Documentation:            not tested

Overall, the patch works fine. However, I have a few observations:

(1) Code Comments:
- The code comments should be added for the 2 new macros, in particular for PGSS_NUM_LOCK_PARTITIONS. As you explained
inyour email, this may be used to limit the number of locks if a very large value for pgss_max is specified.
 
- From the code I inferred that the number of locks can in future be less than pgss_max (per your email where in future
thismacro could be used to limit the number of locks). I suggest to perhaps add some notes helping future changes in
thiscode area.
 

(2) It seems like that "pgss->lock = &(pgss->base + pgss_max)->lock;" statement should not use pgss_max directly and
insteaduse PGSS_NUM_LOCK_PARTITIONS macro, as when a limit is imposed on number of locks, this statement will cause an
overrun.


-- 
Highgo Software (Canada/China/Pakistan)
URL : www.highgo.ca
ADDR: 10318 WHALLEY BLVD, Surrey, BC
CELL:+923335449950  EMAIL: mailto:hamid.akhtar@highgo.ca
SKYPE: engineeredvirus

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: SyncRepLock acquired exclusively in default configuration
Next
From: Heikki Linnakangas
Date:
Subject: Refactor pg_rewind code and make it work against a standby