• 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
      • Easiest way to fix postgres data partition full without any data loss ?

      Easiest way to fix postgres data partition full without any data loss ?

      • Posted by 2ndnijam
      • Categories Blog
      • Date February 9, 2019
      • Comments 0 comment

      In this blog will be helpful to solve the problem of data partition once full how to solve the problem with less down time and what are steps want to follow for data partition full .

      postgres data partition full ? we got this issue 2 time one is at the time of database restoration and second one is at normal transaction.

      Step 1. Moving  archive 
      if you get disk partition issue while restoring database means initially you have to move your archive logs to some other partition once you moved your archive means xlog (WAL LOG) will be archived automatically to archive partition once restarted your postgres server if instance is down , mostly instance will be down once data directory is full , the simple logic is “xlog is inside data”  following script will be helpful to move and compress your archive to some other partition

      Script for postgres archive move

      Step 2.  Postgres Log moving :

      it is one of the maintenance activity in postgres , once you moved your logs means you will get some more free space at data partition simple logic is postgres logs is inside the data directory. following script will be helpful to move postgres logs to some other partition .

      Script to move and compress the  postgres logs

      Step 3. postgres data splitting: 

      once default tablespace or non-default tablespace filesystem is full means you will get issue/error  at the time of new transaction in postgresql database

      Error:- Cannot insert in that file id

      after above 2 steps you have to split your postgres data’s to different location following blogs will be helpful to splitting the data to some other disk partition

      Moving PostgreSQL Tablespace Types

       Step 4.  VACUUM :

      Postgres VACUUM FULL reclaims all free space released by VACUUM by removing dead rows physically but will not return physical space it is for future transaction not , but vacuum full return free physical space as well as remove dead rows but This method also requires extra disk space, since it writes a new copy of the table and doesn’t release the old copy until the operation is complete.

      To solve this problem, we need additional storage like any other network drive or portable hard disk.
      Please do not forget that VACUUM FULL requires an exclusive lock on the table so during this operation your table cannot be accessible.

      To fix this issue you have to do VACUUM FULL one by one objects it may be schema , database , group of table , or single table it is depend on disk space you have to choose the objects one by one .

      so better choose vacuum instead of vacuum full until disk adding. following script will be helpful to do vacuum for daily basis and weekly basis.

      •  Script for VACUUM and ANALYZE for postgres database
      • How to schedule VACUUM and ANALYZE script for for postgres database ?

      Thanks for reading our blogs if you like share this posts to linkedin, facebook, twitter, google+ …etc

      For IT related Support please contact Our team

      • Share:
      2ndnijam

      Previous post

      How to schedule VACUUM and ANALYZE script for for postgres database ?
      February 9, 2019

      Next post

      While Importing CSV files with text fields that contain double quotes using postgres COPY
      February 10, 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?