pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed30.3. Asynchronous Commit
3+ messages / 3 participants
[nested] [flat]
* 30.3. Asynchronous Commit
@ 2019-03-27 12:25 PG Doc comments form <noreply@postgresql.org>
2019-04-10 20:06 ` Re: 30.3. Asynchronous Commit Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 3+ messages in thread
From: PG Doc comments form @ 2019-03-27 12:25 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: imre.gabesz@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/9.6/wal-async-commit.html
Description:
How do async commits and unlogged tables relate? You might add a paragraph
on clarifying this relation.
https://www.postgresql.org/docs/9.6/wal-async-commit.html
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: 30.3. Asynchronous Commit
2019-03-27 12:25 30.3. Asynchronous Commit PG Doc comments form <noreply@postgresql.org>
@ 2019-04-10 20:06 ` Bruce Momjian <bruce@momjian.us>
2019-04-10 20:47 ` Re: 30.3. Asynchronous Commit Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Momjian @ 2019-04-10 20:06 UTC (permalink / raw)
To: imre.gabesz@gmail.com; pgsql-docs@lists.postgresql.org
On Wed, Mar 27, 2019 at 12:25:34PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.6/wal-async-commit.html
> Description:
>
> How do async commits and unlogged tables relate? You might add a paragraph
> on clarifying this relation.
> https://www.postgresql.org/docs/9.6/wal-async-commit.html
Async commit controls the WAL writes for _logged_ tables. Unlogged
tables don't generate WAL, since they are not crash safe, and hence are
not affected by async commit.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: 30.3. Asynchronous Commit
2019-03-27 12:25 30.3. Asynchronous Commit PG Doc comments form <noreply@postgresql.org>
2019-04-10 20:06 ` Re: 30.3. Asynchronous Commit Bruce Momjian <bruce@momjian.us>
@ 2019-04-10 20:47 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 3+ messages in thread
From: Andres Freund @ 2019-04-10 20:47 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: imre.gabesz@gmail.com; pgsql-docs@lists.postgresql.org
Hi,
On 2019-04-10 16:06:10 -0400, Bruce Momjian wrote:
> On Wed, Mar 27, 2019 at 12:25:34PM +0000, PG Doc comments form wrote:
> > The following documentation comment has been logged on the website:
> >
> > Page: https://www.postgresql.org/docs/9.6/wal-async-commit.html
> > Description:
> >
> > How do async commits and unlogged tables relate? You might add a paragraph
> > on clarifying this relation.
> > https://www.postgresql.org/docs/9.6/wal-async-commit.html
>
> Async commit controls the WAL writes for _logged_ tables. Unlogged
> tables don't generate WAL, since they are not crash safe, and hence are
> not affected by async commit.
That's not quite true, I think. Async commit is a question that only
matters at commit time. Logged/Unlogged only matters insofar as it
determines whether WAL has been written up ot that point.
Currently we *always* perform an async commit if a transaction didn't
write any WAL, even if an xid has been assigned (but we'll log a commit
record).
But even transactions that only write to unlogged tables can easily have
WAL assigned - e.g. hot pruning in catalog tables or during reads from
user defined logged tables; or enough subtransactions were used that an
xid assigment record had to be written; or some logged table (including
catalog tables) was accessed, and a hit bit had been set, and
wal_log_hint bits were set, and a lot of other reasons.
Thus I think it's wrong to say that async commit doesn't mean anything
for unlogged tables.
I'd also say that it's not correct to say that async commit really
controls WAL writes at all. It's just whether we *flush* the commit
record, or not.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-04-10 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 12:25 30.3. Asynchronous Commit PG Doc comments form <noreply@postgresql.org>
2019-04-10 20:06 ` Bruce Momjian <bruce@momjian.us>
2019-04-10 20:47 ` Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox