diff --git a/Cargo.lock b/Cargo.lock index 06d1b6772f..a45aa06825 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1292,12 +1292,13 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "postgres" version = "0.19.1" -source = "git+https://github.com/zenithdb/rust-postgres.git?rev=a0d067b66447951d1276a53fb09886539c3fa094#a0d067b66447951d1276a53fb09886539c3fa094" +source = "git+https://github.com/zenithdb/rust-postgres.git?rev=9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858#9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" dependencies = [ "bytes", "fallible-iterator", "futures", "log", + "postgres-protocol", "tokio", "tokio-postgres", ] @@ -1305,13 +1306,14 @@ dependencies = [ [[package]] name = "postgres-protocol" version = "0.6.1" -source = "git+https://github.com/zenithdb/rust-postgres.git?rev=a0d067b66447951d1276a53fb09886539c3fa094#a0d067b66447951d1276a53fb09886539c3fa094" +source = "git+https://github.com/zenithdb/rust-postgres.git?rev=9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858#9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" dependencies = [ "base64", "byteorder", "bytes", "fallible-iterator", "hmac", + "lazy_static", "md-5", "memchr", "rand", @@ -1322,7 +1324,7 @@ dependencies = [ [[package]] name = "postgres-types" version = "0.2.1" -source = "git+https://github.com/zenithdb/rust-postgres.git?rev=a0d067b66447951d1276a53fb09886539c3fa094#a0d067b66447951d1276a53fb09886539c3fa094" +source = "git+https://github.com/zenithdb/rust-postgres.git?rev=9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858#9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" dependencies = [ "bytes", "fallible-iterator", @@ -2031,7 +2033,7 @@ dependencies = [ [[package]] name = "tokio-postgres" version = "0.7.1" -source = "git+https://github.com/zenithdb/rust-postgres.git?rev=a0d067b66447951d1276a53fb09886539c3fa094#a0d067b66447951d1276a53fb09886539c3fa094" +source = "git+https://github.com/zenithdb/rust-postgres.git?rev=9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858#9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" dependencies = [ "async-trait", "byteorder", diff --git a/control_plane/Cargo.toml b/control_plane/Cargo.toml index 48ed1ae8c1..946afe0f5c 100644 --- a/control_plane/Cargo.toml +++ b/control_plane/Cargo.toml @@ -9,8 +9,8 @@ edition = "2018" [dependencies] rand = "0.8.3" tar = "0.4.33" -postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } +postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } serde = { version = "1.0", features = ["derive"] } toml = "0.5" lazy_static = "1.4" diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index 51f9d0c773..bf2d562e84 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -9,8 +9,8 @@ edition = "2018" [dependencies] lazy_static = "1.4.0" rand = "0.8.3" -postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } +postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } pageserver = { path = "../pageserver" } walkeeper = { path = "../walkeeper" } diff --git a/pageserver/Cargo.toml b/pageserver/Cargo.toml index 4ccb748e73..84d7562b2f 100644 --- a/pageserver/Cargo.toml +++ b/pageserver/Cargo.toml @@ -27,10 +27,10 @@ daemonize = "0.4.1" rust-s3 = { version = "0.27.0-rc4", features = ["no-verify-ssl"] } tokio = { version = "1.3.0", features = ["full"] } tokio-stream = { version = "0.1.4" } -tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -postgres-types = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -postgres-protocol = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } +tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +postgres-types = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +postgres-protocol = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } rocksdb = "0.16.0" anyhow = "1.0" crc32c = "0.6.0" diff --git a/pageserver/src/walreceiver.rs b/pageserver/src/walreceiver.rs index b991700ad1..d9ee05c739 100644 --- a/pageserver/src/walreceiver.rs +++ b/pageserver/src/walreceiver.rs @@ -26,9 +26,9 @@ use std::str::FromStr; use std::sync::Mutex; use std::thread; use std::thread::sleep; -use std::time::Duration; +use std::time::{Duration, SystemTime}; use tokio::runtime::Runtime; -use tokio_postgres::replication::{PgTimestamp, ReplicationStream}; +use tokio_postgres::replication::ReplicationStream; use tokio_postgres::{NoTls, SimpleQueryMessage, SimpleQueryRow}; use tokio_stream::StreamExt; use zenith_utils::lsn::Lsn; @@ -244,7 +244,7 @@ fn walreceiver_main( let reply_requested: bool = keepalive.reply() != 0; trace!( - "received PrimaryKeepAlive(wal_end: {}, timestamp: {} reply: {})", + "received PrimaryKeepAlive(wal_end: {}, timestamp: {:?} reply: {})", wal_end, timestamp, reply_requested, @@ -254,8 +254,8 @@ fn walreceiver_main( let last_lsn = PgLsn::from(u64::from(timeline.get_last_valid_lsn())); let write_lsn = last_lsn; let flush_lsn = last_lsn; - let apply_lsn = PgLsn::INVALID; - let ts = PgTimestamp::now()?; + let apply_lsn = PgLsn::from(0); + let ts = SystemTime::now(); const NO_REPLY: u8 = 0u8; runtime.block_on( diff --git a/walkeeper/Cargo.toml b/walkeeper/Cargo.toml index 5e2d96f9fc..267c408819 100644 --- a/walkeeper/Cargo.toml +++ b/walkeeper/Cargo.toml @@ -23,9 +23,9 @@ daemonize = "0.4.1" rust-s3 = { version = "0.27.0-rc4", features = ["no-verify-ssl"] } tokio = { version = "1.3.0", features = ["full"] } tokio-stream = { version = "0.1.4" } -tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -postgres-protocol = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } -postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="a0d067b66447951d1276a53fb09886539c3fa094" } +tokio-postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +postgres-protocol = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } +postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" } anyhow = "1.0" crc32c = "0.6.0" parse_duration = "2.1.1"