Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't achieve asynchronous using pg_background_detach(pg_background_launch('INSERT QUERY')) #54

Open
NITHISH862002 opened this issue May 23, 2024 · 1 comment

Comments

@NITHISH862002
Copy link

NITHISH862002 commented May 23, 2024

We have a table in Postgres where data will be inserting frequently for example 100000 records at a time.

So, the problem is that we got dynamic memory error after 20 records were inserted, so we tried using **pg_background_detach(pg_background_launch('INSERT QUERY'))** to detach but this didn't work out we also figured out that if we use **pg_sleep(0.1)** it worked out but doing like this would lead to synchronous. so, to overcome this problem is there any solution
@vibhorkum

@vibhorkum
Copy link
Owner

It looks like you are exhausting max_parallel_worker. Can you please share the exact error message?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants