Update census to run less frequently (#3346)
* update census to run less frequently * Update internal/census/census_job.go Co-authored-by: Michael Gaffney <mike@gaffney.cc> * change nextrunin duration --------- Co-authored-by: Michael Gaffney <mike@gaffney.cc>
This commit is contained in:
1 parent
02c1b74551
commit
23c40a0bc3
3 files changed
+53
-4
No files matched your search
@@ -0,0 +1,20 @@
|
||||
-- Copyright (c) HashiCorp, Inc.
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
begin;
|
||||
|
||||
create table census_last_logged (
|
||||
last_logged_at wt_timestamp primary key
|
||||
);
|
||||
comment on table census_last_logged is
|
||||
'census_last_logged is a table with 1 row which contains the timestamp '
|
||||
'of the last time the census status and snapshots were logged.';
|
||||
|
||||
-- This index ensures that there will only ever be one row in the table.
|
||||
-- See: https://www.postgresql.org/docs/current/indexes-expressional.html
|
||||
create unique index census_last_logged_one_row
|
||||
on census_last_logged((last_logged_at is not null));
|
||||
|
||||
insert into census_last_logged(last_logged_at) values('-infinity');
|
||||
|
||||
commit;
|
||||
Reference in new issue
Block a user