-
-
Notifications
You must be signed in to change notification settings - Fork 422
Description
Summary
On macOS, after reinstalling pgModeler Plus 2.0 over a system where the 2.0 alpha had been installed and tested before, the app continued using an older existing pgmodeler-2.0 preference set instead of adopting the newer and more complete connection configuration already present in pgmodeler-1.2.
This resulted in the 2.0 app loading stale database and SSH tunnel connection settings, while the 1.2 config set contained the newer canonical definitions.
Environment
- OS: macOS
- App bundle:
pgModelerPlus.app - Bundle identifier:
io.pgmodeler.pgModeler - Observed user preference directories:
~/Library/Preferences/pgmodeler-1.0~/Library/Preferences/pgmodeler-1.2~/Library/Preferences/pgmodeler-2.0
Expected behavior
If a newer existing per-user config set contains newer connection definitions than the current 2.0 config set, the 2.0 installation or first run should either:
- migrate/import the newer connection settings automatically, or
- prompt the user to choose which existing config set to import, or
- at minimum avoid silently preferring stale 2.0 config files over newer 1.2 ones.
Actual behavior
This was not a clean first-time 2.0 install. An older ~/Library/Preferences/pgmodeler-2.0/ already existed from a previous 2.0 installation.
After reinstalling 2.0, the app used those older files already present in ~/Library/Preferences/pgmodeler-2.0/ even though ~/Library/Preferences/pgmodeler-1.2/ contained the newer and more complete connection definitions.
The 1.2 set had newer DB and SSH connection parameters, including:
- PostgreSQL connection
options="keepalives=1 keepalives_idle=60 keepalives_interval=10 keepalives_count=5" - SSH tunnel options
-o ServerAliveInterval=60;-o ServerAliveCountMax=3 - Additional tunnel/connection entries not present in the 2.0 set
Evidence
The canonical newer files were (newer files on older 1.2 version):
~/Library/Preferences/pgmodeler-1.2/connections.conf~/Library/Preferences/pgmodeler-1.2/plugins/sshtunnel/sshtunnel.conf
The stale 2.0 files were (stale preferences from previous alpha testing ov 2.0 version):
~/Library/Preferences/pgmodeler-2.0/connections.conf~/Library/Preferences/pgmodeler-2.0/plugins/sshtunnel/sshtunnel.conf
Differences observed (user specific extra parameters for the connections):
pgmodeler-1.2/connections.confincluded database connectionoptions="keepalives=..."attributes that were missing inpgmodeler-2.0/connections.conf.pgmodeler-1.2/plugins/sshtunnel/sshtunnel.confincluded SSH options-o ServerAliveInterval=60;-o ServerAliveCountMax=3, whilepgmodeler-2.0/plugins/sshtunnel/sshtunnel.confdid not.pgmodeler-1.2/plugins/sshtunnel/sshtunnel.confalso had an extra tunnel definition that was absent from the 2.0 set.
Reproduction idea
A likely trigger is:
- Have an existing
~/Library/Preferences/pgmodeler-2.0/from an older install. - Later update or continue using
~/Library/Preferences/pgmodeler-1.2/, adding newer database and SSH connection settings. - Reinstall or relaunch pgModeler Plus 2.0.
- Observe that 2.0 keeps using the older pre-existing
pgmodeler-2.0files instead of migrating/importing the newer 1.2 definitions.
Likely cause
My inference is that migration/import behavior may only work when the target version directory is absent or blank, and may be skipped when ~/Library/Preferences/pgmodeler-2.0/ already exists.
If that is the current behavior, it would explain why a reinstall preserved stale 2.0 connection files instead of comparing them with newer available settings from 1.2.
Impact
Users can lose access to the latest working connection definitions after reinstalling 2.0, especially when SSH tunnel options or DB keepalive options were only present in the newer 1.2 preference set.
This is confusing because the machine already contains a newer working configuration, but 2.0 silently prefers the stale one.
Suggested fix
Consider adding startup migration logic for macOS preference directories so that when multiple versioned config directories exist, pgModeler:
- detects the newest valid config set,
- compares timestamps or config richness even when the current-version directory already exists,
- offers import/migration into the current version directory, and
- does not silently keep stale connection and tunnel definitions.
It would also help to expose a clear policy or setting for this behavior, with a sensible default, for example:
- prefer the newest compatible config set,
- prefer the existing current-version directory, or
- prompt the user to choose when both exist.
Workaround used
Manual copy from the newer 1.2 config set into the 2.0 config set:
~/Library/Preferences/pgmodeler-1.2/connections.conf->~/Library/Preferences/pgmodeler-2.0/connections.conf~/Library/Preferences/pgmodeler-1.2/plugins/sshtunnel/sshtunnel.conf->~/Library/Preferences/pgmodeler-2.0/plugins/sshtunnel/sshtunnel.conf
Verification after workaround
After manually copying the newer 1.2 files into the 2.0 preference directory:
- the SSH tunnels established successfully in pgModeler Plus 2.0, and
- the database export completed successfully without issues.
This confirms the newer 1.2 connection and SSH tunnel configs were the correct working set, and that the problem was the 2.0 app continuing to use stale existing 2.0 preference files instead of the newer available configuration.