Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This sounds a lot like a transaction issue, where you aren't <code>COMMIT</code>ting your transactions after you do work, so the changes are lost. If your SQLite driver defaults to <code>COMMIT</code>ting transactions that're closed without an explicit <code>COMMIT</code> or rollback, and your Pg driver defaults to <code>ROLLBACK</code>, you'd get the behaviour described. The same will happen if the SQLite defaults to autocomitting each statement by default, and the Pg driver driver defaults to opening a transaction.</p> <p>This is one of the many good reasons to use the same local database for testing as you're going to deploy to when you want to go live.</p> <p>If you were on a normal Pg instance I'd tell you to enable <code>log_statement = 'all'</code> in <code>postgresql.conf</code>, reload Pg, and watch the logs. You can't do that on Heroku, but you do have access to the Pg logs with <code>heroku logs --ps postgres</code>. Try running <code>ALTER USER my_heroku_user SET log_statement = 'all';</code>, re-testing, and examining the logs.</p> <p>Alternately, install Pg locally.</p> <p>Other less likely possibilities that come to mind:</p> <ul> <li>You're using long-running SERIALIZABLE transactions for reads, so their snapshot never gets updated. Pretty unlikely.</li> <li>Permissions on database objects are causing <code>INSERT</code>s, <code>UPDATE</code>s, etc to fail, and your app is ignoring the resulting errors. Again, unlikely.</li> <li>You have <code>DO INSTEAD</code> rules that don't do what you expect, or <code>BEFORE</code> triggers that return <code>NULL</code>, thus silently turning operations into no-ops. Seems unlikely if you're testing with SQLite.</li> <li>You're writing to a different DB than you're reading from. Not impossible in setups that're attempting to read from a cluster of hot standbys, etc.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload