pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedConfused about a statement in WAL configs
4+ messages / 3 participants
[nested] [flat]
* Confused about a statement in WAL configs
@ 2017-07-31 13:16 finzelj@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: finzelj@gmail.com @ 2017-07-31 13:16 UTC (permalink / raw)
To: pgsql-docs
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/9.6/static/wal-configuration.html
Description:
In this section:
"At checkpoint time, all dirty data pages are flushed to disk and a special
checkpoint record is written to the log file. (The change records were
previously flushed to the WAL files.)"
I am confused by what the part in parenthesis means by "previously". This
may only reflect my ignorance, but I don't know if "previously" means "in
previous versions of Postgres" or "before the checkpoint" or something
else.
Mostly because of this, I don't understand what this statement means. Thank
you.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused about a statement in WAL configs
@ 2017-07-31 15:04 David G. Johnston <david.g.johnston@gmail.com>
parent: finzelj@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: David G. Johnston @ 2017-07-31 15:04 UTC (permalink / raw)
To: finzelj@gmail.com; +Cc: pgsql-docs
On Mon, Jul 31, 2017 at 6:16 AM, <finzelj@gmail.com> wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.6/static/wal-configuration.html
> Description:
>
> In this section:
>
> "At checkpoint time, all dirty data pages are flushed to disk and a
> special
> checkpoint record is written to the log file. (The change records were
> previously flushed to the WAL files.)"
>
> I am confused by what the part in parenthesis means by
> "previously". This
> may only reflect my ignorance, but I don't know if
> "previously" means "in
> previous versions of Postgres" or "before the checkpoint"
> or something
> else.
>
> Mostly because of this, I don't understand what this statement means.
> Thank
> you.
>
"previously" in that sentence means "earlier in time". The "WAL files"
are written to during every COMMIT. They constitute a journal of changes
that affected the in-memory "pages" and made them "dirty". During a
checkpoint a marker entry is written that says a checkpoint has occurred
and that every change noted in the WAL files written before the marker
entry and now known to exist in the actual data files on disk. Until that
happens some of those change may only exist in memory (in the form of dirty
data pages).
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused about a statement in WAL configs
@ 2017-08-01 14:23 Jeremy Finzel <finzelj@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Finzel @ 2017-08-01 14:23 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-docs
On Mon, Jul 31, 2017 at 10:04 AM, David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Mon, Jul 31, 2017 at 6:16 AM, <finzelj@gmail.com> wrote:
>
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/9.6/static/wal-configuration.html
>> Description:
>>
>> In this section:
>>
>> "At checkpoint time, all dirty data pages are flushed to disk and a
>> special
>> checkpoint record is written to the log file. (The change records were
>> previously flushed to the WAL files.)"
>>
>> I am confused by what the part in parenthesis means by
>> "previously". This
>> may only reflect my ignorance, but I don't know if
>> "previously" means "in
>> previous versions of Postgres" or "before the checkpoint"
>> or something
>> else.
>>
>> Mostly because of this, I don't understand what this statement
>> means. Thank
>> you.
>>
>
> "previously" in that sentence means "earlier in time". The "WAL files"
> are written to during every COMMIT. They constitute a journal of changes
> that affected the in-memory "pages" and made them "dirty". During a
> checkpoint a marker entry is written that says a checkpoint has occurred
> and that every change noted in the WAL files written before the marker
> entry and now known to exist in the actual data files on disk.
>
Forgive me, but I don't quite follow this clause at it's not a complete
sentence: "every change noted in the WAL files written before the marker
entry and now known to exist in the actual data files on disk". Is there a
typo here?
> Until that happens some of those change may only exist in memory (in the
> form of dirty data pages).
>
> David J.
>
I *think* I follow now: before the checkpoint, the dirty data pages had
already been written to the WAL files, but not necessarily flushed to
disk. The checkpoint flushes them all to disk as well.
If that is the case, I still think the wording is confusing and should be
updated to say that ^^ more explicitly spelled out. For example:
At checkpoint time, all dirty data pages are flushed to disk and a special
checkpoint record is written to the log file. (The change records were
previously flushed only to the WAL files, not necessarily to disk).
Again, if I understand rightly. Thank you.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Confused about a statement in WAL configs
@ 2017-08-01 14:31 David G. Johnston <david.g.johnston@gmail.com>
parent: Jeremy Finzel <finzelj@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: David G. Johnston @ 2017-08-01 14:31 UTC (permalink / raw)
To: Jeremy Finzel <finzelj@gmail.com>; +Cc: pgsql-docs
On Tue, Aug 1, 2017 at 7:23 AM, Jeremy Finzel <finzelj@gmail.com> wrote:
>
> I *think* I follow now: before the checkpoint, the dirty data pages had
> already been written to the WAL files, but not necessarily flushed to
> disk. The checkpoint flushes them all to disk as well.
>
Yes, that it correct.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2017-08-01 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 13:16 Confused about a statement in WAL configs finzelj@gmail.com
2017-07-31 15:04 ` David G. Johnston <david.g.johnston@gmail.com>
2017-08-01 14:23 ` Jeremy Finzel <finzelj@gmail.com>
2017-08-01 14:31 ` David G. Johnston <david.g.johnston@gmail.com>
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