Re: It is possible to force periodically switch xlog?
Hi Edson, You can switch by using below command below PG 10. Select pg_switch_xlog(); And there is no parameter present to switch it. Regards, Abdul Sayeed On Thursday, April 2, 2020, Edson Richter wrote: > I would like to know if there is any parameter I can set to force postgres > to switch xlog periodically, even if it not reach the 16MB size? > > Thanks, > > Edson. > > -- Thanks & Regards, Abdul Sayeed PostgreSQL DBA Postgres Professional Certified Skype: abdul.sayeed24
Re: Patroni & PostgreSQL issue
Hi Uma, If i understand your scenario correct, after failover, Patroni created deleted files on old primary by replciating from New primary? If that is correct, i would recommend to check lag between new primary and old primary(now slave). if it is zero then we are good to perform failover. Regards, Abdul Sayeed On Wed, Jul 20, 2022 at 5:29 PM Sankar, Uma (Uma) wrote: > Hi All, > > > > This is regarding the Postgres HA working with patroni in 3 node setup, we > have an issue with the primary because a few database files were deleted > manually so performed a switch over to move the services from primary to > secondary with patroni, post the switchover was deleted file was re-created > by itself in the old primary. > > > > Now we are planning to switch back the services from secondary(Leader) to > primary(replica) as the deleted files were re-created itself, can someone > please suggest if this works normally when we switch back to promote > primary as the leader and secondary as a replica. > > > > > > *Regards,* > > *Uma Sankar* > > > -- Thanks & Regards, Abdul Sayeed PostgreSQL DBA Postgres Professional Certified Skype: abdul.sayeed24
Re: Postgres to edb AS, need conversion?
After migration you need to execute below command from SQL Prompt: vacuum (verbose, analyze); --> to update statistics. Rest is good. Regards, Abdul Sayeed On Thu, Nov 3, 2022 at 3:15 PM milist ujang wrote: > Hi all, > > Anyone have experiences or someone from edb can guid about change engine > from postgres open source to edb as, di I need to convert the data or > simply plug-and-play? Or need run a tool to add catalog table owned by edb > as? > > > -- > regards > > ujang jaenudin | DBA Consultant (Freelancer) > http://ora62.wordpress.com > http://id.linkedin.com/pub/ujang-jaenudin/12/64/bab > -- Thanks & Regards, Abdul Sayeed PostgreSQL DBA Postgres Professional Certified Skype: abdul.sayeed24
Re: High Availability and Replication
Hi, When Master server goes down, either you need to promote one of slave node or configure HA mechanism so that in case of master server goes down it will automatically promote the slave server as new master. Patroni HA tool would be good option for your requirement. https://patroni.readthedocs.io/en/latest/README.html Hope this helps. Thanks & Regards, Abdul Sayeed PostgreSQL DBA On Sat, 2 Mar 2024 at 2:15 AM, Israel Brewster wrote: > On Mar 1, 2024, at 11:36 AM, normandavis1990 > wrote: > > > On Thursday, February 29th, 2024 at 11:38 PM, Israel Brewster < > ijbrews...@alaska.edu> wrote: > > On Feb 29, 2024, at 10:15 AM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > > > > On Thursday, February 29, 2024, normandavis1990 > wrote: > >> >> What is the difference between High Availability and Replication? >> > > The former is a goal, the later is a technique. > > > Perhaps more specifically: Replication is simply Replicating - or copying > - the “master” database to one or more “slave” databases, generally in > real-time such that the slave database clusters are replicas of the master. > This is good when the master goes down, because you’ll still have one or > more copies of it available, but by itself it doesn’t keep there from being > an outage if/when the master goes down. > > High Availability layers on top of replication to provide some means of > ensuring that the database is HIGHLY available, such as an automatic > failover system or load balancer. Many different options that work in many > different ways are available to help meet this goal. > --- > Israel Brewster > Software Engineer > Alaska Volcano Observatory > Geophysical Institute - UAF > 2156 Koyukuk Drive > <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail&source=g> > > Fairbanks AK 99775-7320 > <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail&source=g> > Work: 907-474-5172 > cell: 907-328-9145 > > > David J. > > > > > Hi, > You said "This is good when the master goes down, because you’ll still > have one or more copies of it available, but by itself it doesn’t keep > there from being an outage if/when the master goes down.". What does "goes > down" mean? > > > Exactly what I said - it goes down. Not functioning. Offline. > Inaccessible. It is not up and running, therefore, it is down. > > In Replication mode, if the primary server is shut down, then the data > will also be lost? > > > No. As I said - and you quoted - “When the master goes down…you’ll still > have one or more copies of it available”. So no, the data will NOT be lost. > > --- > Israel Brewster > Software Engineer > Alaska Volcano Observatory > Geophysical Institute - UAF > 2156 Koyukuk Drive > <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail&source=g> > > Fairbanks AK 99775-7320 > <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail&source=g> > Work: 907-474-5172 > cell: 907-328-9145 > >
Re: High Availability and Replication
Hi, Not required. Thanks & Regards, Abdul Sayeed PostgreSQL DBA Postgres Professional Certified Skype: abdul.sayeed24 On Sat, 2 Mar 2024 at 12:21 PM, normandavis1990 wrote: > > On Saturday, March 2nd, 2024 at 1:24 AM, Abdul Sayeed < > abdulsayee...@gmail.com> wrote: > > Hi, > > When Master server goes down, either you need to promote one of slave node > or configure HA mechanism so that in case of master server goes down it > will automatically promote the slave server as new master. > > Patroni HA tool would be good option for your requirement. > > https://patroni.readthedocs.io/en/latest/README.html > > Hope this helps. > > > > Thanks & Regards, > Abdul Sayeed > PostgreSQL DBA > > > > On Sat, 2 Mar 2024 at 2:15 AM, Israel Brewster > wrote: > >> On Mar 1, 2024, at 11:36 AM, normandavis1990 >> wrote: >> >> > On Thursday, February 29th, 2024 at 11:38 PM, Israel Brewster < >> ijbrews...@alaska.edu> wrote: >> >> On Feb 29, 2024, at 10:15 AM, David G. Johnston < >> david.g.johns...@gmail.com> wrote: >> >> >> >> On Thursday, February 29, 2024, normandavis1990 < >> normandavis1...@proton.me> wrote: >> >>> >>> What is the difference between High Availability and Replication? >>> >> >> The former is a goal, the later is a technique. >> >> >> Perhaps more specifically: Replication is simply Replicating - or copying >> - the “master” database to one or more “slave” databases, generally in >> real-time such that the slave database clusters are replicas of the master. >> This is good when the master goes down, because you’ll still have one or >> more copies of it available, but by itself it doesn’t keep there from being >> an outage if/when the master goes down. >> >> High Availability layers on top of replication to provide some means of >> ensuring that the database is HIGHLY available, such as an automatic >> failover system or load balancer. Many different options that work in many >> different ways are available to help meet this goal. >> --- >> Israel Brewster >> Software Engineer >> Alaska Volcano Observatory >> Geophysical Institute - UAF >> 2156 Koyukuk Drive >> <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail> >> Fairbanks AK 99775-7320 >> <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail> >> Work: 907-474-5172 >> cell: 907-328-9145 >> >> >> David J. >> >> >> >> Hi, >> You said "This is good when the master goes down, because you’ll still >> have one or more copies of it available, but by itself it doesn’t keep >> there from being an outage if/when the master goes down.". What does "goes >> down" mean? >> >> >> Exactly what I said - it goes down. Not functioning. Offline. >> Inaccessible. It is not up and running, therefore, it is down. >> >> In Replication mode, if the primary server is shut down, then the data >> will also be lost? >> >> >> No. As I said - and you quoted - “When the master goes down…you’ll still >> have one or more copies of it available”. So no, the data will NOT be lost. >> >> --- >> Israel Brewster >> Software Engineer >> Alaska Volcano Observatory >> Geophysical Institute - UAF >> 2156 Koyukuk Drive >> <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail> >> Fairbanks AK 99775-7320 >> <https://www.google.com/maps/search/2156+Koyukuk+Drive+Fairbanks+AK+99775-7320?entry=gmail> >> Work: 907-474-5172 >> cell: 907-328-9145 >> >> > Hi, > Does installing Patroni cause the primary server to stop even for a short > time? >
Re: Pgbackrest : Resumable backup of same type exists
Hello, This warning message indicates that a *resumable backup*, labeled 20250425-115723F, already exists from a previous attempt. The backup system has detected it and will do the following: - *Remove any invalid or corrupted files* from that existing backup attempt. - *Resume* the backup from where it left off, rather than starting over. This is a *normal and expected message* if a previous backup was interrupted (due to system shutdown, network error, etc.). It helps avoid wasting time and resources by reusing valid parts of the incomplete backup. If you're concerned or just reviewing logs, you generally *don’t need to take action* unless: - The resume process fails. - The backup system repeatedly logs this message without completing. - You're unsure if the resumed backup will be reliable (e.g., after a crash). Would you like help verifying the integrity of the resumed backup once it finishes? Else, DELETE the failed backup and take/run fresh backup. rm -rf /var/lib/pgbackrest/backup/your_stanza_name/20250425-115723F Thanks & Regards, Abdul Sayeed On Thu, May 1, 2025 at 1:20 PM KK CHN wrote: > Hi, > Due to a backup failure in my Reposerver, the storage disk ran out of > space, fixed later. I reschedule the cron job to take a full backup but > it show for the last 3 hours > > 025-05-01 09:30:16.377 P00 WARN: resumable backup 20250425-115723F of > same type exists -- invalid files will be removed then the backup will > resume > > This message only I am seeing when looking at the backup log for my repo , > is this normal ? How much time does it take to start actual backup again ? > Or something wrong ? > > root@db1 ~]# cat /etc/pgbackrest/pgbackrest.conf > [My_Repo] > pg1-path=/var/lib/postgres/16/data > pg1-port=5444 > pg1-user=postgres > pg-version-force=16 > > [global] > repo1-host=10.x.x.x > repo1-host-user=postgres > > archive-async=y > spool-path=/var/spool/pgbackrest > > log-level-console=info > log-level-file=debug > #log-level-file=warn > log-level-stderr=info > delta=y > > [global:archive-get] > process-max=2 > > [global:archive-push] > process-max=4 > > Regards, > Krishane > > --
Re: Pgbackrest : Resumable backup of same type exists
Hi Greg, My apologies but the above answer which i gave was not from chatgpt, I had face similar situation in one of our env. Deleting failed backup helped me. To be honest I did use chathpt to paraphrase my sentences before posting in general mail list. Thanks & Regards, Abdul Sayeed On Thu, 1 May, 2025, 11:13 pm Greg Sabino Mullane, wrote: > On Thu, May 1, 2025 at 9:08 AM Abdul Sayeed > wrote: > >> Hello, >> >> This warning message indicates that a *resumable backup*, >> > (plus lots more ChatGPT crap) > > Please do not use LLMs to answer questions here. If the original poster > wanted that, they could have done it themselves. Further, you are polluting > the pgsql-general archives with computer-generated answers which will in > turn get slurped in again, leading to degradation. People posting here > deserve real answers from real people. > > /rant > > Original poster, I wouldn't expect it to take three+ hours, but we don't > know how large your backups are. Check /var/log/pgbackrest and see the > latest log entry - it looks like you have "debug" level enabled, so it > should be quite verbose. If the process is running but not writing anything > to the logs, you might want to use strace against its PID to verify what it > is doing (if anything). > > Cheers, > Greg > > -- > Crunchy Data - https://www.crunchydata.com > Enterprise Postgres Software Products & Tech Support > >