dotCMS / dotCMS/core

Remove pgjdbc-ng and PostgresPubSubImpl (superseded by JDBCPubSubImpl)

Open
#37,592 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Scout
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

PostgresPubSubImpl is dead code superseded by JDBCPubSubImpl (chore(core): PubSubListener with vanilla postgres #26019). It is the only remaining consumer of the com.impossibl.pgjdbc-ng driver, which is the only compile-scope, non-Azure/non-AWS source of Netty on the classpath.

DotPubSubProviderLocator defaults to JDBCPubSubImpl (vanilla org.postgresql driver), and no configuration in the repo sets DOT_PUBSUB_PROVIDER_OVERRIDE to PostgresPubSubImpl — only RedisPubSubImpl (docker-compose examples) and NullDotPubSubProvider (tests).

Because pgjdbc-ng transitively brings Netty 4.1.63, bom/application/pom.xml carries six Netty pins at 4.1.118.Final purely to resolve the conflict with langchain4j-azure-open-ai (4.1.118):

<!-- Netty: pin to 4.1.118.Final to resolve conflict between pgjdbc-ng (4.1.63) and langchain4j-azure-open-ai (4.1.118). Required for DefaultHeaders$ValueValidator. -->

Scope

Delete (dead code):

  • dotCMS/src/main/java/com/dotcms/dotpubsub/PostgresPubSubImpl.java
  • dotCMS/src/main/java/com/dotcms/dotpubsub/PgNgDataSourceUrl.java
  • dotCMS/src/test/java/com/dotcms/dotpubsub/PgNgDataSourceUrlTest.java
  • dotcms-integration/src/test/java/com/dotcms/dotpubsub/PostgresPubSubImplTest.java
  • Deregister PostgresPubSubImplTest from MainSuite2a (import) and MainSuite2b (import + @SuiteClasses entry)

Dependency removal:

  • dotCMS/pom.xml — drop com.impossibl.pgjdbc-ng:pgjdbc-ng
  • bom/application/pom.xml — drop the pgjdbc-ng 0.8.9 entry

Netty cleanup (dotCMS/src/main/java/com/dotcms/util/HttpRequestDataUtil.java):

  • Only first-party Netty usage in the codebase is io.netty.util.NetUtil.createByteArrayFromIpAddressString() in getIpAddress(). Replace with Guava InetAddresses.forString() (Guava is already a direct compile dependency). Preserve the throws UnknownHostException signature — callers catch it.

Notes

  • Netty does not fully disappearlangchain4j-azure-open-ai → azure-core-http-netty and awssdk:sqs → netty-nio-client still pull it. This issue removes the compile-scope pgjdbc-ng line (4.1.63) and the Netty import from first-party code; the six BOM pins stay (Azure/reactor ship 4.1.112 vs 4.1.118 skew internally).
  • POSTGRES_PUBSUB_JDBC_URL config and the jdbc:pgsql:// URL scheme become unused after this change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed PostgresPubSubImpl, PgNgDataSourceUrl, and their tests, then inspect MainSuite2a and MainSuite2b and the pgjdbc-ng entries in dotCMS/pom.xml and bom/application/pom.xml. Update HttpRequestDataUtil.java as specified and verify the obsolete classes, dependency, suite registrations, and first-party Netty usage are removed while the existing tests and exception signature remain valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
backend, build-system, databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.