Henry
Henry

Reputation: 620

Does PostgreSQL allow running stored procedures in parallel?

I'm working with an ETL tool, Business Objects Data Services, which has the capability of specifying parallel execution of functions. The documentation says that before you can do this, you have to make sure that your database, which in our case is Postgres, allows "a stored procedure to run in parallel". Can anyone tell me if Postgres does that?

Upvotes: 6

Views: 3623

Answers (3)

PostgresSucks
PostgresSucks

Reputation: 1

Use pgcron to schedule the procedure as many times you want. Use arguments to make the procedure act on different sets of data.

Upvotes: 0

Robins Tharakan
Robins Tharakan

Reputation: 2473

You can also call different stored procedures from the same connection (and effectively still run them in parallel) by using DBLink.

See this SO answer to see an example.

Upvotes: 0

Dmitry Negoda
Dmitry Negoda

Reputation: 3189

Sure. Just run your queries in different connections, and they will run in parallel transactions. Beware of locking though.

Upvotes: 6

Related Questions