postgresql - 手动启动 PostgreSQL 服务器并设置详细模式以查看所有查询
问题描述
手动启动 postgresql 服务器时,是否有详细模式可以在终端控制台中获取在 PostgreSQL 服务器上执行的查询列表?如果是,如何使用?
我在 macos 上以这种方式启动 PostgreSQL 服务器:
/Applications/Postgres.app/Contents/Versions/12/bin/postgres -D "/Users/me/Library/Application Support/Postgres/var-12" -p 5432
解决方案
您可以log_statement=all
在 postgresql.conf 中或在bin/postgres
命令行中使用-c
.
推荐阅读
- c# - 如何执行“Parallel.ForEach”作为后台任务,将控制权立即返回给调用方法?
- php - 如何在 PHP / laravel 中查询 2 次之间的时隙
- javascript - 使用 Javascript 从 HTML 表格输入单元格中获取值
- java - Kafka Streams 有类似 Spark 的累加器吗?
- docker - 使用 docker-compose 和 nodemon 时出错
- r - 用ggplot绘制表函数对象?
- python-3.x - 合并更改 Pandas 类型
- android - Pjsip - 迷你电话会议(音频)
- python - 在 PIL 中保存 GIF 时,透明度无法始终如一地工作
- insert - Autogenerate=true 不设置 Room 中插入实体的 id