HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

send jobs via psql asynchronously

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
psqljobsviaasynchronouslysend

Problem

I want to backup a huge number of records and delete them, but I don't have complete access to database server so I can't run my script on the server. because it takes so long I need to submit jobs(say REINDEX for example) and then turn off my computer. Is it possible to do something like this?

Solution

Not really. There is pgAgent (part of pgAdmin package), that could be abused to do it, but it's not its main purpose.

Generally, to run such long queries/jobs, you need somewhere to have a psql session to live until it will finish. Usually, psql on screen on some kind of server - database server, or app server, doesn't matter much.

Context

StackExchange Database Administrators Q#16301, answer score: 3

Revisions (0)

No revisions yet.