postgresql/src
Tom Lane 37f6fd1eaa Fix initdb misbehavior when user mis-enters superuser password.
While testing simple_prompt() revisions, I happened to notice that
current initdb behaves rather badly when --pwprompt is specified and
the user miskeys the second password.  It complains about the mismatch,
does "rm -rf" on the data directory, and exits.  The problem is that
since commit c4a8812cf, there's a standalone backend sitting waiting
for commands at that point.  It gets unhappy about its datadir having
gone 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 a
core dump...)  We don't really want that sort of thing to happen unless
there's an internal failure in initdb, which this surely is not.

The best fix seems to be to move the collection of the password
earlier, 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.
2016-08-30 15:25:01 -04:00
..
backend Split hash.h → hash_xlog.h 2016-08-29 18:55:49 -03:00
bin Fix initdb misbehavior when user mis-enters superuser password. 2016-08-30 15:25:01 -04:00
common pgindent run for 9.6 2016-06-09 18:02:36 -04:00
fe_utils Make initdb's suggested "pg_ctl start" command line more reliable. 2016-08-20 15:05:25 -04:00
include Split hash.h → hash_xlog.h 2016-08-29 18:55:49 -03:00
interfaces Remove support for OpenSSL versions older than 0.9.8. 2016-08-29 20:16:02 +03:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
port Stamp HEAD as 10devel. 2016-08-15 13:49:49 -04:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Fix instability in parallel regression tests. 2016-08-25 09:57:09 -04:00
timezone Fix typos in comments. 2016-08-29 16:06:40 +09:00
tools initdb now needs to reference libpq include files in MSVC builds. 2016-08-20 16:53:25 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
bcc32.mak
DEVELOPERS
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
Makefile.shlib Make the AIX case of Makefile.shlib safe for parallel make. 2016-07-23 20:30:03 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak