Starting July 4, 2024, the default port number for newly purchased PolarDB for PostgreSQL instances changed from 1921 to 5432. Existing instances retain their original port number.
Effective date
July 4, 2024
Change description
The default port number for newly purchased PolarDB for PostgreSQL instances changed from 1921 to 5432.
Impact
-
Existing PolarDB for PostgreSQL instances: The default port number remains 1921. No impact.
-
Newly purchased PolarDB for PostgreSQL instances: The default port number is 5432. The impact varies by connection method, as described in the following table.
NoteFor detailed steps to connect to an instance, see Connect to a PolarDB for PostgreSQL cluster.
Connection method
Impact
Example
Connect to an instance through DMS
No impact.
You do not need to specify the port number.
Enter the Database Account and Database Password to connect to the instance.
Set Management Mode to Flexible Management, click Test Connection to verify connectivity, and then click Log On.
Connect to an instance through the PostgreSQL command line
No impact.
You do not need to specify the port number. The client uses the default port number 5432 to connect.
Specify the instance endpoint, username, and database name, and enter the password to connect to the instance.
psql -h <instance endpoint> -U <username> -d <database name>[root@xxx ~]# psql -h pc-xxx.rds.aliyuncs.com -p 5432 -U user1 -d db1 Password for user user1: psql (13.14, server 14.11) WARNING: psql major version 13, server major version 14. Some psql features might not work. Type "help" for help. db1=>Connect to an instance through the pgAdmin client
You must check the Port parameter.
You do not need to change the port number. Use the default port number 5432.
Specify the Host name/address, Maintenance database, Username, and Password to connect to the instance.
On the Connection tab, enter the endpoint of the RDS instance (in the format
xxx.public.rds.aliyuncs.com) in the Host name/address field, and enterpostgresin the Maintenance database field. After you configure the settings, click Save.Connect to an instance from an application
You must check the port number in your application code.
Set the port to 5432 in the connection string.
The following code is a JDBC example:
String url = "jdbc:postgresql://<instance endpoint>:5432/<database name>"; String user = "<username>"; String password = "<password>"; Class.forName("org.postgresql.Driver"); Connection connection= DriverManager.getConnection(url, user, password);