psql and regex not like

2025-03-07 Thread Ron Johnson
This statement runs great from the psql prompt. Does exactly what I want. select datname from pg_database WHERE datname !~ 'template|postgres' ORDER BY datname; But it doesn't work so well from the bash prompt. Not escaping the "!" generates a bunch of garbage, while escaping throws an sql synta

Re: No. Of wal files generated

2025-03-07 Thread Greg Sabino Mullane
Take a look at the pg_stat_archiver view, if you have not already: https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ARCHIVER-VIEW So I want to check how many wal file got created in x minutes and how many > .ready files got created in those x minutes. > It's not c

Re: No. Of wal files generated

2025-03-07 Thread Ron Johnson
On Fri, Mar 7, 2025 at 7:53 PM Atul Kumar wrote: > Please can you elaborate more about the meaning of inotifywait. > Google is your friend. > And how pgbackrest will solve the issue ? > PgBackRest does all the WAL archiving for you, keeps track of them, makes sure they are not overwritten, pu

Re: No. Of wal files generated

2025-03-07 Thread Atul Kumar
Please can you elaborate more about the meaning of inotifywait. And how pgbackrest will solve the issue ? Regards. On Sat, 8 Mar 2025, 01:37 Ron Johnson, wrote: > inotifywait can log every file creation and deletion in a directory. > > Honestly, though, I'd strongly think about using PgBack

Re: Query editor window not appearing

2025-03-07 Thread Adrian Klaver
On 3/7/25 08:30, Seggie, Graeme wrote: OFFICIAL Hello, I have recently upgraded my pgAdmin install on Windows 10 Enterprise to pgAdmin 4 v9.1. Having done so, when opening, my connections work for listing tables etc, but query editor will not open as a functioning window. It is listed as a

Re: Asking for OK for a nasty trick to resolve PG CVE-2025-1094 i

2025-03-07 Thread Laurenz Albe
[redirecting to pgsql-general] On Thu, 2025-03-06 at 07:39 +, Abraham, Danny wrote: > I have many customers using PG 15.3 happily, and I cannot just snap upgrade > them all to 15.12. Why do you think you cannot do that? In the long run, you'll be sorry if you don't. It is just a matter of re

Is pg_basebackup Performance Limited by Files Page Cache?

2025-03-07 Thread Alexandru Lazarev
Hi everyone, I'm a Java developer, so please bear with me if my description isn't perfect. I hope the community can help me understand this issue better. I have PostgreSQL 15 running in a Kubernetes Pod using the Zalando Spilo image, managed by Patroni. The container has a memory limit of 16 GB, a

Changing column filter for existing publication with WAL backlog

2025-03-07 Thread Atapys Sharsh
Hi, Recently, I decided to add column filtering for our publication. The commands I used were: ALTER SUBSCRIPTION mysub DISABLE; ALTER PUBLICATION mypub SET TABLE public.my_table(id, first_column, another_column), TABLE public.other_table; -- excluding third_column ALTER SUBSCRIPTION mysub ENABL

Re: No. Of wal files generated

2025-03-07 Thread Atul Kumar
I want to check and compare the speed wal file generation process and archival process. So I want to check how many wal file got created in x minutes and how many .ready files got created in those x minutes. Regards, Atul On Fri, 7 Mar 2025, 22:45 Ron Johnson, wrote: > On Fri, Mar 7, 2025 a

Re: Duplicate Key Values

2025-03-07 Thread mark bradley
Wouldn't that be nice 🙂 Best regards, Mark Brady amazon.com/author/markjbrady From: Adrian Klaver Sent: Friday, March 7, 2025 10:55 AM To: mark bradley Cc: pgsql-general Subject: Re: Duplicate Key Values On 3/7/25 06:34, m

Re: Duplicate Key Values

2025-03-07 Thread Adrian Klaver
On 3/7/25 11:47, mark bradley wrote: Wouldn't that be nice 🙂 No, because you would end up with a mess. My AI rant: AI is neither artificial or intelligent. It is human code that pattern matches and then throws the matches against the wall and hope something sticks. It is left to the human t

Re: No. Of wal files generated

2025-03-07 Thread Ron Johnson
inotifywait can log every file creation and deletion in a directory. Honestly, though, I'd strongly think about using PgBackRest instead of something you wrote yourself. On Fri, Mar 7, 2025 at 2:47 PM Atul Kumar wrote: > I want to check and compare the speed wal file generation process and > a

Re: No. Of wal files generated

2025-03-07 Thread Ron Johnson
On Fri, Mar 7, 2025 at 10:59 AM Atul Kumar wrote: > Hi, > > Please could you help me by sharing any redhat linux command through which > I can count the no. of wal files and no. of ".ready" files generated in > last 10 minutes. > What problem are you trying to solve? -- Death to , and butter s

RE: Query editor window not appearing

2025-03-07 Thread Seggie, Graeme
OFFICIAL Just to update on this, I realised the window is actually present, it just needs to be maximised or resized and then the results of a query (Data Output) have to be switched to or resized etc - quite a different default to what I was used to, that's all. Graeme OFFICIAL From: Segg

Query editor window not appearing

2025-03-07 Thread Seggie, Graeme
OFFICIAL Hello, I have recently upgraded my pgAdmin install on Windows 10 Enterprise to pgAdmin 4 v9.1. Having done so, when opening, my connections work for listing tables etc, but query editor will not open as a functioning window. It is listed as a title with Query History, Data Output, Mes

No. Of wal files generated

2025-03-07 Thread Atul Kumar
Hi, Please could you help me by sharing any redhat linux command through which I can count the no. of wal files and no. of ".ready" files generated in last 10 minutes. Regards, Atul

Re: Duplicate Key Values

2025-03-07 Thread Adrian Klaver
On 3/7/25 06:34, mark bradley wrote: This is what MS Copilot has to say about this apparent bug where Postgres inserts extra rows violating a primary keys uniqueness constraint: What to do?  I hesitate to just delete my tables and start over because this error will reoccur. Let the AI solv

Re: Duplicate Key Values

2025-03-07 Thread Greg Sabino Mullane
On Fri, Mar 7, 2025 at 9:35 AM mark bradley wrote: > This is what MS Copilot has to say about this apparent bug where Postgres > inserts extra rows violating a primary keys uniqueness constraint: > > Yes, this issue has been encountered by others. There are a few potential > reasons why this migh

Re: Duplicate Key Values

2025-03-07 Thread mark bradley
Here are some of the references from Copilot https://dba.stackexchange.com/questions/62675/why-does-my-table-hold-duplicate-primary-keys https://stackoverflow.com/questions/1461/having-duplicate-rows-on-a-primary-key-and-unique-constraints-in-postgres Best regards, Mark Brady amazon.com/aut

Re: Duplicate Key Values

2025-03-07 Thread mark bradley
This is what MS Copilot has to say about this apparent bug where Postgres inserts extra rows violating a primary keys uniqueness constraint: Yes, this issue has been encountered by others. There are a few potential reasons why this might happen: 1. Sequence Out of Sync: Sometimes, the sequenc

Re: Review my steps for rollback to restore point

2025-03-07 Thread Greg Sabino Mullane
On Thu, Mar 6, 2025 at 6:49 AM chandan Kumar wrote: > need any correction or advise. > Honestly, this all seems overly complex and fragile. I'm not sure what the overall goal is, but if it's to have a general PITR solution, use pgBackRest. If it's just to have a fall back method for a particular

Re: [EXTERNAL] Re: Asking for OK for a nasty trick to resolve PG CVE-2025-1094 i

2025-03-07 Thread Greg Sabino Mullane
CVE-2025-1094 has a narrow blast radius. If you are not directly affected, I would focus your efforts on getting to 17. But the lack of an existing process to smoothly upgrade minor revisions is worrying and something that needs to get addressed as well. Cheers, Greg -- Crunchy Data - https://www

Vacuum related question

2025-03-07 Thread Bartosz Stalewski
Hello All! I'm currently using 17.2 version and working on optimizing vacuums. I would be greateful if you could confirm (or deny) my idea. Current situation: Every 4-5 days vacuum to prevent wraparound is running in my DB, which of course is bad. There are a few tables that are constantly being