Skip to content

Commit fe23a6b

Browse files
authored
Merge branch 'documentdb:main' into main
2 parents 9ad587b + 90cfa08 commit fe23a6b

73 files changed

Lines changed: 2742 additions & 786 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/continuous-deployment.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ jobs:
156156
env:
157157
JEKYLL_BASE_PATH: /blogs
158158
run: npm run build
159-
- name: Verify exported documentation pages
159+
- name: Verify exported site pages
160160
# A partially failed content compile must never reach production as a
161161
# docs-less site. compile-content fails the build on clone/copy errors;
162162
# this is the independent belt-and-braces check on the final artifact.
163163
run: |
164164
set -euo pipefail
165-
for page in out/index.html out/docs/index.html out/docs/getting-started/index.html out/docs/reference/index.html; do
165+
for page in out/index.html out/docs/index.html out/docs/getting-started/index.html out/docs/reference/index.html out/blogs/index.html out/announcements/index.html; do
166166
if [ ! -f "$page" ]; then
167167
echo "Missing expected page: $page"
168168
exit 1

‎.github/workflows/continuous-integration.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
node-version: 24
5252
cache: npm
5353
- name: Setup Ruby
54-
# The full site build now includes the Jekyll-powered blogs section.
54+
# The full site build includes the Jekyll-powered content sections.
5555
uses: ruby/setup-ruby@v1
5656
with:
5757
ruby-version: 3.3
@@ -96,9 +96,9 @@ jobs:
9696
run: |
9797
sudo apt-get update
9898
sudo apt-get install -y createrepo-c dpkg-dev rpm python3
99-
- name: Generate repository from v0.117-0
99+
- name: Generate repository from v1.0-0
100100
env:
101-
DOCUMENTDB_VERSION: v0.117-0
101+
DOCUMENTDB_VERSION: v1.0-0
102102
run: .github/scripts/download_packages.sh
103103
- name: Verify release inventory and metadata
104104
run: python3 .github/scripts/verify_package_inventory.py

‎PACKAGE-INSTALL.md‎

Lines changed: 74 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
Repository-backed installation commands for DocumentDB.
44

