From 2e3d72820dedc252f15692f1d327630e6fa3f5e6 Mon Sep 17 00:00:00 2001 From: Henry Rodman Date: Tue, 10 Dec 2024 06:28:00 -0600 Subject: [PATCH] fix: update units for effectiveCacheSize and tempBuffers (#112) These parameters need to be described in number of 8kb blocks https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.Parameters.html --- lib/database/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/database/index.ts b/lib/database/index.ts index 94f7267..18d6444 100644 --- a/lib/database/index.ts +++ b/lib/database/index.ts @@ -159,11 +159,11 @@ export class PgStacDatabase extends Construct { return { maxConnections: `${maxConnections}`, sharedBuffers: `${sharedBuffers / 8}`, // Represented in 8kb blocks - effectiveCacheSize: `${effectiveCacheSize}`, + effectiveCacheSize: `${effectiveCacheSize / 8}`, // Represented in 8kb blocks workMem: `${workMem}`, maintenanceWorkMem: `${maintenanceWorkMem}`, maxLocksPerTransaction: "1024", - tempBuffers: `${tempBuffers}`, + tempBuffers: `${tempBuffers / 8}`, // Represented in 8kb blocks seqPageCost: `${seqPageCost}`, randomPageCost: `${randomPageCost}`, };