# Postgresql broken on Focal

**URL:** <https://travis-ci.community/t/postgresql-broken-on-focal/10371>\
**Category:** Linux\
**Created:** [October 30, 2020, 10:46am UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371 "2020-10-30T10:46:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasiekmarc](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jasiekmarc/32/5434_2.png) [@jasiekmarc](https://travis-ci.community/u/jasiekmarc)\
**Post date:** [October 30, 2020, 10:46am UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/1 "2020-10-30T10:46:36Z")

</div>

It seems to me that something has changed recently (this week) with Postgresql on Focal.

My configuration starts with

```auto
dist: focal
language: python
python:
  - "3.8"

addons:
  apt:
    packages:
      - yarnpkg
  postgresql: "12"
services:
  - postgresql
  - redis-server
…
before_script:
  - psql -c 'CREATE DATABASE fereol_test;' -U postgres

```

It used to work perfectly well, and suddenly, yesterday, my builds started failing on `CREATE DATABASE` step with the message:

```auto
$ psql -c 'CREATE DATABASE fereol_test;' -U postgres
psql: error: could not connect to server: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The command "psql -c 'CREATE DATABASE fereol_test;' -U postgres" failed and exited with 2 during .

```

(the build: [https://travis-ci.com/github/iiuni/projektzapisy/jobs/420866754](https://travis-ci.com/github/iiuni/projektzapisy/jobs/420866754))  
Earlier in the run—while configuring Postgres—it says:

```auto
Assertion failed on job for postgresql@12-main.service.

```

I tried playing with the config: changing Postgres version, installing the packages manually. I was not able to set it up correctly.

Is it a bug, or is my configuration wrong?

---

<div class="post-metadata">

**Author:** ![jasiekmarc](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jasiekmarc/32/5434_2.png) [@jasiekmarc](https://travis-ci.community/u/jasiekmarc)\
**Post date:** [October 30, 2020, 2:16pm UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/2 "2020-10-30T14:16:14Z")

</div>

Changing Postgres version to “13” seems to have fixed the issue.

Are earlier versions of Postgres not supported any more?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [November 2, 2020, 7:03am UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/3 "2020-11-02T07:03:19Z")

</div>

This will help you a bit more:

> **[Travis CI Documentation](https://docs.travis-ci.com/user/reference/focal/)**
>
> The Ubuntu 20.04 (Focal Fossa) Build Environment

---

<div class="post-metadata">

**Author:** ![jasiekmarc](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jasiekmarc/32/5434_2.png) [@jasiekmarc](https://travis-ci.community/u/jasiekmarc)\
**Post date:** [November 2, 2020, 11:18pm UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/4 "2020-11-02T23:18:49Z")

</div>

> [@Montana](#):
>
> This will help you a bit more:

As a matter of fact it didn’t help. This documentation does not explain, why my configuration is not working. Neither does it say, why the same exact configuration does work with Graviton2/LXD.

---

<div class="post-metadata">

**Author:** ![joergsteffens](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/joergsteffens/32/5537_2.png) [@joergsteffens](https://travis-ci.community/u/joergsteffens)\
**Post date:** [November 11, 2020, 4:20pm UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/5 "2020-11-11T16:20:56Z")

</div>

We experienced the same problem.  
Using Postgresql does not work with:  
Build image provisioning date and time  
Tue 03 Nov 2020 10:34:47 AM UTC

However, it worked without problems on  
Build image provisioning date and time  
Tue 25 Aug 2020 10:07:36 AM UTC

See [https://travis-ci.org/github/bareos/bareos/jobs/742402304](https://travis-ci.org/github/bareos/bareos/jobs/742402304) (well, no the best build log to debug postgres problems).

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [November 11, 2020, 7:26pm UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/6 "2020-11-11T19:26:40Z")

</div>

Hey folks,

I will send this into our internal support team as soon as possible.

-Montana Mendy  
(Travis CI Staff)

---

<div class="post-metadata">

**Author:** ![y-yagi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/y-yagi/32/960_2.png) [@y-yagi](https://travis-ci.community/u/y-yagi)\
**Post date:** [November 22, 2020, 4:06am UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/7 "2020-11-22T04:06:17Z")

</div>

Hello, I encountered the same issue. Is there any plan to fix this issue? Or, we have to use the upper version of PostgreSQL?

---

<div class="post-metadata">

**Author:** ![mustafa](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mustafa/32/2752_2.png) [@mustafa](https://travis-ci.community/u/mustafa)\
**Post date:** [April 19, 2021, 7:27am UTC](https://travis-ci.community/t/postgresql-broken-on-focal/10371/8 "2021-04-19T07:27:37Z")

</div>

Hello,

I have crafted a .`travis.yml` [1] file that may be helpful for your case as well.

Thanks.

[1] [Postgre12 on Focal · GitHub](https://gist.github.com/mustafa-travisci/529d77d29c07e2b37f0f19042ea1ef38)
