[Tickets #14878] Sequence reset incompatible with PostgreSQL 10+

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Nov 26 11:16:13 UTC 2018


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: https://bugs.horde.org/ticket/14878
------------------------------------------------------------------------------
  Ticket           | 14878
  Erstellt Von     | stefan at stklcode.de
  Zusammenfassung  | Sequence reset incompatible with PostgreSQL 10+
  Warteschlange    | Horde Base
  Version          | 5.2.20
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 2. Medium
  Milestone        |
  Patch            |
  Zuständige       |
------------------------------------------------------------------------------


stefan at stklcode.de (2018-11-26 11:16) hat geschrieben:

After upgrading the database from PostgreSQL 9.6 to 11 certain  
operations fail when trying to reset a sequence.

Example to reproduce:
Create a new event in Kronolith raises an error (see attached log).  
After refreshing the page the event is created successfully.

Cause:
Method "resetPkSequence" in file  
"pear/Horde/Db/Adapter/Postgresql/Schema.php" executes the following  
SQL:
SELECT setval(%s, (SELECT COALESCE(MAX(%s) + (SELECT increment_by FROM  
%s), (SELECT min_value FROM %s)) FROM %s), false)

Sequence column "increment_by" is no longer available in PostgreSQL 10  
and above.



stefan at stklcode.de (2018-11-26 11:16) hat hochgeladen: horde-seq-pg11.log

https://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=horde-seq-pg11.log&ticket=14878&fn=%2Fhorde-seq-pg11.log





More information about the bugs mailing list