Skip site navigation (1) Skip section navigation (2)

Re: vacuum as flags in PGPROC

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: vacuum as flags in PGPROC
Date: 2007-10-24 14:13:10
Message-ID: 20071024141310.GF6559@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > In the spirit of incremental improvement, here is a patch that turns the
> > couple of bools in PGPROC into a bitmask, and associated fallout.
> 
> Maybe declare the field as uint8 instead of char?  Otherwise, +1.

I'm wondering if it's safe to do something like

MyProc->vacuumFlags |= PROC_FOR_XID_WRAPAROUND

without holding the ProcArrayLock.  It seems in practice a type smaller
than "int" (which uint8 always is) is always stored atomically so this
shouldn't be a problem.

-- 
Alvaro Herrera                               http://www.PlanetPostgreSQL.org/
"La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-24 14:31:17
Subject: Re: vacuum as flags in PGPROC
Previous:From: Tom LaneDate: 2007-10-23 23:13:36
Subject: Re: vacuum as flags in PGPROC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group