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 1q2Ajx-0007ZG-7k for pgsql-general@arkaria.postgresql.org; Thu, 25 May 2023 13:10:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q2Ajw-00028G-3t for pgsql-general@arkaria.postgresql.org; Thu, 25 May 2023 13:10:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2Ajv-00027U-H2 for pgsql-general@lists.postgresql.org; Thu, 25 May 2023 13:10:47 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q2Ajt-001p4h-0R for pgsql-general@lists.postgresql.org; Thu, 25 May 2023 13:10:46 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-561c46e07d7so7457417b3.2 for ; Thu, 25 May 2023 06:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685020244; x=1687612244; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=gG6KWyGmaZqeA+/BWqmnfl00lWV20sc8Y27AAJPC1Tc=; b=gqFP9xlzILOdQFcVeMay/+1PVVqyAYpNWYa0RqGro306ScCFntPM1eyOZJ/vK6FOwz SICJdN2vIFG2nP0LUAQ642CGSUH2gFpv519GnagW6gyFlu5bLFdCDHNqN1rvC5+5d9ed 81lj0KqUEtQDKRA8b5oxTazkn5r15IdtAxYpSn5ShZfc9YO9R1VBqs0RXYXfsaiMvduw ryBeVY3SnmcsvW0B/q6u5uuTbEaSOyACmDlLnDUx355AmLDt5h5SASp+bCkqxhikHQ2K 0iJK7cSYdhTZqHrsrwspSry3fqt4ur6BBQQXMz/zQh5kPADKev0k2VZk5KjpUMRmWRQ6 8WEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685020244; x=1687612244; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=gG6KWyGmaZqeA+/BWqmnfl00lWV20sc8Y27AAJPC1Tc=; b=BBACYVGKW18Vrtuy05NxnD5AHlEQsbjmG6/KQ0T7ypb+KLPTa/JNfTT8ig+yJeBQ9k PFWSdejPPiUK3mFtGb9Fq7HlRm5UfQweVuBToCRIRM/GyNgjtUEVBQz6az/luep+qv7B 2r1x3dldBnziATWfH3h2taHQUQQz3g+ZCsu8Xu51fsVJRXFSB7tf+Kn16ejDTotgnYtG +f15Lbrb4tkFUJBCvBgC0QkSdmHhpxh2wR8IKag85MgGZJRo0WyAfboQRq1dczX1jgN5 kT6R/87VJpHbOmGLKLHh9dfK9KPNB/ADEZ8EcnbO1oBYrOvbet9fnJ0oqoZes5W9bMaF qyiw== X-Gm-Message-State: AC+VfDy1OH6zMx5XHfk1JPdDWkBBBAYDO8LcFRav8hXs2d+AU1aRL4wG dcBz7rsZg2i+axTxzmRYwe0XliYmozE= X-Google-Smtp-Source: ACHHUZ5nDfpxk0Ny0GUW9YFTKa2vJaMir2MegencqmNoqnyt5wqFmwnL5kWivtDs5R4NU2E6rnVtRQ== X-Received: by 2002:a81:750a:0:b0:565:9d27:c5e0 with SMTP id q10-20020a81750a000000b005659d27c5e0mr270134ywc.2.1685020243559; Thu, 25 May 2023 06:10:43 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:ccfd:c146:a1fa:eea3? ([2600:1700:bd2c:b810:ccfd:c146:a1fa:eea3]) by smtp.googlemail.com with ESMTPSA id l185-20020a0de2c2000000b00559d1eabc3csm351719ywe.79.2023.05.25.06.10.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 May 2023 06:10:43 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------cj0MhzLVvnCxXhzcdMnQfT2p" Message-ID: Date: Thu, 25 May 2023 08:10:42 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: DB migration : Sybase to Postgres Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------cj0MhzLVvnCxXhzcdMnQfT2p Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit If I read your email correctly, I see two options - Apply FK constraints *after* initial data load. - Load parent data before child data (You can create the FKs ahead of time, but use the NOT VALID clause; then, after data is loaded do ALTER TABLE ... VALIDATE CONSTRAINT.) On 5/25/23 06:30, Sengottaiyan T wrote: > Is there an option to set novalidate constraints in postgres? In my source > Sybase DB, table structures are not defined properly (only primary keys > exist and no foreign key) - I'm making necessary changes on target > Postgres DB (created tables, identifying relationship between table > columns with respective team). After creating proper structure on target, > the next step is to load data - I'm sure there will be a lot of errors > during initial data load (no parent record found). How to handle it? > > On Tue, Mar 28, 2023 at 3:22 PM Sengottaiyan T wrote: > > Team, > > Need some help regarding Open Source tools for DB migration (from > SYBASE to PostgreSQL) with real time CDC. Along with this, is there > any possibility to migrate other objects (like Triggers, Stored > Procedures and Functions) to PostgreSQL? > > Thanks, > Senko > -- Born in Arizona, moved to Babylonia. --------------cj0MhzLVvnCxXhzcdMnQfT2p Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit If I read your email correctly, I see two options
- Apply FK constraints *after* initial data load.
- Load parent data before child data

(You can create the FKs ahead of time, but use the NOT VALID clause; then, after data is loaded do ALTER TABLE ... VALIDATE CONSTRAINT.)

On 5/25/23 06:30, Sengottaiyan T wrote:
Is there an option to set novalidate constraints in postgres? In my source Sybase DB, table structures are not defined properly (only primary keys exist and no foreign key) - I'm making necessary changes on target Postgres DB (created tables, identifying relationship between table columns with respective team). After creating proper structure on target, the next step is to load data - I'm sure there will be a lot of errors during initial data load (no parent record found). How to handle it?

On Tue, Mar 28, 2023 at 3:22 PM Sengottaiyan T <techsenko@gmail.com> wrote:
Team,

Need some help regarding Open Source tools for DB migration (from SYBASE to PostgreSQL) with real time CDC. Along with this, is there any possibility to migrate other objects (like Triggers, Stored Procedures and Functions) to PostgreSQL?

Thanks,
Senko

--
Born in Arizona, moved to Babylonia.
--------------cj0MhzLVvnCxXhzcdMnQfT2p--