public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected]
To: [email protected]
Subject: FK from logged to unlogged table?
Date: Fri, 21 Nov 2025 16:08:15 -0800
Message-ID: <5031a50c-aca7-4512-9478-95583606b5ff@Spark> (raw)
Hello,
I'm looking to improve bulk write performance on a table of about 23 million rows by setting it unlogged. If lost, the table can be re-generated from archived raw data. The unlogged table would be referenced from a different, logged, table by a sparse but very important foreign key.
If the unlogged table is lost, I can repair the foreign key data by re-uploading the raw data and following a different unique key. However, this would be annoying and I would rather not have to implement it if I can protect the keyed records instead.
1. Is it allowed to key from a logged table to an unlogged table?
2. What is the system behavior if the unlogged table is lost?
3. Is there a clean way to protect only the subset of records that are keyed? (Yes, I am considering periodic backups to an archive table, but there would still be some repair needed that way).
Thanks! Nice to meet you all.
-Dolan
view thread (2+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: FK from logged to unlogged table?
In-Reply-To: <5031a50c-aca7-4512-9478-95583606b5ff@Spark>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox