| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Robert Haas <rhaas(at)postgresql(dot)org> |
| Cc: | pgsql-committers(at)postgresql(dot)org |
| Subject: | Re: pgsql: Change the way that LWLocks for extensions are allocated. |
| Date: | 2016-08-26 22:00:26 |
| Message-ID: | 20160826220026.2fw6xj56qgd22wqi@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers |
Hi,
On 2016-02-04 21:43:14 +0000, Robert Haas wrote:
> Change the way that LWLocks for extensions are allocated.
>
> The previous RequestAddinLWLocks() method had several disadvantages.
> First, the locks would be in the main tranche; we've recently decided
> that it's useful for LWLocks used for separate purposes to have
> separate tranche IDs. Second, there wasn't any correlation between
> what code called RequestAddinLWLocks() and what code called
> LWLockAssign(); when multiple modules are in use, it could become
> quite difficult to troubleshoot problems where LWLockAssign() ran out
> of locks. To fix, create a concept of named LWLock tranches which
> can be used either by extension or by core code.
>
> Amit Kapila and Robert Haas
I noticed that this code has no test coverage:
http://coverage.postgresql.org/src/backend/storage/lmgr/lwlock.c.gcov.html
It'd be good to add some, although I'm not entirely sure what the best
way is. Maybe add a simple pg_stat_statements test?
Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-08-27 21:50:57 | pgsql: Add macros to make AllocSetContextCreate() calls simpler and saf |
| Previous Message | Tom Lane | 2016-08-26 20:20:33 | pgsql: Add a nonlocalized version of the severity field to client error |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martín Marqués | 2016-08-26 22:12:15 | Re: pg_dump with tables created in schemas created by extensions |
| Previous Message | Peter Eisentraut | 2016-08-26 21:42:01 | Re: Renaming some binaries |