Hi I am using PgSql 14 and I have installed it's relevant PgAgent from stack builder.
By using local and remote both are not connected to the database.
But the same job script working fine with PgSQL 12.3 and it's PgAgent.
What are the things needs to consider. Any error logs to check for PGAGENT?
Please give suggestions.
Thanks
Related
Created a job using pgagent.
Successfully it got created but could not check its status if its running or not.
Neither it has performed its specified code which I have given in steps.
Verion Used:
PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
With the help of pgAgent I have created a JOB
Job successfully got created but I cant check if its working or not as there is no notification for the same, neither it is performing the SQL code which i have passed in Job -> Step.
If I got it right, you installed pgAagent but it is not starting when you execute the jobs. Have you tried starting it using the terminal? The service might be down (I do start it manually every time the database system is restarted).
Using the postgres user ...
sudo su - postgres
... execute the following command (assuming you're on the db server):
pgagent hostaddr=127.0.0.1 dbname=postgres user=postgres -s pgagent_log.log
I hope it helps.
Cheers!
Maybe it'll be helpful to some windows users, because I faced the same issue recently.
to check run's statistic in pgadmin click at the your job and then select "statisctic" tab.
Second unclear thing to me is step's settings.
I have the one server, so i thought I have to choose "local" connection type, but in didn't work. Even on the same machine try to select "remote", and then put connection string like:
host=localhost port=5432 dbname=YOUR_DB user=postgres password='asd#3wf!'
Please pay attention that for passwords which contain special symbols you have to set it in the ''.
In my case the problem was that agent couldn't authorize to database and service hasn't been started, so after I've made all connections trusted from localhost the service started successfully and job works fine
for more information about error you should see into windows event viewer or eq in unix based systemC:\Program Files\PostgreSQL\10\data\pg_hba.conf
I'm not sure that I actually have a problem, but I am confused. I wanted to move a PostgreSQL database from PythonAnywhere to an AWS RDS server. I connected to both servers with pgAdmin from my Windows PC (ssh tunnel with PuTTY). I then did a backup of the database from PythonAnywhere and then did a restore to a clean database on the RDS server.
The backup had no issues, but, while the restore seemed to run fine, pgAdmin showed the process "Failed". The database on the RDS server looks fine. I checked row counts on a few tables, and they matched what I had on PythonAnywhere. I don't see any messages in pgAdmin other than that the process failed. I don't see anything in the pgAdmin logs to indicate what might be wrong. Do I have a problem? Should I use a command line restore instead?
Thanks for any insights.
--Al
Using cli is a better way, the ide may not give full errors. pg_dump will work for you. Maybe you should build a EC2 for this job.
I am new to the mysql , I downloaded the employee database zip file extracted it. Then I run the script file but its always giving me error that this file is already being used.
Here's a snap of error.
MySQL Workbench
Run SQL Script
[WinError 32] The process cannot access the file because it is being used by another process:
'C:\Users\Kushagra\AppData\...\tmpd26qry86,cnf'
Can someone please explain how to solve the issue? Is there any another way to import ?
I'm using
MySQL Shell 8.0.25
MySQL Workbench 8.0 CE
Can you check the background process of MySQL using task manager? It may acquire the process and preventing the script from execution.
After finding a lot of solutions and none seemed to affect I downgraded my MySQL workbench version.
Initial version : 8.0.25
Downgraded version (worked fine) : 8.0.20
I am using Sequel Pro and want to access my local Postgres DB.
When I get prompted in sequel pro to add connection details for my db I oblige:
And then when I click connect I get:
I am on a mac running Catalina 10.15.3.
The database I am running is a postgres installed with brew. When I run brew services list I get:
My application (a laravel application using laravel valet) can access the database.
What can be wrong? I have some thoughts...
If I enter my db and type: select inet_server_addr( ), inet_server_port( );
I get this output:
inet_server_addr | inet_server_port
------------------+------------------
|
(1 row)
And I think that I should get 127.0.0.1 at least in the inet_server_addr column....
I don't know if this is a hint of where the error might be or not.
So, to summarize. My thoughts go in the direction that I am not running the postgres server 100% correctly... BUT i still think it is strange that my app can access the db but not Sequel Pro...
If I typ 127.0.0.1 in my browser I get a 404 - Not Found
How do I do to be able to access my local postgres with Sequel Pro?
As a_horse_with_no_name pointed out in the comments, the website states that Sequel Pro is for MySQL databases, not Postgres:
"Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases."
Created a job using pgagent.
Successfully it got created but could not check its status if its running or not.
Neither it has performed its specified code which I have given in steps.
Verion Used:
PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
With the help of pgAgent I have created a JOB
Job successfully got created but I cant check if its working or not as there is no notification for the same, neither it is performing the SQL code which i have passed in Job -> Step.
If I got it right, you installed pgAagent but it is not starting when you execute the jobs. Have you tried starting it using the terminal? The service might be down (I do start it manually every time the database system is restarted).
Using the postgres user ...
sudo su - postgres
... execute the following command (assuming you're on the db server):
pgagent hostaddr=127.0.0.1 dbname=postgres user=postgres -s pgagent_log.log
I hope it helps.
Cheers!
Maybe it'll be helpful to some windows users, because I faced the same issue recently.
to check run's statistic in pgadmin click at the your job and then select "statisctic" tab.
Second unclear thing to me is step's settings.
I have the one server, so i thought I have to choose "local" connection type, but in didn't work. Even on the same machine try to select "remote", and then put connection string like:
host=localhost port=5432 dbname=YOUR_DB user=postgres password='asd#3wf!'
Please pay attention that for passwords which contain special symbols you have to set it in the ''.
In my case the problem was that agent couldn't authorize to database and service hasn't been started, so after I've made all connections trusted from localhost the service started successfully and job works fine
for more information about error you should see into windows event viewer or eq in unix based systemC:\Program Files\PostgreSQL\10\data\pg_hba.conf