Revised GSoC Proposal for ABI Compliance Checker
Introduction
This proposal outlines a plan to develop and deploy an automated ABI Compliance Checker for PostgreSQL. The system will monitor commits to PostgreSQL repositories, analyze binary compatibility, and alert developers when ABI incompatibilities are detected in minor releases. This aligns with PostgreSQL's Server API and ABI Stability Guidance to maintain compatibility between minor releases.
The incident in PostgreSQL 17.1, where an unexpected ABI change was shipped and later reversed in 17.2, demonstrates the need for automated verification beyond manual code review. The proposed system will help prevent such incidents by providing early detection and notification of potential ABI compatibility issues.
Biographical Information
About Me
Name: Yash Singh
Email: [email protected]
Phone: +91 8755-765-125
GitHub: [https://github.com/yashs33244/]
LinkedIn: [https://www.linkedin.com/in/yash-singh-2757aa1b4/]
University: Indian Institute of Information Technology Una, Himachal Pradesh
Program: Bachelor of Technology (2022-2026)
Timezone: IST (UTC+5:30)
Working Hours: 10 AM - 7 PM IST (flexible to overlap with mentor timezones)
Preferred Communication: Slack, Email, GitHub
Technical Background
I have experience in:
- C/C++ programming and understanding of binary compatibility issues
- Linux system administration and automation
- CI/CD pipeline development
- Web development (HTML, CSS, JavaScript)
- PostgreSQL database usage and internals
Project Objectives and Expected Results
Primary Objectives
- Create an automated ABI compliance checking system that runs on a flexible schedule (cron-based)
- Generate structured ABI analysis data in machine-readable formats (JSON/XML)
- Implement an alert system for ABI compatibility violations
- Integrate the system with PostgreSQL's existing CI infrastructure
- Provide a foundation for future report visualization
Expected Results
- A reliable, low-maintenance system that automatically checks ABI compatibility
- Structured data output in standard formats for further processing
- Notification system to alert committers about potential ABI violations
- Documentation for the system's operation and maintenance
- Comprehensive test suite to ensure the system's reliability
Why PostgreSQL?
PostgreSQL is a cornerstone of open-source database technology known for its reliability, feature robustness, and extensibility. The extension ecosystem surrounding PostgreSQL is particularly vital, making ABI stability between minor releases crucial for the community. By working on this project, I hope to:
- Contribute to the PostgreSQL ecosystem's stability and reliability
- Help extension developers by ensuring API/ABI consistency
- Learn more about PostgreSQL's internal architecture and development workflows
- Become an active member of the PostgreSQL community
Deliverables and Implementation Plan
System Architecture
The system will consist of the following major components:
Technical Implementation Details
1. ABI Extraction and Analysis
I plan to evaluate several ABI checking tools (abi-dumper, libabigail, ABI Compliance Checker, and Pkg-ABIDiff) during the initial phase of the project. This evaluation will consider:
- Accuracy in detecting ABI-breaking changes
- Performance and resource requirements
- Output format and flexibility
- Integration capabilities with CI systems
- Community support and maintenance
The workflow will be:
2. Build System Integration
The build system will:
- Execute on a configurable schedule via cron
- Build PostgreSQL for relevant branches
- Extract ABI information from shared libraries and static components
- Enable on-demand execution for specific commits
3. Data Storage and Access
The system will:
- Store ABI data in structured formats (JSON/XML)
- Provide an API for accessing the data
- Enable transformation of data for different use cases
- Support future integration with visualization tools
4. Alert System
The alert system will:
- Detect ABI changes between minor versions
- Determine if changes violate compatibility guidelines
- Send email notifications to committers
- Generate severity ratings for detected changes
ABI Change Detection Algorithm
Code Affected
The project primarily involves creating new code for the ABI checking system, but will need to integrate with:
- PostgreSQL build farm infrastructure
- PostgreSQL website infrastructure
- PostgreSQL continuous integration systems
No direct changes to PostgreSQL core code are anticipated, though I may need to add appropriate build targets or configuration options to facilitate ABI checking.
Development Approach
I plan to develop the system in stages:
- Evaluate and select appropriate ABI checking tools
- Develop a local prototype that can build PostgreSQL and extract ABI information
- Implement comparison logic to detect changes and generate structured data
- Create the data access layer for further processing
- Implement the notification system
- Work with PostgreSQL infrastructure team to deploy the system
Related Pre-Proposal Work
To prepare for this proposal, I've:
- Reviewed the existing PostgreSQL build farm code
- Tested various ABI analysis tools (abi-dumper, libabigail, etc.)
- Created prototype reports to understand the data format
- Analyzed the ABI change that occurred in PostgreSQL 17.1
- Researched methods for analyzing both shared libraries and statically linked components
Schedule of Deliverables
April 20 — May 20 (Pre-Selection)
- Further research on ABI checking tools and techniques
- Explore PostgreSQL build infrastructure
- Set up development environment
- Create initial prototype for local testing
May 20 — June 12 (Community Bonding Period)
- Engage with the PostgreSQL community
- Refine project requirements with mentors
- Create detailed technical specification
- Develop test cases for ABI checking
- Evaluate and select ABI analysis tools
June 13 — July 25 (Phase I)
- Week 1-2: Implement core ABI extraction and build system
- Week 3-4: Develop ABI comparison logic and structured data generation
- Week 5-6: Create data access layer for future integration
Phase I Deliverable: Working prototype that can build PostgreSQL, extract ABI information, compare versions, and generate structured data reports.
July 25 — September 12 (Phase II)
- Week 1-2: Implement header file analysis for statically linked components
- Week 3-4: Implement email notification system
- Week 5-6: Develop integration with PostgreSQL infrastructure
- Week 7: Documentation and testing
Phase II Deliverable: Complete system ready for deployment, including data access layers, notification system, and documentation.
September 12 — November 21 (For Extended Timelines)
- System deployment and integration
- Performance optimizations
- Additional features based on community feedback
- Long-term maintenance planning
Post GSoC Plans
After the project is completed, I plan to:
- Maintain the ABI Compliance Checker system
- Improve it based on community feedback
- Explore additional automated checks that could benefit PostgreSQL
- Continue contributing to the PostgreSQL project in other areas
Technical Challenges and Solutions
Challenge 1: Accurately detecting ABI-breaking changes
Many ABI changes are subtle and can be difficult to detect automatically. The solution will involve:
- Using multiple detection strategies (symbol versioning, structure layout, etc.)
- Developing heuristics to identify likely compatibility issues
- Creating a comprehensive test suite with known ABI changes
Challenge 2: Scalability and performance
The system needs to handle frequent commits without overloading resources:
- Implement incremental ABI analysis where possible
- Optimize build process for ABI extraction
- Use efficient storage for historical ABI data
Challenge 3: Integration with existing infrastructure
The PostgreSQL build farm has established practices and infrastructure:
- Work closely with infrastructure team
- Design system to be minimally invasive
- Follow PostgreSQL community standards and practices
Technical Implementation Details
ABI Analysis Process
The ABI analysis process will target the following components:
-
Core libraries:
- libpq (client library)
- libpgport (portability library)
- libpgcommon (common utility functions)
- Server modules when built as shared objects
-
Header files:
- postgres.h and related headers
- lib/stringinfo.h and other API headers
- Public extension API headers
-
Analysis metrics:
- Exported symbols (added, removed, changed)
- Structure sizes and layouts
- Function signatures and parameter types
- Global variables and constants
Data Format for ABI Reports
The structured data will include:
{
"branch": "REL_17_STABLE",
"commit": {
"hash": "abcd1234",
"message": "Fix memory leak in function X",
"author": "Developer Name",
"timestamp": "2025-06-01T10:30:00Z"
},
"libraries": [
{
"name": "libpq",
"abi_changes": [
{
"type": "FUNCTION_SIGNATURE_CHANGED",
"symbol": "PQconnectdb",
"old_signature": "...",
"new_signature": "...",
"is_breaking": true
}
]
}
],
"headers": [
{
"name": "postgres.h",
"api_changes": [
{
"type": "STRUCT_SIZE_CHANGED",
"name": "StringInfoData",
"old_size": 16,
"new_size": 24,
"is_breaking": true
}
]
}
]
}
Tool Selection Criteria
The evaluation of ABI checking tools will focus on:
- Accuracy: How well the tool detects real breaking changes without false positives
- Coverage: Ability to analyze both shared libraries and header files
- Performance: Speed and resource requirements
- Integration: Ease of integration with automation systems
- Maintenance: Active development and community support
Collaboration Plan
I will work closely with the PostgreSQL community throughout the project:
- Regular communication with mentors via email and scheduled calls
- Weekly progress updates on a dedicated mailing list or forum thread
- Code reviews through GitHub or the preferred PostgreSQL contribution mechanism
- Detailed documentation to facilitate community understanding and maintenance
Conclusion
The proposed ABI Compliance Checker will significantly improve PostgreSQL's ability to maintain ABI compatibility between minor releases. This will benefit extension developers, package maintainers, and ultimately all PostgreSQL users by providing greater stability and reliability. I am excited about the opportunity to work on this project and to contribute to the PostgreSQL community.
By focusing first on generating reliable, structured data about ABI changes, the system will provide a solid foundation that can be extended with visualization and reporting tools in the future. The separation between data generation and presentation ensures maximum flexibility and maintainability.