Re: Long running processes and commit writing to disk - Mailing list pgsql-sql

From Rob Sargent
Subject Re: Long running processes and commit writing to disk
Date
Msg-id 17a3b7ea-5334-c3f6-577b-a582a64d7548@gmail.com
Whole thread Raw
In response to RE: Long running processes and commit writing to disk  ("Mike Sofen" <msofen@runbox.com>)
List pgsql-sql
On 4/8/22 10:52, Mike Sofen wrote:
@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:11.0pt; font-family:"Calibri",sans-serif;}span.EmailStyle24 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif;}div.WordSection1 {page:WordSection1;}

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.)

pgsql-sql by date:

Previous
From: "Mike Sofen"
Date:
Subject: RE: Long running processes and commit writing to disk
Next
From: Shaozhong SHI
Date:
Subject: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?