Skip to content

Fix database switching #780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix database switching #780

wants to merge 1 commit into from

Conversation

jerem
Copy link

@jerem jerem commented Mar 4, 2025

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.

@sosedoff
Copy link
Owner

@jerem do you have specific instructions on how to reproduce the issue?

@sosedoff
Copy link
Owner

@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

@Benno007
Copy link

Benno007 commented May 13, 2025

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:
Load the pgweb UI, may still be logged into another DB
Click Disconnect
Click a new bookmark
Click Connect
Upon login, the new connections schema and tables are there, but the old bookmarks schemas are there. If I click around the tables, in some cases I get "ERROR: pq: relation "public.some_table" does not exist"

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants