Unix Technical Forum

pgsql: Rearrange vacuum-related bits in PGPROC as a bitmask, to better

This is a discussion on pgsql: Rearrange vacuum-related bits in PGPROC as a bitmask, to better within the pgsql Committers forums, part of the PostgreSQL category; --> Log Message: ----------- Rearrange vacuum-related bits in PGPROC as a bitmask, to better support having several of them. Add ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Committers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 01:50 AM
Alvaro Herrera
 
Posts: n/a
Default pgsql: Rearrange vacuum-related bits in PGPROC as a bitmask, to better

Log Message:
-----------
Rearrange vacuum-related bits in PGPROC as a bitmask, to better support
having several of them. Add two more flags: whether the process is
executing an ANALYZE, and whether a vacuum is for Xid wraparound (which
is obviously only set by autovacuum).

Sneakily move the worker's recently-acquired PostAuthDelay to a more useful
place.

Modified Files:
--------------
pgsql/src/backend/access/transam:
twophase.c (r1.36 -> r1.37)
(http://developer.postgresql.org/cvsw...1=1.36&r2=1.37)
pgsql/src/backend/commands:
analyze.c (r1.109 -> r1.110)
(http://developer.postgresql.org/cvsw...1.109&r2=1.110)
vacuum.c (r1.359 -> r1.360)
(http://developer.postgresql.org/cvsw...1.359&r2=1.360)
pgsql/src/backend/postmaster:
autovacuum.c (r1.62 -> r1.63)
(http://developer.postgresql.org/cvsw...1=1.62&r2=1.63)
pgsql/src/backend/storage/ipc:
procarray.c (r1.35 -> r1.36)
(http://developer.postgresql.org/cvsw...1=1.35&r2=1.36)
pgsql/src/backend/storage/lmgr:
proc.c (r1.194 -> r1.195)
(http://developer.postgresql.org/cvsw...1.194&r2=1.195)
pgsql/src/include/storage:
proc.h (r1.100 -> r1.101)
(http://developer.postgresql.org/cvsw...1.100&r2=1.101)

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 01:50 AM
Tom Lane
 
Posts: n/a
Default Re: pgsql: Rearrange vacuum-related bits in PGPROC as a bitmask, to better

alvherre@postgresql.org (Alvaro Herrera) writes:
> Rearrange vacuum-related bits in PGPROC as a bitmask, to better support
> having several of them. Add two more flags: whether the process is
> executing an ANALYZE, and whether a vacuum is for Xid wraparound (which
> is obviously only set by autovacuum).


Is the explicit reset of PROC_VACUUM_FOR_WRAPAROUND (about line 2140
of autovacuum.c) actually needed? Won't that get cleared automatically
during transaction end?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 01:50 AM
Alvaro Herrera
 
Posts: n/a
Default Re: pgsql: Rearrange vacuum-related bits in PGPROC asa bitmask, to better

Tom Lane wrote:
> alvherre@postgresql.org (Alvaro Herrera) writes:
> > Rearrange vacuum-related bits in PGPROC as a bitmask, to better support
> > having several of them. Add two more flags: whether the process is
> > executing an ANALYZE, and whether a vacuum is for Xid wraparound (which
> > is obviously only set by autovacuum).

>
> Is the explicit reset of PROC_VACUUM_FOR_WRAPAROUND (about line 2140
> of autovacuum.c) actually needed?


Probably not. Actually I was just wondering if it was possible to
commit the transaction opened for the previous vacuum sooner, which
would clear that bit and also release the locks on the vacuumed
relation. But that's probably too much of a hassle and a wasted Xid or
two.

--
Alvaro Herrera http://www.advogato.org/person/alvherre
"Ellos andaban todos desnudos como su madre los parió, y también las mujeres,
aunque no vi más que una, harto moza, y todos los que yo vi eran todos
mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:09 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com