SShortSingh.
Back to feed

Silent pg_restore Bug Can Lose Entire Tables When Restoring Supabase Backups

0
·57 views

A developer discovered that restoring a Supabase database backup using standard pg_restore can silently drop entire tables without raising a fatal error. The issue occurs because Supabase-specific functions like auth.uid(), commonly used as column defaults, fail when restored into a plain PostgreSQL environment that lacks the auth schema. By default, pg_restore logs these errors but continues execution, leaving the affected tables and their data absent from the restored database. The bug is particularly dangerous because developers testing Supabase backups are already conditioned to ignore auth-related errors, making missing tables easy to overlook. The fix involves creating stub roles and a minimal auth schema in the target database before running pg_restore, ensuring dependent objects resolve correctly during restoration.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Python में ग्राहक सूची से डुप्लिकेट हटाने के तीन तरीके और उनके परिणाम

जब दो पंक्तियाँ पूरी तरह एक जैसी नहीं होतीं, तो डुप्लिकेट हटाने का तरीका चुनना अहम हो जाता है। लेख में 412 पंक्तियों वाली एक उदाहरण ग्राहक सूची पर पूरी पंक्ति, केवल ईमेल और ईमेल के साथ शहर जैसी तीन key की तुलना की गई है। पूरी पंक्ति वाली key से कुछ नहीं हटता, जबकि केवल ईमेल से 38 पंक्तियाँ हटती हैं और ईमेल व शहर से 25। लेख बताता है कि पहली मिली पंक्ति रखना डिफ़ॉल्ट है, पर सबसे नई ऑर्डर वाली पंक्ति रखने के लिए पहले तारीख के अनुसार क्रम बदलना ज़रूरी है। यह तरीका Python के साथ-साथ osFoundry के Spreadsheet Editor के Remove Duplicates कमांड में भी समझाया गया है।

0
ProgrammingDEV Community ·

Escalation Room: Three AI Agents Handle Customer Support Cases in Telegram

A developer built Escalation Room for the Flip the Switch hackathon, a system where three AI agents and one human work customer support cases together in a Telegram chat. Customer messages arrive in one group, while a private war-room group holds diagnoses, code diffs, and draft replies, so nothing is shipped until the person approves it. The project uses Switch, an open-source tool that connects AI agents to team chat rooms, with routing controlled by @-mentions and access limited by addressing rules. The entire team setup is defined in a single YAML template that others can import, and the demo repository includes a small Python shop with planted coupon bugs for the engineer agent to fix.

0
ProgrammingDEV Community ·

NexoPeek: VR-App für Meta Quest bringt Proteinstrukturen zum räumlichen Erleben

Ein Autor beschreibt NexoPeek, eine VR-Anwendung für Meta Quest des Entwicklers Seven Sportz, die molekulare Strukturen begehbar macht. Im geführten Modus lässt sich etwa das Hämoglobin-Tetramer mit Sauerstoffbindung und Konformationsänderung erkunden. Der zweite Modus bietet eine Analyse-Suite mit Live-Anbindung an Datenbanken wie RCSB PDB und AlphaFold DB sowie Import eigener Dateien und Trajektorien. Zudem sind eine KI-gestützte Vorhersage möglicher Bindetaschen und strukturelle Vergleiche integriert. Der Autor betont, dass die Werkzeuge der Hypothesenbildung dienen und validierte Pipelines nicht ersetzen.

0
ProgrammingDEV Community ·

Open-source AI apps target Adobe products, raising questions for software makers

Software engineer Brandon Thomas released ArtCraft, a set of open-source AI-built applications aimed at seven Adobe products, including Photoshop, Illustrator, and Premiere. The first versions reportedly appeared within days of the initial code being committed, though Thomas has said the apps are not close to ready. The article argues that rivals need not match every feature, only solve enough of a customer's problem to prompt a switch, and that the challenge may come from customers themselves. It also contends that traditional handoffs between product, design, and engineering slow ideas down, even when AI speeds up each step. The piece suggests bringing cross-disciplinary teams together at the idea stage, supported by AI agents.