Questions tagged [acid]

ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.

Filter by
Sorted by
Tagged with
-1
votes
1answer
76 views

Serializable Transactions vs SELECT FOR UPDATE in MySQL

I have a stock table with columns: id, available, sold, status fields. Before increasing sold field I have to check if sold + x is less and equal than available. To make sure every transaction uses ...
-2
votes
2answers
125 views

How do writers not block reads in PostgreSql

Since readers do not block writers and writers do not block readers is what MVCC is all about, how does postgresql prevent writers who are in the process of committing their changes to blocks/pages ...
1
vote
1answer
46 views

Making sure balance field is always consistently updated with triggers

This is my database schema, related to the problem. This is one of the triggers: CREATE OR REPLACE FUNCTION "public"."update_balance_bet"() RETURNS "pg_catalog"."trigger" AS $BODY$ DECLARE ...
1
vote
1answer
82 views

Optimize queries that need to be 100% ACID compliant but can tolerate latency in persistence

Introduction I'm writing a trading program in C++. The program involves having user balances and orderbooks. The orderbook is basically a set of buy and sell orders. When submitting an order, say a ...
1
vote
1answer
28 views

Database transaction consistency on PostgreSQL

In a table with three columns (serial id, varchar name, varchar email) and having two different transactions executing concurrently as the ones bellow: Transaction 1: BEGIN; INSERT INTO public.users ...
1
vote
2answers
158 views

Why do uncommitted transactions rollback instead of redo after a crash in ARIES?

Since all actions within a transaction are idempotent in crash recovery algorithms like ARIES that use write-ahead logging why do we rollback after a crash during an uncommitted transaction to get ...
0
votes
3answers
3k views

How to handle ~1k inserts per second [closed]

Assuming one has about 1k requests per second that require an insert. Now, there are a lot of answers to this on the internet... but they're technically wrong in this specific context. Yes, pretty ...
1
vote
0answers
214 views

Git as distributed and decentralized storrage with regard to ACID and CAP

When using Git to store documents distributed and decentralized it can be considered as a database. How would the ACID properties and the CAP theorem correspond to git in this case? I think one has ...
1
vote
1answer
338 views

Can power failure rollback mysql innodb database of many days?

I have an application running on a x86 system with MySQL InnoDB database. This application store many rows per day and yesterday, due to a power failure, I experienced a rollback of a one entire day ...
3
votes
4answers
4k views

Is Mysql ACID Compliant?

Is Mysql not an ACID compliant according to Postgresql? In some blogs I see Mysql is not ACID compliant. How true is that? Let't not consider the replication here, lets consider a standalone and how ...
2
votes
1answer
265 views

Postgres: Are secondary indexes included in ACID?

Are non-unique indexes / indices covered under the Consistency clause in aCid? (same for other attributes of an index that do not place constraints on the data) I am seeing certain performance issues (...
0
votes
1answer
227 views

Google Cloud Spanner UNIQUE Index Consistency

As far as I understand Google Cloud Spanner is globally consistent and also fast. Let's say I have a table with a unique username field. User A in USA inserts user johndoe to a US Spanner node User ...
2
votes
2answers
514 views

Transaction atomicity implies consistency

Transactions are said to need both atomicity and consistency. But, what is the point of consistency? Once you ensure that you either update both accounts on money transfer, you are consistent. ...
3
votes
2answers
1k views

Half of a transaction completes, when the other half fails?

I have done some searching on SO, MSDN, and various other sources, and I found plenty of questions about transactions, but none that seem to be exactly what I'm dealing with. Admittedly I'm still ...
0
votes
1answer
94 views

Scalability question

There is a DB {MySql} with 5 tables A, BIG, C, D, E. Their grow factor is about 1/100/1/1/1. The table BIG has Insert/Read/Update request ratio about 1/10/2. The Inserts and Updates 'cannot fail'. ...
1
vote
2answers
642 views

ACID violation in Postgres 9.1?

I am using a Postgres DB to implement a scheduling of jobs for a large number of computers/processes. To make the story short, every job has its id, all scheduling is implemented with three tabes: all ...
1
vote
1answer
51 views

Is it possible that records are changed while a read query is still executing?

Suppose a read (select) query R is reading some 100 records from a table, 50 records are read so far, could in the meanwhile a write query W change some of the unread records? We didn't take any ...
1
vote
1answer
904 views

How to configure read transactions to never cause other write serialization transactions to fail

I am protecting critical transactions with application mutexes and SERIALIZABLE. I presume that this makes these operations as acid as possible, but now I'm concerned that reads might cause failures ...
2
votes
1answer
78 views

Reference implementation of a scalable storage system with strong consistency?

Is there a storage system with these properties? horizontally scalable - can handle arbitrary read and write throughput if you add enough nodes to the cluster consistent, in the sense that all reads ...
11
votes
1answer
5k views

Synchronization using triggers

I have a requirement similar to previous discussions at: Writing a simple bank schema: How should I keep my balances in sync with their transaction history? Trigger in combination with transaction I ...
3
votes
3answers
839 views

Can You Drop Consistency from ACID?

In his book "An Introduction to Database Systems" C.J.Date wrote a chapter about the ACID principles called "Dropping ACID". In this chapter he calls Correctness(Consistency) "essentially meaningless" ...
2
votes
2answers
2k views

row locking within ACID transaction innodb

I have a financial transaction that looks something like this (pseudo): begin select record for update update record(same record as selected) insert another record into another table ...
18
votes
3answers
12k views

Consistency in ACID and CAP theorem, are they the same?

From my understanding, the consistency in ACID is ensuring the data integrity. However, the consistency in CAP means the data can appear quickly in distributed system. Does that mean: they are not ...
2
votes
1answer
312 views

Transaction level difference between using a large IN filter VS. “BEGIN TRAN/COMMIT”

I would like to delete about 100,000 records with minimal server overhead. I've had a few nagging questions I haven't been able to test properly so I figured I'd ask some experts here. Which would ...