aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/postgres
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2021-02-24 07:44:24 -0800
committerAaron Schulz <aschulz@wikimedia.org>2021-05-18 20:06:37 -0700
commit12923c1cd5492bb4387bc50d7622ee74ba9d88a4 (patch)
tree55b413534b287f4c7d132eb23cd9e19b80ddc22b /maintenance/postgres
parentd4f22be28aa1a0938bf9f24ba46e91c0387b31ea (diff)
downloadmediawikicore-12923c1cd5492bb4387bc50d7622ee74ba9d88a4.tar.gz
mediawikicore-12923c1cd5492bb4387bc50d7622ee74ba9d88a4.zip
objectcache: add last-modified token field to objectcache table
Also added token and flags fields. The token field can be used as a tie-breaker for modtime and also for faster cas() operations. The flags field makes serialization and compression format changes easier in the future. Bug: T274174 Change-Id: I45731a877b21835652993c2d285165a76eeae3e9
Diffstat (limited to 'maintenance/postgres')
-rw-r--r--maintenance/postgres/archives/patch-objectcache-modtoken.sql8
-rw-r--r--maintenance/postgres/tables-generated.sql2
2 files changed, 10 insertions, 0 deletions
diff --git a/maintenance/postgres/archives/patch-objectcache-modtoken.sql b/maintenance/postgres/archives/patch-objectcache-modtoken.sql
new file mode 100644
index 000000000000..4fb2a325baec
--- /dev/null
+++ b/maintenance/postgres/archives/patch-objectcache-modtoken.sql
@@ -0,0 +1,8 @@
+-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
+-- Source: maintenance/abstractSchemaChanges/patch-objectcache-modtoken.json
+-- Do not modify this file directly.
+-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
+ALTER TABLE objectcache
+ADD modtoken VARCHAR(17) DEFAULT '00000000000000000' NOT NULL;
+ALTER TABLE objectcache
+ADD flags INT DEFAULT NULL; \ No newline at end of file
diff --git a/maintenance/postgres/tables-generated.sql b/maintenance/postgres/tables-generated.sql
index 90d440aef52d..e796f6995a29 100644
--- a/maintenance/postgres/tables-generated.sql
+++ b/maintenance/postgres/tables-generated.sql
@@ -722,6 +722,8 @@ CREATE TABLE objectcache (
keyname TEXT DEFAULT '' NOT NULL,
value TEXT DEFAULT NULL,
exptime TIMESTAMPTZ NOT NULL,
+ modtoken VARCHAR(17) DEFAULT '00000000000000000' NOT NULL,
+ flags INT DEFAULT NULL,
PRIMARY KEY(keyname)
);