• Home
  • Services
    • HR Services
      • HR Advisory Services
      • Contract Staffing
      • HR Outsourcing Services
      • Manpower Supply Services
      • Payroll Processing
      • Permanent Placement
      • Recruitment and Placement Services
      • Recruitment Process Outsourcing
      • Staffing Agency Services
    • DBA Support
      • DBA Consultancy Services
      • PostgreSQL Support
    • Website Maintenance
    • Company Registration Services
    • Virtual Office Space Address
  • Company
    • FAQs
    • About Us
    • Contact
  • Locations
  • Blogs
    • Blog
    • Blog – PostgreSQL Support
    • Blog – PostgreSQL Migration
    • Blog – All DB’s
    • Blog – Linux
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum

    Greenplum

    $1,500.00
    Read More
    Have any question?
    (+91)8838953252
    ITsupport@rayafeel.com
    Login
    RayaFeeL
    • Home
    • Services
      • HR Services
        • HR Advisory Services
        • Contract Staffing
        • HR Outsourcing Services
        • Manpower Supply Services
        • Payroll Processing
        • Permanent Placement
        • Recruitment and Placement Services
        • Recruitment Process Outsourcing
        • Staffing Agency Services
      • DBA Support
        • DBA Consultancy Services
        • PostgreSQL Support
      • Website Maintenance
      • Company Registration Services
      • Virtual Office Space Address
    • Company
      • FAQs
      • About Us
      • Contact
    • Locations
    • Blogs
      • Blog
      • Blog – PostgreSQL Support
      • Blog – PostgreSQL Migration
      • Blog – All DB’s
      • Blog – Linux
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum

      Greenplum

      $1,500.00
      Read More

      Blog

      • Home
      • Blog
      • Blog
      • How to DELETE current XLOG / WAL LOG in postgresql database ?

      How to DELETE current XLOG / WAL LOG in postgresql database ?

      • Posted by Nijamutheen J
      • Categories Blog
      • Date August 19, 2019
      • Comments 0 comment

      Below are ours server , xlog & archive  details 

      PRIMARY / MASTER:
      ================
      
      postgres@tutorialdba_1:> ps -ef|grep postgres
      postgres   4436     1  0 Jun25 ?        00:05:04 /opt/10.6/bin/postgres -D /data
      postgres   4437  4436  0 Jun25 ?        00:00:00 postgres: logger process
      postgres   4439  4436  0 Jun25 ?        00:10:19 postgres: checkpointer process
      postgres   4440  4436  0 Jun25 ?        00:00:40 postgres: writer process
      postgres   4441  4436  0 Jun25 ?        00:04:55 postgres: wal writer process
      postgres   4442  4436  0 Jun25 ?        00:01:31 postgres: autovacuum launcher process
      postgres   4443  4436  0 Jun25 ?        00:00:27 postgres: archiver process   last was 00000001000000450000005E
      postgres   4444  4436  0 Jun25 ?        00:06:55 postgres: stats collector process
      postgres   4445  4436  0 Jun25 ?        00:00:02 postgres: bgworker: logical replication launcher
      postgres   4500  4436  0 Jun25 ?        00:05:07 postgres: wal sender process repmgr 53.99.98.119(44112) streaming 45/5FF3DB10
      
      XLOGS :
      
      postgres@tutorialdba_1:/xlog>
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 000000010000004500000096
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 000000010000004500000097
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 000000010000004500000098
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 000000010000004500000099
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 00000001000000450000009A
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 00000001000000450000009B
      drwx------ 2 postgres postgres    36864 Jul 22 05:01 archive_status
      
      
      
      XLOG STATUS :
      
      postgres@tutorialdba_1:/xlog/archive_status> ls -l
      total 0
      
      
      ARCHIVE LOGS:
      postgres@tutorialdba_1:/archive_log>
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 000000010000004500000059
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005A
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005B
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005C
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005D
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005E
      drwx------ 2 postgres postgres    20480 Jun 14 13:55 archive_status
      
      
      
      STANDBY / SLAVE : 
      =================
      
      postgres@tutorialdba_2:/archive_log> ps -ef|grep postgres
      postgres   4488     1  0 Jun25 ?        00:00:57 /opt/10.6/bin/postgres -D /data
      postgres   4489  4488  0 Jun25 ?        00:00:00 postgres: logger process
      postgres   4490  4488  0 Jun25 ?        00:16:08 postgres: startup process   recovering 00000001000000450000005F
      postgres   4493  4488  0 Jun25 ?        00:10:07 postgres: checkpointer process
      postgres   4494  4488  0 Jun25 ?        00:00:33 postgres: writer process
      postgres   4495  4488  0 Jun25 ?        00:01:08 postgres: stats collector process
      postgres   4496  4488  0 Jun25 ?        00:44:00 postgres: wal receiver process   streaming 45/5FF3DBF0
      
      
      
      XLOGS :
      postgres@tutorialdba_2:/xlog>
      -rw------- 1 postgres postgres 16777216 Jul 22 04:01 000000010000004500000059
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005A
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005B
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005C
      -rw------- 1 postgres postgres 16777216 Jul 22 04:02 00000001000000450000005D
      -rw------- 1 postgres postgres 16777216 Jul 22 20:39 00000001000000450000005E
      -rw------- 1 postgres postgres 16777216 Jul 22 12:36 00000001000000450000006F
      drwx------ 2 postgres postgres   970752 Jul 22 04:02 archive_status
      
      
      XLOG STATUS :
      postgres@tutorialdba_2:/xlog/archive_status>
      -rw------- 1 postgres postgres 0 Jul 22 04:01 000000010000004500000057.done
      -rw------- 1 postgres postgres 0 Jul 22 04:01 000000010000004500000058.done
      -rw------- 1 postgres postgres 0 Jul 22 04:01 000000010000004500000059.done
      -rw------- 1 postgres postgres 0 Jul 22 04:02 00000001000000450000005A.done
      -rw------- 1 postgres postgres 0 Jul 22 04:02 00000001000000450000005B.done
      -rw------- 1 postgres postgres 0 Jul 22 04:02 00000001000000450000005C.done
      -rw------- 1 postgres postgres 0 Jul 22 04:02 00000001000000450000005D.done
      -rw------- 1 postgres postgres 0 Jul 22 04:02 00000001000000450000005E.done
      
      
      
      Archive log location :
      postgres@tutorialdba_2:/archive_log> ls -l
      total 0

      Solution :

      Slave win’t be archive if even archive enabled as well.

      Check the status of xlog then delete the .done files before that check the master xlog status, walsender and last archived log for your confirmation.

      so finally you can delete the below xlog  untill (000000010000004500000059 – 00000001000000450000005E).

      Tag:archive, wal log, xlog

      • Share:
      Nijamutheen J
      Nijamutheen J

      Nijamutheen J 7+ years of experience in PostgreSQL, Linux admin , web hosting - apache server , Oracle ,mySQL, Mriadb, vertica DB & Server security administrator

      My updated resume is https://www.tutorialdba.com/p/hi-i-have-4.html

      Previous post

      Ora2PG - Oracle/MySQL to Postgres DB migration - Latest Version 20.0
      August 19, 2019

      Next post

      PostgreSQL SSL Setup
      September 7, 2019

      Leave A Reply

      You must be logged in to post a comment.

      Connect with



      Search

      ADVERTISEMENT

      Latest Posts

      Tips to Choose the Best Serviced Office for Your Business
      24May2022
      What key considerations do you need to keep in mind when choosing a new serviced office to house your business?
      24May2022
      The Benefits of Coworking
      24May2022
      The Long-Term Impact of Coworking
      24May2022
      Are you spending more money than you earn? Outsource with Ease and Move When You’re Ready
      24May2022
      PostgreSQL

      PostgreSQL

      $800.00 $500.00
      Greenplum

      Greenplum

      $1,500.00
      Oracle Database

      Oracle Database

      $350.00
      2ndquadrant.in

      (+91) 8838953252

      ITsupport@rayafeel.com

      Company

      • About Us
      • Our Team

      COURSES

      • List Of Course
      • Become An Instructor

      Support

      • DBA Support
      • Consultancy Services

      Recommend

      • Login
      • Contact Us

      IT Services by rayafeel.com. Powered by Rayafeel Technologies Pvt Ltd.

      • Privacy
      • Terms

      Become An Instructor?

      Join thousand of instructors and earn money hassle free!

      Get Started Now

      Connect with

      Login with Google Login with Twitter Login with Linkedin Login with Windowslive Login with Yahoo

      Login with your site account

      Connect with



      Lost your password?