diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-04-06 09:09:39 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-04-06 09:09:39 +0300 |
commit | fd01983594b7d2119653428e3b532578008c7065 (patch) | |
tree | b920b54fd75a350cecd80efebde2326823dabbd6 /src/backend/tcop/postgres.c | |
parent | 5c21ad07cc06f00f96e9401209a7da839b326d3a (diff) | |
download | postgresql-fd01983594b7d2119653428e3b532578008c7065.tar.gz postgresql-fd01983594b7d2119653428e3b532578008c7065.zip |
Remove dead code and fix comments in fast-path function handling.
HandleFunctionRequest() is no longer responsible for reading the protocol
message from the client, since commit 2b3a8b20c2. Fix the outdated
comments.
HandleFunctionRequest() now always returns 0, because the code that used
to return EOF was moved in 2b3a8b20c2. Therefore, the caller no longer
needs to check the return value.
Reported by Andres Freund. Backpatch to all supported versions, even though
this doesn't have any user-visible effect, to make backporting future
patches in this area easier.
Discussion: https://www.postgresql.org/message-id/20170405010525.rt5azbya5fkbhvrx@alap3.anarazel.de
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index a2282058c0d..41801f14391 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -4164,19 +4164,7 @@ PostgresMain(int argc, char *argv[], /* switch back to message context */ MemoryContextSwitchTo(MessageContext); - if (HandleFunctionRequest(&input_message) == EOF) - { - /* lost frontend connection during F message input */ - - /* - * Reset whereToSendOutput to prevent ereport from - * attempting to send any more messages to client. - */ - if (whereToSendOutput == DestRemote) - whereToSendOutput = DestNone; - - proc_exit(0); - } + HandleFunctionRequest(&input_message); /* commit the function-invocation transaction */ finish_xact_command(); |