gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] Fixup Server failed


From: slappinjohn
Subject: Re: [Gnumed-bugs] Fixup Server failed
Date: Mon, 2 Sep 2019 22:30:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

 pk_audit | row_version |         modified_when         | modified_by | 
pk   |                  user_action                 
----------+-------------+-------------------------------+-------------+-------+-----------------------------------------------
   593079 |           0 | 2019-07-23 06:26:59.141724+00 | maan        |
67314 | EMR access: pulling chart for identity [9672]
(1 Zeile)

Am 02.09.19 um 21:40 schrieb Karsten Hilbert:
> On Mon, Sep 02, 2019 at 09:28:00PM +0200, slappinjohn wrote:
>
>> gm-fixup-server 22 failed after latest update.
>>
>> a pk seems to be in use twice - how can I get rid of this problem?
> Indeed ...
>
>> 2019-09-02 21:24:07  INFO      gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1156): REINDEXing cloned 
>> target database so upgrade does not fail in case of a broken index
>> 2019-09-02 21:24:07  INFO      gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1157): this may potentially 
>> take "quite a long time" depending on how much data there is in the database
>> 2019-09-02 21:24:07  INFO      gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1158): you may want to monitor 
>> the PostgreSQL log for signs of progress
>> 2019-09-02 21:24:34  ERROR     gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1168): >>>[REINDEX (VERBOSE) 
>> DATABASE gnumed_v22]<<< failed
>> Traceback (most recent call last):
>>   File "./bootstrap_gm_db_system.py", line 1166, in reindex_all
>>     curs_outer.execute(cmd)
>>   File "/usr/lib/python2.7/dist-packages/psycopg2/extras.py", line 144, in 
>> execute
>>     return super(DictCursor, self).execute(query, vars)
>> IntegrityError: could not create unique index "access_log_pkey"
>> DETAIL:  Key (pk)=(67314) is duplicated.
>>
>> 2019-09-02 21:24:34  INFO      gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1170): attempting REINDEXing 
>> without VERBOSE
>> 2019-09-02 21:25:02  ERROR     gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::reindex_all() #1176): >>>[REINDEX DATABASE 
>> gnumed_v22]<<< failed
>> Traceback (most recent call last):
>>   File "./bootstrap_gm_db_system.py", line 1174, in reindex_all
>>     curs_inner.execute(cmd)
>>   File "/usr/lib/python2.7/dist-packages/psycopg2/extras.py", line 144, in 
>> execute
>>     return super(DictCursor, self).execute(query, vars)
>> IntegrityError: could not create unique index "access_log_pkey"
>> DETAIL:  Key (pk)=(67314) is duplicated.
>>
>> 2019-09-02 21:25:02  ERROR     gm.bootstrapper  [140446077142464 MainThread] 
>>  (./bootstrap_gm_db_system.py::__bootstrap() #652): cannot REINDEX cloned 
>> target database
> Strange how this can have happened.
>
> But this is exactly *why* we do a REINDEX at such time: to
> catch such problems early.
>
> Very interesting would be the output of
>
>       SELECT * FROM gm.access_log WHERE pk = 67314;
>
> which should show the duplicated rows.
>
> There's a doable fix but it somewhat depends on what those
> rows contain.
>
> Best,
> Karsten
> --
> GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]