# \#postgresql

**URL:** https://discuss.circleci.com/tag/postgresql/69.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [ActiveRecord::ConnectionNotEstablished: PQsocket() can't get socket descriptor](https://discuss.circleci.com/t/activerecord-pqsocket-cant-get-socket-descriptor/53161)

<div class="topic-metadata">

**Author:** [@kreintjes](https://discuss.circleci.com/u/kreintjes)\
**Replies:** 0\
**Last updated:** [April 24, 2025, 1:13pm UTC](https://discuss.circleci.com/t/activerecord-pqsocket-cant-get-socket-descriptor/53161 "2025-04-24T13:13:22Z")

</div>

Since yesterday we suddenly get PQsocket errors on (almost) all of our system tests for one of our applications. The exact error is: ActiveRecord::ConnectionNotEstablished: PQsocket() can't get socket descriptor …

---

## [.Net 6 Pipeline with SQL Server, Postgresql, & Publishing to Nuget Example](https://discuss.circleci.com/t/net-6-pipeline-with-sql-server-postgresql-publishing-to-nuget-example/45782)

<div class="topic-metadata">

**Author:** [@mik3c](https://discuss.circleci.com/u/mik3c)\
**Replies:** 0\
**Last updated:** [October 15, 2022, 9:14pm UTC](https://discuss.circleci.com/t/net-6-pipeline-with-sql-server-postgresql-publishing-to-nuget-example/45782 "2022-10-15T21:14:26Z")

</div>

I wanted to share this pipeline I built for one of my SDK projects which has been very useful to me and solved a number of publishing & testing problems. It uses a few intermediate and (at least one unconventional) tech…

---

## [Possible to mix executors within a job or persist database across jobs?](https://discuss.circleci.com/t/possible-to-mix-executors-within-a-job-or-persist-database-across-jobs/41895)

<div class="topic-metadata">

**Author:** [@Apreche](https://discuss.circleci.com/u/Apreche)\
**Replies:** 1\
**Last updated:** [October 10, 2022, 2:23pm UTC](https://discuss.circleci.com/t/possible-to-mix-executors-within-a-job-or-persist-database-across-jobs/41895 "2022-10-10T14:23:37Z")

</div>

I have a relatively simple Python application I would like to test, there’s just one catch. We are using a separate system, flyway, for our database migrations. In order to run the tests we must follow these steps: Cre…

---

## [Postgresql Database Job Failure](https://discuss.circleci.com/t/postgresql-database-job-failure/40496)

<div class="topic-metadata">

**Author:** [@rmad17171](https://discuss.circleci.com/u/rmad17171)\
**Replies:** 5\
**Last updated:** [May 24, 2022, 4:41am UTC](https://discuss.circleci.com/t/postgresql-database-job-failure/40496 "2022-05-24T04:41:31Z")

</div>

I am getting the following error while setting up postgres to run my tests. This was working fine till couple of days back and suddenly stopped working. The files belonging to this database system will be owned by user …

---

## [Postgres failing with upgrading from 11.6 to 11.14](https://discuss.circleci.com/t/postgres-failing-with-upgrading-from-11-6-to-11-14/42932)

<div class="topic-metadata">

**Author:** [@tonydehnke](https://discuss.circleci.com/u/tonydehnke)\
**Replies:** 4\
**Last updated:** [February 18, 2022, 8:15pm UTC](https://discuss.circleci.com/t/postgres-failing-with-upgrading-from-11-6-to-11-14/42932 "2022-02-18T20:15:23Z")

</div>

Hi, upgrading from Ruby 2.6.6 to 2.6.9, that seems to be working, but now when updating from postgres 11.6-alpine to postgres 11.14 things get stuck (I’ve also tried 11.13 from cimg). It look like the Postgres server ge…

---

## [Rails Postgres - db:test:prepare - could not open extension control file pg\_stat\_statements](https://discuss.circleci.com/t/rails-postgres-dbprepare-could-not-open-extension-control-file-pg-stat-statements/41668)

<div class="topic-metadata">

**Author:** [@Cmarl](https://discuss.circleci.com/u/Cmarl)\
**Replies:** 2\
**Last updated:** [November 25, 2021, 12:22am UTC](https://discuss.circleci.com/t/rails-postgres-dbprepare-could-not-open-extension-control-file-pg-stat-statements/41668 "2021-11-25T00:22:21Z")

</div>

using image: cimg/postgres:12.7 and installing client/contrib via: - run: name: Install Postgresql Client command: sudo apt install postgresql-client postgresql-contrib Locally (and in other …

---

## [Next-Gen PostgreSQL Convenience Image Beta](https://discuss.circleci.com/t/next-gen-postgresql-convenience-image-beta/40278)

<div class="topic-metadata">

**Author:** [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Replies:** 4\
**Last updated:** [October 21, 2021, 1:05am UTC](https://discuss.circleci.com/t/next-gen-postgresql-convenience-image-beta/40278 "2021-10-21T01:05:09Z")

</div>

The next-gen PostgreSQL beta image is now available. The following initial tags are available: cimg/postgres:9.6.22 (cimg/postgres:9.6) cimg/postgres:10.17 cimg/postgres:11.12 cimg/postgres:12.7 cimg/postgres:13.3 We’…

---

## [Next-Gen PostgreSQL Convenience Image Now GA/Stable](https://discuss.circleci.com/t/next-gen-postgresql-convenience-image-now-ga-stable/41595)

<div class="topic-metadata">

**Author:** [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Replies:** 0\
**Last updated:** [October 21, 2021, 1:04am UTC](https://discuss.circleci.com/t/next-gen-postgresql-convenience-image-now-ga-stable/41595 "2021-10-21T01:04:37Z")

</div>

The next-gen PostgreSQL Convenience Image has now reached GA and is considered stable. The following initial tags are available: 9.6.22 9.6.23 (9.6) 10.17 10.18 11.12 11.13 12.7 12.8 13.3 13.4 14.0 There is also a Pos…

---

## [Postgres commands hang in Ubuntu machine](https://discuss.circleci.com/t/postgres-commands-hang-in-ubuntu-machine/41514)

<div class="topic-metadata">

**Author:** [@cali](https://discuss.circleci.com/u/cali)\
**Replies:** 5\
**Last updated:** [October 13, 2021, 6:30am UTC](https://discuss.circleci.com/t/postgres-commands-hang-in-ubuntu-machine/41514 "2021-10-13T06:30:42Z")

</div>

I’m creating a CircleCI config file with the following excerpt: executors: ubuntu: machine: image: ubuntu-2004:202107-02 jobs: build: executor: ubuntu environment: …

---

## [Use database docker containers with machine build](https://discuss.circleci.com/t/use-database-docker-containers-with-machine-build/40150)

<div class="topic-metadata">

**Author:** [@jasonab](https://discuss.circleci.com/u/jasonab)\
**Replies:** 0\
**Last updated:** [May 21, 2021, 10:20pm UTC](https://discuss.circleci.com/t/use-database-docker-containers-with-machine-build/40150 "2021-05-21T22:20:36Z")

</div>

I have a build that uses Localstack, and given the issues of running a Docker container inside of a Docker build, I’d like to switch to a machine configuration instead. However, the database Docker images are nice and ea…

---

## [CircleCi postgres rake db:create is failing](https://discuss.circleci.com/t/circleci-postgres-rake-db-create-is-failing/39031)

<div class="topic-metadata">

**Author:** [@chandanchoubey1](https://discuss.circleci.com/u/chandanchoubey1)\
**Replies:** 0\
**Last updated:** [February 4, 2021, 1:14pm UTC](https://discuss.circleci.com/t/circleci-postgres-rake-db-create-is-failing/39031 "2021-02-04T13:14:22Z")

</div>

I am trying to run docker file where rake db:create is there but its continuously failing with below error. below is DB configuration using YML. docker: - image: circleci/ruby:2.6.5-node-browsers-legacy environment…

---

## [Ruby 3.0 image error, undefined symbol: rb\_cData](https://discuss.circleci.com/t/ruby-3-0-image-error-undefined-symbol-rb-cdata/38649)

<div class="topic-metadata">

**Author:** [@dluan](https://discuss.circleci.com/u/dluan)\
**Replies:** 2\
**Last updated:** [January 4, 2021, 8:27pm UTC](https://discuss.circleci.com/t/ruby-3-0-image-error-undefined-symbol-rb-cdata/38649 "2021-01-04T20:27:05Z")

</div>

Running a command RAILS\_ENV=test bin/rails db:create db:schema:load --trace in a job with the images: circleci/ruby:3.0.0-node-browsers and circleci/postgres:12.5 currently breaks with the following trace. #!/bin/bash…

---

## [Moving to -ram postgresql image leads to PG::ConnectionBad: PQsocket() can't get socket descriptor](https://discuss.circleci.com/t/moving-to-ram-postgresql-image-leads-to-pg-pqsocket-cant-get-socket-descriptor/38455)

<div class="topic-metadata">

**Author:** [@johnpaulashenfelter](https://discuss.circleci.com/u/johnpaulashenfelter)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 1:57pm UTC](https://discuss.circleci.com/t/moving-to-ram-postgresql-image-leads-to-pg-pqsocket-cant-get-socket-descriptor/38455 "2020-12-11T13:57:06Z")

</div>

Hi folks, We’ve been building for a while on CircleCI, using our own Docker image (hosted by GCP) for a React/Rails app with ~2500 specs. Its been running specs in 4 parallel steps. This configuration has worked for us …

---

## [Rails Postgis & GEOS](https://discuss.circleci.com/t/rails-postgis-geos/37029)

<div class="topic-metadata">

**Author:** [@flanger001](https://discuss.circleci.com/u/flanger001)\
**Replies:** 1\
**Last updated:** [August 12, 2020, 6:22pm UTC](https://discuss.circleci.com/t/rails-postgis-geos/37029 "2020-08-12T18:22:23Z")

</div>

I am trying to get a Rails app with a Postgres/Postgis db with Geos working and I am not able to do so. I found this link: https://discuss.circleci.com/t/libgeos-not-recognized-in-circleci-2-0-environment/22451 That ev…

---

## [PostgreSQL Image Password Not Specified Issue](https://discuss.circleci.com/t/postgresql-image-password-not-specified-issue/34555)

<div class="topic-metadata">

**Author:** [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Replies:** 4\
**Last updated:** [July 14, 2020, 3:05pm UTC](https://discuss.circleci.com/t/postgresql-image-password-not-specified-issue/34555 "2020-07-14T15:05:16Z")

</div>

Some people have recently come across an error with the circleci/postgres image that looks something like this: Error: Database is uninitialized and superuser password is not specified. You must specify POSTGRES\_…

---

## [Can not connect to postgres](https://discuss.circleci.com/t/can-not-connect-to-postgres/36253)

<div class="topic-metadata">

**Author:** [@paulvitic](https://discuss.circleci.com/u/paulvitic)\
**Replies:** 1\
**Last updated:** [June 11, 2020, 10:24am UTC](https://discuss.circleci.com/t/can-not-connect-to-postgres/36253 "2020-06-11T10:24:28Z")

</div>

I am trying to execute integration tests against a secondary Postgres service container and a RabbitMQ container. Here is my config file version: 2.1 jobs: integration-test: docker: - image: circleci/node:l…

---

## [PostgreSQL - Alpine version for 11.7 - any reason it does not exist?](https://discuss.circleci.com/t/postgresql-alpine-version-for-11-7-any-reason-it-does-not-exist/34787)

<div class="topic-metadata">

**Author:** [@tonydehnke](https://discuss.circleci.com/u/tonydehnke)\
**Replies:** 6\
**Last updated:** [March 16, 2020, 2:51pm UTC](https://discuss.circleci.com/t/postgresql-alpine-version-for-11-7-any-reason-it-does-not-exist/34787 "2020-03-16T14:51:17Z")

</div>

Hi, we have been using the Alpine version of PostgreSQL for a while. Our production environment has upgraded to v11.7 and I wanted to update the CircleCI version to the same. There is no Alpine version of 11.7 availabl…

---

## [Caching pg\_dump files by migrations](https://discuss.circleci.com/t/caching-pg-dump-files-by-migrations/28248)

<div class="topic-metadata">

**Author:** [@kirk-clover](https://discuss.circleci.com/u/kirk-clover)\
**Replies:** 7\
**Last updated:** [July 20, 2019, 12:04am UTC](https://discuss.circleci.com/t/caching-pg-dump-files-by-migrations/28248 "2019-07-20T00:04:01Z")

</div>

I have three repos that I run migrations on before doing downstream integration tests. We use Postgres as our database. The migrated repos are django & flask. In one job, we run the migrations in each repo, call pg\_dump …

---

## [Circleci/mongo randomly fails](https://discuss.circleci.com/t/circleci-mongo-randomly-fails/30158)

<div class="topic-metadata">

**Author:** [@timsuchanek](https://discuss.circleci.com/u/timsuchanek)\
**Replies:** 9\
**Last updated:** [July 3, 2019, 2:29pm UTC](https://discuss.circleci.com/t/circleci-mongo-randomly-fails/30158 "2019-07-03T14:29:07Z")

</div>

We’re using circleci/mongo:3 in our .circleci/config.yml and for about 2 weeks it randomly fails some times to boot. The error: 2019-05-02T12:25:38.857+0000 E - \[main\] Error saving history file: FileOpenFailed: …

---

## [Can not run migrate in CircleCI with knex migration](https://discuss.circleci.com/t/can-not-run-migrate-in-circleci-with-knex-migration/30549)

<div class="topic-metadata">

**Author:** [@tienvv1234](https://discuss.circleci.com/u/tienvv1234)\
**Replies:** 0\
**Last updated:** [May 24, 2019, 8:28am UTC](https://discuss.circleci.com/t/can-not-run-migrate-in-circleci-with-knex-migration/30549 "2019-05-24T08:28:53Z")

</div>

I want to Create a database for integration test by Circle CI and here is the .config.yml Circle CI config version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a …

---

## [Random 404 when doing \`apt-get install postgresql-client\`](https://discuss.circleci.com/t/random-404-when-doing-apt-get-install-postgresql-client/30286)

<div class="topic-metadata">

**Author:** [@Onumis](https://discuss.circleci.com/u/Onumis)\
**Replies:** 2\
**Last updated:** [May 8, 2019, 11:55am UTC](https://discuss.circleci.com/t/random-404-when-doing-apt-get-install-postgresql-client/30286 "2019-05-08T11:55:47Z")

</div>

In my config I am using postgresql: version: 2 references: container\_config: &container\_config docker: - image: circleci/postgres:9.6-alpine-ram #... install\_dependencies: &install\_dependencies run: …

---

## [Job environment variables don't pass to postgres image](https://discuss.circleci.com/t/job-environment-variables-dont-pass-to-postgres-image/29774)

<div class="topic-metadata">

**Author:** [@dvasdekis](https://discuss.circleci.com/u/dvasdekis)\
**Replies:** 4\
**Last updated:** [April 15, 2019, 9:30pm UTC](https://discuss.circleci.com/t/job-environment-variables-dont-pass-to-postgres-image/29774 "2019-04-15T21:30:23Z")

</div>

Hi folks. I’m trying to set up my postgres container with some variables declared at job level, but it breaks! My master branch works with variables duplicated at job and at container level: https://github.com/dvasdekis…

---

## [PostgreSQL always reports "Job was canceled"](https://discuss.circleci.com/t/postgresql-always-reports-job-was-canceled/29208)

<div class="topic-metadata">

**Author:** [@goofansu](https://discuss.circleci.com/u/goofansu)\
**Replies:** 2\
**Last updated:** [March 25, 2019, 1:55pm UTC](https://discuss.circleci.com/t/postgresql-always-reports-job-was-canceled/29208 "2019-03-25T13:55:15Z")

</div>

.circleci/config.yml version: 2 jobs: build: docker: - image: circleci/elixir:1.8 environment: MIX\_ENV: test - image: circleci/postgres:11 environment: POSTGRES\_USER: postgres …

---

## [Ability to set Port for Postgres Docker Image?](https://discuss.circleci.com/t/ability-to-set-port-for-postgres-docker-image/28255)

<div class="topic-metadata">

**Author:** [@mlevyVHC](https://discuss.circleci.com/u/mlevyVHC)\
**Replies:** 3\
**Last updated:** [February 10, 2019, 5:13am UTC](https://discuss.circleci.com/t/ability-to-set-port-for-postgres-docker-image/28255 "2019-02-10T05:13:27Z")

</div>

Hi there, Been using the circleci/postgres:9.6.2-alpine image for running postgres in my CI for our testing suite. We’re running into an issue where we need multiple databases running locally so we tried setting differ…

---

## [Database setup with 2 language](https://discuss.circleci.com/t/database-setup-with-2-language/27134)

<div class="topic-metadata">

**Author:** [@GalGavu](https://discuss.circleci.com/u/GalGavu)\
**Replies:** 1\
**Last updated:** [December 23, 2018, 10:26pm UTC](https://discuss.circleci.com/t/database-setup-with-2-language/27134 "2018-12-23T22:26:34Z")

</div>

Hi, I’m using mainly two languages in my dev stack: ruby and golang. I’m setting up database with ruby and I’m using this database (postgresql) on both ruby and golang. Ruby side: With setting up circleCi for ruby rep…

---

## [PostgreSQL 11 CircleCI Docker Image Available](https://discuss.circleci.com/t/postgresql-11-circleci-docker-image-available/25928)

<div class="topic-metadata">

**Author:** [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Replies:** 0\
**Last updated:** [October 22, 2018, 8:01pm UTC](https://discuss.circleci.com/t/postgresql-11-circleci-docker-image-available/25928 "2018-10-22T20:01:47Z")

</div>

Some of you may have noticed already but following the PostgreSQL 11 Stable release on October 18th, we also have the image. circleci/postgres:11

---

## [Mystery DATABASE\_USER=ubuntu Setting](https://discuss.circleci.com/t/mystery-database-user-ubuntu-setting/25235)

<div class="topic-metadata">

**Author:** [@jherdman](https://discuss.circleci.com/u/jherdman)\
**Replies:** 4\
**Last updated:** [September 19, 2018, 2:40pm UTC](https://discuss.circleci.com/t/mystery-database-user-ubuntu-setting/25235 "2018-09-19T14:40:44Z")

</div>

I’m trying to set up a build environment with PG10. Despite my best efforts I cannot resolve this error: PG::ConnectionBad: FATAL: role "ubuntu" does not exist I’ve tracked this down to an ENV variable DATABASE\_USER b…

---

## [Latest circleci/postgres:9.6-ram docker image is missing postgres role](https://discuss.circleci.com/t/latest-circleci-postgres-9-6-ram-docker-image-is-missing-postgres-role/25037)

<div class="topic-metadata">

**Author:** [@danbunford](https://discuss.circleci.com/u/danbunford)\
**Replies:** 2\
**Last updated:** [September 12, 2018, 11:39am UTC](https://discuss.circleci.com/t/latest-circleci-postgres-9-6-ram-docker-image-is-missing-postgres-role/25037 "2018-09-12T11:39:26Z")

</div>

Hi, The latest circleci/postgres:9.6-ram docker image (circleci/postgres@sha256:3ed62672b3e7bd540c3556614c4bc286b584af10aaec43cfc05bc2cf44172b03) Has been changed, it’s no longer running the “create role postgres;” sta…

---

## [Postgres image breaking changes (role postgres not found)](https://discuss.circleci.com/t/postgres-image-breaking-changes-role-postgres-not-found/25024)

<div class="topic-metadata">

**Author:** [@anzecesar](https://discuss.circleci.com/u/anzecesar)\
**Replies:** 14\
**Last updated:** [September 11, 2018, 7:10pm UTC](https://discuss.circleci.com/t/postgres-image-breaking-changes-role-postgres-not-found/25024 "2018-09-11T19:10:18Z")

</div>

Yesterday all our builds suddenly started failing on a project which has postgres:10-alpine-ram set up. I see new tags were built and published yesterday (https://hub.docker.com/r/circleci/postgres/tags/) aligning with …

---

## [CircleCi Occasionally Can't Connect To Postgres In Builds](https://discuss.circleci.com/t/circleci-occasionally-cant-connect-to-postgres-in-builds/24384)

<div class="topic-metadata">

**Author:** [@jerrodq2](https://discuss.circleci.com/u/jerrodq2)\
**Replies:** 3\
**Last updated:** [September 11, 2018, 7:05am UTC](https://discuss.circleci.com/t/circleci-occasionally-cant-connect-to-postgres-in-builds/24384 "2018-09-11T07:05:23Z")

</div>

Basically, I have a Nodejs project which connects to a postgres database via knex and I use circleci for my tests. It works, but occasionally a build will fail due to “Error: connect ECONNREFUSED 127.0.0.1:5432”, and I c…

[Next page](https://discuss.circleci.com/tag/postgresql/69.md?match_all_tags=true&page=1&tags%5B%5D=postgresql)
