[INSTRM-187] Modify archiver's loadFile to allow using stdin. Created: 09/Sep/17 Updated: 28/Nov/19 Resolved: 21/Nov/19 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | ics_archiver |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | cloomis | Assignee: | cloomis |
| Resolution: | Done | Votes: | 0 |
| Labels: | SPS, Subaru | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The archiver spools new database rows to disk files, then flushes those periodically. That uses the COPY from $file command, which is executed by the database server. That does not work if the archiver and the database server are on different hosts. If we want to fix this, the archiver's loadFile and shutdown methods need to allow running the load as COPY from STDIN. Not hard. |
| Comments |
| Comment by cloomis [ 26/Jan/18 ] |
|
Even on the same host it can be a problem. Bump. Flushing table actors idle for 2.983 secs actors: flushing 1 rows 'database.loadFile failed for /Users/cloomis/mhs/logs/actors/archiver/archiver-25326/actors_0 with error: ProgrammingError (see below for details)' "must be superuser to COPY to or from a file\nHINT: Anyone can COPY to stdout or from stdin. psql's \\copy command also works for anyone.\n" |
| Comment by cloomis [ 14/Nov/19 ] |
|
At Subaru the db is on a non-actor host. This now matters. |
| Comment by cloomis [ 21/Nov/19 ] |
|
Merged at 56524d9, tagged 1.2.2. Running at Subaru. |