Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:18:17+00:00 2026-06-07T06:18:17+00:00

This may be a long shot, but I thought I’d ask anyway. I am

  • 0

This may be a long shot, but I thought I’d ask anyway.

I am looking at using Heroku’s new Crane Postgres DB (400 MB RAM Cache) in conjunction with an app I’m deploying on Heroku. The 400 MB cache size should be plenty for our needs… except for one column of one table, in which we store a cached PDF file as a string. The PDF’s could easily use up the 400MB RAM pretty quickly if Heroku uses its Cache for them.

If I were on an actual server, I’d just store the PDF as a file, but given Heroku’s ephemeral file system, my life is much simpler if I just store the pdf in the DB rather than rigging up a connection to S3 just for this one thing. (It further complicates that we’re looking at deploying multiple heroku instances, one for each client … so using the DB’s is simpler than creating a new bucket for each one.) I don’t really care about the speed on this. If people are getting the file, they will expect speeds as if it were coming from a file system anyhow, since thats how most file downloads are done. Is there any way to tell PostGRES to not bother caching this column?

Or maybe I’m asking the wrong question, and there is some other way to solve the problem or design alternatives that make it irrelevant.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:18:18+00:00Added an answer on June 7, 2026 at 6:18 am

    You don’t have to do anything. PostgreSQL will automatically use TOAST on values larger than 8 kB.

    From http://www.postgresql.org/docs/9.1/static/storage-toast.html

    PostgreSQL uses a fixed page size (commonly 8 kB), and does not allow tuples to span multiple pages. Therefore, it is not possible to store very large field values directly. To overcome this limitation, large field values are compressed and/or broken up into multiple physical rows. This happens transparently to the user, with only small impact on most of the backend code. The technique is affectionately known as TOAST (or “the best thing since sliced bread”).

    PostgreSQL caching is also done at the page level so TOAST does not have to be cached with the rest of the row (http://www.westnet.com/~gsmith/content/postgresql/InsideBufferCache.pdf).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a long shot, but I'm using ComponentOne's Spellchecker control for Silverlight.
This may be a long shot but I'm out of ideas. I've got a
I realize that this question may be a long shot, but I have to
This may be the wrong place but this is new to me. I did
this may sound a newbie question anyway Im new to GCD, I'm creating and
This may be a long shot question.. I am working on an application that
I realize this may be a simple problem, but I am new to ASP.net
this may be a stupid question or a typo but I'm going to ask
This post may seem long.. But it's very simple. So please please help. Thanks.
This may be a basic question, but I'm still looking for the answer. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.