| 1 | |
| 2 | = Subscription and slony logs = |
| 3 | |
| 4 | === Subscription === |
| 5 | |
| 6 | When a site 'subscribes' to a series, the process is initiated by the site sending a message to JSOC telling them that they're interested in that series. JSOC sends back the commands to build the table, and populate it to the current slony checkpoint. Then JSOC add the table name to their list of what's being subscribed to by that site. |
| 7 | |
| 8 | The only way to know if you're subscribed is to actually look in the lists at JSOC, which are named according to the convention: |
| 9 | |
| 10 | {{{ |
| 11 | /data/pgsql/slon_logs/live/etc/(site).lst |
| 12 | }}} |
| 13 | |
| 14 | |
| 15 | === Slony logs === |
| 16 | |
| 17 | At JSOC, the logs are written to the directory : |
| 18 | |
| 19 | {{{ |
| 20 | /data/pgsql/slon_logs/live/site_logs/(site) |
| 21 | }}} |
| 22 | |
| 23 | The slony logs have names according to the convention : |
| 24 | |
| 25 | {{{ |
| 26 | slony1_log_2_00000000000000690325.sql |
| 27 | }}} |
| 28 | |
| 29 | Where the number 690325 is a counter that increments for each file. The term "log" is perhaps somewhat misleading with respect to these files, as they are not warnings or errors printed as the database operates. Rather, they are lists of database operations that have taken place at JSOC. If other sites are to keep in sync with JSOC, they must apply the same operations to their local databases. A typical log file may have entries like : |
| 30 | |
| 31 | {{{ |
| 32 | insert into "hmi"."rdvpspec_fd05" ("recnum","sunum","slotnum","sessionid","sessionns","ln_source_isset","ln_source_carrrot","ln_source_cmlon_index","ln_source_lonhg_index","ln_source_lathg_index", |
| 33 | "ln_source_loncm_index","cparms_sg000","logp_bzero","logp_bscale","carrrot","cmlon","lonhg","lathg","loncm","crpix1","crpix2","cdelt1","cdelt2","cdelt3","delta_k","delta_nu","d_omega","module", |
| 34 | "source","input","created","bld_vers","log_base","datamin","datamax","apode_f","apod_min","apod_max","cmlon_index","loncm_index","lathg_index","lonhg_index","sg_000_file","history") values |
| 35 | ('9919708','528962345','0','27939659','su_rsb','1','2146','32','48','41','-32','','-8.48432540893554688','0.000635004483736478385','2146','200','120','-12.5','80','64.5','64.5', |
| 36 | '0.101023711','0.101023711','0.000181805124','0.101023711','28.9351845','0.000181805124','pspec3 v 1.1','hmi.rdVtrack_fd05[2146][200][120.0][-12.5][-80.0]', |
| 37 | 'hmi.rdVtrack_fd05[2146][200]','1171214459','V8R2','2.71828182845904509','-29.1219711','12.1533213','0.96875','0.9765625','1','32','-32','41','48','logP.fits',''); |
| 38 | |
| 39 | insert into "hmi"."rdvpspec_fd05" ("recnum","sunum","slotnum","sessionid","sessionns","ln_source_isset","ln_source_carrrot","ln_source_cmlon_index","ln_source_lonhg_index","ln_source_lathg_index", |
| 40 | "ln_source_loncm_index","cparms_sg000","logp_bzero","logp_bscale","carrrot","cmlon","lonhg","lathg","loncm","crpix1","crpix2","cdelt1","cdelt2","cdelt3","delta_k","delta_nu","d_omega","module", |
| 41 | "source","input","created","bld_vers","log_base","datamin","datamax","apode_f","apod_min","apod_max","cmlon_index","loncm_index","lathg_index","lonhg_index","sg_000_file","history") values |
| 42 | ('9919709','528962345','1','27939659','su_rsb','1','2146','32','48','42','-32','','-9.26125526428222656','0.000644568281907301633','2146','200','120','-15','-80','64.5','64.5', |
| 43 | '0.101023711','0.101023711','0.000181805124','0.101023711','28.9351845','0.000181805124','pspec3 v 1.1','hmi.rdVtrack_fd05[2146][200][120.0][-15.0][-80.0]', |
| 44 | 'hmi.rdVtrack_fd05[2146][200]','1171214461','V8R2','2.71828182845904509','-30.2097244','11.6872139','0.96875','0.9765625','1','32','-32','42','48','logP.fits',''); |
| 45 | }}} |
| 46 | |
| 47 | |
| 48 | After a while (daily?), these slony log files are archived into a bundle, named like so : |
| 49 | {{{ |
| 50 | slony_logs_688467-689890.tar.gz |
| 51 | }}} |
| 52 | |
| 53 | |
| 54 | And then after a longer period of time - two weeks? - these archives of slony log files are deleted. It is **critical** that the slony logs are applied at remote sites before they deleted at JSOC. |