On Fri, Jun 11, 2021 at 12:20 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > On Wed, Jun 9, 2021 at 8:44 PM Mark Dilger <mark.dilger@enterprisedb.com> wrote:
> >> On Jun 9, 2021, at 7:52 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> Somewhat unrelated, but ... am I reading the code correctly that
> >>> apply_handle_stream_start and related routines are using Asserts
> >>> to check that the remote sent stream-control messages in the correct
> >>> order?
>
> > This also needs to be changed to test-and-elog.
>
> Here's a proposed patch for this. It looks like pretty much all of the
> bogosity is new with the streaming business.
>
Except for the change in change in apply_handle_commit which seems to
be from the time it is introduced in commit 7c4f5240
> You might quibble with
> which things I thought deserved elog versus report.
I wonder why you used elog in handle_streamed_transaction and
apply_handle_commit? It seems all the other places use ereport for
anything wrong it got from the protocol message.
> Another thing
> I'm wondering is how many of these messages really need to be
> translated. We could use errmsg_internal and avoid burdening the
> translators, perhaps.
>
Not sure but I see all existing similar ereport calls don't use errmsg_internal.
--
With Regards,
Amit Kapila.