Some records in Postgres db disappeared

Services I’m using
NodeJS - Free plan
Postgres 14 - Free plan

I deployed an app yesterday for testing, Nextjs app, Postgres db. I was testing it for about an hour and the BE api made about 100-200 records (I’m using Prisma on BE) and everything seemed to be working just fine.

I opened the app today and found out more than 50% of the records that were written yesterday just disappeared.

I saw the same behavior some time ago with different app but didn’t pay much attention to it as I wasn’t writing the code and just thought it’s a bug in the app

It seems like when there are missing records the entire table was “truncated”.

I found an article describing similar issue Disappearing Data in PostgreSQL – , is there any connection between the issue in the article and my issue ?

I would be more or less ok with this happening on free plan, but my main concern is this will/may happen on paid plan.

Hi Stefan,
I can assure you that this is not something that we do - nor anything that I’ve seen before or had reports on.

What I have seen is people accidentally running their test suite against the wrong database which truncates the entire table - however that would affect the entire table contents and not selectively 50% of it.

You’d probably want to look at row counts in your Postgres database when you’ve inserted the records to confirm they have been added to the database - and monitor accordingly.

Again, it really doesn’t sound like something that would originate from us,


John B

Sorry for the delay, I’ll try to investigate it a bit further and if it happens again I’ll let you know

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.