commit timestamps and replication

From: Andreas Brandl <abrandl(at)gitlab(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: commit timestamps and replication
Date: 2018-09-14 19:01:54
Message-ID: CACTZmE+A8o77akr_X8zXrfVrhru-cCKSOq8D2OgBExDZDvpoKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

we're discussing a system design and it boils down to a question
regarding commit timestamps (in the sense of [1],
track_commit_timestamp='on'):

We have a insert-only (append-only) table. Do commit timestamps on
this table constitute the same order in which records become visible
on a secondary (streaming replication)? Is there any reason why this
might not be the case?

To put this differently: If a client reads from a secondary and reads
the "latest" record by commit timestamp (commit time T). Is it safe to
assume that there won't ever be another record with a lower commit
timestamp < T, that only shows up on the secondary after that read?

I'm aware of concerns regarding physical time, time adjustments and so
on, so the question here assumes those things never happen.

Thank you!

Best regards,
Andreas

[1] https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5#Commit_timestamp_tracking

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Schneider 2018-09-14 19:11:06 Re: Slow shutdowns sometimes on RDS Postgres
Previous Message Steven Lembark 2018-09-14 18:40:22 Re: Convert interval to hours