Jump to content

systemcr

Members
  • Posts

    22
  • Joined

  • Last visited

systemcr's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi everyone, As I explained in a former post, I'd like to schedule a cron job to run an SQL script on my PostgreSQL database for maintenance stuff. The thing is that I am receiving this error when the cron job is being executed (see image attached). Could anyone help me please? Thanks in advance!
  2. Hello, I'd like to know if I can use 'psql' instead of 'php' to run a daily maintenance SQL script on my PostgreSQL database as a cron job from cPanel. The command line to execute would be something similar to the following, according to https://dba.stackexchange.com/questions/157991/how-to-create-jobs-in-postgresql/157992#157992 psql -d myDb -f "maintenance.sql" Thank you very much in advance.
  3. Hi again, After some research, I've seen it's been a matter of granting access for the user I use to connect to my database at a schema level. After granting it access to my newly-created schema, I can work now from pgAdmin. :-)
  4. Hi, I think it is more to grant access to the user I use to connect through pgAdmin to be able to use all of the objects in the database. I think I've done it from phppgadmin, but there're asterisks in the table of privileges after grating them whose meaning I don't understand: Screenshot: https://i.ibb.co/wsKJKJG/Screenshot-1.png I can't still work from pgadmin after this grant. I need to work from pgadmin because I can't be creating my database objects from a UI tool like the one provided by phppgadmin; I need to do this through SQL (I know, I can also run SQL from phppgadmin, but it's absolutely not the same working from a tool like pgAdmin).
  5. Hi, I will then configure two cron jobs from cPanel. Instead of using php, could I use psql to connect to the database like this Stackoverflow says? https://dba.stackexchange.com/a/157992 If so, I would like to know how and where I can place the .sql file to be given to the psql command. Thanks!
  6. Hi, Thanks a lot for your response. Yes, I can create schemas from phppgadmin (I didn't know this tool did exist). However I think creating schemas from pgadmin should be possible. Kind regards.
  7. Yes of course. I completely understand. Just asking to know if he wasn't here anymore
  8. Is Krydos on vacation? Just asking to get an idea about how long this answer can be delayed, as I can't continue working if I can't create schemas on my database. Thanks!
  9. Hi Wolstech, I'd prefer to be one to schedule the maintenance scheduled tasks, because if something would fail, I'd like to fix it by myself as soon as possible to minimize my customer's impact. Can this also be escalated to Krydos? So that I can take into consideration his opinion about this issue as well.
  10. Hi, No problem if the version can't be updated. However, not being able to create schemas is a big limitation in my opinion, as it helps a lot to keep database's objects well organized. It'd be great if we could create them.
  11. Hi Wolstech, Yes, I've read about cron jobs but I was thinking in more in some alternative "self-contained" in the database. However, it seems a good approach to me what you say about using scheduled tasks on Lily or schedule cron jobs in any other server. About scheduling tasks on Lily, has anyone done this before? So that I can search in the forum first prior asking for explanation on how to do that.
  12. Hello everyone, I need to perform some daily "maintenance" tasks on my PostgreSQL database that include mainly deleting old data and backuping some tables. I've read that PostgreSQL does not include any built-in feature to schedule these kind of tasks, similar to what can be achieved on Microsoft SQL Server through the use of jobs. However, I've read there's an extension called pg_cron [1] that can be used to achieve this in PostgreSQL. Is it possible to use it within the PostgreSQL databases we're provided on Johnny? Thanks in advance! [1] https://github.com/citusdata/pg_cron
  13. Hi, I want to create a new schema on my PostgreSQL database but it seems I don't have enough permissions to do so (image attached). Can anyone tell me why? Thanks in advance! PD: by the way, it seems PostgreSQL's version on Johnny is 9.2, which is a bit old... could it be updated?
×
×
  • Create New...