xxxx(super_postgres) 就是你的用户名称
text
docker exec -it my-postgres psql -U super_postgres -d mydatabase -c "CREATE DATABASE demo_db_for_gin;"
添加连接数:
text
container_name: my-postgres
restart: always
# 👇 1. 【核心修改】在这里指定最大连接数
# 默认是 100,这里改成了 1000 (根据你机器配置调整)
command: postgres -c max_connections=1000
docker exec -it my-postgres psql -U super_postgres -d mydatabase -c "SHOW max_connections;"
评论
还没有评论,来发第一个吧