# Store & Forward Not Passing To Postgres

**URL:** <https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725>\
**Category:** Ignition\
**Created:** [July 4, 2018, 9:05pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725 "2018-07-04T21:05:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuck.jonkman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chuck.jonkman/32/5704_2.png) [@chuck.jonkman](https://forum.inductiveautomation.com/u/chuck.jonkman)\
**Post date:** [July 4, 2018, 9:05pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/1 "2018-07-04T21:05:28Z")

</div>

PostgreSQL 10.4 | Ignition Platform 7.9.8 _(running on trial)_

Store and Forward seems to only be sending data to quarantine and not to the DB. The tables appear to be in the DB but there are not any values.

There are two errors in the log that are occurring :

**DatasourceForwardTransaction**  
org.postgresql.util.PSQLException: Returning autogenerated keys is only supported for 8.2 and later servers.  
at org.postgresql.jdbc3.AbstractJdbc3Statement.addReturning(AbstractJdbc3Statement.java:153)  
at org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement(AbstractJdbc3Connection.java:363)  
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:458)  
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:394)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatement(SRConnectionWrapper.java:428)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatmentForGeneratedKeys(SRConnectionWrapper.java:433)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepInsertGetKey(SRConnectionWrapper.java:250)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.getIdOfScanclassName(TagHistoryDatasourceSink.java:587)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.updateSCExecRecord(TagHistoryDatasourceSink.java:545)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:476)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:458)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:137)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:115)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:170)  
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:155)

…and…

**MemoryForwardTransaction**  
org.postgresql.util.PSQLException: Returning autogenerated keys is only supported for 8.2 and later servers.  
at org.postgresql.jdbc3.AbstractJdbc3Statement.addReturning(AbstractJdbc3Statement.java:153)  
at org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement(AbstractJdbc3Connection.java:363)  
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:458)  
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:394)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatement(SRConnectionWrapper.java:428)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.prepareStatmentForGeneratedKeys(SRConnectionWrapper.java:433)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepInsertGetKey(SRConnectionWrapper.java:250)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.getIdOfScanclassName(TagHistoryDatasourceSink.java:587)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.updateSCExecRecord(TagHistoryDatasourceSink.java:545)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:476)  
at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:458)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:137)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:115)  
at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:170)  
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:155)

Thank you for looking through this. This is my first project with Ignition so I may have missed something obvious.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 5, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/2 "2018-07-05T15:22:35Z")

</div>

Check out this KBA:  
[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/122/0/database-connection-errors-after-upgrading-postgresql-to-v10](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/122/0/database-connection-errors-after-upgrading-postgresql-to-v10)

---

<div class="post-metadata">

**Author:** ![chuck.jonkman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chuck.jonkman/32/5704_2.png) [@chuck.jonkman](https://forum.inductiveautomation.com/u/chuck.jonkman)\
**Post date:** [July 5, 2018, 8:31pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/3 "2018-07-05T20:31:03Z")

</div>

Worked perfectly, thank you! I thought I had checked all the resources but somehow missed the Knowledgebase:)

---

<div class="post-metadata">

**Author:** ![Rick.Schendel](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rick.Schendel](https://forum.inductiveautomation.com/u/Rick.Schendel)\
**Post date:** [February 6, 2019, 11:08pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/4 "2019-02-06T23:08:00Z")

</div>

I applied the knowledge Article referenced, but I am still getting the “Returning autogenerated keys is only supported for 8.2 and later servers” error. When I retry the quarantined items, they attempt to process, but then cycle back. I should add that this is a new system. It has not previously worked.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ef1ece46ad9ef93da259b2a4fce0dab85770e566.png)

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [March 13, 2019, 9:05pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/5 "2019-03-13T21:05:54Z")

</div>

If you follow the KB and it isn’t working for you, check the **user-lib/jdbc** directory for the old postgres JDBC file still existing. We have seen an issue where the old JDBC driver is not removed when it replaced and it is still being used instead of the new one.

The fix is to remove the old driver from this folder if it still exists.

Garth

---

<div class="post-metadata">

**Author:** ![keari0913](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@keari0913](https://forum.inductiveautomation.com/u/keari0913)\
**Post date:** [July 7, 2019, 1:27am UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/6 "2019-07-07T01:27:50Z")

</div>

Was having the same issue as OP. Following your advice rectified the issue. Thank You

---

<div class="post-metadata">

**Author:** ![milbar](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@milbar](https://forum.inductiveautomation.com/u/milbar)\
**Post date:** [January 28, 2021, 5:12pm UTC](https://forum.inductiveautomation.com/t/store-forward-not-passing-to-postgres/18725/7 "2021-01-28T17:12:11Z")

</div>

Please update the KB article to reflect the possibility that you will need to delete the old .jar file.

> **[Database connection errors after upgrading PostgreSQL to v.10](https://support.inductiveautomation.com/hc/en-us/articles/360047151592?input_string=error%2Binserting%2Binto%2Bpostgresql%2Bdatabase)**
>
> Issue: after upgrading the PostgreSQL database to v.10, the Ignition Gateway log posts errors containing the org.postgresql.util.PSQLException: Returning autogenerated keys is only supported for 8....

I just spent hours looking for a solution and all it took was to delete that old file.
