Best way to customize postgresql.conf?
reece
PROOP

5 months ago

What's the best/recommended way to modify the Postgres config on Railway (ideally, without creating a custom image)?

Solved

19 Replies

noahd
EMPLOYEE

5 months ago

In what ways would you be looking to customize it?


reece
PROOP

5 months ago

my app needs pg_stat_statements in shared_preload_libraries


medim
MODERATOR

5 months ago

You can't directly edit the postgresql.conf file (Maybe through SSH but definitely not recommended)


medim
MODERATOR

5 months ago

Can that be sent as a psql command or set through env vars?


noahd
EMPLOYEE

5 months ago

Was looking into all that env vars can do yeah, I've had some people customize them through those


reece
PROOP

5 months ago

wouldn't be persisted over a restart, which is required after modifyng the config


medim
MODERATOR

5 months ago

True, so unfortunately a custom image is the best option here


reece
PROOP

5 months ago

ah, that's annoying but oh well


noahd
EMPLOYEE

5 months ago

looking through this but yeah https://hub.docker.com/_/postgres
custom image is the best bet


reece
PROOP

5 months ago

I wonder if there could be some middle ground where it has a startup script that writes a config to the disk on startup, from an environment variable


reece
PROOP

5 months ago

just thinking out loud


noahd
EMPLOYEE

5 months ago

Yeah that sounds like it would be helpful here but no clue if Railway supports doing that


brody
EMPLOYEE

5 months ago


medim
MODERATOR

5 months ago

brody to the rescue


reece
PROOP

5 months ago

oh wow i could not find that


reece
PROOP

5 months ago

thanks brody


reece
PROOP

5 months ago

!s


medim
MODERATOR

5 months ago

!s


reece
PROOP

5 months ago

:/


Status changed to Solved medim 5 months ago


Loading...