> On Oct 15, 2024, at 07:17, Dominique Devienne <ddevienne@gmail.com> wrote:
> Am I worrying too much? :)
Probably. :-) The main things I'd worry about is:
1. What's the ratio of log lines to database updates? You want this to be as high as usefully possible, since in
effectyou are doing write amplification by writing to the logs as well as to the "real" database.
2. One of the things to watch out for if you are writing the log lines to the database is that if you write a log line
ina transaction, and that transaction rolls back, you lose the log line. That may or may not be what you want: if it's
reportingan error (such as the reason that the transaction rolled back), you want to preserve that data. One way of
handlingthis is to have the application have a separate session for logging, although you are now doing 2x the number
ofconnections.
If the write volume is very high, you might consider using a dedicate log-ingestion service (there are tons) rather
thanPostgreSQL, so that you aren't overburdening the database with log activity.