You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -84,7 +84,7 @@ Scripts run in sorted filename order after database creation.
84
84
85
85
| Path | Description |
86
86
|------|-------------|
87
-
| `/var/db/postgres` | PostgreSQL data directory |
87
+
| `/var/lib/postgresql/data` | PostgreSQL data directory |
88
88
89
89
## Ports
90
90
@@ -96,6 +96,64 @@ Scripts run in sorted filename order after database creation.
96
96
97
97
- **User:** `bsd` (UID/GID 1000)
98
98
99
+
## Migrating from Linux
100
+
101
+
**You cannot copy a Linux postgres data directory directly to FreeBSD.** PostgreSQL stores locale information (`en_US.utf8`) in the database cluster, and FreeBSD uses a different locale format (`en_US.UTF-8`). Attempting to use copied data will fail with:
102
+
103
+
```
104
+
FATAL: database locale is incompatible with operating system
105
+
DETAIL: The database was initialized with LC_COLLATE "en_US.utf8", which is not recognized by setlocale().
106
+
```
107
+
108
+
### Migration Steps
109
+
110
+
1. **Dump from Linux** (while postgres is running):
The same locale incompatibility applies in reverse. FreeBSD uses `C` or `en_US.UTF-8` locales, which Linux postgres may not recognize. Use pg_dump/restore:
0 commit comments