From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Optionally don't error out due to preexisting slots in commandli |
Date: | 2015-08-12 06:09:21 |
Message-ID: | CAB7nPqQ3o10SY6NVdU4pjq85GQTN5tbbkq2gnNUh2fBNU3rKyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Mon, Jul 13, 2015 at 5:17 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Optionally don't error out due to preexisting slots in commandline utilities.
>
> pg_receivexlog and pg_recvlogical error out when --create-slot is
> specified and a slot with the same name already exists. In some cases,
> especially with pg_receivexlog, that's rather annoying and requires
> additional scripting.
>
> Backpatch to 9.5 as slot control functions have newly been added to
> pg_receivexlog, and there doesn't seem much point leaving it in a less
> useful state.
Andres, Coverity is pointing out that this commit missed the shot when
sqlstate is NULL in CreateReplicationSlot and this would crash.
Something like the patch attached look adapted to me, vacuumdb.c doing
the necessary checks similarly.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20150812_pgreceivexlog_state.patch | text/x-diff | 593 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2015-08-12 11:58:40 | pgsql: This routine was calling ecpg_alloc to allocate to memory but di |
Previous Message | Tom Lane | 2015-08-12 04:49:18 | pgsql: Fix some possible low-memory failures in regexp compilation. |