Fix "show pool_processes" to not show row description twice.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 14 Jun 2024 00:30:46 +0000 (09:30 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 14 Jun 2024 02:07:11 +0000 (11:07 +0900)
processes_reporting() accidentaly called both send_row_description()
and send_row_description_and_data_rows().

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2024-June/004472.html
    [pgpool-hackers: 4471] [PATCH] printing empty row first in query "show pool_process"
Author: Kwangwon Seo
Back patch to V4.2 where the problem started.

src/utils/pool_process_reporting.c

index 23f62cdc790fc7673433a371cf87b98f5f7125b1..40867fb74bd5d70768e9bcea354130a968155083 100644 (file)
@@ -5,7 +5,7 @@
  * pgpool: a language independent connection pool server for PostgreSQL
  * written by Tatsuo Ishii
  *
- * Copyright (c) 2003-2023     PgPool Global Development Group
+ * Copyright (c) 2003-2024     PgPool Global Development Group
  *
  * Permission to use, copy, modify, and distribute this software and
  * its documentation for any purpose and without fee is hereby
@@ -1812,8 +1812,6 @@ processes_reporting(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend)
        num_fields = sizeof(field_names) / sizeof(char *);
        processes = get_processes(&nrows);
 
-       send_row_description(frontend, backend, num_fields, field_names);
-
        send_row_description_and_data_rows(frontend, backend, num_fields, field_names, offsettbl,
                                                                           (char *)processes, sizeof(POOL_REPORT_PROCESSES), nrows);