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 8427003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:40:55+00:00 2026-06-10T04:40:55+00:00

I’ll let this irb session do the talking (junk omitted with …. ). Create

  • 0

I’ll let this irb session do the talking (junk omitted with ....).

Create a model with some Marshalled data. user_info is a binary column

irb(main):011:0> p2 = Provider.create(user_info: Marshal.dump(ActiveSupport::HashWithIndifferentAccess.new({foo: 1, bar: 2}))
   (0.7ms)  BEGIN
  SQL (11.6ms)  INSERT INTO "providers" (...."user_info") VALUES (....$9) RETURNING "id"  [.....["user_info", "\x04\bC:-ActiveSupport::HashWithIndifferentAccess{\aI\"\bfoo\x06:\x06EFi\x06I\"\bbar\x06;\x06Fi\a"]]
   (3.6ms)  COMMIT
=> #<Provider id: 98, ..... user_info: "\x04\bC:-ActiveSupport::HashWithIndifferentAccess{\aI\"\bf...", provider_id: nil>

Check the value. Looks right:

irb(main):013:0> p2.user_info
=> "\x04\bC:-ActiveSupport::HashWithIndifferentAccess{\aI\"\bfoo\x06:\x06EFi\x06I\"\bbar\x06;\x06Fi\a"

Bad things happen: here I reload it and the value completely changes into a format Marshal can’t load

irb(main):014:0> p2.reload
  Provider Load (5.3ms)  SELECT "providers".* FROM "providers" WHERE "providers"."id" = $1 LIMIT 1  [["id", 98]]
=> #<Provider id: 98, ...., user_info: "x0408433a2d416374697665537570706f72743a3a4861736857...", provider_id: nil>

irb(main):015:0> p2.user_info
=> "x0408433a2d416374697665537570706f72743a3a4861736857697468496e646966666572656e744163636573737b07492208666f6f063a0645466906492208626172063b06466907"

This session is running on Heroku after I recently moved my database from shared to their new free Dev Postgres.

I’m not sure if this is a heroku problem, a postgres problem or a rails problem. The strange thing is: I also migrated another instance (production) of the same app to the new Dev Posgress and it’s not having this problem. I found this but it appears to have been fixed years ago. Anyone have experience with this?

Update

Looks like I found an answer after all from this excellent answer on SO: https://stackoverflow.com/a/8541304/65311

  • 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-10T04:40:56+00:00Added an answer on June 10, 2026 at 4:40 am

    Heroku’s docs explain how to configure the change for bytea in their newer databases at: https://devcenter.heroku.com/articles/heroku-postgresql#troubleshooting

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

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.