Conversation
|
@jerem do you have specific instructions on how to reproduce the issue? |
|
@jerem ping on this -- if this is really an issue i'd like to have some way of reproducing the bug. information like wether you're running pgweb in containers, k8s with some specific configuration would also help |
|
Unsure if related to this particular issue, we were having issues with bookmark swapping We are running pgweb in kubernetes. We have two pods running, and use multiple bookmarks to connect to different connection strings. We recently added 10 bookmarks (a single bookmark worked ok), and are now unable to connect properly. What we do: Swapping back to just one pod fixed the issue and we can swap bookmarks. I assume it's an issue with shared state between the two pods for the current connection maybe just not supported? Would we need a shared volume if the current connection is stored to disk? |
|
@Benno007 yea pgweb is not meant to be executed in a multi-pod environment unless all post are connected to the same database, so bookmarks are kinda off the table. Main issue is pgweb's state -- nothing is stored in cookies or db store of any kind, so if you're load-balancing connections for different databases, you'd need to find an alternative option. |
@sosedoff Thanks for looking into this. I can consistently reproduce the bug with the following setup: PostgreSQL: v16.9, running locally, listening on the default Unix socket. Steps to reproduce: Launch pgweb as described above. Screencast.From.2025-06-17.14-38-24.mp4 |
Issue
Database switching fails because the current URL path is replaced with the database name, causing the leading / to be missing. This results in incorrect URL resolution.
Fix
Ensure the replacement retains the leading / when updating the URL path with the new database name.