Skip to content

Commit

Permalink
Merge pull request #75 from PanDAWMS/syncwithoracle
Browse files Browse the repository at this point in the history
Postgres schema sync with oracle: harvester_workers.minramcount
  • Loading branch information
EdwardKaravakis authored Jul 11, 2024
2 parents af85df1 + 7084168 commit db3676d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions schema/postgres/sqls/patches/0.0.18.patch.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- patch to be used to upgrade from version 0.0.17
ALTER TABLE doma_panda.harvester_workers ADD COLUMN minramcount integer;
COMMENT ON COLUMN harvester_workers.minramcount IS E'Worker memory requirements';

-- Update versions
UPDATE pandadb_version SET major=0, minor=0, patch=18 where component='JEDI';
UPDATE pandadb_version SET major=0, minor=0, patch=18 where component='SERVER';
COMMIT;
4 changes: 3 additions & 1 deletion schema/postgres/sqls/pg_PANDA_TABLE.sql
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ CREATE TABLE harvester_workers (
pilotstarttime timestamp,
pilotendtime timestamp,
pilotstatus varchar(80),
pilotstatussynctime timestamp
pilotstatussynctime timestamp,
minramcount integer
) PARTITION BY RANGE (lastupdate) ;
COMMENT ON TABLE harvester_workers IS E'for workers submitted by harvesters. Combination of INSTANCEID and WORKERID is unique. Deletion policy is to delete all records with LASTUPDATE<NOW-N_days. To be enforced a data sliding window by partition removal although the PK has a global index (The ALTER TABLE ... DROP PARTITION ... UPDATE GLOBAL INDEXES) to be used. ';
COMMENT ON COLUMN harvester_workers.batchid IS E'Unique ID in the batch system';
Expand Down Expand Up @@ -497,6 +498,7 @@ COMMENT ON COLUMN harvester_workers.stdout IS E'URL for stdout';
COMMENT ON COLUMN harvester_workers.submissionhost IS E'The host name of the submission node';
COMMENT ON COLUMN harvester_workers.submittime IS E'Set when the worker is submitted';
COMMENT ON COLUMN harvester_workers.workerid IS E'Identifier of the worker';
COMMENT ON COLUMN harvester_workers.minramcount IS E'Worker memory requirements';
ALTER TABLE harvester_workers OWNER TO panda;
CREATE INDEX harvester_workers_compsite_idx ON harvester_workers (computingsite);
CREATE INDEX harvester_workers_status_idx ON harvester_workers (status, pilotstatus);
Expand Down
2 changes: 1 addition & 1 deletion schema/postgres/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.17
0.0.18

0 comments on commit db3676d

Please sign in to comment.