Re: BUG #16604: pg_dump with --jobs breaks SSL connections

From: Zsolt Ero <zsolt(dot)ero(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: BUG #16604: pg_dump with --jobs breaks SSL connections
Date: 2020-09-23 19:26:34
Message-ID: CAKw-smBKagNkWRZvTujeKgx6j5ZkjazDvDPFq9bZWbBC7YXqbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I've created a minimal reproducible Dockerfile, it reproduces 100%. The PG
server is configured to require client certificates.

Dockerfile (repro with: "docker build .")

FROM ubuntu:18.04

RUN apt-get update && apt-get install -y wget gnupg

RUN echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" >
/etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
apt-key add -
RUN apt-get update && apt-get install -y postgresql-client-12

WORKDIR /tmp
COPY *.pem /tmp/
RUN chmod 400 /tmp/*.pem

ENV PGPASSWORD=xxx

RUN pg_dump --dbname="sslmode=verify-ca sslrootcert=server-ca.pem \
sslcert=client-cert.pem sslkey=client-key.pem \
hostaddr=1.2.3.4 \
port=5432 \
user=postgres dbname=postgres" \
--format=directory \
--file=dump_app \
--jobs=3

Zsolt

On 15 Sep 2020 at 14:04:09, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> On Tue, Sep 15, 2020 at 1:36 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
>> > On 1 Sep 2020, at 22:08, PG Bug reporting form <noreply(at)postgresql(dot)org>
>> wrote:
>> >
>> > The following bug has been logged on the website:
>> >
>> > Bug reference: 16604
>> > Logged by: Zsolt Ero
>> > Email address: zsolt(dot)ero(at)gmail(dot)com
>> > PostgreSQL version: 12.4
>> > Operating system: Ubuntu 20.04
>> > Description:
>> >
>> > I'm using pg_dump in the following syntax:
>> >
>> > pg_dump --dbname="sslmode=verify-ca sslrootcert=server-ca.pem \
>> > sslcert=client-cert.pem sslkey=client-key.pem \
>> > hostaddr=1.2.3.4 \
>> > user=postgres dbname=app" \
>> > --format=directory \
>> > --file=dump_app \
>> > --jobs=3
>> >
>> > As long as the --jobs parameter is present, the process breaks after
>> > "pg_dump: saving database definition".
>> > It breaks with "FATAL: connection requires a valid client certificate".
>> >
>> > Without --jobs it completes without errors. I also think it's happening
>> with
>> > pg_restore as well.
>>
>> I am unable to reproduce this with 12.4 as well as 14devel. If this
>> error is
>> reproducible for you, can you please share more details on the setup?
>> (ideally
>> a recipe for setting up a repro environment)
>>
>
> Grasping a long straw hwere, but I wonder if it could be relataed to the
> debian/ubuntu wrapper.
>
> Zsolt, can you try running it with hardcoding the pg_dump path
> to /usr/lib/postgresql/12/bin/pg_dump instead of just pg_dump, to see if
> that might be it?
>
> --
> Magnus Hagander
> Me: https://www.hagander.net/ <http://www.hagander.net/>
> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-09-23 19:48:03 Re: BUG #16624: Query Optimizer - Performance bug related to predicate simplification
Previous Message Peter Geoghegan 2020-09-23 19:22:52 Re: BUG #16624: Query Optimizer - Performance bug related to predicate simplification