Skip to content

Commit 4923cff

Browse files
docs: remove remaining 'ahi' prefix; use generic source placeholders
- docs/11: rewrite ownership section to describe the source role generically (<source_role>/<server>) instead of the specific ahi_dev/gmf_* names, so it stays coherent while containing no 'ahi' prefix - docs/10 & 11(c): genericize source ahi_db/ahi_dev wording - Result: zero 'ahi' and zero internal hostnames anywhere in the repo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent aff760b commit 4923cff

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

docs/10-SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ superuser can cascade. Rotate promptly:
3838
ALTER USER local_dev WITH PASSWORD 'new-strong-password';
3939
```
4040
Also rotate, at the source/remote side, **any credential that was visible**:
41-
the source `ahi_dev` password, and the remote MySQL/SQL Server logins stored in
41+
the source database's superuser password, and the remote MySQL/SQL Server logins stored in
4242
the FDW user mappings. Update the mappings afterwards:
4343
```sql
4444
ALTER USER MAPPING FOR <role> SERVER <srv> OPTIONS (SET password 'new-remote-pw');

docs/11-IMPORT-FROM-SOURCE.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,31 @@ cp .env.source.example .env.source # fill in host/port/user/db/password (gitig
3636

3737
## 11.3 Three things that need attention
3838

39-
### (a) Ownership / roles — objects are owned by `ahi_dev`
40-
This repo renamed its superuser to **`local_dev`**. Pick one:
39+
### (a) Ownership / roles
40+
Objects in the dump are owned by whatever role owned them on the **source**
41+
(call it `<source_role>`). If that role doesn't exist in this target — whose
42+
superuser is **`local_dev`** — pick one:
4143

42-
- **Recommended (frictionless FDW):** also create a role named `ahi_dev` in the
43-
target before importing, so owners *and* FDW user mappings restore verbatim:
44+
- **Recommended (frictionless FDW):** create a matching role in the target
45+
before importing, so owners *and* FDW user mappings restore verbatim:
4446
```bash
4547
docker compose exec -T postgres psql -U local_dev -d local_db \
46-
-c "CREATE ROLE ahi_dev LOGIN SUPERUSER PASSWORD 'pick-a-password';"
48+
-c "CREATE ROLE <source_role> LOGIN SUPERUSER PASSWORD 'pick-a-password';"
4749
```
4850
Then import **without** `--no-owner` (edit the script) to keep ownership.
4951
- **Pure `local_*` (default in our script):** import with
5052
`--no-owner --no-privileges` → everything ends up owned by `local_dev`. The
51-
catch: the 5 **FDW user mappings are tied to `ahi_dev`**, so a `local_dev`
52-
session won't use them. Recreate them for `local_dev` (the import carries the
53+
catch: any **FDW user mappings tied to `<source_role>`** won't be used by a
54+
`local_dev` session. Recreate them for `local_dev` (the import carries the
5355
remote credentials into the catalog; copy them with):
5456
```sql
5557
-- as the importing user, inspect then recreate per server:
5658
SELECT srvname FROM pg_foreign_server;
57-
-- CREATE USER MAPPING FOR local_dev SERVER gmf_imesys OPTIONS (username '...', password '...');
59+
-- CREATE USER MAPPING FOR local_dev SERVER <server> OPTIONS (username '...', password '...');
5860
```
5961

60-
> TL;DR: if you just want it to **work immediately**, create the `ahi_dev` role
61-
> in the target. If you want a clean `local_*` world, expect to redo 5 user
62-
> mappings.
62+
> TL;DR: to **work immediately**, recreate the source owner role in the target.
63+
> For a clean `local_*` world, expect to redo the user mappings.
6364
6465
### (b) `pg_cron` jobs are NOT dumped
6566
`pg_dump` never carries `cron.job` rows. Recreate them after import:
@@ -71,7 +72,7 @@ docker compose exec -T postgres psql -U local_dev -d local_db \
7172

7273
### (c) `timescaledb` is preloaded on the source — but unused
7374
The source's `shared_preload_libraries = 'timescaledb, pg_cron'`, yet
74-
`timescaledb` is **not** created as an extension in `ahi_db` (no hypertables).
75+
`timescaledb` is **not** created as an extension in the source database (no hypertables).
7576
So the import does **not** need it and will not fail. Only if you later intend to
7677
use TimescaleDB features would you add `postgresql-17-timescaledb` to the
7778
`Dockerfile` and preload it.

0 commit comments

Comments
 (0)