Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
94 stars 13 forks source link

pg_setup fails when run from project with long directory name #82

Closed jayvdb closed 6 months ago

jayvdb commented 1 year ago

Should be easy to fix by falling back to using tempdir's default, i.e. /tmp on linux.

I'll take this issue, as it is caused by my own choice of local directory structures for work projects. But not a high priority as the workaround is easy.

pg_setup
create tmp server
2023-05-10 08:58:32.273 AWST   [21659]LOG:  starting PostgreSQL 15.2 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 13.0.1 20230421 (prerelease) [revision f980561c60b0446cc427595198d7f3f4f90e0924], 64-bit
2023-05-10 08:58:32.273 AWST   [21659]LOG:  Unix-domain socket path "/really/long/path/tmp_pg/9b0f3a7c-147b-42b0-affe-e1e46a4c78f4/socket/.s.PGSQL.5432" is too long (maximum 107 bytes)
2023-05-10 08:58:32.273 AWST   [21659]WARNING:  could not create Unix-domain socket in directory "/really/long/path/tmp_pg/9b0f3a7c-147b-42b0-affe-e1e46a4c78f4/socket"
2023-05-10 08:58:32.273 AWST   [21659]FATAL:  could not create any Unix-domain sockets
2023-05-10 08:58:32.274 AWST   [21659]LOG:  database system is shut down
thread 'actix-rt|system:3|arbiter:1' panicked at 'postgres process died', /home/jayvdb/rust/butane/butane_test_helper/src/lib.rs:100:13
jayvdb commented 6 months ago

This was duplicated by https://github.com/Electron100/butane/issues/191