| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> | 
| Cc: | Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jan Lentfer <Jan(dot)Lentfer(at)web(dot)de>, Euler Taveira <euler(at)timbira(dot)com(dot)br> | 
| Subject: | Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ] | 
| Date: | 2014-06-30 22:17:37 | 
| Message-ID: | 20140630221737.GW7340@eldon.alvh.no-ip.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Jeff Janes wrote:
> In particular, pgpipe is almost an exact duplicate between them,
> except the copy in vac_parallel.c has fallen behind changes made to
> parallel.c.  (Those changes would have fixed the Windows warnings).  I
> think that this function (and perhaps other parts as
> well--"exit_horribly" for example) need to refactored into a common
> file that both files can include.  I don't know where the best place
> for that would be, though.  (I haven't done this type of refactoring
> myself.)
I think commit d2c1740dc275543a46721ed254ba3623f63d2204 is apropos.
Maybe we should move pgpipe back to src/port and have pg_dump and this
new thing use that.  I'm not sure about the rest of duplication in
vac_parallel.c; there might be a lot in common with what
pg_dump/parallel.c does too.  Having two copies of code is frowned upon
for good reasons.  This patch introduces 1200 lines of new code in
vac_parallel.c, ugh.
If we really require 1200 lines to get parallel vacuum working for
vacuumdb, I would question the wisdom of this effort.  To me, it seems
better spent improving autovacuum to cover whatever it is that this
patch is supposed to be good for --- or maybe just enable having a shell
script that launches multiple vacuumdb instances in parallel ...
-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2014-06-30 22:18:39 | Re: WAL format and API changes (9.5) | 
| Previous Message | Peter Geoghegan | 2014-06-30 22:10:14 | Fresh initdb contains a few deleted B-Tree pages |