Home > OS >  Queries to increase memory usage PostgreSQL
Queries to increase memory usage PostgreSQL

Time:05-13

I created an AWS CloudWatch alarm for Aurora PostgreSQL's Freeable Memory and wanted to test if it is created correctly. So looking for any queries to be executed on the Aurora PostgreSQL 12.8 which can increase its memory usage to say 70 or 80% and activate the CloudWatch Alarm.

The DB is completely empty and we can create DB's/Tables etc. and run any queries we want.

CodePudding user response:

I cannot say about Aurora, but on PostgreSQL you could do something like:

SET work_mem = '1TB';
SELECT * FROM generate_series(1, 100000000000000000000000000000000);
  • Related