forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit558730a
committed
Clean up CREATE DATABASE processing to make it more robust and get rid
of special case for Windows port. Put a PG_TRY around most of createdb()to ensure that we remove copied subdirectories on failure, even if thefailure happens while creating the pg_database row. (I think this explainsOliver Siegmar's recent report.) Having done that, there's no need forthe fragile assumption that copydir() mustn't ereport(ERROR), so simplifyits API. Eliminate the old code that used system("cp ...") to copysubdirectories, in favor of using copydir() on all platforms. This notonly should allow much better error reporting, but allows us to fsyncthe created files before trusting that the copy has succeeded.1 parent0001e98 commit558730a
File tree
6 files changed
+273
-277
lines changed- src
- backend/commands
- include
- port
6 files changed
+273
-277
lines changedLines changed: 0 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14915 | 14915 |
| |
14916 | 14916 |
| |
14917 | 14917 |
| |
14918 |
| - | |
14919 |
| - | |
14920 |
| - | |
14921 |
| - | |
14922 |
| - | |
14923 |
| - | |
14924 |
| - | |
14925 |
| - | |
14926 | 14918 |
| |
14927 | 14919 |
| |
14928 | 14920 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
913 | 913 |
| |
914 | 914 |
| |
915 | 915 |
| |
916 |
| - | |
917 | 916 |
| |
918 | 917 |
| |
919 | 918 |
| |
|
Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
391 |
| - | |
| 391 | + | |
392 | 392 |
| |
393 |
| - | |
| 393 | + | |
394 | 394 |
| |
395 |
| - | |
396 | 395 |
| |
397 | 396 |
| |
398 | 397 |
| |
399 | 398 |
| |
400 | 399 |
| |
401 | 400 |
| |
402 | 401 |
| |
403 |
| - | |
404 | 402 |
| |
405 | 403 |
| |
406 | 404 |
| |
|
0 commit comments
Comments
(0)