postgresql/src/backend
Tom Lane 3fc489cb36 Prevent starting a standalone backend with standby_mode on.
This can't really work because standby_mode expects there to be more
WAL arriving, which there will not ever be because there's no WAL
receiver process to fetch it.  Moreover, if standby_mode is on then
hot standby might also be turned on, causing even more strangeness
because that expects read-only sessions to be executing in parallel.
Bernd Helmle reported a case where btree_xlog_delete_get_latestRemovedXid
got confused, but rather than band-aiding individual problems it seems
best to prevent getting anywhere near this state in the first place.
Back-patch to all supported branches.

In passing, also fix some omissions of errcodes in other ereport's in
readRecoveryCommandFile().

Michael Paquier (errcode hacking by me)

Discussion: <00F0B2CEF6D0CEF8A90119D4@eje.credativ.lan>
2016-08-31 08:52:13 -04:00
..
access Prevent starting a standalone backend with standby_mode on. 2016-08-31 08:52:13 -04:00
bootstrap Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
catalog Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
commands Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
executor Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Remove mergeHyperLogLog. 2016-04-27 10:55:32 -04:00
libpq Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
main Repair a bit of pgindent damage. 2016-06-09 18:09:17 -04:00
nodes Fix improper repetition of previous results from a hashed aggregate. 2016-08-24 14:38:13 -04:00
optimizer Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
parser Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
po Translation updates 2016-08-29 12:00:00 -04:00
port pgindent run for 9.6 2016-06-09 18:02:36 -04:00
postmaster Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:12:16 -05:00
replication Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
rewrite pgindent run for 9.6 2016-06-09 18:02:36 -04:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
tcop Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
tsearch Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
utils Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00