View Issue Details

IDProjectCategoryView StatusLast Update
0007060Talerexchangepublic2021-11-21 15:26
ReporterFlorian Dold Assigned ToChristian Grothoff  
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiongit (master) 
Target Version0.9Fixed in Version0.9 
Summary0007060: exchange DB connection does not re-run prepared statements on re-connect
DescriptionThe function prepare_statements in plugin_exchangedb_postgres.c is only called from internal_setup, and only if pg->init is set to false.

However, we never set pg->init to true if we lose the DB connection. Worse, GNUNET_PQ_reconnect_if_down doesn't let is know if we reconnected or not.

Ideally, libgnunetpq would track whether prepared statements have been run or not.

The problem with that approach is that currently libgnunetpq eagerly executes prepared statements, even though tables might not be created yet, which causes these statements to fail. But I don't understand why this matters, since we only need to do this for DB connection that normally access the DB, and not for the special administrative DB transactions.
TagsNo tags attached.


Christian Grothoff

2021-11-21 15:26

manager   ~0018516

Bug was based on a misunderstanding by Florian on the GNUNET_PQ_prepare_statements() logic which does already ensure reinitialization of all prepared statements on reconnect.

Issue History

Date Modified Username Field Change
2021-11-01 15:51 Florian Dold New Issue
2021-11-01 15:51 Florian Dold Status new => assigned
2021-11-01 15:51 Florian Dold Assigned To => Christian Grothoff
2021-11-21 15:26 Christian Grothoff Status assigned => resolved
2021-11-21 15:26 Christian Grothoff Resolution open => no change required
2021-11-21 15:26 Christian Grothoff Fixed in Version => 0.9
2021-11-21 15:26 Christian Grothoff Note Added: 0018516
2021-11-21 15:26 Christian Grothoff Target Version 0.9.1 => 0.9
2021-11-21 15:26 Christian Grothoff Status resolved => closed