@Override
		public synchronized Connection getConnection() throws SQLException {

			if (successfulConnection) {
				try {
					// attempt to reuse pooled connection or current settings
					try {
						return bds.getConnection();
					}
					catch (SQLException e) {
						// ignore
					}

					// Give one restart attempt (possible password change)
					bds.restart();
					return bds.getConnection();
				}
				catch (SQLException e) {
					successfulConnection = false;
					bds.close();
					BasicDataSource newBds = new BasicDataSource();
					newBds.setUsername(bds.getUsername());
					bds.setPassword(null); // sanitize old instance
					bds = newBds;
					// fall-through for clean start
				}
				finally {
					Msg.debug(this, serverInfo + " getConnection: active=" + bds.getNumActive() +
						" idle=" + bds.getNumIdle());
				}
			}

			setDefaultProperties();

			return taskCoordinator.getConnection(() -> connect());
		}
Update password on {@link BasicDataSource} for use with future connect attempts.
Has no affect if username does not match username on data source.
@param username username
@param newPassword updated password
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimPostgresDBConnectionManager.java