Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn1vH-0004Gf-LM for pgsql-admin@arkaria.postgresql.org; Thu, 22 Sep 2016 11:12:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bn1vH-0008Dm-8a for pgsql-admin@arkaria.postgresql.org; Thu, 22 Sep 2016 11:12:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bn1tQ-0006BY-7w for pgsql-admin@postgresql.org; Thu, 22 Sep 2016 11:10:16 +0000 Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bn1tM-00085z-Ff for pgsql-admin@postgresql.org; Thu, 22 Sep 2016 11:10:15 +0000 Received: by mail-vk0-x234.google.com with SMTP id o139so19696092vka.2 for ; Thu, 22 Sep 2016 04:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avast-com.20150623.gappssmtp.com; s=20150623; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=IxD7qvRQZ4D4qgEcQejSTFyYcO6YHPKnibOa3qnsaKo=; b=PlhGBCmYgePjr2zLq0WvZP9CIS7xF2jxDozhBr3c4eHn84+L39GuepXiKQ2dA8gnDK zDLZVMeQjHQP2Edx0pnGP3W3VObtgsJwyxfygSXvBH4U1BiKfIGul2mIa/AjZ4/gdHMq JuunGooQrSCVOqpl/Q+pmtnDdOAFr6GzDOENoUZhN8UPAfYNPtmJVyfdGsnWI/9Jzme1 X1cVL9GGor9SMRRHldpVtck6EAfUkTv0lBEVtEwa2gWfD1mOuJH1/e90ycsw4ONTN07B erRiTFouPniXlY7PnfX2bJFrifXZZuUw/i7hvtaTkTx/g8k/Avm6u436rQryPjHxA9/T X6SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=IxD7qvRQZ4D4qgEcQejSTFyYcO6YHPKnibOa3qnsaKo=; b=jGSU6yFchFhLR2O7qubvxZU/i2lq8NUpj12EzqHqkQD3SPJr4TGrUdHEdfHuOqkP71 dHQQISZeZRvxWtBzRNNMkGZQzsVQM8HyNrPcGLpwc3oN8iVabvar7ltpMuI6RnJdcZXx I2fVRD3YT5PmbLZv74i9Vic3kDceXuYbhPVKOma3cnDvpFh4eNa7N+28mI+PHR4aBtH6 XzW0HEJG3AdcUknym9IC4T/3WftoCRhitazdm7xKW/zGUQ+9an9+zo7+LvS2/osCHx3O T2iTvBsQ1eiRJbGs8nymFbXe4ZJ0W8xlbYjpxx7i0EZrcRe/RH+wR69YdLM44CDkVf2n B8wA== X-Gm-Message-State: AE9vXwOfmELXThMe1wbEAhId524pdNxUSKZbRSNDSBeNnY9GwXKBXIIGSc2Mpz6ikxPsPBKNeWDOgAEGD6Nh0LGK X-Received: by 10.31.48.20 with SMTP id w20mr1150645vkw.5.1474542611226; Thu, 22 Sep 2016 04:10:11 -0700 (PDT) From: =?UTF-8?B?VG9tw6HFoSBVa28=?= References: <05172a3859cb6805b368084dfd015dbc@mail.gmail.com>, In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJeZc6q4p7G23ZWufj/ZOJoeizsWAJCsalDAuAQpvIDTWZHGwJPW+Csnxa72EA= Date: Thu, 22 Sep 2016 13:10:09 +0200 Message-ID: <5e67f930be15a69865c814786ad27a97@mail.gmail.com> Subject: Re: Problem with extension To: Aislan Luiz Wendling Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=001a114409408c762a053d16b464 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --001a114409408c762a053d16b464 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable No, that doesn=E2=80=99t work as well XY=3D# drop extension hstore; ERROR: extension "hstore" does not exist *From:* Aislan Luiz Wendling [mailto:aislanluiz@hotmail.com] *Sent:* Thursday, September 22, 2016 1:06 PM *To:* Tom=C3=A1=C5=A1 Uko *Subject:* Re: [ADMIN] Problem with extension If it is possible, you can try to drop that extension, copy the contrib from a machine that is working and try to create again. It appears to be a library problem with no treatment. ------------------------------ *From:* pgsql-admin-owner@postgresql.org on behalf of Tom=C3=A1=C5=A1 Uko *Sent:* Thursday, September 22, 2016 7:46 AM *To:* pgsql-admin@postgresql.org *Subject:* Re: [ADMIN] Problem with extension Another thing, Recreating extension again via =E2=80=9ECREATE EXTENSION=E2=80=9C doesn=E2= =80=99t work XY=3D# CREATE EXTENSION hstore SCHEMA public; ERROR: type "hstore" already exists XY=3D# CREATE EXTENSION hstore; ERROR: type "hstore" already exists Any ideas? *From:* Tom=C3=A1=C5=A1 Uko [mailto:uko@avast.com] *Sent:* Wednesday, September 21, 2016 4:58 PM *To:* Payal Singh *Cc:* pgsql-admin@postgresql.org *Subject:* RE: [ADMIN] Problem with extension Hi, Sure, otherwise tables with hstore column won=E2=80=99t be created/usable (= IMHO). Extension is part of contrib package (if I remember correctly) [root@XX ~]# ls -al /usr/pgsql-9.3/lib/hstore.so -rwxr-xr-x 1 root root 56336 May 11 16:59 /usr/pgsql-9.3/lib/hstore.so [root@XX ~]# ls -al /usr/pgsql-9.3/share/extension/hstore* -rw-r--r-- 1 root root 279 May 11 16:57 /usr/pgsql-9.3/share/extension/hstore--1.0--1.1.sql -rw-r--r-- 1 root root 1201 May 11 16:57 /usr/pgsql-9.3/share/extension/hstore--1.1--1.2.sql -rw-r--r-- 1 root root 12646 May 11 16:57 /usr/pgsql-9.3/share/extension/hstore--1.2.sql -rw-r--r-- 1 root root 158 May 11 16:57 /usr/pgsql-9.3/share/extension/hstore.control -rw-r--r-- 1 root root 5509 May 11 16:57 /usr/pgsql-9.3/share/extension/hstore--unpackaged--1.0.sql T. *From:* Payal Singh [mailto:payal@omniti.com] *Sent:* Wednesday, September 21, 2016 4:34 PM *To:* Uko, Tom=C3=A1=C5=A1 *Cc:* pgsql-admin@postgresql.org *Subject:* Re: [ADMIN] Problem with extension On the problematic machines, do you see a hstore.so file in the pgsql/lib directory? Also, do you see hstore sql files in the pgsql/share/extension directory? Payal Singh, Database Administrator, OmniTI Computer Consulting Inc. Phone: 240.646.0770 x 253 On Wed, Sep 21, 2016 at 6:09 AM, Uko, Tom=C3=A1=C5=A1 wrote= : Hi everybody, We have a problem with postgres extensions, we have several servers with several instances on each of them (together 42). Each of those instances are same (except table names - aplication partitioning). But when we are preparing to migrate to newer version of Postgres, we discovered this. On all servers, there are tables with hstore columns, therefore there is hstore extension in use. In order to upgrade from 9.3 to 9.5 we need to run "ALTER EXTENSION hstore UPDATE;" on each database. But on some instances, it says, there is no extension hstore: XY=3D# alter extension hstore update; ERROR: extension "hstore" does not exist On "correct" instance \dx shows (after alter): XY=3D# \dx List of installed extensions Name | Version | Schema | Description -------------+---------+------------+--------------------------------------= ------------ adminpack | 1.0 | pg_catalog | administrative functions for PostgreSQL hll | 1.0 | public | type for storing hyperloglog data hstore | 1.2 | public | data type for storing sets of (key, value) pairs pgstattuple | 1.0 | public | show tuple-level statistics plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language (5 rows) On "weird" one \dx shows: XY=3D# \dx List of installed extensions Name | Version | Schema | Description -------------+---------+------------+--------------------------------------= --- adminpack | 1.0 | pg_catalog | administrative functions for PostgreSQL hll | 1.0 | public | type for storing hyperloglog data pgstattuple | 1.0 | public | show tuple-level statistics plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language (4 rows) We are running: Name : postgresql93-server Arch : x86_64 Version : 9.3.13 Release : 1PGDG.rhel6 On CentOS 6 2.6.32-431.20.3.el6.x86_64 Each instance has a replica on different machine (via WAL shipping as well as streaming replication) and problem is on both of them (master and slave) Weird is, when we try to add extension again (via CREATE EXTENSION), it ends up succesfully, but \dx won't show it Another thing, when we try to add extesion with insert to pg_extension it gets OID far greater than any other: XY=3D# select *,pg_extension.oid from pg_extension; extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition | oid -------------+----------+--------------+----------------+------------+-----= ------+--------------+----------- plpgsql | 10 | 11 | f | 1.0 | | | 12617 adminpack | 10 | 11 | f | 1.0 | | | 16471 hll | 10 | 2200 | f | 1.0 | | | 16472 pgstattuple | 10 | 2200 | t | 1.0 | | | 16473 hstore | 10 | 2200 | t | 1.2 | | | 366992783 Any ideas what to do to fix? Thanks Tomas --001a114409408c762a053d16b464 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

No, that doesn=E2=80=99t work as well

=C2=A0

XY=3D#= drop extension hstore;

ERROR:=C2=A0 exten= sion "hstore" does not exist

=C2= =A0

=C2=A0

= =C2=A0

=C2=A0

If it is possible, you can try to drop that extension, copy the contrib = from a machine that is working and try to create again. It appears to be a = library problem with no treatment.

=C2=A0


From: pgsql-admin-owner@p= ostgresql.org <p= gsql-admin-owner@postgresql.org> on behalf of Tom=C3=A1=C5=A1 Uko &l= t;uko@avast.com>
Sent: Thursday, September 22, 2016 7:46 AM=
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Problem with extensio= n

<= p class=3D"MsoNormal" style=3D"background:white">=C2=A0

Another thing,

= =C2=A0

Recreating extension again via =E2=80=9E= CREATE EXTENSION=E2=80=9C doesn=E2=80=99t work

= XY=3D# CREATE EXTENSION hstore SCHEMA public;

E= RROR:=C2=A0 type "hstore" already exists

XY=3D# CREATE EXTENSION hstore;

ERROR:=C2= =A0 type "hstore" already exists

=C2= =A0<= /font>

Any ideas?

=C2= =A0<= /font>

=C2=A0<= span style=3D"color:black">

= =C2=A0

Fr= om: Tom=C3=A1=C5=A1 Uko [mailto:uko@avast.com]
Sent:= Wednesday, September 21, 2016 4:58 PM
To: Payal Singh <payal@omniti.com>
Cc: pgsql-admin@postgre= sql.org
Subject: RE: = [ADMIN] Problem with extension

=C2=A0

Hi,

=C2=A0

Sur= e, otherwise tables with hstore column won=E2=80=99t be created/usable (IMH= O). Extension is part of contrib package (if I remember correctly)

=C2=A0

[root@XX ~]# ls -a= l /usr/pgsql-9.3/lib/hstore.so=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A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2=A0<= font color=3D"black">

<= span style=3D"font-size:11.0pt;font-family:"Calibri",sans-serif;c= olor:#1f497d">-rwxr-xr-x 1 root root 56336 May 11 16:59 /usr/pgsql-9.3/lib/= hstore.so=C2=A0=C2=A0

=C2=A0

[root@XX ~]# ls -al /usr/pgsql-9.3/share/extension/hstore*

-rw-r--r-- 1 root root=C2=A0=C2=A0 279 May 11 16:57 = /usr/pgsql-9.3/share/extension/hstore--1.0--1.1.sql=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=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=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<= font color=3D"black">

<= span style=3D"font-size:11.0pt;font-family:"Calibri",sans-serif;c= olor:#1f497d">=C2=A0

T.

=C2=A0=

Fr= om: Payal Singh [mailto:payal@omniti.com]
Sent: Wednesday, September 21, 2016 4:34 PM
To: Uko, Tom=C3=A1=C5=A1 <uko@avast.com>
Cc:<= /span> pgsql-admin@postgr= esql.org
Subject: Re:= [ADMIN] Problem with extension

=C2=A0

On the problematic machines, do you see a= hstore.so file in the pgsql/lib directory?=C2=A0

=C2=A0=

Al= so, do you see hstore sql files in the pgsql/share/extension directory?=C2= =A0


Payal Singh,
Database Administrator,

<= p style=3D"background:white">OmniTI Computer Consulting Inc.
Phone:=C2=A0
240.646.0770=C2=A0x 253

=C2=A0

On Wed, Sep 21, 2016 at 6:09 AM, Uko, Tom=C3=A1=C5=A1 <= ;uko@avast.com> w= rote:

Hi everybody,= We have a problem with postgres extensions, we have several servers with s= everal instances on each of them (together 42). Each of those instances are= same (except table names - aplication partitioning). But when we are prepa= ring to migrate to newer version of Postgres, we discovered this.

