From 5a9df06cabb6cbc11e4f7b214ef6d243499816c7 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Thu, 10 Aug 2023 12:23:16 -0700 Subject: [PATCH 1/3] Add pgcat user --- postinst | 5 +++++ postrm | 1 + prerm | 1 + 3 files changed, 7 insertions(+) diff --git a/postinst b/postinst index 54c04119..50138c2b 100644 --- a/postinst +++ b/postinst @@ -1,4 +1,9 @@ #!/bin/bash +set -e systemctl daemon-reload systemctl enable pgcat + +if ! id pgcat 2> /dev/null; then + useradd -s /usr/bin/false pgcat +fi diff --git a/postrm b/postrm index ab20f7b0..ec1d0f7e 100644 --- a/postrm +++ b/postrm @@ -1,3 +1,4 @@ #!/bin/bash +set -e systemctl daemon-reload diff --git a/prerm b/prerm index 6dd0e3ac..601b6991 100644 --- a/prerm +++ b/prerm @@ -1,4 +1,5 @@ #!/bin/bash +set -e systemctl stop pgcat systemctl disable pgcat From aba85975af6b85a9fdfb28e82864b167ea263221 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Thu, 10 Aug 2023 12:24:34 -0700 Subject: [PATCH 2/3] warn --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/server.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec849329..5033eef4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -990,7 +990,7 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pgcat" -version = "1.1.1" +version = "1.1.2" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index c3db48aa..eec90443 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgcat" -version = "1.1.1" +version = "1.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/server.rs b/src/server.rs index c4d7a1af..b006e77b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -9,7 +9,7 @@ use postgres_protocol::message; use std::collections::{BTreeSet, HashMap, HashSet}; use std::mem; use std::net::IpAddr; -use std::sync::{Arc, Once}; +use std::sync::Arc; use std::time::SystemTime; use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, BufStream}; use tokio::net::TcpStream; From 2ba0418b9d57ec1f9aed6d1c5b4b2993d9a2f008 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Thu, 10 Aug 2023 12:25:22 -0700 Subject: [PATCH 3/3] dev --- .github/workflows/publish-deb-package.yml | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-deb-package.yml b/.github/workflows/publish-deb-package.yml index b46b37da..bfd29f28 100644 --- a/.github/workflows/publish-deb-package.yml +++ b/.github/workflows/publish-deb-package.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: packageVersion: - default: "1.1.1" + default: "1.1.2-dev" jobs: build: strategy: diff --git a/Cargo.lock b/Cargo.lock index 5033eef4..459312c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -990,7 +990,7 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pgcat" -version = "1.1.2" +version = "1.1.2-dev" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index eec90443..805a4c7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgcat" -version = "1.1.2" +version = "1.1.2-dev" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html