scsibug / nostr-rs-relay

Mirror of https://sr.ht/~gheartsfield/nostr-rs-relay/
MIT License
593 stars 161 forks source link

PgBouncer of PostgreSQL support. #184

Open cxplay opened 10 months ago

cxplay commented 10 months ago

I am trying to migrate and connect to a PostgreSQL database using connection pooling, but I am getting the following error:

2024-01-08T12:15:12.889 [info] 2024-01-08T12:15:12.889135Z INFO sqlx::postgres::notice: relation "migrations" already exists, skipping
2024-01-08T12:15:13.030 [info] thread '<unnamed>' panicked at src/repo/postgres_migration.rs:70:14:
2024-01-08T12:15:13.030 [info] called `Result::unwrap()` on an `Err` value: Database(PgDatabaseError { severity: Error, code: "42P05", message: "prepared statement \"sqlx_s_1\" already exists", detail: None, hint: None, position: None, where: None, schema: None, table: None, column: None, data_type: None, constraint: None, file: Some("prepare.c"), line: Some(412), routine: Some("StorePreparedStatement") })
2024-01-08T12:15:13.030 [info] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-01-08T12:15:13.035 [info] thread 'main' panicked at src/main.rs:108:19:
2024-01-08T12:15:13.035 [info] called `Result::unwrap()` on an `Err` value: Any { .. }
2024-01-08T12:15:13.344 [info] INFO Main child exited normally with code: 101

I found relevant information about the upstream here, and it seems that it have been stuck here for a long time: https://github.com/launchbadge/sqlx/issues/67