Setting db work_mem with tokio_postgres

let (mut client, connection) =
        tokio_postgres::connect("host=localhost user=user password=pass", NoTls).await?;

client.query("SET WORK_MEM=64", & [  ])
        .await?;

How to set work_mem to 64MB. That code above sets it to 64KB. I've tried number of different things, including adding MB to the second arg, but nothing seams to work.

Have you tried client.query("SET work_mem TO '64MB'").await?;? Taken from this blog post.

Hi and thank you for your reply. Yes, I've tried. That didn't work either. As a workaround I am providing amount in KB. That works.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.