- TCP + startup (
handler.rs:165-225):SSLRequest (80877103/4) → N,CancelRequest → close, else require protocol196608withuser/databasedefaults. - Auth (
session.rs,scram.rs):Cleartext(R3),Md5(R5 salt=pid bytes),Scram(R10→R11→R12, salt=sha256(password)[..16], PBKDF2 4096/32),disabled → R0. Pure-Rust crypto. - Simple
Q: empty →EmptyQuery;COPY … STDIN/STDOUT→ copy frames;DEALLOCATE/DISCARD/UNLISTEN/LISTEN/NOTIFY/CREATE|DROP DATABASE/USE/SHOW DATABASESvia registry or stub; elseExecutor::execute*→T/D/C/E/N/Z(Trowdesc table/col 0,Ddatarow -1=NULL, text values only). - Extended
P/B/D/E/S:Parse→1(store query+types+generation),Bind→2(decode text/binary per OID),Describe→t/T/n,Execute(appendLIMIT max_rows; batchable plain multi-VALUESINSERTs staged, flushed asBEGIN;…;COMMITat Sync),Sync→flush+Z, errors →E+InFailedTransactionuntilSync. - Execution:
statement_type()dispatch,block_in_placeengine calls,pg_catalog/information_schemaserved from live in-memory catalog + session params (server_version 17.0,search_path "$user",public, …).
Transport: set_nodelay, BufReader/Writer, MAX_FRONTEND_MESSAGE_SIZE 64 MiB, max_connections=100000 graceful reject, connection_id/query_id tracing.
Was this page helpful? Thanks — noted locally, nothing is sent anywhere.