On all servers, there are tables with hstore columns= , therefore there is hstore extension in use. In order to upgrade from 9.3 = to 9.5 we need to run "ALTER EXTENSION hstore UPDATE;" on each da= tabase. But on some instances, it says, there is no extension hstore:

=C2= =A0

XY=3D# alter extension hstor= e update;

ERROR: =C2=A0extension "hsto= re" does not exist

=C2=A0

O= n "correct" instance \dx shows (after alter):

XY=3D# \dx

=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0List of installed extensions

= =C2=A0 =C2=A0 Name =C2=A0 =C2=A0 | Version | =C2=A0 Schema =C2=A0 | =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Description<= /font>

<= /div>

-------------+---------+------------+-------------= -------------------------------------

=C2= =A0adminpack =C2=A0 | 1.0 =C2=A0 =C2=A0 | pg_catalog | administrative funct= ions for PostgreSQL

=C2=A0hll =C2=A0 =C2=A0= =C2=A0 =C2=A0 | 1.0 =C2=A0 =C2=A0 | public =C2=A0 =C2=A0 | type for storin= g hyperloglog data

=C2=A0hstore =C2=A0 =C2= =A0 =C2=A0| 1.2 =C2=A0 =C2=A0 | public =C2=A0 =C2=A0 | data type for storin= g sets of (key, value) pairs

=C2=A0pgstattu= ple | 1.0 =C2=A0 =C2=A0 | public =C2=A0 =C2=A0 | show tuple-level statistic= s

=C2=A0plpgsql =C2=A0 =C2=A0 | 1.0 =C2=A0 = =C2=A0 | pg_catalog | PL/pgSQL procedural language

(5 rows)

=C2=A0

On &q= uot;weird" one \dx shows:

XY=3D# \dx

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0List of installed extension= s

=C2=A0 =C2=A0 Name =C2=A0 =C2=A0 | Versio= n | =C2=A0 Schema =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= Description

-------------+---------+------= ------+-----------------------------------------

=C2=A0adminpack =C2=A0 | 1.0 =C2=A0 =C2=A0 | pg_catalog | administr= ative functions for PostgreSQL

=C2=A0hll = =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 1.0 =C2=A0 =C2=A0 | public =C2=A0 =C2=A0 | ty= pe for storing hyperloglog data

=C2=A0pgsta= ttuple | 1.0 =C2=A0 =C2=A0 | public =C2=A0 =C2=A0 | show tuple-level statis= tics=

=C2=A0plpgsql =C2=A0 =C2=A0 | 1.0 =C2= =A0 =C2=A0 | pg_catalog | PL/pgSQL procedural language

(4 rows)

=C2=A0

=C2=A0

<= p style=3D"background:white">We are running:

Name =C2=A0 = =C2=A0 =C2=A0 =C2=A0: postgresql93-server

A= rch =C2=A0 =C2=A0 =C2=A0 =C2=A0: x86_64=

Ver= sion =C2=A0 =C2=A0 : 9.3.13

Release =C2=A0= =C2=A0 : 1PGDG.rhel6

=C2=A0

On = =C2=A0CentOS 6 2.6.32-431.20.3.el6.x86_64

E= ach instance has a replica on different machine (via WAL shipping as well a= s streaming replication) and problem is on both of them (master and slave)<= /span>

= =C2=A0

=C2=A0

Weird= is, when we try to add extension again (via CREATE EXTENSION), it ends up = succesfully, but \dx won't show it<= span style=3D"color:black">

=C2=A0

<= p style=3D"background:white">Another thing, when we try to add extesion with insert to pg_= extension it gets OID =C2=A0far greater than any other:

XY=3D# select *,pg_extension.oid from pg_extension;

=C2=A0 =C2=A0extname =C2=A0 | extowner | extnamespac= e | extrelocatable | extversion | extconfig | extcondition | =C2=A0 =C2=A0o= id

-------------+----------+--------------+= ----------------+------------+-----------+--------------+-----------=

=

=C2=A0plpgsql =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2= =A0 10 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 11 | f =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0| 1.0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| = =C2=A0 =C2=A0 12617

=C2=A0adminpack =C2=A0 = | =C2=A0 =C2=A0 =C2=A0 10 | =C2=A0 =C2=A0 =C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=C2=A0

=C2=A0Any = ideas what to do to fix?

=C2=A0

= =C2=A0Thanks

=C2=A0Tomas

=

=C2=A0

--001a114409408c762a053d16b464--