Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki1dJ-00033J-Tg for pgsql-general@arkaria.postgresql.org; Wed, 25 Nov 2020 20:43:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ki1dI-0003G0-RP for pgsql-general@arkaria.postgresql.org; Wed, 25 Nov 2020 20:43:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki1dI-0003Fs-Ij for pgsql-general@lists.postgresql.org; Wed, 25 Nov 2020 20:43:20 +0000 Received: from mail.mophilly.com ([98.173.51.148] helo=mophilly.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki1dF-0001sG-Se for pgsql-general@lists.postgresql.org; Wed, 25 Nov 2020 20:43:20 +0000 Received: (qmail 4924 invoked by uid 453); 25 Nov 2020 20:43:14 -0000 X-Virus-Checked: by ClamAV 0.100.2 on mophilly.com X-Virus-Found: No Authentication-Results: mophilly.com; auth=pass (plain) smtp.auth=mark Received: from pc-00205.mophilly.com (HELO pc-00205.mophilly.com) (192.168.181.205) by mophilly.com (qpsmtpd/0.96) with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted); Wed, 25 Nov 2020 12:43:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mophilly.com; h=from:content-type:mime-version:subject:message-id:date:to; s=default; bh=cwImx5MQZAwvFjSNRy0/62N2wS9qEQtzd4DunadPloY=; b=n1UB/0m/TI2l7cNx+fUFgPKS8TN5i4OkFXVc/8mRkkeZgBqdm/OCJ/4jlp2kYTmJjs3b+vke90aHXPRRGrII0dy2TMQm4RQYEKGfXu0ijUdmb4eVN/9z7HazkEnhivGeo0W9o5y7sZbtJIcbsO7qXGEBeGlV7Z3IlzVqJ5YxJvkezQiDZxD4SmSk2SlWwqmsN5KutxLPxijB/4cBhOl4OTP+td7yuW26gdEqO99+hGyBdAORxBkkdris+weuVkdlNO5R1umrIj3E5Znu5a2T9CCyAUmRvPSY8lUMUmx5NogcEAYZh3m7/Q5ujo+Us94YnEx2pcefVohp4yQEfKrg2w== From: Mark Phillips Content-Type: multipart/alternative; boundary="Apple-Mail=_92B82CA8-DC4A-4FCD-871B-2A793B7A9844" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: limit of data type character varying Message-Id: <3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com> Date: Wed, 25 Nov 2020 12:43:14 -0800 To: pgsql-general X-Mailer: Apple Mail (2.3608.120.23.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_92B82CA8-DC4A-4FCD-871B-2A793B7A9844 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Ran into a problem with SymmetricDS when attempting to sync two postgres = 12 databases.=20 The problem occurs when Symmetric builds the XML for a table that has = the character varying datatype with an undefined length. SymmetricDS = creates in the xml character field that is 2,147,483,647 length. = Subsequently, when SymmetricDS attempts to create the table on the = client, an error is raised that says the character varying field exceeds = the maximum length.=20 The actual maximum length supported by postgresql 12 is 10,485,760. We = dug into the postgres code and found a limit in the config with a = comment dating it to the pg 8.5 era. Being the simple folk that we are, = we changed the setting to the higher value. Unfortunately, pg 12 raised = some errors of its own. This seems like a bug in SymmetricDS, which ought to set the maximum = length to that supported by the target database. On the other hand, one could argue that a higher limit in postgres is = sensible these days.=20 Additional Information=09 1. symmetricds version 3.12.4 2. Postgresql Version 12 3. OS's Windows 10, Mac Catalina and SME Server Regards, Mark Phillips Mophilly Technology Inc. Telephone: (619) 296-0114 On the web at http://www.mophilly.com= --Apple-Mail=_92B82CA8-DC4A-4FCD-871B-2A793B7A9844 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Ran = into a problem with SymmetricDS when attempting to sync two postgres 12 = databases. 

The problem occurs when = Symmetric builds the XML for a table that has the character = varying datatype with an undefined length. SymmetricDS creates in = the xml character field that is 2,147,483,647 length. Subsequently, when = SymmetricDS attempts to create the table on the client, an error is = raised that says the character varying field exceeds the maximum = length. 

The actual maximum = length supported by postgresql 12 is 10,485,760. We dug into the = postgres code and found a limit in the config with a comment dating it = to the pg 8.5 era. Being the simple folk that we are, we changed the = setting to the higher value. Unfortunately, pg 12 raised some errors of = its own.

This seems like a bug in = SymmetricDS, which ought to set the maximum length to that supported by = the target database.

On the other hand, one could argue that a higher limit in = postgres is sensible these days. 

Additional Information
1. = symmetricds version 3.12.4
2. Postgresql Version 12
3. OS's Windows 10, Mac Catalina and SME Server

Regards,

Mark Phillips
Mophilly = Technology Inc.
Telephone: (619) 296-0114
On the web = at http://www.mophilly.com
= --Apple-Mail=_92B82CA8-DC4A-4FCD-871B-2A793B7A9844--