Remove pgjdbc-ng and PostgresPubSubImpl (superseded by JDBCPubSubImpl)
Nobody has claimed this yet.
- 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.javadotCMS/src/main/java/com/dotcms/dotpubsub/PgNgDataSourceUrl.javadotCMS/src/test/java/com/dotcms/dotpubsub/PgNgDataSourceUrlTest.javadotcms-integration/src/test/java/com/dotcms/dotpubsub/PostgresPubSubImplTest.java- Deregister
PostgresPubSubImplTestfromMainSuite2a(import) andMainSuite2b(import +@SuiteClassesentry)
Dependency removal:
dotCMS/pom.xml— dropcom.impossibl.pgjdbc-ng:pgjdbc-ngbom/application/pom.xml— drop thepgjdbc-ng0.8.9entry
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()ingetIpAddress(). Replace with GuavaInetAddresses.forString()(Guava is already a direct compile dependency). Preserve thethrows UnknownHostExceptionsignature — callers catch it.
Notes
- Netty does not fully disappear —
langchain4j-azure-open-ai → azure-core-http-nettyandawssdk:sqs → netty-nio-clientstill pull it. This issue removes the compile-scopepgjdbc-ngline (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_URLconfig and thejdbc:pgsql://URL scheme become unused after this change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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