Re: database is not accepting commands

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: reem <dailyemailr(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: database is not accepting commands
Date: 2017-05-16 15:20:58
Message-ID: CANu8Fizxuyr_YS5yPrv2SbGnNNP91AN-qZh4JvggVngUijem7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 16, 2017 at 11:03 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 05/16/2017 01:28 AM, reem wrote:
>
>> We have 1.5 TB database that's shown an error and block all commands.
>> The error is :
>> "ERROR: database is not accepting commands to avoid wraparound data loss
>> in
>> database "dbname"
>> HINT: Stop the postmaster and use a standalone backend to vacuum that
>> database.
>> You might also need to commit or roll back old prepared transactions."
>>
>> I tried to do vacuum in the backend mode. Also I tried to set
>> zero_damaged_pages = on then do the vacuum again but same error appeared.
>> The error appeared after two hours of vacuuming where verbose shows
>> passing
>> tables.
>>
>
> Postgres version?
>
> So was all the above done in the standalone backend?
>
>
>> The cause of error could be :
>> 1- a lot of insertion queries for not existing table
>> or
>> 2- truncating data with 40 GB in a week,
>> we used to do that but this is the first time we had this error.
>> also, autovacuume is turned on.
>>
>> Please , I need help or any suggestion?
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://www.postgresql-archive.
>> org/database-is-not-accepting-commands-tp5961831.html
>> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

As Adrian requested:
PostgreSQL Version?
O/S?

Did you ?
A. Stop PostgreSQL
B.postgres --single -D <path_to_data>
C
VACUUMDB -f -d <your_db_name>
OR
VACUUMDB -f -a

D. Restart PostgreSQL normally
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Chapman 2017-05-16 15:24:22 Re: Different query plan used for the same query depending on how parameters are passed
Previous Message Eric Hill 2017-05-16 15:08:00 Re: storing large files in database - performance