Postgres in process watcher has bad symbols - postgresql

I am trying restore db but got error in process watcher with bad symbol. How can I fix it?

Related

Why i am getting error code failed with exit code 1 when restoring my db

When i try to restore my postgress db , it failed with exit code 1. What is the reason. I created the backup using postgress 11 and restoring it to postgress 12.
Appreciate your help.
Sounds like you are using PgAdmin4. You should upgrade it to the latest version (4.30) where they fixed the bug that caused it to hide the real error messages from you. Then you can try again and show us the real errors.
Better yet, use command line tools to do it in the first place.
I you don't want to try again, you can instead look in the database servers log file to find the error messages.

pg_dump FATAL: segment too big

pg_dump is failing with the error message:
"pg_dump FATAL: segment too big"
What does that mean?
PostgreSQL 10.4 on Ubuntu 16.04.
It appears that pg_dump passes the error messages it receives from the queries it is running into the logs.
The following line in the logs (maybe buried deeper if you have busy logs), shows the query that failed.
In this case, we had a corrupted sequence. Any query on the sequence, whether it was interactive, via a column default, or via pgdump, returned the "segment too big" error, and killed the querying process.
I figured out the new start value for the sequence, dropped the dependencies, and created a new sequence starting where the old one left off and then put the dependencies back.
pg_dump worked fine after that.
It is not clear why or how a sequence could get so corrupted that you would have a session killing error when it was accessed. We did have a recent database hard-crash though, so it may be related. (Although that sequence is accessed very rarely and it is unlikely we went down in the middle of incrementing it.)

postgres libpq: synchronous COPY mysteriously cancelled "due to user request"

My application is using libpq to write data to Postgres using the COPY API. After over 900000 successful COPY+commit (each containing a single row, don't ask) actions, one errored out with the following:
ERROR: canceling statement due to user request
CONTEXT: COPY [...]
My code never calls PQcancel or related friends, which I think is precluded anyway by the fact that libpq is being used synchronously and my app is not multi-threaded.
libpq v8.3.0
Postgres v9.2.4
Is there any reasonable explanation for what might have caused the COPY to be cancelled? Will upgrading libpq (as I have done in more recent versions of my application) be expected to improve the situation?
The customer reports that the Postgres server may have been shut down when this error was reported, but I'm not convinced since the error text is pretty specific.
That error will be emitted when you:
send a PQcancel
use pg_cancel_backend
Hit control-C in psql (which invokes PQcancel)
Send SIGINT to a backend, e.g. kill -INT or kill -2.
My initial answer was incorrect, claiming that the following also produced the same error. They don't; these:
pg_terminate_backend
pg_ctl shutdown -m fast
will emit a different error FATAL: terminating connection due to administrator command.

Roll-forward is required following the Restore

I have three different databases for my different environments (hsprd, hstst,hstrn). hsprd is my production environment with live data.
Every so often, a request comes through to restore production data to hstrn or hstst. I typically run this command (after stopping, then dropping the db):
db2 restore db hsprd taken at 20140331180002 to /dbs into hstrn newlogpath /dbs/log/hstrn without rolling forward;
When running this, I receive this message:
SQL2537N Roll-forward is required following the Restore.
Could someone advise how to fix this?
Thanks.
edit: My backups are here:
(/home/dbtmp/backups)> ll
total 22791416
-rwxrwxr-x 1 hsprd cics 11669123072 Mar 31 18:03 HSPRD.0.hsprd.NODE0000.CATN0000.20140331180002.001
After restoring my database and omitting without rolling forward, I receive this message when trying to query the database:
SQL1117N A connection to or activation of database "HSTRN" cannot be made
because of ROLL-FORWARD PENDING. SQLSTATE=57019
When I try to rollforward, with this command, I receive this response:
(/home/dbtmp/backups)> db2 rollforward db hstrn to end of backup and complete;
SQL4970N Roll-forward recovery on database "HSTRN" cannot reach the specified
stop point (end-of-log or point-in-time) on database partition(s) "0".
Roll-forward recovery processing has halted on log file "S0006353.LOG".
The first error suggests that you are restoring an online backup, which must be rolled forward. Alternatively, use an offline backup image, then you can include the without rolling forward option.
The second error means that you need to issue the ROLLFORWARD command before you can use the database restored from an online backup.
Finally the third error means that the ROLLFORWARD command is unable to find the logs required for it to succeed. Assuming the logs are included in the backup image, you'll need to specify the LOGTARGET option on the RESTORE command to extract them, presumably to the NEWLOGPATH location.

E_VW1035 Cannot connect to Vectorwise server

I started with vectorwise, i try to create database but i can do this.
ingres#xx:~$ createdb essai
I have an error :
Creating database 'essai'. . .
E_VW1035 Cannot connect to Vectorwise server.
(Mon Jun 17 09:01:01 2013)
Creation of database 'essai' abnormally terminated.
So how i can resolve this error ? and how i can drop database ? because when i retry
ingres#xx:~$ createdb essai
I see essai exist already
Creating database 'essai'. . .
E_DU3021_DB_EXISTS_CR
The database, essai, already exists.
Creation of database 'essai' abnormally terminated.
The documentation for Vectorwise is available at docu.actian.com
Here you will find references to all of the commands you can use.
To answer the second question first. If you know you can destroy the database then :
destroydb dbname
will do this for you.
If this is a new installation of Vectorwise - try looking in the vectorwise.log file in $II_SYSTEM/ingres/files ( or on Windows down the C:\ProgramData\Actian path ).
You will find an error condition here. In this case if you server is under configured this will be due to insufficient resources - most likely RAM.
If this is the case then you will need to either add more physical RAM to this server (4GB is the minimum recommended) or update the vecvtorwise .conf file to reduce the memory requirements (this would be for a dev/test ONLY solution!)
If this is not your problem - please post the error you see.
If it is the solution you need please update this post.