root/trunk/contrib/pg_scoreboard/README.pg_scoreboard

Revision 54, 0.8 kB (checked in by jesus, 4 years ago)

pull this in and give it to the world

Line 
1 The pg_scoreboard package provides an in-memory task tracking system.  It
2 is specifically designed to track the status of multiple agents in a complex
3 multi-process, multi-server environment.
4
5 Usage:
6
7 A process starts and connects to PostgreSQL and runs:
8
9   select scoreboard.process_register('mytask (params or notes)');
10
11 On a regular interval, heartbeat or update the current status of the job:
12
13   select scoreboard.process_status('handling some doo-dad #23142');
14
15 On completion, either terminate the postgres connection or explicitly:
16
17   select scoreboard.process_deregister();
18
19 If you are terminating the process, it's recommended to do only that and
20 not call the process_deregister() function as the action will happen twice
21 for no gain.
22
23 To see the current scoreboard:
24
25   select * from scoreboard.scoreboard;
Note: See TracBrowser for help on using the browser.