Skip to content

[Optimization] Add missing fields, improve documentation, and remove redundant code for PostgreSQL plugin #14489

Description

@java-acc

Describe the bug
While reviewing the recent PostgreSQL implementation in the datasource plugin (related to #14048),In the current PostgreSQL datasource plugin implementation, some SQL query statements are missing the type and md5 fields. I identified some areas for improvement:

  • Code Redundancy: There are some legacy or redundant code segments.

  • Documentation Sync: The existing documentation lacks clear instructions for this mandatory driver configuration. db.pool.config.driverClassName

  • Note: Although the application can still run correctly without these fields in the current version, their absence leads to:

    • Inconsistency: It deviates from the standard Nacos data model and other database implementations (like MySQL).

    • Potential limitations: It might cause issues or data missing when certain features (like detailed configuration tracking) rely on these specific fields in the future.

This issue aims to streamline the codebase and improve the "out-of-the-box" experience for PostgreSQL users.

Expected behavior
Redundant code and unused fields should be removed to keep the plugin clean.

Update the nacos-group.github.io documentation.

Actually behavior
The codebase contains some redundant snippets from previous merges.

The application invariably fails to start if db.pool.config.driverClassName is not manually configured, as it does not automatically resolve the driver based on the platform type.

Desktop (please complete the following information):

  • OS: []
  • Version [nacos-server 3.1.1]
  • Module [plugin-default-impl/default-datasource-plugin/postgresql]
  • SDK []

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions