Skip to content

Improve deb workflow and add README for install guidance #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -54,3 +54,22 @@ jobs:
retention-days: 7
if-no-files-found: error
compression-level: 0

- name: Install GitHub CLI manually
if: startsWith(github.ref, 'refs/tags/v')
run: |
sudo apt-get update
sudo apt-get install -y gh

- name: Upload to GitHub Release (excluding dbgsym packages)
if: startsWith(github.ref, 'refs/tags/v')
run: |
# Find all .deb files excluding ones with -dbgsym_ in the name
files=$(find packaging -type f -name "*.deb" ! -name "*-dbgsym_*.deb")
if [ -z "$files" ]; then
echo "No .deb packages (excluding dbgsym) found to upload."
exit 1
fi
gh release upload "${{ github.ref_name }}" $files --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 47 additions & 2 deletions packaging/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# To Build Your Own Debian Packages With Docker
# 🛠️ To Build Your Own Debian Packages With Docker

Run `./packaging/build_packages.sh -h` and follow the instructions.
E.g. to build for Debian 12 and PostgreSQL 16, run:
@@ -9,4 +9,49 @@ E.g. to build for Debian 12 and PostgreSQL 16, run:

Packages can be found at the `packages` directory by default, but it can be configured with the `--output-dir` option.

**Note:** The packages do not include pg_documentdb_distributed in the `internal` directory.
**Note:** The packages do not include pg_documentdb_distributed in the `internal` directory.

# 📦 Installing DocumentDB from `.deb` Packages

We provide prebuilt `.deb` packages for PostgreSQL versions **15**, **16**, and **17** on the following operating systems:

- **Debian 11** (bullseye)
- **Debian 12** (bookworm)
- **Ubuntu 22.04** (jammy)
- **Ubuntu 24.04** (noble)

## 🔽 1. Download the Package

Visit the [Releases](../../releases) page of this repository and download the `.deb` package that matches your OS and PostgreSQL version.

Example:

```bash
wget https://github.com/microsoft/documentdb/releases/download/v0.103-0/ubuntu22.04-postgresql-16-documentdb_0.103.0_amd64.deb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about having a latest version for package and folder that maps to latest released version, in this way we can use static link in document, otherwise we need to update link in document for every release.

```

## 🔽 2. Install the Package

Install the downloaded package using `dpkg`:
```bash
sudo dpkg -i ubuntu22.04-postgresql-16-documentdb_0.103.0_amd64.deb
```
If you see dependency errors, fix them with:
```bash
sudo apt-get install -f
```

## 🔽 3. Enable the Extension in PostgreSQL

After installing the package, enable the extension in your PostgreSQL database:
```sql
CREATE EXTENSION documentdb;
```
Make sure you connect to the correct PostgreSQL instance that matches the installed version.

## 🔽 4. Verify Installation
Run the following query to verify that the extension is available:

```sql
SELECT * FROM pg_available_extensions WHERE name = 'documentdb';
```
30 changes: 22 additions & 8 deletions packaging/debian_files/changelog
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
documentdb (DOCUMENTDB_VERSION) Unreleased; urgency=low
documentdb (0.104.0) Unreleased; urgency=low

* Support `$convert` on `binData` to `binData`, `string` to `binData` and `binData` to `string` (except with `format: auto`) *[Feature]*
* Fix list_databases for databases with size > 2 GB *[Bugfix]* (#119)
* Support ARM64 architecture when building docker container *[Preview]*
* Add string case support for `$toDate` operator
* Support collation with `$indexOfArray` aggregation operator. *[Feature]*
* Support collation with arrays and objects comparisons *[Feature]*
* Support background index builds *[Bugfix]* (#36)
* Enable user CRUD by default *[Feature]*

-- Shuai Tian <shuaitian@microsoft.com> Wed, 09 Apr 2026 12:00:00 +0000
-- Shuai Tian <shuaitian@microsoft.com> Wed, 14 May 2025 12:00:00 +0000

documentdb (0.102-0) unstable; urgency=medium
documentdb (0.103.0) unstable; urgency=medium

* Support collation with aggregation and find on sharded collections [Feature]
* Support $convert on binData to binData, string to binData and binData to string (except with format: auto) [Feature]
* Support half-precision vector indexing, vectors can have up to 4,000 dimensions [Feature]
* Support collation with $documents and $replaceWith stage of the aggregation pipeline [Feature]
* Push pg_documentdb_gw for documentdb connections [Feature]
* Support ARM64 architecture when building docker container [Preview]
* Fix list_databases for databases with size > 2 GB [Bugfix] (#119)

-- Shuai Tian <shuaitian@microsoft.com> Fri, 09 May 2025 12:00:00 +0000

documentdb (0.102.0) unstable; urgency=medium

* Support index pushdown for vector search queries [Bugfix]
* Support exact search for vector search queries [Feature]
@@ -29,7 +43,7 @@ documentdb (0.102-0) unstable; urgency=medium

-- Shuai Tian <shuaitian@microsoft.com> Wed, 26 Mar 2025 10:00:00 +0000

documentdb (0.101-0) unstable; urgency=medium
documentdb (0.101.0) unstable; urgency=medium

* Push $graphlookup recursive CTE JOIN filters to index [Perf]
* Build pg_documentdb for PostgreSQL 17 [Infra] (#13)
@@ -40,7 +54,7 @@ documentdb (0.101-0) unstable; urgency=medium

-- Shuai Tian <shuaitian@microsoft.com> Tue, 12 Feb 2025 10:00:00 +0000

documentdb (0.100-0) unstable; urgency=medium
documentdb (0.100.0) unstable; urgency=medium

* Initial release