From a9e261fc20b22d5a77a55276be442ede5baf4fef Mon Sep 17 00:00:00 2001 From: ZmnSCPxj jxPCSnmZ Date: Tue, 23 Nov 2021 14:08:01 +0800 Subject: [PATCH] doc/PLUGINS.md: Clarify that `db_write` hook only works on SQLITE3. I noticed that `wallet/db_postgres.c` never actually calls `db_changes_add`. PostgreSQL arguably has a better replication system (a PostgreSQL cluster) than what `db_write` hook can offer, so rather than make `db_write` work on PostgreSQL, just document that it does not actually work there. ChangeLog-none --- doc/PLUGINS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index a6f94a77c..7b57538de 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -939,7 +939,11 @@ hook subscribers would not get called. ### `db_write` -This hook is called whenever a change is about to be committed to the database. +This hook is called whenever a change is about to be committed to the database, +if you are using a SQLITE3 database (the default). +This hook will be useless (the `"writes"` field will always be empty) if you are +using a PostgreSQL database. + It is currently extremely restricted: 1. a plugin registering for this hook should not perform anything that may cause