summaryrefslogtreecommitdiff
path: root/accel-pppd/logs/log_pgsql.c
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-08-12 00:40:07 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-08-12 00:40:07 +0300
commit428333c9bb283ceb998332481867a59e7cea33b4 (patch)
treeca2e2467cc47a3220e3a32aa17da820d745f816c /accel-pppd/logs/log_pgsql.c
parent1c69485e1ebd17bf3cc6e8fc4728f9bdb431de94 (diff)
downloadaccel-ppp-428333c9bb283ceb998332481867a59e7cea33b4.tar.gz
accel-ppp-428333c9bb283ceb998332481867a59e7cea33b4.zip
log_pgsql: deprecate the module and rename its build flag
The PostgreSQL logging target sees little use and has been a source of memory safety bugs. Mark it as deprecated and scheduled for removal, but give anyone depending on it a chance to object first. To make sure this is not missed, the LOG_PGSQL build flag now fails the build with an explanation, building the module requires the renamed LOG_PGSQL_DEPRECATED flag, cmake prints a warning when it is used, and the module logs a deprecation warning on startup.
Diffstat (limited to 'accel-pppd/logs/log_pgsql.c')
-rw-r--r--accel-pppd/logs/log_pgsql.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/accel-pppd/logs/log_pgsql.c b/accel-pppd/logs/log_pgsql.c
index 5b3fd6ae..6589da0e 100644
--- a/accel-pppd/logs/log_pgsql.c
+++ b/accel-pppd/logs/log_pgsql.c
@@ -1,3 +1,13 @@
+/*
+ * DEPRECATED
+ *
+ * This module is scheduled for removal in a future release. It is built
+ * only when the deprecated LOG_PGSQL_DEPRECATED build flag is given.
+ * If you depend on it, please object at
+ * https://github.com/accel-ppp/accel-ppp/issues, otherwise it will be
+ * deleted.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -293,6 +303,9 @@ static void init(void)
{
char *opt;
+ log_warn("log_pgsql: this module is deprecated and is scheduled for removal,"
+ " please object at https://github.com/accel-ppp/accel-ppp/issues if you need it\n");
+
spinlock_init(&queue_lock);
opt = conf_get_opt("log-pgsql", "conninfo");