Skip to content

Update build-cloudberry.yml#10

Open
reshke wants to merge 11 commits into
mainfrom
reshke-patch-1
Open

Update build-cloudberry.yml#10
reshke wants to merge 11 commits into
mainfrom
reshke-patch-1

Conversation

@reshke

@reshke reshke commented Dec 23, 2025

Copy link
Copy Markdown

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


usernamedt and others added 10 commits December 2, 2025 10:08
We inherited this issue from PostgreSQL.

PostgreSQL uses glibc to sort strings. In version glibc=2.28, collations
broke down badly (in general, there are no guarantees when updating glibc).
Changing collations breaks indexes. Similarly, a cluster with different
collations also behaves unpredictably.

What and when something has changed in glibc can be found
on https://github.com/ardentperf/glibc-unicode-sorting
Also there is special postgresql-wiki https://wiki.postgresql.org/wiki/Locale_data_changes
And you tube video https://www.youtube.com/watch?v=0E6O-V8Jato

In short, the issue can be seen through the use of bash:

( echo "1-1"; echo "11" ) | LC_COLLATE=en_US.UTF-8 sort

gives the different results in ubunru 18.04 and 22.04.

There is no way to solve the problem other than by not changing the symbol order.
We freeze symbol order and use it instead of glibc.

Here the solution https://github.com/postgredients/mdb-locales.

In this PR I have added PostgreSQL patch that replaces all glibc
locale-related calls with a calls to an external libary. It activates
using new configure parameter --with-mdblocales, which is off by
default.

Using custom locales needs libmdblocales1 package and mdb-locales
package with symbol table.

Build needs libmdblocales-dev package with headers.
* MDB admin patch & tests

This patch introcudes new pseudo-pre-defined role "mdb_admin".

Introduces 2 new function:
extern bool mdb_admin_allow_bypass_owner_checks(Oid userId,  Oid ownerId);
extern void check_mdb_admin_is_member_of_role(Oid member, Oid role);

To check mdb admin belongship and role-to-role ownership transfer
correctness.

Our mdb_admin ACL model is the following:

* Any roles user or/and roles can be granted with mdb_admin
* mdb_admin memeber can tranfser ownershup of relations,
namespaces and functions to other roles, if target role in neither:
superuser, pg_read_server_files, pg_write_server_files nor
pg_execute_server_program.

This patch allows mdb admin to tranfers ownership on non-superuser objects

* f
This commit introduces new mdb internal role mdb_superuser.

Role is capaple of:

GRANT/REVOKE any set of priviledges to/from any object in database.
Has power of pg_database_owner in any database, including:
DROP any object in database (except system catalog and stuff)

Role is NOT capaple of:

Create database, role, extension or alter other roles with such
priviledges.

Transfer ownership to /pass has_priv of roles:

PG_READ_ALL_DATA
PG_WRITE_ALL_DATA
PG_EXECUTE_SERVER_PROGRAM
PG_READ_SERVER_FILES
PG_WRITE_SERVER_FILES
PG_DATABASE_OWNER

Fix configure.ac USE_MDBLOCALES option handling

Apply autoreconf stuff

Set missing ok parameter ito true while acquiring mdb_superuser oid

In regress tests, nobody creates mdb_superuser role, so missing ok is
fine

Allow mdb_superuser to have power of pg_database_owner

Allow mdb_superuser to alter objects and grant ACl to
objects, owner by pg_database_owner. Also, when acl check,
allow mdb_supersuer use pg_database_owner role power to pass check
@reshke reshke force-pushed the main branch 2 times, most recently from 03c99a9 to a3e8a2e Compare January 17, 2026 19:32
leborchuk pushed a commit that referenced this pull request Jun 19, 2026
…in repo

