BackendKeyData is mandatory? - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject BackendKeyData is mandatory?
Date
Msg-id 20250617.101056.1437027795118961504.ishii@postgresql.org
Whole thread Raw
Responses Re: BackendKeyData is mandatory?
List pgsql-hackers
In the Frontend/Backend protocol, it is explained that after
successful authentication following messages can be sent from backend
to frontend[1]:

BackendKeyData
ParameterStatus
ReadyForQuery
ErrorResponse
NoticeResponse

My question is, BackendKeyData is mandatory or not. Currently
Pgpool-II raises a fatal error if BackendKeyData is not sent before
ReadyForQuery arrives. This is because without the message, frontend
cannot send a CancelRequest message later on, as there's no secret
key.

I heard that some "PostgreSQL compatible" servers do not send
BackendKeyData message to frontend. I wonder if this is a protocol
violation.

[1] https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-START-UP

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pg_dump --with-* options
Next
From: Vaibhav Dalvi
Date:
Subject: Re: pg_upgrade fails with an error "object doesn't exist"