# Error altering user password when building Postgres container

**URL:** <https://meta.discourse.org/t/error-altering-user-password-when-building-postgres-container/293069>\
**Category:** Self-hosting\
**Created:** [January 26, 2024, 5:06pm UTC](https://meta.discourse.org/t/error-altering-user-password-when-building-postgres-container/293069 "2024-01-26T17:06:59Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)\
**Post date:** [January 26, 2024, 5:06pm UTC](https://meta.discourse.org/t/error-altering-user-password-when-building-postgres-container/293069/1 "2024-01-26T17:06:59Z")

</div>

After postgres is successfully installed in the container, the launcher script tries to change the password of the discourse user. However I get this error

```plaintext
Pups::ExecError: su - postgres -c 'psql discourse' failed with return #<Process::Status: pid 100 exit 141>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"stdin"=>"alter user discourse with password 'redacted';\n", "cmd"=>"su - postgres -c 'psql discourse'", "raise_on_fail"=>true}
bootstrap failed with exit code 141
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.

```

Seems like postgres isn’t running when this command is reached so it fails in a broken pipe. My postgres.yml is based off the data.yml sample file though, so I’m not sure what I’m doing wrong. Any ideas?

---

_[View the full topic](https://meta.discourse.org/t/error-altering-user-password-when-building-postgres-container/293069)._
