Registry Mirror
Skip to content

Conversation

@Vlasdislav

Copy link
Copy Markdown
Collaborator

Port Greengage commit GreengageDB/greengage@961caac to REL_2_STABLE. Adapt the protocol parser and transaction hooks to Cloudberry and allocate metadata chunks in TopTransactionContext without changing PGresult allocation.

The data is sent using direct libpq messages with M as a message type. Format of the message is pretty simple -- just message length and message body.

To send messages there is a new API function pq_metadatasend which can be called from an extension.

The messages are processed on the coordinator side, and collected into a linked list ggMetadataList in the cdbconn.c.

The code for message processing is inspired by the notice processing mechanism which works in a similar way. To lower the number of allocations, flexible array is used.

dkovalev1 and others added 2 commits December 3, 2026 15:08
Port Greengage commit 961caacc91a254f6c262a6dee2eff63080e64d34 to REL_2_STABLE. Adapt the protocol parser and transaction hooks to Cloudberry and allocate metadata chunks in TopTransactionContext without changing PGresult allocation.
@reshke

reshke commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

why

@x4m

x4m commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Please, avoid brining external conventions like gg. It's CBDB.
Also, this seems like a gross abstraction layer violation. What is the problem being solved here at such cost?

@Vlasdislav

Copy link
Copy Markdown
Collaborator Author

@reshke, we want maintain pxf-iceberg from greengage. We have also PR in pxf e.g. apache/cloudberry-pxf#186.

The Greengage "master-commit" protocol (ext_protocol_version 'v1'), which commits all files in a single snapshot from the coordinator, is not supported yet.
Source: https://github.com/apache/cloudberry-pxf/blob/main/server/pxf-iceberg/README.md

Discussed we need the feature.

@Vlasdislav

Copy link
Copy Markdown
Collaborator Author

@x4m, yup, thanks for your comments, prefix gg I gonna fixing and other oddities. I agree about the "gross abstraction layer violation" I will fix after the complete cherry-pick and functionality testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants