WIP: Fix parallel workers connection bug in pg_dump (Bug #13727)

From: Zeus Kronion <zkronion(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: WIP: Fix parallel workers connection bug in pg_dump (Bug #13727)
Date: 2015-10-25 21:55:43
Message-ID: CAA0N8Qgc5E=4jxsR2c1BMGqnyS5GKZsmdOo9CF9vWg4BT9+RAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Parallel workers were failing to connect to the database when running
pg_dump with a connection string. The first of the following two commands
runs without errors, while the second one fails:
pg_dump "postgres://my-user:my-password(at)my(dot)hostname(dot)com:5432/my-db" -Fd -f
my-dump
pg_dump "postgres://my-user:my-password(at)my(dot)hostname(dot)com:5432/my-db" -Fd
--jobs=9 -f my-dump

The error message:
pg_dump: [parallel archiver] connection to database "my-db" failed:
fe_sendauth: no password supplied

The password is not being stored correctly in the PGconn object when
connecting with a connection string.

This is my first time contributing to Postgres, so I tried to stick to the
instructions from the "Submitting a Patch" wiki. This submission is for
discussion because I haven't figured out how to write regression tests for
this patch yet (and I would appreciate guidance).

Target branch: master
Compiles and tests successfully: true
Platform-specific items: none
Regression tests: still needed
Documentation: N/A
Performance implications: none

Attachment Content-Type Size
pworker-connection-fix-v1.patch application/octet-stream 657 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2015-10-26 00:54:03 Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Previous Message Fabien COELHO 2015-10-25 21:01:37 Re: pgbench gaussian/exponential docs improvements