Re: CLOSE_WAIT pileup and Application Timeout

2024-10-07 Thread Alvaro Herrera
On 2024-Oct-07, KK CHN wrote: > On Mon, Oct 7, 2024 at 12:07 AM Alvaro Herrera > wrote: > Where do I have to introduce the TCP keepalives ? in the OS level or > application code level ? > > [root@dbch wildfly-27.0.0.Final]# cat /proc/sys/net/ipv4/tcp_keepalive_time > 7200 > [root@dbch wildfly-2

Re: CLOSE_WAIT pileup and Application Timeout

2024-10-07 Thread KK CHN
On Mon, Oct 7, 2024 at 12:07 AM Alvaro Herrera wrote: > On 2024-Oct-04, KK CHN wrote: > > > The mobile tablets are installed with the android based vehicle > > tracking app which updated every 30 seconds its location fitted inside > the > > vehicle ( lat long coordinates) to the PostgreSQL DB thr

Get cursor name for invalid_cursor_name error

2024-10-07 Thread PetSerAl
How to reliable get cursor name which cause invalid_cursor_name error? postgres=# CREATE FUNCTION value_from_cursor_unsafe(cursor_name text) RETURNS integer postgres-# STRICT LANGUAGE plpgsql postgres-# AS $$ postgres$# DECLARE postgres$# cursor CONSTANT refcursor NOT NULL := cursor_name; po

Re: Get cursor name for invalid_cursor_name error

2024-10-07 Thread Adrian Klaver
On 10/7/24 08:15, PetSerAl wrote: How to reliable get cursor name which cause invalid_cursor_name error? postgres=# CREATE FUNCTION value_from_cursor_unsafe(cursor_name text) RETURNS integer postgres-# STRICT LANGUAGE plpgsql postgres-# AS $$ postgres$# DECLARE postgres$# cursor CONSTANT r

backup

2024-10-07 Thread Andy Hartman
anyone use Powershell in an automated fashion to do DB backup? Would you share your example? Thanks.

Re: Question on pg_stat* views

2024-10-07 Thread Greg Sabino Mullane
Adrian and Veem were saying: > > so does it mean that we should increase the pg_stat_statement.max to > further higher value? > Yes, you should raise this setting if you find your queries are getting pushed out. Moving to version 17 will also help, as myself and others have been working on norma

Re: backup

2024-10-07 Thread Adrian Klaver
On 10/7/24 08:48, Andy Hartman wrote: anyone use Powershell in an automated fashion to do DB backup?  Would you share your example? Search engine of your choice: "powershell postgresql backup script" Using DuckDuckGo I see 6 relevant entries right of the top.  Thanks. -- Adrian Klaver ad

Re: backup

2024-10-07 Thread Ron Johnson
On Mon, Oct 7, 2024 at 11:48 AM Andy Hartman wrote: > anyone use Powershell in an automated fashion to do DB backup? Would you > share your example? > PS can execute utilities, so using it as a wrapper for pg_dump and pg_restore (just like a bash script) is perfectly viable. -- Death to , and

Re: Repeatable Read Isolation Level "transaction start time"

2024-10-07 Thread Greg Sabino Mullane
On Sat, Oct 5, 2024 at 5:03 PM Tom Lane wrote: > As I mentioned upthread, we currently promise that xact_start matches the > query_start of the transaction's first statement. (I'm not sure > how well that's documented, but the code goes out of its way to make it > so, so somebody thought it was

Re: backup

2024-10-07 Thread Muhammad Usman Khan
Hi, You can refer the following: Automating PostgreSQL Backups with Python Using pg_basebackup | by Usman Khan | Sep, 2024 | Medium Automating PostgreSQL Backups with PG Back Web: The Com

Re: Load balancing of write queries among health-checked nodes

2024-10-07 Thread Ron Johnson
On Mon, Oct 7, 2024 at 11:04 PM wrote: > Hello. I have a PostgreSQL high availability cluster with Pgpool-II, but I > don't use the virtual IP feature so my clients don't know which node to > send queries to. DNS round-robin is not a solution because it can't > distinguish between healthy and dea

Re: Load balancing of write queries among health-checked nodes

2024-10-07 Thread me+postgres
Among PostgreSQL instances there is only one master. But yes, each server may be considered master by the clients because it's Pgpool-II will redirect write queries to the actual master. Maybe it's even better to avoid this unnecessary traffic between servers and decide which Pgpool-II is in fro

Load balancing of write queries among health-checked nodes

2024-10-07 Thread me+postgres
Hello. I have a PostgreSQL high availability cluster with Pgpool-II, but I don't use the virtual IP feature so my clients don't know which node to send queries to. DNS round-robin is not a solution because it can't distinguish between healthy and dead nodes. I thought about having a Pgpool-II i

Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2024-10-07 Thread Thomas Munro
Hi Kirk, Just as an FYI since you were working in this area, Tom has just knocked off one of the blockers for tab completion on Windows, namely that MSVC didn't like the overgrown if-then-else code in tab-complete.c[1]. That is now fixed in PostgreSQL's master branch[2][3][4] (v18 to be). [1] h