From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Misleading error message in logical decoding for binary plugins |
Date: | 2014-09-03 15:06:14 |
Message-ID: | 20140903150614.GD4298@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-09-03 10:59:17 -0400, Robert Haas wrote:
> On Wed, Sep 3, 2014 at 10:45 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2014-09-03 09:36:32 -0400, Robert Haas wrote:
> >> On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> >> > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote:
> >> >> Hi all,
> >> >>
> >> >> Using a plugin producing binary output, I came across this error:
> >> >> =# select data from pg_logical_slot_peek_changes('foo', NULL, NULL);
> >> >> ERROR: 0A000: output plugin cannot produce binary output
> >> >> LOCATION: pg_logical_slot_get_changes_guts, logicalfuncs.c:404
> >> >>
> >> >> Shouldn't the error message be here something like "binary output plugin
> >> >> cannot produce textual output"? The plugin used in my case produces binary
> >> >> output, but what is requested from it with pg_logical_slot_peek_changes is
> >> >> textual output.
> >> >
> >> > I don't like the new message much. It's imo even more misleading than
> >> > the old message. How about
> >> > "output pluing produces binary output but the sink only accepts textual data"?
> >>
> >> Maybe:
> >>
> >> ERROR: pg_logical_slot_peek_changes cannot be used with a plugin that
> >> produces only binary output
> >> HINT: Use pg_logical_slot_peek_binary_changes instead.
> >
> > That level has no knowledge of what it's used by, so I think that'd
> > require bigger changes than worth it.
>
> ERROR: this logical decoding plugin can only produce binary output
> ERROR: logical decoding plugin "%s" can only produce binary output
ERROR: logical decoding plugin "%s" produces binary output, but sink only copes with textual data
Not sure about 'sink'. Maybe 'receiving side' or 'receiver'?
Not 100% sure if the name is available in that site, but if not it can
be left of without hurting much.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Tiikkaja | 2014-09-03 15:09:19 | Re: PL/pgSQL 2 |
Previous Message | Bruce Momjian | 2014-09-03 15:05:15 | Re: PL/pgSQL 2 |