Content-Length: 286625 | pFad | http://github.com/postgrespro/postgres_cluster/commit/9103372f52ab9042a934aa857ee83a24784be3ce

C9 Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves one · postgrespro/postgres_cluster@9103372 · GitHub
Skip to content

Commit 9103372

Browse files
committed
Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves one
send() and probable process context swap during backend startup.
1 parent 8adf56f commit 9103372

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/backend/libpq/auth.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.72 2001/11/05 17:46:25 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.73 2002/02/19 19:49:09 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -619,9 +619,16 @@ sendAuthRequest(Port *port, AuthRequest areq)
619619
pq_sendbytes(&buf, port->cryptSalt, 2);
620620

621621
pq_endmessage(&buf);
622-
pq_flush();
622+
623+
/*
624+
* Flush message so client will see it, except for AUTH_REQ_OK,
625+
* which need not be sent until we are ready for queries.
626+
*/
627+
if (areq != AUTH_REQ_OK)
628+
pq_flush();
623629
}
624630

631+
625632
#ifdef USE_PAM
626633

627634
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/9103372f52ab9042a934aa857ee83a24784be3ce

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy