From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@lists.postgresql.org
Subject: Re: Long running processes and commit writing to disk
Date: Fri, 8 Apr 2022 11:05:08 -0600
Message-ID: <17a3b7ea-5334-c3f6-577b-a582a64d7548@gmail.com> (raw)
In-Reply-To: <02f801d84b69$06336370$129a2a50$@runbox.com>
References: <CA+i5JwbqHrQNPjWgUzcQWTs3XueGuxp82RZ4FAZ-P8dhRk22CA@mail.gmail.com>
<CA+i5JwYicGdvXLSNx_VdREEuCCWch2gWevK6avSQfPM2EgDwEQ@mail.gmail.com>
<02f801d84b69$06336370$129a2a50$@runbox.com>
On 4/8/22 10:52, Mike Sofen wrote:
>
> *From:* Shaozhong SHI <shishaozhong@gmail.com> *Sent:* Friday, April
> 08, 2022 9:39 AM
>
> When long running processes got disrupted, one may not see any
> expected result.
>
> How to make sure that the result of each operation is saved to disk in
> a loop?
>
> Regards,
>
> David
>
> Simple: don’t use a database – you’re asking to violate ACID.
>
> A database’s power comes from set-based operations. You’re asking to
> do single row operations. Use a spreadsheet...or a plain text file
> and treat it like a log.
>
> Mike
>
Or commit every loop (perhaps every N loops, depending on how much
you're prepared to re-do.)
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: robjsargent@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: Long running processes and commit writing to disk
In-Reply-To: <17a3b7ea-5334-c3f6-577b-a582a64d7548@gmail.com>
References: <CA+i5JwbqHrQNPjWgUzcQWTs3XueGuxp82RZ4FAZ-P8dhRk22CA@mail.gmail.com> <CA+i5JwYicGdvXLSNx_VdREEuCCWch2gWevK6avSQfPM2EgDwEQ@mail.gmail.com> <02f801d84b69$06336370$129a2a50$@runbox.com> <17a3b7ea-5334-c3f6-577b-a582a64d7548@gmail.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