pg_background
pg_background copied to clipboard
Can't achieve asynchronous using pg_background_detach(pg_background_launch('INSERT QUERY'))
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