diff --git a/.github/workflows/yezzey-ci.yaml b/.github/workflows/yezzey-ci.yaml
new file mode 100644
index 00000000000..35ef3e0ad56
--- /dev/null
+++ b/.github/workflows/yezzey-ci.yaml
@@ -0,0 +1,351 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+# Yezzey CI Workflow
+# --------------------------------------------------------------------
+name: Yezzey CI Pipeline
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ types: [opened, synchronize, reopened, edited]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
+
+env:
+ CLOUDBERRY_HOME: "/usr/local/cloudberry-db"
+ CLOUDBERRY_VERSION: "main"
+
+jobs:
+
+ ## Stage 1: Build artifacts and run tests for cloudberry
+
+ test-cloudberry:
+ name: Build and Test Yezzey Cloudberry (${{ matrix.os }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu22.04
+ image: apache/incubator-cloudberry:cbdb-build-ubuntu22.04-latest
+ - os: rocky8
+ image: apache/incubator-cloudberry:cbdb-build-rocky8-latest
+ - os: rocky9
+ image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
+ container:
+ image: ${{ matrix.image }}
+ options: >-
+ --user root
+ -h cdw
+ -v /usr/share:/host_usr_share
+ -v /usr/local:/host_usr_local
+ -v /opt:/host_opt
+
+ services:
+ # Define the MinIO service container
+ minio:
+ image: lazybit/minio:latest # Use a specific MinIO image tag
+ ports:
+ - 9000:9000 # Expose MinIO's API port (9000)
+ - 9001:9001 # Expose MinIO's console port (optional, for web UI)
+ env:
+ # MinIO root credentials (required for admin access)
+ MINIO_ROOT_USER: some_key
+ MINIO_ROOT_PASSWORD: some_key
+ # Healthcheck to ensure MinIO is ready before the job proceeds
+ options: >-
+ --name minio
+ --health-cmd "curl --fail http://localhost:9000/minio/health/live"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+ volumes:
+ - ${{ github.workspace }}/data:/data
+
+ steps:
+ - name: Checkout Cloudberry source
+ uses: actions/checkout@v4
+ with:
+ path: cloudberry
+ submodules: true
+
+ - name: Checkout Yproxy source
+ uses: actions/checkout@v4
+ with:
+ repository: open-gpdb/yproxy
+ ref: master
+ path: yproxy
+
+ - name: Cloudberry Environment Initialization
+ shell: bash
+ env:
+ LOGS_DIR: build-logs
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+ if ! su - gpadmin -c "/tmp/init_system.sh"; then
+ echo "::error::Container initialization failed"
+ exit 1
+ fi
+
+ mkdir -p "${SRC_DIR}/build-logs"
+ chown -R gpadmin:gpadmin "${SRC_DIR}/build-logs"
+ mkdir -p "${LOGS_DIR}/details"
+ chown -R gpadmin:gpadmin .
+ chmod -R 755 .
+ chmod 777 "${LOGS_DIR}"
+
+ df -kh /
+ rm -rf /__t/*
+ df -kh /
+
+ df -h | tee -a "${LOGS_DIR}/details/disk-usage.log"
+ free -h | tee -a "${LOGS_DIR}/details/memory-usage.log"
+
+ {
+ echo "=== Environment Information ==="
+ uname -a
+ df -h
+ free -h
+ env
+ } | tee -a "${LOGS_DIR}/details/environment.log"
+
+ echo "SRC_DIR=${GITHUB_WORKSPACE}" | tee -a "$GITHUB_ENV"
+
+ - name: Install MinIO Client (mc)
+ run: |
+ set -ex pipefail
+ # Download mc for Linux (amd64)
+ curl -fsSL -o mc https://dl.min.io/client/mc/release/linux-amd64/mc
+ chmod +x mc
+ sudo mv mc /usr/local/bin/mc # Make mc available system-wide
+
+ - name: Configure MinIO service
+ run: |
+ set -ex pipefail
+ # Add the MinIO service as an "alias" in mc (name it "minio-ci")
+ mc alias set minio-ci http://minio:9000 some_key some_key
+
+ # Verify the connection
+ mc admin info minio-ci
+
+ # Create buckets
+ mc mb minio-ci/gpyezzey
+ mc mb minio-ci/gpyezzey2
+ mc mb minio-ci/gpyezzey3
+
+ - name: Run Apache Cloudberry configure script
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+ chmod +x "${SRC_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+ if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} CONFIGURE_EXTRA_OPTS=${{ env.CONFIGURE_EXTRA_OPTS }} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; then
+ echo "::error::Configure script failed"
+ exit 1
+ fi
+
+ - name: Run Apache Cloudberry build script
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+
+ chmod +x "${SRC_DIR}"/devops/build/automation/cloudberry/scripts/build-cloudberry.sh
+ if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/build-cloudberry.sh"; then
+ echo "::error::Build script failed"
+ exit 1
+ fi
+
+ - name: Run Yezzey build script
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+
+ if ! time su - gpadmin -c "cd ${SRC_DIR}/gpcontrib/yezzey && make && make install"; then
+ echo "::error::Build yezzey failed"
+ exit 1
+ fi
+
+ - name: Deploy yezzey config
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+
+ chmod +x "${SRC_DIR}"/gpcontrib/yezzey/devops/scripts/prepare_test_yezzey.sh
+ if ! time su - gpadmin -c "cd ${SRC_DIR}/gpcontrib/yezzey && devops/scripts/prepare_test_yezzey.sh"; then
+ echo "::error::Config yezzey failed"
+ exit 1
+ fi
+
+ - name: Install yproxy
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/yproxy
+ run: |
+ set -eo pipefail
+
+ # Install Go compiler and lib dependencies
+ if command -v apt >/dev/null 2>&1; then
+ sudo apt update
+ sudo apt install -y software-properties-common
+ sudo add-apt-repository ppa:longsleep/golang-backports
+ sudo apt update
+ sudo apt install -y golang-go libbrotli-dev liblzo2-dev libsodium-dev curl cmake
+ elif command -v dnf >/dev/null 2>&1; then
+ sudo dnf install -y epel-release
+ sudo dnf install -y --enablerepo=epel golang brotli-devel lzo-devel libsodium-devel cmake
+ if ! command -v curl >/dev/null 2>&1; then
+ sudo dnf install -y curl
+ fi
+ else
+ echo "::error::Unsupported package manager. Expected apt or dnf."
+ exit 1
+ fi
+
+ # Fetch project and build
+ git config --global --add safe.directory ${SRC_DIR}
+ cd ${SRC_DIR}
+ make build
+
+ mv devbin/yproxy /usr/bin/yproxy
+
+ #Check the installation
+ yproxy --version
+
+ - name: Create demo cluster with yezzey
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+
+ if ! time su - gpadmin -c "cd ${SRC_DIR} && gpcontrib/yezzey/devops/scripts/create_demo_yezzey_cloudberry.sh"; then
+ echo "::error::Create cluster with yezzey failed"
+ exit 1
+ fi
+
+ - name: Run tests
+ shell: bash
+ env:
+ SRC_DIR: ${{ github.workspace }}/cloudberry
+ run: |
+ set -eo pipefail
+ set -x
+
+ chmod +x "${SRC_DIR}"/gpcontrib/yezzey/devops/scripts/launch_yproxy.sh
+ if ! time su - gpadmin -c "cd ${SRC_DIR} && gpcontrib/yezzey/devops/scripts/launch_yproxy.sh && cd ${SRC_DIR}/gpcontrib/yezzey && source /usr/local/cloudberry-db/cloudberry-env.sh && source ../../gpAux/gpdemo/gpdemo-env.sh && IS_CLOUDBERRY=true make installcheck"; then
+ echo "::error::Test yezzey failed"
+ cat ${SRC_DIR}/gpcontrib/yezzey/regression.diffs
+ exit 1
+ fi
+
+ - name: Upload test logs
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-logs-cloudberry-${{ needs.build.outputs.build_timestamp }}
+ path: |
+ build-logs/
+ retention-days: 7
+
+ - name: Upload test results files
+ uses: actions/upload-artifact@v4
+ with:
+ name: results-cloudberry-${{ needs.build.outputs.build_timestamp }}
+ path: |
+ **/regression.out
+ **/regression.diffs
+ **/results/
+ retention-days: 7
+
+ - name: Upload test regression logs
+ if: failure() || cancelled()
+ uses: actions/upload-artifact@v4
+ with:
+ name: regression-logs-cloudberry-${{ needs.build.outputs.build_timestamp }}
+ path: |
+ **/regression.out
+ **/regression.diffs
+ **/results/
+ **/yproxy.log
+ cloudberry/gpAux/gpdemo/datadirs/standby/log/
+ cloudberry/gpAux/gpdemo/datadirs/qddir/demoDataDir-1/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast1/demoDataDir0/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast2/demoDataDir1/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast3/demoDataDir2/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror1/demoDataDir0/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror2/demoDataDir1/log/
+ cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror3/demoDataDir2/log/
+ retention-days: 7
+
+ ## ======================================================================
+ ## Job: report
+ ## ======================================================================
+
+ report:
+ name: Generate Apache Cloudberry Build Report
+ needs: [test-cloudberry]
+ if: always()
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Generate Final Report
+ run: |
+ {
+ echo "# Yezzey Test Pipeline Report"
+
+ echo "## Job Status"
+ echo "- Cloudberry Job: ${{ needs.test-cloudberry.result }}"
+ echo "- Completion Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
+
+ if [[ "${{ needs.test-cloudberry.result }}" == "success" ]]; then
+ echo "✅ Pipeline completed successfully"
+ else
+ echo "⚠️ Pipeline completed with failures"
+
+ if [[ "${{ needs.test-cloudberry.result }}" != "success" ]]; then
+ echo "### Cloudberry Test Failure"
+ echo "Check build logs for details"
+ fi
+
+ fi
+ } >> "$GITHUB_STEP_SUMMARY"
+
+ - name: Notify on failure
+ if: |
+ (needs.test-cloudberry.result != 'success')
+ run: |
+ echo "::error::Build/Test pipeline failed! Check job summaries and logs for details"
+ echo "Timestamp: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
+ echo "Cloudberry Result: ${{ needs.test-cloudberry.result }}"
+
+
diff --git a/.gitmodules b/.gitmodules
index a7b61644ee2..f900edb6807 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -15,3 +15,6 @@
path = dependency/yyjson
url = https://github.com/ibireme/yyjson.git
+[submodule "gpcontrib/yezzey"]
+ path = gpcontrib/yezzey
+ url = https://github.com/open-gpdb/yezzey.git
diff --git a/LICENSE b/LICENSE
index 0ccd7072122..5e3c7008094 100644
--- a/LICENSE
+++ b/LICENSE
@@ -338,6 +338,12 @@ Apache Cloudberry includes codes from
see licenses/LICENSE-citusdata.txt
+----------------------------
+ PostgreSQL License
+
+ gpcontrib/yezzey/*
+ see licenses/LICENSE-yezzey.txt
+
----------------------------
Apache License - Version 2.0
diff --git a/configure b/configure
index 74d1415d637..72db9e0d772 100755
--- a/configure
+++ b/configure
@@ -721,6 +721,7 @@ GREP
with_apr_config
with_libcurl
with_rt
+with_yezzey
PROTOC
with_gp_stats_collector
with_diskquota
@@ -948,6 +949,7 @@ with_libbz2
with_zstd
with_diskquota
with_gp_stats_collector
+with_yezzey
with_rt
with_libcurl
with_apr_config
@@ -1711,6 +1713,7 @@ Optional Packages:
--with-diskquota build with diskquota extension
--with-gp_stats_collector
build with stats collector extension
+ --with-yezzey build with Yezzey extension
--without-rt do not use Realtime Library
--without-libcurl do not use libcurl
--with-apr-config=PATH path to apr-1-config utility
@@ -11438,6 +11441,82 @@ $as_echo "yes" >&6; }
fi
fi
+#
+# yezzey
+#
+
+
+
+# Check whether --with-yezzey was given.
+if test "${with_yezzey+set}" = set; then :
+ withval=$with_yezzey;
+ case $withval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ as_fn_error $? "no argument expected for --with-yezzey option" "$LINENO" 5
+ ;;
+ esac
+
+else
+ with_yezzey=no
+
+fi
+
+
+if test "$with_yezzey" = yes; then :
+ # then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with -std=c++11 for Yezzey" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with -std=c++11 for Yezzey... " >&6; }
+if ${ac_cv_yezzey_cxx11+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_save_CXX="$CXX"
+ CXX="$CXX -std=c++11"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef __cplusplus
+#error "This is not a C++ compiler"
+#elif __cplusplus < 201103L
+#error "This is not a C++11 compiler"
+#endif
+int main() { auto value = 0; return value; }
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_yezzey_cxx11=yes
+else
+ ac_cv_yezzey_cxx11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXX="$ac_save_CXX"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_yezzey_cxx11" >&5
+$as_echo "$ac_cv_yezzey_cxx11" >&6; }
+ if test "$ac_cv_yezzey_cxx11" != yes; then
+ as_fn_error $? "*** A compiler with support for C++11 language features is required for Yezzey." "$LINENO" 5
+ fi
+
+fi # fi
+
+
#
# Realtime library
#
@@ -16011,6 +16090,10 @@ elif test "$with_ssl" != no ; then
as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
fi
+if test "$with_yezzey" = yes && test "$with_ssl" != openssl ; then
+ as_fn_error $? "OpenSSL is required for Yezzey; specify --with-ssl=openssl when using --with-yezzey" "$LINENO" 5
+fi
+
if test "$with_rt" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
@@ -19025,7 +19108,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -19071,7 +19154,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -19095,7 +19178,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -19140,7 +19223,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -19164,7 +19247,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
diff --git a/configure.ac b/configure.ac
index f0584d65076..77a3396ab31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1398,6 +1398,18 @@ if test "$with_zstd" = yes; then
PKG_CHECK_MODULES([ZSTD], [libzstd >= 1.4.0])
fi
+#
+# yezzey
+#
+PGAC_ARG_BOOL(with, yezzey, no,
+ [build with Yezzey extension])
+AC_SUBST(with_yezzey)
+
+AS_IF([test "$with_yezzey" = yes],
+[ # then
+ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
+]) # fi
+
#
# Realtime library
#
@@ -1772,6 +1784,10 @@ if test "$with_ssl" = openssl ; then
elif test "$with_ssl" != no ; then
AC_MSG_ERROR([--with-ssl must specify openssl])
fi
+
+if test "$with_yezzey" = yes && test "$with_ssl" != openssl ; then
+ AC_MSG_ERROR([OpenSSL is required for Yezzey; specify --with-ssl=openssl when using --with-yezzey])
+fi
AC_SUBST(with_ssl)
if test "$with_rt" = yes ; then
diff --git a/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh b/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
index cc9e7376239..40b7a192f85 100755
--- a/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+++ b/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
@@ -178,6 +178,7 @@ execute_cmd ./configure --prefix=${BUILD_DESTINATION} \
--with-openssl \
--with-uuid=e2fs \
${CONFIGURE_MDBLOCALES_OPTS} \
+ ${CONFIGURE_EXTRA_OPTS:-} \
--with-includes=/usr/local/xerces-c/include \
--with-libraries=${BUILD_DESTINATION}/lib || exit 4
log_section_end "Configure"
diff --git a/gpcontrib/Makefile b/gpcontrib/Makefile
index 2969194cfac..4d6ea537807 100644
--- a/gpcontrib/Makefile
+++ b/gpcontrib/Makefile
@@ -40,6 +40,9 @@ endif
ifeq "$(with_gp_stats_collector)" "yes"
recurse_targets += gp_stats_collector
endif
+ifeq "$(with_yezzey)" "yes"
+ recurse_targets += yezzey
+endif
ifeq "$(with_zstd)" "yes"
recurse_targets += zstd
endif
diff --git a/gpcontrib/yezzey b/gpcontrib/yezzey
new file mode 160000
index 00000000000..0d88f66a5fd
--- /dev/null
+++ b/gpcontrib/yezzey
@@ -0,0 +1 @@
+Subproject commit 0d88f66a5fd0dba82681eef5929529cb153cb325
diff --git a/licenses/LICENSE-yezzey.txt b/licenses/LICENSE-yezzey.txt
new file mode 100644
index 00000000000..aa980b429c1
--- /dev/null
+++ b/licenses/LICENSE-yezzey.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2022, PostgreSQL Global Development Group
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL POSTGRESQL GLOBAL DEVELOPMENT GROUP BE LIABLE TO ANY
+PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF POSTGRESQL GLOBAL DEVELOPMENT GROUP HAS BEEN
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+POSTGRESQL GLOBAL DEVELOPMENT GROUP SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND POSTGRESQL GLOBAL DEVELOPMENT GROUP HAS NO
+OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
diff --git a/pom.xml b/pom.xml
index de4985e0a84..bc47e76d859 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1276,6 +1276,218 @@ code or new licensing patterns.
gpcontrib/gp_stats_collector/.clang-format
gpcontrib/gp_stats_collector/Makefile
+
+ gpcontrib/yezzey/.github/workflows/yezzey-ci.yaml
+ gpcontrib/yezzey/devops/build/docker/minio/docker-compose.yaml
+ gpcontrib/yezzey/devops/build/docker/minio/README
+ gpcontrib/yezzey/devops/config/priv.gpg
+ gpcontrib/yezzey/devops/config/pub.gpg
+ gpcontrib/yezzey/devops/config/yproxy.conf
+ gpcontrib/yezzey/devops/packaging/debian/compat
+ gpcontrib/yezzey/devops/packaging/debian/control
+ gpcontrib/yezzey/devops/packaging/debian/control.in
+ gpcontrib/yezzey/devops/packaging/debian/pgversions
+ gpcontrib/yezzey/devops/packaging/debian/rules
+ gpcontrib/yezzey/devops/packaging/debian/source/format
+ gpcontrib/yezzey/devops/packaging/debian/source/lintian-overrides
+ gpcontrib/yezzey/devops/scripts/boot.sh
+ gpcontrib/yezzey/devops/scripts/conf_setup.sh
+ gpcontrib/yezzey/devops/scripts/create_demo_yezzey_cloudberry.sh
+ gpcontrib/yezzey/devops/scripts/create_demo_yezzey_gpdb.sh
+ gpcontrib/yezzey/devops/scripts/launch_yproxy.sh
+ gpcontrib/yezzey/devops/scripts/prepare_test_yezzey.sh
+ gpcontrib/yezzey/docs/README.cleanup.md
+ gpcontrib/yezzey/docs/yezzey_vacuum.md
+ gpcontrib/yezzey/example_with_backup.md
+ gpcontrib/yezzey/expected/drop-column_cbdb.out
+ gpcontrib/yezzey/expected/drop-column.out
+ gpcontrib/yezzey/expected/load_offload_load_cbdb.out
+ gpcontrib/yezzey/expected/load_offload_load.out
+ gpcontrib/yezzey/expected/simple_cbdb.out
+ gpcontrib/yezzey/expected/simple.out
+ gpcontrib/yezzey/expected/versions.out
+ gpcontrib/yezzey/expected/yezzey_feat_cbdb_last.out
+ gpcontrib/yezzey/expected/yezzey_feat_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-alter_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-alter-toast_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-alter-toast.out
+ gpcontrib/yezzey/expected/yezzey-alter-ts_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-alter-ts.out
+ gpcontrib/yezzey/expected/yezzey-alter.out
+ gpcontrib/yezzey/expected/yezzey-create-offloaded_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-create-offloaded.out
+ gpcontrib/yezzey/expected/yezzey-expand_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-expand.out
+ gpcontrib/yezzey/expected/yezzey-otm-deletion_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-otm-deletion.out
+ gpcontrib/yezzey/expected/yezzey-otm-feat_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-otm-feat.out
+ gpcontrib/yezzey/expected/yezzey-reorg_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-reorg.out
+ gpcontrib/yezzey/expected/yezzey-stat_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-stat.out
+ gpcontrib/yezzey/expected/yezzey-trunc_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-trunc.out
+ gpcontrib/yezzey/expected/yezzey-vac-relation_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-vac-relation-187_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-vac-relation-187.out
+ gpcontrib/yezzey/expected/yezzey-vac-relation.out
+ gpcontrib/yezzey/expected/yezzey-vacuum_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-vacuum-garbage_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-vacuum-garbage.out
+ gpcontrib/yezzey/expected/yezzey-vacuum.out
+ gpcontrib/yezzey/expected/yezzey-vi-eh-unique_cbdb.out
+ gpcontrib/yezzey/expected/yezzey-vi-eh-unique.out
+ gpcontrib/yezzey/images/read.png
+ gpcontrib/yezzey/images/workflow.png
+ gpcontrib/yezzey/images/write.png
+ gpcontrib/yezzey/include/binary_upgrade.h
+ gpcontrib/yezzey/include/chunkinfo.h
+ gpcontrib/yezzey/include/expire_hint.h
+ gpcontrib/yezzey/include/gucs.h
+ gpcontrib/yezzey/include/io_adv.h
+ gpcontrib/yezzey/include/io.h
+ gpcontrib/yezzey/include/meta.h
+ gpcontrib/yezzey/include/msgproto.h
+ gpcontrib/yezzey/include/offload_policy.h
+ gpcontrib/yezzey/include/offload_tablespace_map.h
+ gpcontrib/yezzey/include/offload.h
+ gpcontrib/yezzey/include/partition.h
+ gpcontrib/yezzey/include/pg.h
+ gpcontrib/yezzey/include/proxy.h
+ gpcontrib/yezzey/include/storage.h
+ gpcontrib/yezzey/include/types.h
+ gpcontrib/yezzey/include/url.h
+ gpcontrib/yezzey/include/util.h
+ gpcontrib/yezzey/include/virtual_index.h
+ gpcontrib/yezzey/include/virtual_schema.h
+ gpcontrib/yezzey/include/virtual_tablespace.h
+ gpcontrib/yezzey/include/worker.h
+ gpcontrib/yezzey/include/xvacuum.h
+ gpcontrib/yezzey/include/yezzey_heap_api.h
+ gpcontrib/yezzey/include/yezzey_meta.h
+ gpcontrib/yezzey/include/ygpver.h
+ gpcontrib/yezzey/include/yproxy_connector.h
+ gpcontrib/yezzey/include/yproxy_deleter_v2.h
+ gpcontrib/yezzey/include/yproxy_deleter.h
+ gpcontrib/yezzey/include/yproxy_lister.h
+ gpcontrib/yezzey/include/yproxy_reader.h
+ gpcontrib/yezzey/include/yproxy_writer.h
+ gpcontrib/yezzey/include/yproxy.h
+ gpcontrib/yezzey/LICENSE
+ gpcontrib/yezzey/Makefile
+ gpcontrib/yezzey/notes/announce.md
+ gpcontrib/yezzey/notes/scripts/1. ny-taxi-src-pxf.sql
+ gpcontrib/yezzey/notes/scripts/2. ny-taxi-src-gp.sql
+ gpcontrib/yezzey/notes/scripts/3. ny-taxi-yezzey.sql
+ gpcontrib/yezzey/notes/scripts/4. ny-taxi-pxf-rw.sql
+ gpcontrib/yezzey/notes/scripts/5. ny-taxi-zones-src-pxf.sql
+ gpcontrib/yezzey/notes/scripts/6. ny-taxi-zones-src-gp.sql
+ gpcontrib/yezzey/notes/scripts/7. yezzey-test.sql
+ gpcontrib/yezzey/notes/scripts/8. ny-taxi-s3.sql
+ gpcontrib/yezzey/notes/scripts/9. s3-test.sql
+ gpcontrib/yezzey/README.md
+ gpcontrib/yezzey/README.ubuntu.install
+ gpcontrib/yezzey/smgr.c
+ gpcontrib/yezzey/sql/drop-column_cbdb.sql
+ gpcontrib/yezzey/sql/drop-column.sql
+ gpcontrib/yezzey/sql/load_offload_load_cbdb.sql
+ gpcontrib/yezzey/sql/load_offload_load.sql
+ gpcontrib/yezzey/sql/simple_cbdb.sql
+ gpcontrib/yezzey/sql/simple.sql
+ gpcontrib/yezzey/sql/versions.sql
+ gpcontrib/yezzey/sql/yezzey_feat_cbdb_last.sql
+ gpcontrib/yezzey/sql/yezzey_feat_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-alter_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-alter-toast_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-alter-toast.sql
+ gpcontrib/yezzey/sql/yezzey-alter-ts_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-alter-ts.sql
+ gpcontrib/yezzey/sql/yezzey-alter.sql
+ gpcontrib/yezzey/sql/yezzey-create-offloaded_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-create-offloaded.sql
+ gpcontrib/yezzey/sql/yezzey-expand_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-expand.sql
+ gpcontrib/yezzey/sql/yezzey-otm-deletion_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-otm-deletion.sql
+ gpcontrib/yezzey/sql/yezzey-otm-feat_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-otm-feat.sql
+ gpcontrib/yezzey/sql/yezzey-reorg_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-reorg.sql
+ gpcontrib/yezzey/sql/yezzey-stat_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-stat.sql
+ gpcontrib/yezzey/sql/yezzey-trunc_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-trunc.sql
+ gpcontrib/yezzey/sql/yezzey-vac-relation_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-vac-relation-187_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-vac-relation-187.sql
+ gpcontrib/yezzey/sql/yezzey-vac-relation.sql
+ gpcontrib/yezzey/sql/yezzey-vacuum_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-vacuum-garbage_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-vacuum-garbage.sql
+ gpcontrib/yezzey/sql/yezzey-vacuum.sql
+ gpcontrib/yezzey/sql/yezzey-vi-eh-unique_cbdb.sql
+ gpcontrib/yezzey/sql/yezzey-vi-eh-unique.sql
+ gpcontrib/yezzey/src/binary_upgrade.cpp
+ gpcontrib/yezzey/src/expire_hint.cpp
+ gpcontrib/yezzey/src/io_adv.cpp
+ gpcontrib/yezzey/src/io.cpp
+ gpcontrib/yezzey/src/meta.cpp
+ gpcontrib/yezzey/src/msgproto.cpp
+ gpcontrib/yezzey/src/offload_policy.cpp
+ gpcontrib/yezzey/src/offload_tablespace_map.cpp
+ gpcontrib/yezzey/src/offload.cpp
+ gpcontrib/yezzey/src/partition.cpp
+ gpcontrib/yezzey/src/proxy.cpp
+ gpcontrib/yezzey/src/storage.cpp
+ gpcontrib/yezzey/src/url.cpp
+ gpcontrib/yezzey/src/util.cpp
+ gpcontrib/yezzey/src/virtual_index.cpp
+ gpcontrib/yezzey/src/virtual_schema.cpp
+ gpcontrib/yezzey/src/virtual_tablespace.cpp
+ gpcontrib/yezzey/src/xvacuum.cpp
+ gpcontrib/yezzey/src/yproxy_connector.cpp
+ gpcontrib/yezzey/src/yproxy_deleter_v2.cpp
+ gpcontrib/yezzey/src/yproxy_deleter.cpp
+ gpcontrib/yezzey/src/yproxy_lister.cpp
+ gpcontrib/yezzey/src/yproxy_reader.cpp
+ gpcontrib/yezzey/src/yproxy_writer.cpp
+ gpcontrib/yezzey/test/Makefile
+ gpcontrib/yezzey/test/msgproto_test.cpp
+ gpcontrib/yezzey/test/regress_source/expirity.sql
+ gpcontrib/yezzey/test/regress_source/metadata.sql
+ gpcontrib/yezzey/test/regress_source/simple_alter.sql
+ gpcontrib/yezzey/test/regress_source/simple_vac.sql
+ gpcontrib/yezzey/test/regress_source/simple.sql
+ gpcontrib/yezzey/test/regress_source/simplebig.sql
+ gpcontrib/yezzey/test/regress_source/simplelol.sql
+ gpcontrib/yezzey/test/regress_source/yao.sql
+ gpcontrib/yezzey/test/regress_source/yezzey_wal.sql
+ gpcontrib/yezzey/test/regress_source/yezzey-exp.sql
+ gpcontrib/yezzey/test/regress_source/yezzey-large.sql
+ gpcontrib/yezzey/test/regress_source/yezzey-reorg.sql
+ gpcontrib/yezzey/test/regress_source/yezzey-vindex.sql
+ gpcontrib/yezzey/test/regress_source/yezzey.sql
+ gpcontrib/yezzey/test/yproxy_test.cpp
+ gpcontrib/yezzey/yezzey--1.0--1.8.sql
+ gpcontrib/yezzey/yezzey--1.0.sql
+ gpcontrib/yezzey/yezzey--1.8--1.8.1.sql
+ gpcontrib/yezzey/yezzey--1.8.1--1.8.2.sql
+ gpcontrib/yezzey/yezzey--1.8.2--1.8.3.sql
+ gpcontrib/yezzey/yezzey--1.8.3--1.8.4.sql
+ gpcontrib/yezzey/yezzey--1.8.4--1.8.5.sql
+ gpcontrib/yezzey/yezzey--1.8.5--1.8.6.sql
+ gpcontrib/yezzey/yezzey--1.8.6--1.8.7.sql
+ gpcontrib/yezzey/yezzey--1.8.7--1.8.8.sql
+ gpcontrib/yezzey/yezzey--1.8.8.sql
+ gpcontrib/yezzey/yezzey.c
+ gpcontrib/yezzey/yezzey.control
+ gpcontrib/yezzey/yezzey.h
+ gpcontrib/yezzey/yezzey/devops/packaging/ubuntu/script/build_cloudberry_deb.sh
+ gpcontrib/yezzey/ystat.h
+
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index d413bd86761..457a4a0944e 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -273,6 +273,7 @@ ZSTD_LIBS = @ZSTD_LIBS@
EVENT_LIBS = @EVENT_LIBS@
with_diskquota = @with_diskquota@
with_gp_stats_collector = @with_gp_stats_collector@
+with_yezzey = @with_yezzey@
##########################################################################
#