- Notifications
You must be signed in to change notification settings - Fork5
Commit37f6fd1
committed
Fix initdb misbehavior when user mis-enters superuser password.
While testing simple_prompt() revisions, I happened to notice thatcurrent initdb behaves rather badly when --pwprompt is specified andthe user miskeys the second password. It complains about the mismatch,does "rm -rf" on the data directory, and exits. The problem is thatsince commitc4a8812, there's a standalone backend sitting waitingfor commands at that point. It gets unhappy about its datadir havinggone away, and spews a PANIC message at the user, which is not nice.(And the shell then adds to the mess with meaningless bleating about acore dump...) We don't really want that sort of thing to happen unlessthere's an internal failure in initdb, which this surely is not.The best fix seems to be to move the collection of the passwordearlier, so that it's done essentially as part of argument collection,rather than at the rather ad-hoc time it was done before.Back-patch to 9.6 where the problem was introduced.1 parent8e1e3f9 commit37f6fd1
1 file changed
+14
-9
lines changedLines changed: 14 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
| 138 | + | |
138 | 139 |
| |
139 | 140 |
| |
140 | 141 |
| |
| |||
255 | 256 |
| |
256 | 257 |
| |
257 | 258 |
| |
258 |
| - | |
| 259 | + | |
259 | 260 |
| |
260 | 261 |
| |
261 | 262 |
| |
| |||
1544 | 1545 |
| |
1545 | 1546 |
| |
1546 | 1547 |
| |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1547 | 1552 |
| |
1548 | 1553 |
| |
1549 | 1554 |
| |
1550 |
| - | |
| 1555 | + | |
1551 | 1556 |
| |
1552 | 1557 |
| |
1553 |
| - | |
| 1558 | + | |
1554 | 1559 |
| |
1555 | 1560 |
| |
1556 | 1561 |
| |
| |||
1560 | 1565 |
| |
1561 | 1566 |
| |
1562 | 1567 |
| |
| 1568 | + | |
| 1569 | + | |
1563 | 1570 |
| |
1564 | 1571 |
| |
1565 | 1572 |
| |
| |||
1609 | 1616 |
| |
1610 | 1617 |
| |
1611 | 1618 |
| |
1612 |
| - | |
1613 |
| - | |
1614 |
| - | |
1615 |
| - | |
| 1619 | + | |
1616 | 1620 |
| |
1617 | 1621 |
| |
1618 | 1622 |
| |
| |||
3279 | 3283 |
| |
3280 | 3284 |
| |
3281 | 3285 |
| |
3282 |
| - | |
3283 |
| - | |
3284 | 3286 |
| |
3285 | 3287 |
| |
3286 | 3288 |
| |
| |||
3569 | 3571 |
| |
3570 | 3572 |
| |
3571 | 3573 |
| |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
3572 | 3577 |
| |
3573 | 3578 |
| |
3574 | 3579 |
| |
|
0 commit comments
Comments
(0)