pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Phillips <mark.phillips@mophilly.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: limit of data type character varying
Date: Wed, 25 Nov 2020 12:43:14 -0800
Message-ID: <3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com> (raw)

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=

view thread (2+ messages)  latest in thread

Message-ID: <3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com>
Permalink:  ../3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com/
Also on:    postgresql.org/message-id/3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mark.phillips@mophilly.com
  Subject: Re: limit of data type character varying
  In-Reply-To: <3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com>
  References: <3F1A5CF4-EB95-45AC-855B-B8A269FFDA0D@mophilly.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox