Releases: clay/amphora-storage-postgres
Bumping Knex and PG packages versions plus provide access to the knex instance
v2.1.0
What's Changed
- adds postgres constraint to prevent circular URIs by @mattoberle in #72
Dependency bump
- Upgrade dependencies to patch a critical vulnerability and add Node.js 14 support by @amirandalibi in #78
Full Changelog: v2.0.1...v2.1.0
v2.0.1
#59 - Uses a TTL for cached keys via CLAY_STORAGE_POSTGRES_CACHE_TTL
. The default value is 24h.
#67 - Allows Knex timeouts to be configured via CLAY_STORAGE_CONNECTION_TIMEOUT
.
#68 - Upgrades amphora-fs
to 2.0.0
and clayutils
to 3.0.0
.
This release is part of a broader set of releases across the Clay suite that reduce the number of places the handlebars
version is managed.
This release should be used with amphora@8+
and kiln@10+
.
TTLs for already-cached keys will not be modified by adopting this version of amphora-storage-postgres
.
Existing keys should be purged or manually assigned a TTL via the TTL command.
v1.5.0
Utilizes the "Global" Redis Keyspace
Removed: Support for the REDIS_HASH
configuration value.
Users of amophora-storage-postgres
that currently utilize the Redis cache need to be aware of three things.
-
The Redis cache now uses
GET/SET
commands instead of theirH
counterparts. This means items are cached in the database's global keyspace, rather than all under a single hashmap. Users upgrading from a version<1.5.0
should delete the old hashmap to avoid wasted persistent memory. -
When first deployed, the cache will be cold. This will result in a higher-than-usual load on the database until the new caching keyspace is populated.
-
Upgrading to
v1.5.0
means that Redis's eviction mechanisms can safely been enabled to treat Redis as an LRU cache (as long as the Redis instance/cluster is not shared for any other uses).
v1.4.1
Dependency Bump
This release upgrades the package's dependencies.
It also introduces a development change, which is the inclusion of new integration tests.
Adopting a v1.4.x
release may significantly increase the memory requirements for the Redis cache for Amphora users that do not have the majority of their data already cached.
If the memory available in Redis is less than the total size of the Postgres database it's strongly recommended to upgrade directly to > v1.5.x
and enable an eviction policy in Redis.
v1.4.0
Feature: Cache Re-population
This release introduces a mechanism to re-populate the cache in the following scenario (#57):
- A call to
redis.get
fails to retrieve an item (it's not present in Redis). - A call to
postgres.get
succeeds in retrieving the item. - The retrieved item will be saved with
redis.put
, future lookups will hit the cache. 🆕
Prior to this change, the Redis cache was only acting as a cache for components/uris/layouts/etc modified after the cache's inception. As a result, a loss of cache data could result in a permanent performance drop without a recovery from backup or a manual solution for re-hydration.
Adopting a v1.4.x
release may significantly increase the memory requirements for the Redis cache for Amphora users that do not have the majority of their data already cached.
If the memory available in Redis is less than the total size of the Postgres database it's strongly recommended to upgrade directly to > v1.5.x
and enable an eviction policy in Redis.
v1.3.2
Bugfix: CLAY_STORAGE_POSTGRES_PORT
This release contains an important bugfix for anyone setting CLAY_STORAGE_POSTGRES_PORT
explicitly.
Releases v1.3.0
and v1.3.1
will fail to execute migrations due to the port being interpreted as a string rather than an integer.
Release v1.3.2
converts the environment variable value to an integer when provided.
v1.3.1
Bump dependencies for security fixes.
v1.3.0
Feature: Database Migrations
Implements #37 and responds to #34, adding a folder for migrations which should be SQL files or a javascript function that returns a string that is valid SQL.
Migrations are run on startup of amphora-storage-postgres. Migrations may not be changed after they are run once, so all setup of components and layouts tables is done after the migrations have run.
Migrations will be used to add functionality to amphora-storage-postgres that relies on schema changes.
v1.2.1
Enables Redis cache toggling via environment variable
This release adds a toggle to utilize Redis only if the cache is enabled through CLAY_STORAGE_POSTGRES_CACHE_ENABLED=true
.