Re: IO related waits

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: veem v <veema0000(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Christophe Pettus <xof(at)thebuild(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: IO related waits
Date: 2024-09-17 13:13:12
Message-ID: CAKAnmm+FFS1fALtWcviwvm6=9h1NwqH20gZPSGrdXey0tproJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 16, 2024 at 11:56 PM veem v <veema0000(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zwettler Markus (OIZ) 2024-09-17 13:16:06 WG: [Extern] Re: question on plain pg_dump file usage
Previous Message Ron Johnson 2024-09-17 12:43:36 Re: question on plain pg_dump file usage