跳至正文
Wener Notes

Odyssey

约 1 分钟阅读
  • - BSD 3
    • 多线程
    • Transaction pooling
      • 断开链接时支持 cancel 或 rollback
      • 客户端复用上次链接
    • Database+User 纬度 pooling 控制
    • SSL/TLS、md5、clear text
    • 日志汇总 - 每个 client 一个 uuid
  • - prepared statements in transaction pooling

配置

bash
storage "postgres_server" {
	type "remote"

	host "host.docker.internal"
	port 5432
}

database default {
	user default {
		authentication "none"

		storage "postgres_server"
#		storage_db "db"
#		storage_user "user"
#		storage_password "password"

		pool "session"

		client_fwd_error yes
	}
}

unix_socket_dir "/tmp"
unix_socket_mode "0644"

log_format "%p %t %l [%i %s] (%c) %m\n"
log_debug yes
log_config yes
log_session yes
log_query yes
log_stats yes

stats_interval 60

listen {
	host "*"
	port 6432
}

FAQ

odyssey vs pgbouncer

  • odyssey
    • 单进程多线程
    • 不支持 configuration file reload by signal, support for unix sockets, authentication by PAM and HBA.
  • pgbouncer
    • 可以多进程同端口
    • Scale 能力弱于 odyssey

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub4 条
其他外链1 条
最近更新commit c48877a编辑