database, Main Process, Threads

database, Main Process, Threads

Post by Pooja Daryan » Sat, 20 Oct 2001 06:08:25

Hi All,

I have a scenario where multiple threads need to communicate to a database
and retrieve records from it. The database is huge with around 50,000
records and it is still growing. Thus the time taken by each thread to get a
record is enormous, specially when each record is retrieved one by one and
with few changes updated.

We are thinking of making a Main Process, that will get say 1000 records
from the database at a time and will work asyncronously. Meanwhile the
threads can retrieve one record at a time from this Main Process. I am
wondering if the communication between the Main process and threads will be
smooth enough. And will it be possible to actaully pass the recordset from
the Main process, so that for threads the communication is just the same as
for database.

Any suggestions are welcome

Thanks & Regards,



1. forking a server process in backend/main/main.c

Does anyone know whether it's a good idea to put code in backend/main/main.c
that forks a server process (which continually sends data<-- resulting from
a call to GetLockStatusData())
to a client?

GetLockStatusData() function exists in src/backend/storage/lmgr/Lock.c.

If NOT a good idea to do so, where should I put the code?


Add photos to your e-mail with MSN 8. Get 2 months FREE*.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly

2. Pverify

3. forking child processes in src/backend/main/main.c

4. Profiler/trace errors

5. Putting code in main of src/backend/main/main.c

6. system account..what does the SQL server and agent services suppose to start as?

7. Main package thread

8. Connect to Database on Internet

9. Package hangs unless executed on Main Package Thread

10. ActiveX script task executing in main thread cannot update DTSOlapProcess TreeKey property

11. Database <-> Main process <-> Threads

12. How to find out main resource taking processes ..

13. pgsql/src/backend/main main.c