Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMWgv-002c2E-36 for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jul 2023 16:39:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMWgt-00ByOw-96 for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jul 2023 16:39:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMWgs-00ByOo-Vi for pgsql-hackers@lists.postgresql.org; Thu, 20 Jul 2023 16:39:46 +0000 Received: from mail-vs1-xe34.google.com ([2607:f8b0:4864:20::e34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMWgp-000gQJ-DP for pgsql-hackers@lists.postgresql.org; Thu, 20 Jul 2023 16:39:46 +0000 Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-440ac4b44a8so412924137.3 for ; Thu, 20 Jul 2023 09:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689871182; x=1690475982; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=enRMbkNQfxnqK4BcQlqF7RO33JcZZoCozQBHzGpmMW4=; b=Uvlgd6xFi3eQZ3VnGcmuWXKyUIM5yqgN/cy5KTsCexce9Ba5oy7Td8CGeaOM3iUP0n FL/rF3vjbPObRzS1LqyNUtrPUYSHwY9k7XpqQhegtFRRCkXZ85LMQ6DGBuStMN86Y0O5 xRbT13f2BapPfHYKlpMGAjx3ZD2leS6OHOkUEVFqiFp3MR0y98eTaqOgaFxBFpIM3dOJ tfP8U6RANcrYobhdsClcxyOfvkSb42Krp3jOJDkzSnsDWHj7c5jSuRzRuWLkTap0ySUO RmSy7S6QS4j9QqaS8GjZNqLuKJWT78EHSSn5rd+pGs77qk6ffkTcjQhYOBhlM0BfQ4Bo JKQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689871182; x=1690475982; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=enRMbkNQfxnqK4BcQlqF7RO33JcZZoCozQBHzGpmMW4=; b=HmUCtzkFmlOGiMG/m0AldpRDG6Qj3+jHU4QqZFID1q/P01/lA3bPutdN9VBCgsKK8y qI7+ACf3PPwB/0RDNRg4ls5bAmqVxCZCwOqBGPLdh0O7CyqSC99wzMkUuLoAa7UBYnNR NQbyf5Cfor4lOr79VXe14D4Z5RyL+emwF0O1+Rr4DxlgsbS5R8cJNRwQpJFPgWxmZ7Bl 06+7jHI4rcWUH4bnjZH5BrqllUaFzb/aXqZKHinDA3cdQ6O43PWdUkYqXyITJDkVzZaV bZX6uMejQ0ioz9400AfP+4qEwWHqax8Pk5xseqTjdA7Yn4gfCeF3g03zZrsZt9Kl5YMp WqIg== X-Gm-Message-State: ABy/qLZ5v6y5fpPF7F5lQ3Dytzyf7tEYrzs9Vf7jWkoaogowBndGvoa4 q+o6fLM5EE3rmuxOOZpV9EVLyQanWZligKSgSx0= X-Google-Smtp-Source: APBJJlEecSq0jo6HbBmJpS/qIJNZThD7XeHwxwRETSsGQl9HVmuKSGbWBfifQCdQ52Nmx0KfPAC8jIrYJ7fepqMs+DQ= X-Received: by 2002:a67:b109:0:b0:445:a7c:efac with SMTP id w9-20020a67b109000000b004450a7cefacmr4249983vsl.11.1689871182717; Thu, 20 Jul 2023 09:39:42 -0700 (PDT) MIME-Version: 1.0 References: <20230717142452.74yml7mfqkypfixp@alvherre.pgsql> In-Reply-To: From: Ashutosh Bapat Date: Thu, 20 Jul 2023 22:09:31 +0530 Message-ID: Subject: Re: logicalrep_message_type throws an error To: Amit Kapila Cc: Masahiko Sawada , Alvaro Herrera , Euler Taveira , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 20, 2023 at 9:11=E2=80=AFAM Amit Kapila wrote: > > > > Okay, changed it accordingly. > > > > oops, forgot to attach the patch. > WFM @@ -3367,7 +3367,7 @@ apply_dispatch(StringInfo s) default: ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid logical replication message type \"%c\"", action))); + errmsg("invalid logical replication message type \"??? (%d)\"", action))); I think we should report character here since that's what is visible in the code and also the message types are communicated as characters not integers. Makes debugging easier. Context may report integer as an additional data point. --=20 Best Wishes, Ashutosh Bapat