Re: Parallel pg_dump's error reporting doesn't work worth squat - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Parallel pg_dump's error reporting doesn't work worth squat
Date
Msg-id 20160525.173041.123092921.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Parallel pg_dump's error reporting doesn't work worth squat  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Parallel pg_dump's error reporting doesn't work worth squat  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At Wed, 25 May 2016 00:15:57 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote in <3149.1464149757@sss.pgh.pa.us>
> Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> > Shouldn't archive_close_connection have an assertion (si->AHX !=
> > NULL) instead of checking "if (si->AHX)" in each path?
> 
> I thought about that but didn't see any really good argument for it.
> It'd be making that function dependent on the current behavior of
> unrelated code, when it doesn't need to be.

It's also fine with me.

I tried it on Windows 7/64 but first of all, I'm surprised to see
that the following command line gets an error but it would be
fine because it is consistent with what is written in the manual.

| >pg_dump postgres://horiguti:hoge@localhost/postgres --jobs=9 -Fd -f testdump
| pg_dump: too many command-line arguments (first is "--jobs=9")
| Try "pg_dump --help" for more information.


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.

| >pg_dump -d postgres --jobs=9 -Fd -f testdump
| Password: <correct password>
| pg_dump: [archiver] WARNING: requested compression not available in this installation -- archive will be
uncompressed
| pg_dump: [compress_io] not built with zlib support
| pg_dump: [parallel archiver] a worker process died unexpectedly
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'
| pg_dump: [archiver (db)] query failed: ERROR:  invalid snapshot identifier: "00002299-1"
| pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT '00002299-1'


Third, I'm not sure on this detail, but pg_dump shows the
following message then freeze until Ctrl-C. I think that I forgot
to set password to the user for the time. It doesn't seem to
occur for this patch on top of the current master.

| >pg_dump --jobs=9 -Fd -f testdump "postgres://horiguti:hoge@localhost/postgres"
| pg_dump: [archiver] WARNING: requested compression not available in this installation -- archive will be
uncompressed
| pg_dump: [compress_io] not built with zlib support
| pg_dump: [parallel archiver] a worker process died unexpectedly
| ^C
| >

The main thread was stopping at WaitForMultiplObjects() around
parallel.c:361(@master + this patch) but I haven't investigated
it any more.


Finally, I got the following expected result, which seems sane.

| >pg_dump --jobs=9 -Fd -f testdump "postgres://horiguti:hoge@localhost/postgres"
| pg_dump: [archiver] WARNING: requested compression not available in this installation -- archive will be
uncompressed
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [parallel archiver] a worker process died unexpectedly
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied
| pg_dump: [archiver (db)] connection to database "postgres" failed: fe_sendauth:no password supplied


I might be wrong with something, but pg_dump seems to have some
issues in thread handling.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center





pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Does people favor to have matrix data type?
Next
From: Dmitry Igrishin
Date:
Subject: Deleting prepared statements from libpq.