Skip to content

Commit

Permalink
doc/PLUGINS.md: Clarify that db_write hook only works on SQLITE3.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ZmnSCPxj committed Nov 24, 2021
1 parent 163d3a9 commit a9e261f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9e261f

Please sign in to comment.