From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Parallel pg_dump's error reporting doesn't work worth squat |
Date: | 2016-05-26 06:25:59 |
Message-ID: | 20160526.152559.266074794.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Sounds reasonable. I look into this further.
I looked into that and found one problem in the patch.
> Next, I got the following behavior for the following command,
> then freeze. Maybe stopping at the same point with the next
> paragraph but I'm not sure. The same thing occurs this patch on
> top of the current master but doesn't on Linux.
This occurs in the following steps.
1. One of the workers dies from some reason.
(InitCompressorZlib immediately goes into exit_horribly in this case)
2. The main thread detects in ListenToWorkers that the worker is dead.
3. ListenToWorkers calls exit_horribly then exit_nicely
4. exit_nicely calls archive_close_connection as a callback then
the callback calls ShutdownWorkersHard
5. ShutdownWorkersHard should close the write side of the pipe
but the patch skips it for WIN32.
So, the attached patch on top the patch fixes that, that is,
pg_dump returns to command prompt even for the case.
By the way, the reason of the "invalid snapshot identifier" is
that some worker threads try to use it after the connection on
the first worker closed. Some of the workers succesfully did
before the connection closing and remained listening to their
master to inhibit termination of the entire process.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
pg_dump-error-reporting-fix-1_plus.patch | text/x-patch | 582 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2016-05-26 07:18:15 | Re: Optimization for updating foreign tables in Postgres FDW |
Previous Message | Noah Misch | 2016-05-26 05:57:58 | Re: statistics for shared catalogs not updated when autovacuum is off |