From: | John Naylor <jcnaylor(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Does parallel make require guards against duplicate actions? |
Date: | 2010-01-05 03:14:40 |
Message-ID: | 4d191a531001041914o409bed54mb6c65f1161109f6e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
FWIW, the old make rule was
fmgroids.h fmgrtab.c: (deps)
which is now
fmgroids.h: fmgrtab.c ;
fmgrtab.c: (deps)
I was going by this comment in parser/Makefile:
# There is no correct way to write a rule that generates two files.
# Rules with two targets don't have that meaning, they are merely
# shorthand for two otherwise separate rules. To be safe for parallel
# make, we must chain the dependencies like this.
On Mon, Jan 4, 2010 at 6:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The old Gen_fmgrtab.sh script used temporary file names that included
> its process PID. It had this comment about that:
>
> # We use the temporary files to avoid problems with concurrent runs
> # (which can happen during parallel make).
>
> The new implementation uses temp files that just have ".tmp" appended to
> the target file name. If there is a risk that "make -j" will run the
> same action twice in parallel, this isn't good enough. While it
> wouldn't be too tough to add the PID to the scripts, I wonder whether
> this comment is about a real problem or just a flight of fancy. It
> doesn't seem to me that parallel make ought to be stupid enough to
> do the same action twice. Anybody know?
>
> regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2010-01-05 03:28:04 | Re: pg_migrator issues |
Previous Message | Takahiro Itagaki | 2010-01-05 03:00:51 | Re: Verifying variable names in pgbench |