diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-02-19 19:49:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-02-19 19:49:09 +0000 |
commit | 9103372f52ab9042a934aa857ee83a24784be3ce (patch) | |
tree | ab4f2b4dc634e2ea7ef76c7fbfa0042194a9e479 /src/backend/libpq/auth.c | |
parent | 8adf56f77aa0cc8cf4af7a19f0d235fc56fbabc7 (diff) | |
download | postgresql-9103372f52ab9042a934aa857ee83a24784be3ce.tar.gz postgresql-9103372f52ab9042a934aa857ee83a24784be3ce.zip |
Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves one
send() and probable process context swap during backend startup.
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r-- | src/backend/libpq/auth.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index df9091e9b46..e3dd02cb489 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.72 2001/11/05 17:46:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.73 2002/02/19 19:49:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -619,9 +619,16 @@ sendAuthRequest(Port *port, AuthRequest areq) pq_sendbytes(&buf, port->cryptSalt, 2); pq_endmessage(&buf); - pq_flush(); + + /* + * Flush message so client will see it, except for AUTH_REQ_OK, + * which need not be sent until we are ready for queries. + */ + if (areq != AUTH_REQ_OK) + pq_flush(); } + #ifdef USE_PAM /* |