Re: pg_rewind problem: cannot find WAL

2025-05-07 Thread Luca Ferrari
On Wed, May 7, 2025 at 3:55 PM Laurenz Albe wrote: > > I don't think it is connected to a WAL switch. > Thanks. > I'd say that you should set "wal_keep_size" high enough that all the WAL > needed for pg_rewind is still present. > > If you have a WAL archive, you could define a restore_command on

Re: huge_pages=on cause could not map anonymous shared memory: Cannot allocate memory

2025-05-07 Thread Greg Sabino Mullane
Kudos to Alicja for that excellent answer. It would be nice if the Postgres log message was a little more descriptive. (throws it onto my huge pile of "future maybe enhancement ideas") Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Suppor

Re: huge_pages=on cause could not map anonymous shared memory: Cannot allocate memory

2025-05-07 Thread Bogdan Siara
Hi Alicja, Thanks for your advice, now postgresql works fine with 'huge_pages=on'. Regards Bogdan śr., 7 maj 2025 o 14:17 Alicja Kucharczyk napisał(a): > Hi Bogdan, > The root cause here is that the number of huge pages you've configured > (vm.nr_hugepages = 980) is not sufficient. > Each huge p

Re: Pgbackrest failure for INCR and DIFF but not FULL backup

2025-05-07 Thread Greg Sabino Mullane
On Wed, May 7, 2025 at 7:15 AM KK CHN wrote: > *archive_command = 'pgbackrest --stanza=My_Repo archive-push %p && cp %p > /data/archive/%f' * > Don't do this. You are archiving twice, and worse, the first part is using async archiving. Remove that whole "cp" part. Once that is fixed, run: pgbac

Re: pg_rewind problem: cannot find WAL

2025-05-07 Thread Laurenz Albe
On Wed, 2025-05-07 at 12:51 +0200, Luca Ferrari wrote: > running 17.4 on ubuntu 24.04 machines. I've three hosts, pg-1 > (primary) and two physical replicas. > I then promote host pg-3 as a master (pg_promote()) and want to rewind > the pg-1 to follow the new master, so: > > ssh pg-3 'sudo -u post

Re: huge_pages=on cause could not map anonymous shared memory: Cannot allocate memory

2025-05-07 Thread Alicja Kucharczyk
Hi Bogdan, The root cause here is that the number of huge pages you've configured (vm.nr_hugepages = 980) is not sufficient. Each huge page on your system is 2 MB in size, so 980 pages give you roughly 1.96 GB of memory (980 × 2 MB). However, PostgreSQL is clearly requesting about 2.2 GB of shared

Re: Soundness of strategy for detecting locks acquired by DDL statements

2025-05-07 Thread Agis
On Wed, May 7, 2025, 00:57 Laurenz Albe wrote: > On Tue, 2025-05-06 at 12:06 +0300, Agis Anastasopoulos wrote: > > I'd like to "preflight" a given schema migration (i.e. one or > > more DDL statements) before applying it to the production database (e.g. > > for use in a CI pipeline). I'm thinking

Pgbackrest failure for INCR and DIFF but not FULL backup

2025-05-07 Thread KK CHN
Hi folks, I am facing a strange issue, Pgbackrest backup fails for DIFF or INCR backups but not Full backup, with the * error WAL file cannot be archived before 6 ms timeout.* The pgbackrest " *stanza check* " command *sometimes succeeds, but sometimes fails.* I don't know why * PG is u

pg_rewind problem: cannot find WAL

2025-05-07 Thread Luca Ferrari
Hi all, running 17.4 on ubuntu 24.04 machines. I've three hosts, pg-1 (primary) and two physical replicas. I then promote host pg-3 as a master (pg_promote()) and want to rewind the pg-1 to follow the new master, so: ssh pg-3 'sudo -u postgres /usr/lib/postgresql/17/bin/pg_rewind -D /var/lib/postg

huge_pages=on cause could not map anonymous shared memory: Cannot allocate memory

2025-05-07 Thread Bogdan Siara
Hi, I have problem to run postgresql on ubuntu 24.04 server with huge_pages = on. My instance have 8GB ram and 2 vcpus (t3a.large). My configuration is: max_connections = 1000 superuser_reserved_connections = 3 shared_buffers = 1960MB effective_cache_size = 5881MB huge_pages = on temp_buffers = 32

Re: Error in DROP TABLESPACE

2025-05-07 Thread Laurenz Albe
On Wed, 2025-05-07 at 08:16 +, Fagnani Gabriele G (GDS I&TS) wrote: > INTERNAL ? > I've run into an odd problem - I have what seems to be a "zombie" tablespace > that PostgreSQL won't let me drop, but nothing inside it is active. >   > drop tablespace ts_idx_wb2; > ERROR:  tablespace "ts_idx_

Error in DROP TABLESPACE

2025-05-07 Thread
INTERNAL Hi, I've run into an odd problem - I have what seems to be a "zombie" tablespace that PostgreSQL won't let me drop, but nothing inside it is active. drop tablespace ts_idx_wb2; ERROR: tablespace "ts_idx_wb2" is not empty postgres=# \db+ ts_idx_wb2