Re: Performance Issue with Hash Partition Query Execution in PostgreSQL 16

2024-11-07 Thread ravi k
Hi , Thanks for the suggestions. Two more observations: 1) no sequence scan noticed from pg_stat_user_tables ( hope stats are accurate in postgres 16) if parameter sniffing happens the possibility of going to sequence scan is more right. 2) no blockings or IO issue during the time. 3) even wi

Re: Advice on cluster architecture for two related, but distinct, use cases

2024-11-07 Thread Zahid Rahman
Perhaps a 14 minute investment in this article may prove fruitful. https://medium.com/@martin.hodges/adding-a-postgres-high-availability-database-to-your-kubernetes-cluster-634ea5d6e4a1 On Thu, 7 Nov 2024, 21:06 Matthias Leisi, wrote: > Dear all, > > (This is a follow-up to a question I asked

Re: Trouble using pg_rewind to undo standby promotion

2024-11-07 Thread Craig McIlwee
> > >> Are you archiving WAL on the promoted machine in a way that your >> restore_command can find it? Check archive_command and archive_mode on the >> promoted machine. >> > > No, the promoted machine is not archiving. How should that work? Is it > OK for a log shipping standby that uses restor

How to recover correctly master and replica using backup made by pg_basebackup?

2024-11-07 Thread Evgeniy Ratkov
Hello. I try to use pg_basebackup to make backup and recover master and replica from it. I recover master with action "promote". Next, I recover replica from the same backup with action "shutdown". After it, I start replica with configured connection and replication slot to the master. I get e

Re: About the stability of COPY BINARY data

2024-11-07 Thread Dominique Devienne
On Thu, Nov 7, 2024 at 7:04 PM Adrian Klaver wrote: > On 11/7/24 09:55, Dominique Devienne wrote: > > On Thu, Nov 7, 2024 at 6:39 PM Daniel Verite > > wrote: > >> Dominique Devienne wrote: > >>> Also, does the code for per-type _send() and _recv() functions > >>> really change across ve

Re: About the stability of COPY BINARY data

2024-11-07 Thread Adrian Klaver
On 11/7/24 09:55, Dominique Devienne wrote: On Thu, Nov 7, 2024 at 6:39 PM Daniel Verite wrote: Dominique Devienne wrote: Also, does the code for per-type _send() and _recv() functions really change across versions of PostgreSQL? How common are instances of such changes across version

Re: About the stability of COPY BINARY data

2024-11-07 Thread Dominique Devienne
On Thu, Nov 7, 2024 at 6:39 PM Daniel Verite wrote: > Dominique Devienne wrote: > > Also, does the code for per-type _send() and _recv() functions > > really change across versions of PostgreSQL? How common are > > instances of such changes across versions? Any examples of such > > backwar

Re: About the stability of COPY BINARY data

2024-11-07 Thread Daniel Verite
Dominique Devienne wrote: > Also, does the code for per-type _send() and _recv() functions > really change across versions of PostgreSQL? How common are > instances of such changes across versions? Any examples of such > backward-incompatible changes, in the past? For the timestamp types,

Re: About the stability of COPY BINARY data

2024-11-07 Thread Dominique Devienne
On Thu, Nov 7, 2024 at 5:37 PM Adrian Klaver wrote: > > On 11/6/24 08:20, Dominique Devienne wrote: > >>From https://www.postgresql.org/docs/current/sql-copy.html: > > |> binary-format file is less portable across machine architectures > > and PostgreSQL versions > > > > In my experience, the bina

Re: About the stability of COPY BINARY data

2024-11-07 Thread Adrian Klaver
On 11/6/24 08:20, Dominique Devienne wrote: From https://www.postgresql.org/docs/current/sql-copy.html: |> binary-format file is less portable across machine architectures and PostgreSQL versions In my experience, the binary encoding of binding/resultset/copy is endian neutral (network byte ord

Re: Trouble using pg_rewind to undo standby promotion

2024-11-07 Thread Craig McIlwee
On Thu, Nov 7, 2024 at 4:47 AM Torsten Förtsch wrote: > Your point of divergence is in the middle of the 7718/00BF file. So, > you should have 2 such files eventually, one on timeline 1 and the other on > timeline 2. > > Are you archiving WAL on the promoted machine in a way that your > resto

Re: Trouble using pg_rewind to undo standby promotion

2024-11-07 Thread Torsten Förtsch
Your point of divergence is in the middle of the 7718/00BF file. So, you should have 2 such files eventually, one on timeline 1 and the other on timeline 2. Are you archiving WAL on the promoted machine in a way that your restore_command can find it? Check archive_command and archive_mode on t