草庐IT

postgresql_psycopg

全部标签

postgresql - 使用 docker-compose 启动 Postgres 会立即关闭

Postgres在使用docker-compose启动时会立即关闭。使用的yaml文件如下version:'2'services:postgres:image:postgres:9.5container_name:local-postgres9.5ports:-"5432:5432"docker-composeup命令执行时的日志Creatinglocal-postgres9.5Attachingtolocal-postgres9.5local-postgres9.5|Thefilesbelongingtothisdatabasesystemwillbeownedbyuser"post

postgresql - 使用 docker-compose 启动 Postgres 会立即关闭

Postgres在使用docker-compose启动时会立即关闭。使用的yaml文件如下version:'2'services:postgres:image:postgres:9.5container_name:local-postgres9.5ports:-"5432:5432"docker-composeup命令执行时的日志Creatinglocal-postgres9.5Attachingtolocal-postgres9.5local-postgres9.5|Thefilesbelongingtothisdatabasesystemwillbeownedbyuser"post

postgresql - 如何在 Kubernetes 中使用 Aws EBS 挂载 postgresql 卷

我首先创建了持久卷(EBS10G)和相应的持久卷声明。但是当我尝试如下部署postgresqlpod(yaml文件)时:test-postgresql.yaml从pod接收错误:initdb:目录“/var/lib/postgresql/data”存在但不为空它包含一个lost+found目录,可能是因为它是一个挂载点。不建议直接使用挂载点作为数据目录。在挂载点下创建一个子目录。为什么pod不能使用这个路径?我在minikube上尝试过相同的测试。我没有遇到任何问题。我尝试将卷挂载目录路径更改为“/var/lib/test/data”,Pod可以运行。我创建了一个新表和一些数据,然后杀

postgresql - 如何在 Kubernetes 中使用 Aws EBS 挂载 postgresql 卷

我首先创建了持久卷(EBS10G)和相应的持久卷声明。但是当我尝试如下部署postgresqlpod(yaml文件)时:test-postgresql.yaml从pod接收错误:initdb:目录“/var/lib/postgresql/data”存在但不为空它包含一个lost+found目录,可能是因为它是一个挂载点。不建议直接使用挂载点作为数据目录。在挂载点下创建一个子目录。为什么pod不能使用这个路径?我在minikube上尝试过相同的测试。我没有遇到任何问题。我尝试将卷挂载目录路径更改为“/var/lib/test/data”,Pod可以运行。我创建了一个新表和一些数据,然后杀

c# - PostgreSQL 和 C# 数据类型

我搜索了PostgreSQL和C#之间的类型转换表,但我找不到任何东西。如果我有时间,我会研究上表中的空单元格。但是,如果您知道包含这些信息的网页,我将非常适合您的帮助。PostgreType--->C#Typebigint--->Int64bigserial--->bit[(n)]--->Byte[]bitvarying[(n)]--->Byteboolean--->Booleanbox--->bytea--->Byte[]charactervarying[(n)]--->Stringcharacter--->Stringcidrcircledate--->DateTimedoubl

C# .NET + PostgreSQL

我正在研究一个使用C#.NET(位于Windows机器上)作为主要语言并使用PostgreSQL作为后端数据库(后端位于Linux机器上)的项目。我听说ODBC.NET允许轻松集成这两个组件。有没有人有实际设置C#和PostgreSQL协同工作的经验?如果是这样,您对如何着手、发现的问题等有什么建议吗? 最佳答案 我正在使用C#和Postgres使用Npgsql2组件,它们运行速度很快,我推荐你。可以从https://github.com/npgsql/Npgsql/releases下载注意:如果您想要一个适用于任何数据库的应用程序

postgresql - Docker 错误 : standard_init_linux. go:185: exec 用户进程导致 "no such file or directory"

我正在尝试将我的elixir-phoenix应用程序与postgresql数据库一起设置为与Docker一起运行。这就是我的Dockerfile的样子:#./Dockerfile#StartingfromtheofficialElixir1.5.2image:#https://hub.docker.com/_/elixir/FROMelixir:1.5.2ENVDEBIAN_FRONTEND=noninteractive#InstallhexRUNmixlocal.hex#InstallrebarRUNmixlocal.rebar#InstallthePhoenixframeworki

postgresql - Docker 错误 : standard_init_linux. go:185: exec 用户进程导致 "no such file or directory"

我正在尝试将我的elixir-phoenix应用程序与postgresql数据库一起设置为与Docker一起运行。这就是我的Dockerfile的样子:#./Dockerfile#StartingfromtheofficialElixir1.5.2image:#https://hub.docker.com/_/elixir/FROMelixir:1.5.2ENVDEBIAN_FRONTEND=noninteractive#InstallhexRUNmixlocal.hex#InstallrebarRUNmixlocal.rebar#InstallthePhoenixframeworki

postgresql - 在 Docker Compose 中更改 postgres 容器服务器端口

我正在尝试使用Dockercompose在远程服务器上部署第二个数据库容器。此postgresql服务器在端口5433上运行,而不是第一个postgresql容器使用的5432。当我设置应用程序时,我得到这个错误输出:web_1|django.db.utils.OperationalError:couldnotconnecttoserver:Connectionrefusedweb_1|Istheserverrunningonhost"db"(172.17.0.2)andacceptingweb_1|TCP/IPconnectionsonport5433?我的dockercompose

postgresql - 在 Docker Compose 中更改 postgres 容器服务器端口

我正在尝试使用Dockercompose在远程服务器上部署第二个数据库容器。此postgresql服务器在端口5433上运行,而不是第一个postgresql容器使用的5432。当我设置应用程序时,我得到这个错误输出:web_1|django.db.utils.OperationalError:couldnotconnecttoserver:Connectionrefusedweb_1|Istheserverrunningonhost"db"(172.17.0.2)andacceptingweb_1|TCP/IPconnectionsonport5433?我的dockercompose