Skip to content

Commit e27edef

Browse files
authored
Fix unrunnable commands and product wording in the two newest posts (#260)
The collation tutorial's docker run had literal \n instead of line breaks, and it needs v1.3, which is unreleased: on the published 1.2 image step 2 fails on documentdb.enable_collation_with_create_collection. Say so and add a version check. The pgAudit post named a Microsoft Purview sink it never explains. Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com> Co-authored-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
1 parent d5df42e commit e27edef

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

‎blogs/_posts/2026-11-13-collated-collections-and-indexes.md‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Should a query for `"a"` also match `"A"`? By using collation, you can make that
1717

1818
DocumentDB OSS beginning **v1.3 supports creating unsharded collections with collation**. Collation uses Unicode (ICU) rules for locale-aware string comparisons, including case- and accent-insensitive matching. Supported collated indexes can serve queries whose collation matches the index.
1919

20+
> **v1.3 isn't released yet.** The newest published image is v1.2, which lacks the `documentdb.enable_collation_with_create_collection` flag, so step 2 fails on it. Until v1.3 ships, you need an image built from the [`main` branch](https://github.com/documentdb/documentdb); the [changelog](https://github.com/documentdb/documentdb/blob/main/CHANGELOG.md) shows when it's released.
21+
2022
This walkthrough enables the required feature flags, creates a collection and a non-unique index, and demonstrates a case-insensitive query. It is based on [the original example and feature-flag notes](https://gist.github.com/xgerman/0d84036a676927a9382785cbffc857af).
2123

2224
## Choose how strings compare
@@ -30,14 +32,24 @@ Use `{ locale: "en", strength: 2 }`, so `"a"` and `"A"` compare equal, as do `"b
3032

3133
## 1. Start a local container
3234

33-
You need Docker and a **DocumentDB OSS v1.3 image**. The following command uses `latest`, a moving tag; ensure the image includes v1.3 before proceeding.
35+
You need Docker and a **DocumentDB OSS v1.3 image**. The following command uses `latest`, a moving tag that points to v1.2 until v1.3 is released.
3436

3537
```bash
36-
docker run -d --name docdb-test -p 127.0.0.1:10260:10260 \n -e USERNAME=testuser \n -e PASSWORD=testpass123 \n ghcr.io/documentdb/documentdb/documentdb-local:latest
38+
docker run -d --name docdb-test -p 127.0.0.1:10260:10260 \
39+
-e USERNAME=testuser \
40+
-e PASSWORD=testpass123 \
41+
ghcr.io/documentdb/documentdb/documentdb-local:latest
3742
```
3843

3944
Allow the gateway to finish starting before connecting. The published port is bound to localhost, and the credentials are for this disposable local example only.
4045

46+
Check the version before you continue; it must be `1.3-0` or later:
47+
48+
```bash
49+
docker exec docdb-test psql -X -U documentdb -p 9712 -d postgres \
50+
-Atc "SELECT extversion FROM pg_extension WHERE extname = 'documentdb';"
51+
```
52+
4153
## 2. Enable the collation feature flags
4254

4355
To create a collated collection, you need to enable **all five feature flags** listed below, even if the application index you create is non-unique.

‎blogs/_posts/2026-11-13-documentdb-audit-logging-with-pgaudit.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ For conventional actor-based auditing of writes and collection DDL:
252252
4. Leave global auditing disabled and enable `write, ddl` on each audited role.
253253
5. Keep SQL statement and parameter logging disabled; enable relation and row-count logging.
254254
6. Reconnect clients and verify the resulting records with a representative workload.
255-
7. Send logs to a durable, access-controlled Microsoft Purview Audit sink.
255+
7. Send logs to a durable, access-controlled audit-log destination.
256256
8. Retain catalog mapping history if consumers require logical collection names.
257257

258-
For authoritative commit outcomes, document reconstruction, or recovery after ordinary Audit logs are lost, complement this approach with [WAL-based forensic analysis](https://github.com/xgerman/documentdb-wal-audit) and an appropriate WAL-retention strategy.
258+
For authoritative commit outcomes, document reconstruction, or recovery after ordinary audit logs are lost, complement this approach with [WAL-based forensic analysis](https://github.com/xgerman/documentdb-wal-audit) and an appropriate WAL-retention strategy.
259259

260260
The useful distinction is simple: **pgAudit records actor-attributed PostgreSQL activity; WAL-based analysis addresses what committed and what can be reconstructed.** Choose the evidence your audit requirements actually need.

‎tests/containerCredentials.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,11 @@ describe('container credentials', () => {
4949
}
5050
}
5151
});
52+
53+
// A literal \n in Markdown is two characters, not a line break; the pasted command fails.
54+
it.each(sources().filter((file) => file.endsWith('.md')).map((file) => [path.relative(root, file), file]))('%s has no literal \\n in a run command', (_name, file) => {
55+
for (const command of runCommands(fs.readFileSync(file, 'utf8'))) {
56+
expect(command).not.toMatch(/\\n/);
57+
}
58+
});
5259
});

0 commit comments

Comments
 (0)