Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u84TT-00CzDq-Qc for pgsql-novice@arkaria.postgresql.org; Thu, 24 Apr 2025 21:51:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u84TR-003vQ0-1b for pgsql-novice@arkaria.postgresql.org; Thu, 24 Apr 2025 21:51:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u84TQ-003vPs-Os for pgsql-novice@lists.postgresql.org; Thu, 24 Apr 2025 21:51:13 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u84TO-001r9L-1S for pgsql-novice@lists.postgresql.org; Thu, 24 Apr 2025 21:51:13 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2255003f4c6so18030875ad.0 for ; Thu, 24 Apr 2025 14:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745531469; x=1746136269; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BLClCBsYMorEbNTinOCcy/D+V0qygl7k2HESGt5hHXk=; b=a7UeCdUOvkiZ11gpu1E483WlbKy3F7kE/9hczK6DrUMctnEu6yC8OSqtJ8Hq/Hfe0/ Pn6wP6DvGC7qGFp3nlExWG3vqwirojCkkz2HF6LWdTBaO4tCDW9w2J2szwAwaEiahMwt UOnE0U3BiG6cuGmqchKACwHF6eBJdRXSlcsSSJ/tzLJGSdEVXlY9fquixfnVOi1FSU2d n57UUUQnIFhsZXWF9K0rk6r90CfAJB+xSg7WVIshQX9gWrP8BfdtDRRCxkxQxlgU66Xf 7ebHZSGCk5AYLGl2yqRQdLePwjw0YcDkcWa4F5t2javwQtMhHR+pIQHxJKpL8cKaShOL A6ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745531469; x=1746136269; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BLClCBsYMorEbNTinOCcy/D+V0qygl7k2HESGt5hHXk=; b=fft/cCo7Uq+hVBtEGfnJQfY1xywT0Aig4WdCdKXETeiACJNpyXSGjUwdD0r26XeXHE XwfYCBlJrdHFF3q9jF4az4jrM+Yk/CnEeiW2K7po7t6hMegIRFJrw4Ib/lBGMouj6AOf 5GmdFxmaQTyGXYfuczPKPNBGW3F6GMYrX55+8JpW9DyyAJ7CmnmNYY8ExjyiqveO/DVg CHujqy4ErSRmiwVp2ApZNF817f305K2BzOI4UlDdwuUGtTQcy/nhFV75GX4XC0tIBXXH IKg7l6G6UN+qDSpoIK8WVrvd9b8lTY4wzwq4CmjcQ5vomdSCG5mQX9g6fnzVk2O56kjz lwsQ== X-Gm-Message-State: AOJu0YzE0x7eIiRLsfxDB6aD6Cacder25AHnhw/QNrKLIBjzBPTPyap9 4TCxwLmjJ3JBaHsTTfQPgBDdTLBUmIH0A9g8Tbnoeexu1D2rfwf272xaT1mjwXZUoRjT+/K1fzT 7fOapnYKEQuzvcInxP2ANhVKGZ9W/ew== X-Gm-Gg: ASbGncvSVxhT5IW/lwHnS/i8PrE5t+2jeWvhNogXBQn2yAY4mTw6coa5ScVs9+jYtXg +KctxjdXVLiEXKCIXTUGS/3BDbhzaIN263A8fA+q66Dfn/GHAgfJTvYFUGwKwu4NdsWsCRDIXrM JlSRsZv0hd45wwIdkagRVA2PZJsvlHTIMb29aY0RL8hwZAsceP8l77UHYNMW6o/+K7Ris= X-Google-Smtp-Source: AGHT+IHqhrk9hxWSYB2xWW2B+bXksyxd8F7woNC3P7/KkGNKAw3YNACNF5c0Ya1csnB2dQ76S12AY95f19xRGwPaN3g= X-Received: by 2002:a17:90a:c888:b0:305:2d27:7ba5 with SMTP id 98e67ed59e1d1-309f7da5508mr180283a91.6.1745531468578; Thu, 24 Apr 2025 14:51:08 -0700 (PDT) MIME-Version: 1.0 From: Ayden Gera Date: Fri, 25 Apr 2025 09:50:57 +1200 X-Gm-Features: ATxdqUHaLWcSuYZ-hx_C_sE3DjyFszOlwyeHu3Q8vIaUHW-ZRjSsWRBDKEQxehw Message-ID: Subject: PGDump question/issue To: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000021077006338d3774" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000021077006338d3774 Content-Type: text/plain; charset="UTF-8" Hi, Hoping someone may have a solution to this problem. We get a daily PGDump file (@3Gb) from our SaaS provider (for BI purpose). In it, it has a Drop Table IF Exists command.. This file has no row level security etc. We want to use the same file to populate Supabase with and add row level security.. but I believe the drop table will destroy the rls each day and manually adding it back *unless mabe scripted) isn't an option. We have an inhouse Postgresql we can also use to potentially load and then do its own PGDump with data only.. But the other issue we have is the source tables don't always have any unique keys that we can tell.. so to be safe and avoid data duplicate risk.. we prefer to delete the entire tables data before inserting.. Does anyone have any suggestions on how to best automate the daily updating of data into the supabase tables without losing any RLS we might configure on those tables? Or what commands should we run on our own PG to get our own data only/insert + commands to drop all data in all tables before running it. I was also wondering if we could send PGDump from SaaS to Supabase Db1 and then stream data to DB2 (Prod) but unclear if we can and/or risk data duplication risk if we cannot somehow delete the tables in Prod just before streaming.. Thanks in advance! --00000000000021077006338d3774 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
Hoping someone may have a solution to t= his problem.
We get a daily PGDump file (@3Gb) from our SaaS prov= ider (for BI purpose). In it, it has a Drop Table IF Exists command..
=
This file has no row level security etc.
We want=C2=A0 to us= e the same file to populate Supabase with and add row level security.. but = I believe the drop table will destroy the rls each day and manually adding = it back *unless mabe scripted) isn't an option.

We have an inhouse Postgresql we can also use to potentially load and the= n do its own PGDump with data only..

But the other= issue we have is the source tables don't always have any unique keys t= hat we can tell.. so to be safe and avoid data duplicate risk.. we prefer t= o delete the entire tables data before inserting..

Does anyone have any suggestions on how to best automate the daily updatin= g of data into the supabase tables without losing any RLS we might configur= e on those tables?
Or what commands should we run on our own PG t= o get our own data only/insert + commands to drop all data in all tables be= fore running it.

I was also wondering if we could = send PGDump from SaaS to Supabase Db1 and then stream data to DB2 (Prod) bu= t unclear if we can and/or risk data duplication risk if we cannot somehow = delete the tables in Prod just before streaming..

= Thanks in advance!



--00000000000021077006338d3774--