The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
18 views

PostgreSQL visibility of records changes from other transaction inside the current one

I have a table "tst" which has a "status" column using which we process records in that table. Once the records are processed we set the status to 'Y'; #\d tst Table "core.tst" ...
1
vote
1answer
29 views

Challenges with Key with Gaps?

I had a mistake with a trigger which resulted in errors in PostgreSQL 9.4.3 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit. Each time during the error, the primary key ...
1
vote
1answer
88 views

SELECT in trigger function in two tables

My table and trigger in PostgreSQL 9.4.3 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit: CREATE TABLE measurements ( measurement_id SERIAL PRIMARY KEY NOT NULL, ...
1
vote
0answers
43 views

debugging PostgreSQL serialization failures

I am trying to migrate our PostgreSQL 9.4 database from transaction level READ COMMITTED to either REPEATABLE READ or SERIALIZABLE. In either case, I'm exposed to a new set of errors with the format: ...
2
votes
1answer
44 views

Does READ COMMITTED always start over after serialization failures while SERIALIZABLE simply fails?

On the PostgreSQL Concurrency With MVCC page, it says: know what you’re thinking though: what about a two transactions updating the same row at the same time? This is where transaction isolation ...
0
votes
0answers
31 views

Turn off serialization failure logging

Is it possible to turn off serialization failure logging? If so, how? For example, my log is filled with this example: ERROR: could not serialize access due to read/write dependencies among ...
1
vote
1answer
125 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 ...
1
vote
2answers
1k views

psql: id SERIAL PRIMARY KEY not starting with 1?

This is something I don't understand, can somebody explain? I create a table CREATE TABLE cali (id SERIAL PRIMARY KEY, ALK_from char, ALK_to char, AND_from char, AND_to char); Then ...
0
votes
0answers
71 views

Load time implications of storing data in multiple rows vs serialized data

I am currently storing data in fields as shown below. Each of these pricing fields has two database rows associated with it, and there is up to 24 of these tables for a house. This therefore means ...
13
votes
4answers
6k views

Locking issue with concurrent DELETE / INSERT in PostgreSQL

This is pretty simple, but I'm baffled by what PG does (v9.0). We start with a simple table: CREATE TABLE test (id INT PRIMARY KEY); and a few rows: INSERT INTO TEST VALUES (1); INSERT INTO TEST ...
3
votes
2answers
2k views

How do I implement insert-if-not-found for transactions at serializable isolation level?

I'm having a hard time figuring out how to exactly implement a 'insert if not found' function. Consider the following. We have a table called artist with 2 columns, (name, id) where name is the ...
3
votes
1answer
675 views

Send data from SQL to a serial port or IP address

I've been asked to integrate SQL transaction data with a video monitoring system in real-time. The video system's application is only capable of receiving data by listening on a serial port or a ...
2
votes
1answer
667 views

Data type for protobuf objects in mysql

I would like to store some protobuf objects in a MySQL database. The objects are created in a Java application. The object is accompanied with a textual type identifier and a timestamp. ...