Tom Lane wrote:

I forgot to comment:

> This part is very seriously broken:
> 
> diff -c -p -r1.33 lwlock.h
> *** src/include/storage/lwlock.h      5 Jan 2007 22:19:58 -0000       1.33
> --- src/include/storage/lwlock.h      13 Feb 2007 16:58:41 -0000
> *************** typedef enum LWLockId
> *** 62,67 ****
> --- 62,68 ----
>       BtreeVacuumLock,
>       AddinShmemInitLock,
>       FirstBufMappingLock,
> +     AutovacuumLock,
>       FirstLockMgrLock = FirstBufMappingLock + NUM_BUFFER_PARTITIONS,
>   
>       /* must be last except for MaxDynamicLWLock: */
> 
> I'm surprised it got through your testing at all, with the autovacuum
> lock conflicting with bufmgr.

I didn't look closely enough to notice the arithmetic.  I think the only
reason this worked at all was because the autovacuum lock was being held
for very short periods of time, always for assigning or reading some
variable.

I think a warning comment is warranted here -- will include it when I
commit the patch.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to