pg.ddx.io reorg/pg_repack GitHub issues and pull requests
help / color / mirror / Atom feed[reorg/pg_repack] PR #479: Issue #478: Replace client side `LOG` messages by `INFO`
5+ messages / 3 participants
[nested] [flat]
* [reorg/pg_repack] PR #479: Issue #478: Replace client side `LOG` messages by `INFO`
@ 2026-02-13 11:47 "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
0 siblings, 0 replies; 5+ messages in thread
From: za-arthur (@za-arthur) @ 2026-02-13 11:47 UTC (permalink / raw)
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
Client code shouldn't log `LOG` level messages since it is considered as a server operational messages according to PostgreSQL logic. The function `log_required()` [1], which is used by pg_repack, is basically copy of a similar function [2] from PostgreSQL code, therefore we should follow same logic.
1. [log_required()](https://github.com/reorg/pg_repack/blob/85b64c6d4f599b2988343c4e7121acab505c9006/bin/pgut/pgut.c#L95...)
2. [PostgreSQL's is_log_level_output()](https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/utils/error/elog.c#L3715-L3733)
Issue #478
inline patch 1: bin/pg_repack.c, bin/pgut/pgut.c (+6/-6 lines) download inline-1.patch
diff --git a/bin/pg_repack.c b/bin/pg_repack.c
index 97335b5e..aa7476de 100644
--- a/bin/pg_repack.c
+++ b/bin/pg_repack.c
@@ -1059,7 +1059,7 @@ rebuild_indexes(const repack_table *table)
/* Assign available worker to build an index. */
index_jobs[i].status = INPROGRESS;
index_jobs[i].worker_idx = i;
- elog(LOG, "Initial worker %d to build index: %s",
+ elog(INFO, "Initial worker %d to build index: %s",
i, index_jobs[i].create_index);
if (!(PQsendQuery(workers.conns[i], index_jobs[i].create_index)))
@@ -1154,7 +1154,7 @@ rebuild_indexes(const repack_table *table)
}
if (!PQisBusy(workers.conns[index_jobs[i].worker_idx]))
{
- elog(LOG, "Command finished in worker %d: %s",
+ elog(INFO, "Command finished in worker %d: %s",
index_jobs[i].worker_idx,
index_jobs[i].create_index);
@@ -1191,7 +1191,7 @@ rebuild_indexes(const repack_table *table)
{
index_jobs[i].status = INPROGRESS;
index_jobs[i].worker_idx = freed_worker;
- elog(LOG, "Assigning worker %d to build index #%d: "
+ elog(INFO, "Assigning worker %d to build index #%d: "
"%s", freed_worker, i,
index_jobs[i].create_index);
diff --git a/bin/pgut/pgut.c b/bin/pgut/pgut.c
index 106d8dda..6b004fe0 100644
--- a/bin/pgut/pgut.c
+++ b/bin/pgut/pgut.c
@@ -613,11 +613,11 @@ echo_query(const char *query, int nParams, const char **params)
int i;
if (strchr(query, '\n'))
- elog(LOG, "(query)\n%s", query);
+ elog(INFO, "(query)\n%s", query);
else
- elog(LOG, "(query) %s", query);
+ elog(INFO, "(query) %s", query);
for (i = 0; i < nParams; i++)
- elog(LOG, "\t(param:%d) = %s", i, params[i] ? params[i] : "(null)");
+ elog(INFO, "\t(param:%d) = %s", i, params[i] ? params[i] : "(null)");
}
PGresult *
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [reorg/pg_repack] PR #479 (approved): Issue #478: Replace client side `LOG` messages by `INFO`
@ 2026-02-13 11:52 "Melkij (@Melkij)" <noreply+Melkij@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: Melkij (@Melkij) @ 2026-02-13 11:52 UTC (permalink / raw)
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [reorg/pg_repack] PR #479 (approved): Issue #478: Replace client side `LOG` messages by `INFO`
@ 2026-02-13 11:53 "andreasscherbaum (@andreasscherbaum)" <noreply+andreasscherbaum@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: andreasscherbaum (@andreasscherbaum) @ 2026-02-13 11:53 UTC (permalink / raw)
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [reorg/pg_repack] PR #479: Issue #478: Replace client side `LOG` messages by `INFO`
@ 2026-02-13 14:57 "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: za-arthur (@za-arthur) @ 2026-02-13 14:57 UTC (permalink / raw)
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
@za-arthur merged this (commit 4f276d0cc97c).
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [reorg/pg_repack] PR #479: Issue #478: Replace client side `LOG` messages by `INFO`
@ 2026-02-13 14:57 "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: za-arthur (@za-arthur) @ 2026-02-13 14:57 UTC (permalink / raw)
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
@za-arthur closed this.
^ permalink raw [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-02-13 14:57 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-13 11:47 [reorg/pg_repack] PR #479: Issue #478: Replace client side `LOG` messages by `INFO` "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
2026-02-13 11:52 ` Re: [reorg/pg_repack] PR #479 (approved): Issue #478: Replace client side `LOG` messages by `INFO` "Melkij (@Melkij)" <noreply+Melkij@github.com>
2026-02-13 11:53 ` Re: [reorg/pg_repack] PR #479 (approved): Issue #478: Replace client side `LOG` messages by `INFO` "andreasscherbaum (@andreasscherbaum)" <noreply+andreasscherbaum@github.com>
2026-02-13 14:57 ` "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
2026-02-13 14:57 ` "za-arthur (@za-arthur)" <noreply+za-arthur@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox