SQL Error: 0, SQLState: 08006

Ok, that's interesting:

2014-02-19 07:22:35 IST LOG: server process (PID 74813) was terminated by signal 6: Aborted

That indicates that the PostgreSQL server backend is crashing. Specifically, signal 6 (SIGABRT) is triggered by assertion failures, places the code intentionally crashes because something is wrong and it can't continue without risking data corruption.

If you are not running the latest patch release of your PostgreSQL version (which you did not mention), update now.

(The rest is really more questions, but SO's format sometimes makes comments just too restrictive):

I recommend enabling log_statement = all with a log_line_prefix that includes at least the backend pid and transaction ID. Then reloading PostgreSQL to make the setting active. When the problem next happens, look in the query logs to see what the crashing process was executing at the time it crashed. See if running the same statement interactively on the console causes the crash too.

I also recommend enabling core dump files and downloading the debuginfo packages for your PostgreSQL version. This will allow you to attach a debugger to a file that contains the state of the server when it crashed, and hopefully see what went wrong. How to enable core-dumps is OS/distro specific and you haven't mentioned your operating system and version so I can't offer more specific instructions; see Google.


In my case, this error was caused by truncates i have done on tables, but did not commit the transaction. (I used DBeaver tool)