[GENERAL] disk writes within a transaction - Mailing list pgsql-general

From 2xlp - ListSubscriptions
Subject [GENERAL] disk writes within a transaction
Date
Msg-id 81F0A30F-0912-4FD0-B496-C79167B1DD4A@2xlp.com
Whole thread Raw
Responses Re: [GENERAL] disk writes within a transaction  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: [GENERAL] disk writes within a transaction  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
Can someone enlighten me to how postgres handles disk writing?  I've read some generic remarks about buffers, but
that'sabout it. 

We have a chunk of code that calls Postgres in a less-than-optimal way within a transaction block.  I'm wondering where
toprioritize fixing it, as the traffic on the wire isn't an issue. 

Basically the code looks like this:

    begin;
    update foo set foo.a='1' where foo.bar = 1;
    ...
    update foo set foo.b='2' where foo.bar = 1;
    ...
    update foo set foo.c='3' where foo.bar = 1;
    commit;

If the updates are likely to be a memory based operation, consolidating them can wait.  If they are likely to hit the
disk,I should schedule refactoring this code sooner than later. 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] application generated an eternal block in the database
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] disk writes within a transaction