Connection pooling keeps multiple PostgreSQL connections available so Fluent Bit can write log events concurrently instead of paying the startup cost for each additional connection. Enable asynchronous output with async true, then set min_pool_size for maintained connections and max_pool_size for the concurrency limit. section 5.7
Pooling changes database output behavior in practical ways:
- Each connection can process a chunk of log events, increasing potential write throughput. section 5.7
- Concurrent servicing can store events slightly out of sequence; use SQL ORDER BY clauses when reading them. section 5.7
- Test under load with LogSimulator, while recognizing that CPU, memory, Docker, and simulator settings affect whether extra connections are used. section 5.7
Listing 5.9 PostgreSQL output example: db-output.conf
[SERVICE] flush 1 log_level info [INPUT] name http listen 0.0.0.0 port 9881 tag input1 [OUTPUT] name pgsql #1 match * host localhost #2 port 5455 user postgresUser #3 password postgresPW database postgres #4 table fluentbit timestamp_key ts #5
Use the PostgreSQL output configuration as the base before adding asynchronous pooling attributes. section 5.7








