Replies: 5 comments 4 replies
-
I do believe we're also observing this for 15.5-bullseye onwards, 16.1-bullseye onwards, when calling postgres functions as part of init (I've observed it at least for Here's a spinup log: https://app.circleci.com/pipelines/github/Flowminder/FlowKit/22071/workflows/8cfc1081-f2f4-43ea-8665-a4886f34c0f6/jobs/594514/parallel-runs/0/steps/0-1 Which corresponds to this dockerfile: https://github.com/Flowminder/FlowKit/blob/0a2674ee8e3c74b8009af3710a59dee704c3222c/flowdb_testdata.Dockerfile which is built on https://github.com/Flowminder/FlowKit/blob/0a2674ee8e3c74b8009af3710a59dee704c3222c/flowdb.Dockerfile |
Beta Was this translation helpful? Give feedback.
-
same. when some function in the init.sql,the pg container will hang. |
Beta Was this translation helpful? Give feedback.
-
I am unable to replicate a failure. If there is an issue with the image we'd love to fix it, but without being able to replicate the failure, there isn't anything to change.
|
Beta Was this translation helpful? Give feedback.
-
For whatever reason, this is affecting my CI (Codeship) but works fine on my Macbook M1. Current workaround is using the |
Beta Was this translation helpful? Give feedback.
-
I recall some of the PostgreSQL tools default to using a pager when run
interactively and one is available/configured -- maybe try something cheeky
like PAGER=cat to help rule that out?
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've dumped an existing database with
pg_dump -U $POSTGRES_DB -h $HOST -d $DATABASE > dump.sql
(names altered for brevity and privacy), and once I added this file to/docker-entrypoint-initdb.d
, the container hung on startup indefinitely.On closer inspection, once queries were echo'd out, it hung on the following line, which is just a standard
search_path
vulnerability mitigation:SELECT pg_catalog.set_config('search_path', '', false);
It also hangs on any other similar functions, such as
pg_catalog.setval('public."Item_itemId_seq"', 40, true);
. I've left the container running for roughly 16 hours, but it did not progress any further.However, when I create an empty database, and restore the data with
psql -U $POSTGRES_DB -h $HOST -d $DATABASE -f data.sql
from outside the container, it does so with no issue at all.The container is also able to complete the initialisation process if I comment out any lines mentioning
pg_catalog
.Asking
pg_dump
to create a dump file that performs a clean restore, creating all databases also does not help, sinceset_config
is invoked before any databases are dropped.Postgres configs are all default.
Versions tested:
16.1-bookworm
,13.13-bookworm
,12.17-bookworm
Dockerfile:
Beta Was this translation helpful? Give feedback.
All reactions