5-
> This repository serves v0.117-0. v1.0-RC2 is for testing only, gets no fixes (those go into
6-
> a later RC or 1.0), has no upgrade path, and isn't in this repository; see
7-
> [Try the 1.0 release candidate](https://documentdb.io/docs/getting-started/release-candidate/).
5+
> This repository serves v1.0-0.
86
97
## Clean-host installer
108

@@ -15,14 +13,10 @@ curl -fsSLo documentdb-install.sh https://documentdb.io/install.sh &&
1513
sudo sh documentdb-install.sh
1614
```
1715

18-
This installs v0.117-0 from this repository on PostgreSQL 18; add `--pg-major 17`
19-
for 17. To try RC2, add `--version v1.0-RC2`. The installer then downloads this host's
20-
packages from the
21-
[v1.0-RC2 release](https://github.com/documentdb/documentdb/releases/tag/v1.0-RC2),
22-
verifies them against its `SHA256SUMS`, and doesn't use this repository. The
23-
`pgNN-1.0-rc2` container image also runs RC2; it sends anonymous usage telemetry by default
24-
(opt out with `-e DOCUMENTDB_USAGE_TELEMETRY=false`). See the
25-
[RC guide](https://documentdb.io/docs/getting-started/release-candidate/).
16+
This installs v1.0-0 from this repository on PostgreSQL 18; add `--pg-major 17`
17+
for 17. On a host where DocumentDB is already set up, it only reports that instance's status
18+
and doesn't upgrade it; to move an existing install to 1.0, see
19+
[Upgrading an existing install](#upgrading-an-existing-install).
2620

2721
The site serves the `install.sh` attached to the release named in
2822
`scripts/publish-installer.mjs`, and the build fails if its SHA256 changes.
@@ -109,10 +103,12 @@ sudo apt install -y documentdb
109103
wall of GDAL candidate lines that never name the missing repository.
110104

111105
```bash
106+
if (. /etc/os-release && [ "$ID" = centos ]) && [ -f /etc/yum.repos.d/pgdg-redhat-all.repo ]; then sudo sed -i 's/rhel-\$releasever_major\.\$releasever_minor-/rhel-$releasever_major-/g' /etc/yum.repos.d/pgdg-redhat-all.repo; fi && \
112107
sudo dnf install -y dnf-plugins-core && \
113108
sudo dnf config-manager --set-enabled crb && \
114109
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
115110
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-$(uname -m)/pgdg-redhat-repo-latest.noarch.rpm && \
111+
if (. /etc/os-release && [ "$ID" = centos ]) && [ -f /etc/yum.repos.d/pgdg-redhat-all.repo ]; then sudo sed -i 's/rhel-\$releasever_major\.\$releasever_minor-/rhel-$releasever_major-/g' /etc/yum.repos.d/pgdg-redhat-all.repo; fi && \
116112
sudo dnf -qy module disable postgresql && \
117113
sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg && \
118114
printf '%s\n' \
@@ -229,7 +225,7 @@ Before using this anywhere but a private machine:
229225

230226
```bash
231227
sudo documentdb-setup --status # gateway listener, service states, resolved paths
232-
documentdb-gateway --version # DocumentDB version (0.117.0)
228+
documentdb-gateway --version # DocumentDB version (1.0.0)
233229
dpkg -l | grep documentdb # or: rpm -qa | grep documentdb
234230
```
235231

@@ -373,54 +369,89 @@ The current release publishes PostgreSQL 17 and 18. Install `documentdb-17` or
373369

374370
## Upgrading an existing install
375371

376-
> **Warning:** In-place package upgrades from earlier releases are not supported yet. Use a
377-
> clean host or a new, empty PostgreSQL instance for the current fresh installation.
378-
> Removing packages alone does not create a fresh database: package removal preserves PostgreSQL data and
379-
> in-database content, and a later setup run reuses an initialized data directory. Upgrading only
380-
> `postgresql-N-documentdb` does not install the gateway, tools, common payload, or `documentdb-N`.
372+
Package installs from v0.116 or v0.117 upgrade in place to 1.0. Move the entire stack
373+
together; upgrading only `postgresql-N-documentdb` does not update the gateway, tools, common
374+
payload, or `documentdb-N`. These steps use systemd; upgrading a host without it isn't covered here.
375+
On a package-managed private PostgreSQL 18 instance:
381376

382-
For a later point release that uses the same multi-package layout, move the entire stack
383-
together. On a package-managed private PostgreSQL 18 instance:
377+
> **Warning:** A host that ran a 1.0 release candidate (RC1 or RC2) has no upgrade path. Use a
378+
> clean host or a new, empty PostgreSQL instance.
379+
> Removing packages alone does not create a fresh database: package removal preserves PostgreSQL
380+
> data and in-database content, and a later setup run reuses an initialized data directory.
384381
385382
```bash
386-
sudo systemctl stop documentdb-gateway-local@18.service
387-
388383
# Debian / Ubuntu
389-
sudo apt update
384+
sudo systemctl stop documentdb-gateway-local@18.service &&
385+
sudo apt update &&
390386
sudo apt install --only-upgrade documentdb-18 postgresql-18-documentdb \
391387
documentdb-common documentdb-gateway documentdb-postgresql-tools
392388

393389
# EL9: use this instead of the apt commands above
390+
sudo systemctl stop documentdb-gateway-local@18.service &&
394391
sudo dnf upgrade documentdb-18 postgresql18-documentdb \
395392
documentdb-common documentdb-gateway documentdb-postgresql-tools
396-
397-
# PostgreSQL has the old shared library loaded until it restarts.
398-
sudo systemctl restart documentdb-postgresql@18.service
399393
```
400394

401-
Then update the extensions in **every database** that has DocumentDB installed:
395+
Upgrading the packages does not update the database catalog. The simplest way is to restart
396+
PostgreSQL so it loads the new libraries, then re-run setup with the options you installed with.
397+
Setup updates the extensions and then starts the gateway:
402398

403-
```sql
404-
ALTER EXTENSION documentdb_core UPDATE;
405-
ALTER EXTENSION documentdb UPDATE;
406-
ALTER EXTENSION documentdb_extended_rum UPDATE; -- only if it is installed
399+
```bash
400+
sudo systemctl restart documentdb-postgresql@18.service &&
401+
sudo documentdb-setup --pg-version 18 --use-new-postgres-instance --admin-user admin
407402
```
408403

409-
PostgreSQL applies available intermediate extension upgrade scripts automatically. Confirm
410-
afterwards with:
404+
Setup adds any missing `shared_preload_libraries` entries and updates the extensions, but only in
405+
the `postgres` database. If your gateway uses another database, take the manual route below. It also asks for the admin password and sets it on the existing admin
406+
user: enter the current password to keep it.
411407

412-
```sql
413-
SELECT extname, extversion FROM pg_extension WHERE extname LIKE 'documentdb%';
408+
To update by hand, or for every other database that has DocumentDB installed, first check that
409+
the extended RUM library is preloaded:
410+
411+
```bash
412+
sudo -u documentdb-local psql -h /run/documentdb-local/18/postgresql -p 9718 -d postgres -X -Atc "SHOW shared_preload_libraries;"
414413
```
415414

416-
Finally restart the gateway:
415+
If `pg_documentdb_extended_rum` is missing (possible on a 0.116 install), add it before updating;
416+
the update below would succeed without it, and index builds would fail later. If the gateway uses
417+
`postgres`, re-run setup as above. If it uses another database, add the library to
418+
`shared_preload_libraries` in the instance's `postgresql.conf` yourself: setup would point the
419+
gateway back at `postgres`. Then restart
420+
PostgreSQL, update the extensions in one transaction, and start the gateway only if that worked:
417421

418422
```bash
423+
sudo systemctl restart documentdb-postgresql@18.service &&
424+
sudo -u documentdb-local psql -h /run/documentdb-local/18/postgresql -p 9718 -d postgres \
425+
-X -1 -v ON_ERROR_STOP=1 \
426+
-c 'ALTER EXTENSION documentdb_core UPDATE;' \
427+
-c 'ALTER EXTENSION documentdb UPDATE;' \
428+
-c 'CREATE EXTENSION IF NOT EXISTS documentdb_extended_rum CASCADE;' \
429+
-c 'ALTER EXTENSION documentdb_extended_rum UPDATE;' &&
419430
sudo systemctl start documentdb-gateway-local@18.service
420431
```
421432

422-
Take a backup first. For an adopted PostgreSQL instance, restart its operator-managed
423-
PostgreSQL service instead of `documentdb-postgresql@18.service`.
433+
`-1` runs the statements as one transaction: if any fails, every extension stays at its old version
434+
and the gateway stays stopped. `-X` skips `~/.psqlrc`, which could otherwise turn `ON_ERROR_STOP` off. If DocumentDB is installed in other databases too, run the `psql` part for each of them, with
435+
that `-d`, before the last line, so the gateway starts only after every database is updated.
436+
PostgreSQL applies intermediate upgrade scripts automatically. Take a backup first.
437+
438+
On a host with both PostgreSQL 17 and 18, `documentdb-common`, `documentdb-gateway` and
439+
`documentdb-postgresql-tools` serve both majors, so upgrading them affects both: stop both gateways
440+
(`documentdb-gateway-local@17.service` and `@18.service`) before upgrading, then update each major.
441+
442+
For an adopted PostgreSQL instance, setup never restarts PostgreSQL. Stop the gateway
443+
(`documentdb-gateway-local@18.service`) before upgrading, restart the operator-managed PostgreSQL
444+
service yourself, then re-run
445+
`documentdb-setup --pg-version 18 --target-postgres-instance 18/main --admin-user admin` (with your cluster name); it
446+
updates the extensions and then starts the gateway. If
447+
setup has to change `shared_preload_libraries`, it exits without updating the extensions: restart
448+
PostgreSQL and run it once more. By hand, use that instance's own `psql` connection.
449+
450+
Confirm afterwards with:
451+
452+
```sql
453+
SELECT extname, extversion FROM pg_extension WHERE extname LIKE 'documentdb%';
454+
```
424455

425456
## Version pinning
426457

@@ -449,17 +480,17 @@ published in the documentdb.io package repositories. Community builds are welcom
449480
For example, after checking out the matching release tag, build an extension package with:
450481

451482
```bash
452-
./packaging/build_packages.sh --os deb12 --pg 16
483+
./packaging/build_packages.sh --os deb12 --pg 16 --version 1.0.0
453484
```
454485

455-
That command builds only `postgresql-N-documentdb`. A custom full-stack package set uses
486+
`v1.0-0` and `v1.0-RC2` are on the same commit, so pass `--version`; without it the scripts can build RC-versioned packages. That command builds only `postgresql-N-documentdb`. A custom full-stack package set uses
456487
three entry points:
457488

458489
- `packaging/build_packages.sh` — PostgreSQL extension
459490
- `packaging/gateway/build_gateway_packages.sh` — wire-protocol gateway
460491
- `packaging/build_extra_packages.sh` — tools, common payload, `documentdb-N`, and meta package
461492

462-
The [v0.117 packaging guide](https://github.com/documentdb/documentdb/blob/v0.117-0/packaging/README.md)
493+
The [v1.0 packaging guide](https://github.com/documentdb/documentdb/blob/v1.0-0/packaging/README.md)
463494
documents their required arguments, version formats, prerequisites, and accepted targets.
464495
PostgreSQL 15 remains extension-only for package-managed installs because the setup tools
465496
require PostgreSQL 16 or newer.
@@ -474,9 +505,9 @@ they do not retain packages from older releases.
474505
Examples:
475506

476507
```text
477-
ubuntu24.04-documentdb_0.117.0_all.deb
478-
ubuntu24.04-postgresql-18-documentdb_0.117-0_amd64.deb
479-
rhel9-postgresql18-documentdb-0.117.0-1.el9.x86_64.rpm
508+
ubuntu24.04-documentdb_1.0.0_all.deb
509+
ubuntu24.04-postgresql-18-documentdb_1.0-0_amd64.deb
510+
rhel9-postgresql18-documentdb-1.0.0-1.el9.x86_64.rpm
480511
```
481512

482513
For a full stack, pass the five packages for the selected PostgreSQL major to one command:

‎announcements/index.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Announcements
3+
description: DocumentDB project news, releases, and community milestones.
4+
section: announcements
5+
kicker: Project news
6+
---
7+
{% include post-listing.html %}

0 commit comments

Comments
 (0)