public inbox for [email protected]
help / color / mirror / Atom feedFrom: Greg Sabino Mullane <[email protected]>
To: veem v <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: Christophe Pettus <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: IO related waits
Date: Tue, 17 Sep 2024 09:13:12 -0400
Message-ID: <CAKAnmm+FFS1fALtWcviwvm6=9h1NwqH20gZPSGrdXey0tproJA@mail.gmail.com> (raw)
In-Reply-To: <CAB+=1TWdRd2sBw7-vXCovH_VHLANh+aSaU-WyJ2m8tL4TkF=8g@mail.gmail.com>
References: <CAB+=1TWZNvMhVthJ2iKs_Q4qBzMw-v_oaSz7HbFE_P_qC5jMFA@mail.gmail.com>
<[email protected]>
<CAB+=1TWdRd2sBw7-vXCovH_VHLANh+aSaU-WyJ2m8tL4TkF=8g@mail.gmail.com>
On Mon, Sep 16, 2024 at 11:56 PM veem v <[email protected]> wrote:
> So what can be the caveats in this approach, considering transactions
> meant to be ACID compliant as financial transactions.
>
Financial transactions need to be handled with care. Only you know your
business requirements, but as Christophe pointed out, disabling
synchronous commit means your application may think a particular
transaction has completed when it has not. Usually that's a big red flag
for financial applications.
we are using row by row transaction processing for inserting data into the
> postgres database and commit is performed for each row.
This is a better place to optimize. Batch many rows per transaction. Remove
unused indexes.
flushing of the WAL to the disk has to happen anyway(just that it will be
> delayed now), so can this method cause contention in the database storage
> side if the speed in which the data gets ingested from the client is not
> getting written to the disk , and if it can someway impact the data
> consistency for the read queries?
>
Not quite clear what you are asking here re data consistency. The data will
always be consistent, even if synchronous_commit is disabled. The only
danger window is on a server crash.
(Keep in mind that RDS is not Postgres, so take tuning recommendations and
advice with a grain of salt.)
Cheers,
Greg
view thread (7+ 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], [email protected], [email protected], [email protected]
Subject: Re: IO related waits
In-Reply-To: <CAKAnmm+FFS1fALtWcviwvm6=9h1NwqH20gZPSGrdXey0tproJA@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox