0003-Debug-messages.patch

text/x-patch

Filename: 0003-Debug-messages.patch
Type: text/x-patch
Part: 2
Message: Re: row filtering for logical replication

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch 0003
Subject: Debug messages
File+
src/backend/parser/parse_expr.c 6 0
src/test/subscription/t/020_row_filter.pl 1 0
From 4275d48c9f59b6f3b2bc99b4563119da3909dd56 Mon Sep 17 00:00:00 2001
From: Euler Taveira <euler.taveira@enterprisedb.com>
Date: Fri, 26 Feb 2021 21:08:10 -0300
Subject: [PATCH 3/3] Debug messages

---
 src/backend/parser/parse_expr.c           | 6 ++++++
 src/test/subscription/t/020_row_filter.pl | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index fc4170e723..bd02576c86 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -116,6 +116,12 @@ transformExprRecurse(ParseState *pstate, Node *expr)
 	if (expr == NULL)
 		return NULL;
 
+	/*
+	 * T_FuncCall: 349
+	 * EXPR_KIND_PUBLICATION_WHERE: 42
+	 */
+	elog(DEBUG3, "nodeTag(expr): %d ; pstate->p_expr_kind: %d ; nodeToString(expr): %s", nodeTag(expr), pstate->p_expr_kind, nodeToString(expr));
+
 	/* Guard against stack overflow due to overly complex expressions */
 	check_stack_depth();
 
diff --git a/src/test/subscription/t/020_row_filter.pl b/src/test/subscription/t/020_row_filter.pl
index 35a41741d3..8c305cf1dc 100644
--- a/src/test/subscription/t/020_row_filter.pl
+++ b/src/test/subscription/t/020_row_filter.pl
@@ -8,6 +8,7 @@ use Test::More tests => 7;
 # create publisher node
 my $node_publisher = get_new_node('publisher');
 $node_publisher->init(allows_streaming => 'logical');
+$node_publisher->append_conf('postgresql.conf', 'log_min_messages = DEBUG3');
 $node_publisher->start;
 
 # create subscriber node
-- 
2.20.1