11diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
2- index 0775abe35d..f53b3580b3 100644
2+ index 2f8c3d5f918..d9774758413 100644
33--- a/src/backend/tcop/postgres.c
44+++ b/src/backend/tcop/postgres.c
5- @@ -105 ,6 +105 ,11 @@ int PostAuthDelay = 0;
6- /* Time between checks that the client is still connected. */
7- int client_connection_check_interval = 0 ;
5+ @@ -104 ,6 +104 ,11 @@ int client_connection_check_interval = 0;
6+ /* flags for non-system relation kinds to restrict use */
7+ int restrict_nonsystem_relation_kind ;
88
99+ #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1010+ bool fuzzer_first_run = true;
@@ -14,7 +14,7 @@ index 0775abe35d..f53b3580b3 100644
1414 /* ----------------
1515 * private typedefs etc
1616 * ----------------
17- @@ -471 ,11 +476 ,14 @@ static int
17+ @@ -480 ,11 +485 ,14 @@ static int
1818 ReadCommand(StringInfo inBuf)
1919 {
2020 int result;
@@ -30,9 +30,9 @@ index 0775abe35d..f53b3580b3 100644
3030 return result;
3131 }
3232
33- @@ -4021 ,6 +4029 ,11 @@ PostgresMain(const char *dbname, const char *username)
34- bool idle_in_transaction_timeout_enabled = false;
35- bool idle_session_timeout_enabled = false;
33+ @@ -4190 ,6 +4198 ,11 @@ PostgresMain(const char *dbname, const char *username)
34+ volatile bool idle_in_transaction_timeout_enabled = false;
35+ volatile bool idle_session_timeout_enabled = false;
3636
3737+ #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3838+ if(fuzzer_first_run)
@@ -42,7 +42,7 @@ index 0775abe35d..f53b3580b3 100644
4242 Assert(dbname != NULL);
4343 Assert(username != NULL);
4444
45- @@ -4312 ,6 +4325 ,11 @@ PostgresMain(const char *dbname, const char *username)
45+ @@ -4509 ,6 +4522 ,11 @@ PostgresMain(const char *dbname, const char *username)
4646 if (!ignore_till_sync)
4747 send_ready_for_query = true; /* initially, or after error */
4848
@@ -55,16 +55,15 @@ index 0775abe35d..f53b3580b3 100644
5555 * Non-error queries loop here.
5656 */
5757diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
58- index 2af87ee3bd..825bb70532 100644
58+ index 47af743990f..476e336d418 100644
5959--- a/src/backend/utils/error/elog.c
6060+++ b/src/backend/utils/error/elog.c
61- @@ -594 ,7 +594,9 @@ errfinish(const char *filename, int lineno, const char *funcname)
61+ @@ -540 ,7 +540,7 @@ errfinish(const char *filename, int lineno, const char *funcname)
6262 }
6363
6464 /* Emit the message to the right places */
65- + #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
66- EmitErrorReport();
67- + #endif
65+ - EmitErrorReport();
66+ + //EmitErrorReport();
6867
6968 /* Now free up subsidiary data attached to stack entry, and release it */
70- if (edata->message)
69+ FreeErrorDataContents (edata);
0 commit comments