Remove unused FE/BE ControlFile message.

It's a remnant of some old tests in Zenith, but isn't used anymore. It
doesn't exist in PostgreSQL.
This commit is contained in:
Heikki Linnakangas
2021-09-17 20:06:04 +03:00
parent c2af6d98db
commit 745627c8ca
2 changed files with 1 additions and 17 deletions

View File

@@ -254,14 +254,6 @@ impl PageServerHandler {
}
}
fn handle_controlfile(&self, pgb: &mut PostgresBackend) -> io::Result<()> {
pgb.write_message_noflush(&SINGLE_COL_ROWDESC)?
.write_message_noflush(&BeMessage::ControlFile)?
.write_message(&BeMessage::CommandComplete(b"SELECT 1"))?;
Ok(())
}
fn handle_pagerequests(
&self,
pgb: &mut PostgresBackend,
@@ -502,9 +494,7 @@ impl postgres_backend::Handler for PageServerHandler {
}
let query_string = std::str::from_utf8(&query_string)?;
if query_string.starts_with("controlfile") {
self.handle_controlfile(pgb)?;
} else if query_string.starts_with("pagestream ") {
if query_string.starts_with("pagestream ") {
let (_, params_raw) = query_string.split_at("pagestream ".len());
let params = params_raw.split(' ').collect::<Vec<_>>();
ensure!(

View File

@@ -337,7 +337,6 @@ pub enum BeMessage<'a> {
AuthenticationCleartextPassword,
BindComplete,
CommandComplete(&'a [u8]),
ControlFile,
CopyData(&'a [u8]),
CopyDone,
CopyFail,
@@ -530,11 +529,6 @@ impl<'a> BeMessage<'a> {
})?;
}
BeMessage::ControlFile => {
// TODO pass checkpoint and xid info in this message
BeMessage::write(buf, &BeMessage::DataRow(&[Some(b"hello pg_control")]))?;
}
BeMessage::CopyData(data) => {
buf.put_u8(b'd');
write_body(buf, |buf| {