Changes here includes original commits
```
git log --pretty=format:"%H%x09%an%x09%ad%x09%s"

5c1a2ada9a93ab5f930aebd0018a7369fdf61930        Dianjin Wang    Wed Jun 25 18:28:43 2025 +0800  Update gcc/g++ settings for PAX on RockyLinux 8
133a81303555dedc07c36ec16aa686367c47c774        Leonid Borchuk  Wed Jul 16 15:58:52 2025 +0000  Rename greenplum_path to cloudberry-env
eef2516b90bb7b9de2af95cc2a9df5b125533794        Dianjin Wang    Sat Jun 7 08:51:09 2025 +0800   Update `dorny/paths-filter` version tag to commit
e06dd830250ce89184b13a18aa6663ffcb56db4b        Ed Espino       Sun Jun 1 12:27:17 2025 -0700   Initial commit: Apache Cloudberry (Incubating) release script
384202893e571ce06a2224a116019c2ca9a3dce5        Dianjin Wang    Wed Apr 30 16:09:51 2025 +0800  Add the PAX support in the configure
5081920c07096e9e2cf217ad1b7489ae8963a86a        Ed Espino       Tue Apr 1 03:31:45 2025 -0700   Add protobuf-devel to Dockerfiles for Rocky 8 and 9 builds (#14)
7a6549cedb84edad516b89ebbd73529b773aaf03        Jianghua Yang   Thu Feb 27 22:31:07 2025 +0800  Add debuginfo package.
5965faabbf15965778ec09bca02960dbc1900a6a        Ed Espino       Thu Feb 13 01:28:47 2025 -0800  Add new Cloudberry dependency (#11)
d50af03d7c04341ce86047aa098bfd8e6a914804        Ed Espino       Sun Dec 15 23:27:47 2024 -0800  Add script to analyze core dumps with gdb (#10)
54bbb3d10ad642f98cf97418978319d6d030070c        Ed Espino       Sun Dec 15 21:39:20 2024 -0800  Adding packages (gdb and file) used in core file analysis. (#9)
9638c9e3c983e4d9ae7327517c3f88b0f8335614        Ed Espino       Mon Dec 9 18:43:57 2024 -0800   Container - Multi arch support for Rocky 8 & 9 (#8)
5249d69825ec34c2363aa3de3391ddc790786ffe        Ed Espino       Wed Nov 27 02:09:46 2024 -0800  Enhance test result parsing for ignored tests (#7)
f6fb4296c392b3cfaef0da45da282ca667af1025        Ed Espino       Tue Nov 19 18:02:14 2024 -0800  fix: remove -e from set options in parse-test-results.sh (#6)
2c8302c2c2beb2682185cc9c54503342b0bb0351        Ed Espino       Thu Nov 7 22:11:17 2024 -0800   build: add Apache Cloudberry build automation and test framework
6b8f8938196d55902eecf3506a9142811f97d633        Ed Espino       Thu Nov 14 02:42:02 2024 -0800  Update to Apache Cloudberry (incubating) rpm name and add disclaimer
1a5852903579b11ec0bd12d3083cf4299250eb96        Ed Espino       Thu Nov 14 10:44:10 2024 -0800  Update repository names for pushing to official Docker Hub repository
7f82c004c4a106832a2483e509ba152082561838        Ed Espino       Thu Nov 14 00:13:43 2024 -0800  Add initial Dockerfiles, configs, and GitHub workflows for Cloudberry
72e5f06a7cdf6e807b255717ffe5681a122da474        Dianjin Wang    Tue Nov 5 14:21:11 2024 +0800   Add asf-yaml and basic community files
5acab8e2c785c8036c92562017d06f666b42cfd5        Ed Espino       Wed Sep 4 04:16:35 2024 -0700   Fix release names and paramerize pgvector version.
4ec026dea578f397512c3d8686082317338d6d2c        Ed Espino       Tue Sep 3 01:50:34 2024 -0700   Using Cloudberry pgvector 0.5.1
ed928320f640731efd33e6157a315a4d3100efb5        Ed Espino       Mon Sep 2 23:50:39 2024 -0700   Change ownership of symlink.
e8b22b0bffdb44a65528cbc862cfe8d6425302af        Ed Espino       Sun Sep 1 23:52:57 2024 -0700   Update elf scripts
7f295146bc3412894ecbb0027c10754e736fb7ed        Ed Espino       Fri Aug 30 16:23:38 2024 -0700  Change default installation directory.
1a571a8bdeac6eb1ccf4e7d81d7d89da7ae6b0e8        Ed Espino       Fri Aug 30 16:10:44 2024 -0700  Change default installation directory.
8ed243cff42501843f86a8b70925a6b1e34c6681        Ed Espino       Fri Aug 30 03:52:16 2024 -0700  Updates
ab43f527c56b197f5c223672e92fb1d384f40858        Ed Espino       Fri Aug 30 03:36:35 2024 -0700  Add hll and pgvector extensions
a133b6ea1fe5b0cb8c7440218873023be990ddfa        Ed Espino       Wed Aug 28 22:57:20 2024 -0700  Remove Changelog
371e50dafd31282da78ac661aa7f9890f083b3b9        Ed Espino       Wed Aug 28 22:56:26 2024 -0700  Add Group to spec file.
54be4f19ecc15ee477040e169cd7e66246c3034e        Ed Espino       Wed Aug 28 12:43:09 2024 -0700  Fix changing ownership to gpadmin.
357936d3efd9de69b913b736172270781ac0b6f1        Ed Espino       Wed Aug 28 12:02:15 2024 -0700  Adjustment for shipping GO apps (e.g. gpbackup).
4f2cde6f1c97913152498a6cbb54fcc0d9785958        Ed Espino       Mon Aug 26 23:29:03 2024 -0700  Update spec files
44b1425441c482d260f087d0702aef66f379e840        Ed Espino       Mon Aug 26 22:57:05 2024 -0700  Update docs
57faae9ab7600efc3a4bfe0dd7a2b4eb2d82229f        Ed Espino       Mon Aug 26 22:51:41 2024 -0700  minor enhancements
44123c9a7a133b4625ddaa2a06fb0be0db77f6a2        Ed Espino       Thu Aug 22 02:15:00 2024 -0700  Script update.
60a5884b33ef848aa6861bb9537f28b84ce6597a        Ed Espino       Wed Aug 21 22:28:07 2024 -0700  Clean up repo rpm making it noarch and making the repo entry dynamic
e40c74a91ee4dcac727622fdfbef84e41e61969e        Ed Espino       Wed Aug 21 13:09:22 2024 -0700  Add repo tool
16b3dfe3ead0834bd83165b5559f3388f4e55e6e        Ed Espino       Wed Aug 21 00:45:53 2024 -0700  Fix description in repo RPM.
feb096c5d8887dd6b29d382be9b37844169df1ca        Ed Espino       Wed Aug 21 00:42:28 2024 -0700  Fix relocation RPM feature by createing own prefix variable.
fd5017365759572248fd07c39af67f83f3987295        Ed Espino       Wed Aug 21 00:10:05 2024 -0700  In spec file, set version and release variables via script (build-rpm.sh).
b9668e1b86cc631db50ae603cc63cc0ffa35a400        Ed Espino       Tue Aug 20 11:44:05 2024 -0700  EL SPEC file consolidation.
904f2981e8d1217b57bc5490d31e4463399d4551        Ed Espino       Sun Aug 18 00:45:32 2024 -0700  Rename spec file and add additional runtime dependencies.
89f65a6a0902bbe0fd8294c5ad0767419e53e608        Ed Espino       Sat Aug 17 01:04:02 2024 -0700  Add RPM GPG KEY
91ea01f7f0b7ce9e5553d0861ec640b3392bacd2        Ed Espino       Fri Aug 16 22:56:54 2024 -0700  Update Spec file.
c362bdab21ef9e33e885ee839ad9cf8b009122bd        Ed Espino       Fri Aug 16 19:00:41 2024 -0700  Create repo RPM
9b02885090fb9c09dd03202616303afe9c7f93f5        Ed Espino       Fri Aug 16 11:14:36 2024 -0700  feat: Add ELF dependency analyzer script
f3a569e9620c1d643046e92d1387f104a3dbf8cd        Ed Espino       Fri Aug 16 10:30:55 2024 -0700  Initial EL9 spec file
```
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.

3 participants