pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
11+ messages / 4 participants
[nested] [flat]

* [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-04-22 02:05 "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
  0 siblings, 0 replies; 11+ messages in thread

From: hobin2017 (@hobin2017) @ 2025-04-22 02:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

the docker-compose is given below.
```
version: '3'
services:
  postgres:
    image: pgvector/pgvector:pg16
    network_mode: host
    # restart: on-failure
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: xxx123456789!!
    volumes:
      - /home/18data_pgvector:/var/lib/postgresql/data
```

the error goes here
```
Recreating vectordb_postgres_1 ... done
Attaching to vectordb_postgres_1
vectordb_postgres_1 | popen failure: Cannot allocate memory
vectordb_postgres_1 | initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/16/bin/initdb"
vectordb_postgres_1 exited with code 1
```


^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-04-22 02:07 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: hobin2017 (@hobin2017) @ 2025-04-22 02:07 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@hobin2017 renamed this.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-04-22 02:18 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: hobin2017 (@hobin2017) @ 2025-04-22 02:18 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@hobin2017 renamed this.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-04-22 11:11 ` "sdghchj (@sdghchj)" <noreply+sdghchj@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: sdghchj (@sdghchj) @ 2025-04-22 11:11 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

the same with docker: 
```
docker run -it --rm --name pgvector -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres pgvector/pgvector:0.8.0-pg17 
```

and errors occurred:
```
could not execute command ""/usr/lib/postgresql/17/bin/postgres" -V": Cannot allocate memory
initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/17/bin/initdb"
```

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-04-24 01:25 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: hobin2017 (@hobin2017) @ 2025-04-24 01:25 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@hobin2017 renamed this.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-02 19:55 ` "ankane (@ankane)" <noreply+ankane@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: ankane (@ankane) @ 2025-05-02 19:55 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

From the error message, it looks like you're running out of memory.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-02 19:55 ` "ankane (@ankane)" <noreply+ankane@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: ankane (@ankane) @ 2025-05-02 19:55 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-06 01:32 ` "sdghchj (@sdghchj)" <noreply+sdghchj@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: sdghchj (@sdghchj) @ 2025-05-06 01:32 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

> From the error message, it looks like you're running out of memory.

How much memory is needed at least?
In my host, there is 3G left free.

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-07 02:05 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: hobin2017 (@hobin2017) @ 2025-05-07 02:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane By [stackover-link](https://stackoverflow.com/questions/76555305/postgres-container-failed-to-start-with-initdb-error-po...), is this error brought by the os layer?

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-13 17:02 ` "amaranxm (@amaranxm)" <noreply+amaranxm@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: amaranxm (@amaranxm) @ 2025-05-13 17:02 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I'm running into this same issue while I have more than enough memory left.
I found that other users ran into the same issue with the postgres image
https://stackoverflow.com/questions/77811138/the-official-docker-image-postgres-is-not-running-under...
https://codereviewvideos.com/postgres-16-docker-workaround-program-postgres-is-needed-by-initdb/
https://github.com/coder/coder/issues/16876

^ permalink  raw  [nested|flat] 11+ messages in thread

* Re: [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found
@ 2025-05-14 09:14 ` "amaranxm (@amaranxm)" <noreply+amaranxm@github.com>
  9 siblings, 0 replies; 11+ messages in thread

From: amaranxm (@amaranxm) @ 2025-05-14 09:14 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I ended up fixing it by building a pgvector image that is based on a bullseye-based Postgres image

ARG PG_MAJOR=16
FROM postgres:${PG_MAJOR}-bullseye

^ permalink  raw  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2025-05-14 09:14 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 02:05 [pgvector/pgvector] issue #826: container-error: program "postgres" is needed by initdb but was not found "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
2025-04-22 02:07 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
2025-04-22 02:18 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
2025-04-22 11:11 ` "sdghchj (@sdghchj)" <noreply+sdghchj@github.com>
2025-04-24 01:25 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
2025-05-02 19:55 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-02 19:55 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-06 01:32 ` "sdghchj (@sdghchj)" <noreply+sdghchj@github.com>
2025-05-07 02:05 ` "hobin2017 (@hobin2017)" <noreply+hobin2017@github.com>
2025-05-13 17:02 ` "amaranxm (@amaranxm)" <noreply+amaranxm@github.com>
2025-05-14 09:14 ` "amaranxm (@amaranxm)" <noreply+amaranxm@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox