From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Fix erroneous choices of segNo variables |
Date: | 2012-10-31 14:35:32 |
Message-ID: | 20121031143531.GD23139@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Alvaro Herrera wrote:
> Fix erroneous choices of segNo variables
>
> Commit dfda6eba (which changed segment numbers to use a single 64 bit
> variable instead of log/seg) introduced a couple of bogus choices of
> exactly which log segment number variable to use in each case.
>
> This is currently pretty harmless; in one place, the bogus number was
> only being used in an error message for a pretty unlikely condition
> (failure to fsync a WAL segment file).
Hmm, I think I was a bit shy in this commit; it used to do this:
if (pg_fsync(openLogFile) != 0)
ereport(PANIC,
(errcode_for_file_access(),
errmsg("could not fsync log segment %s: %m",
XLogFileNameP(curFileTLI, readSegNo))));
I changed readSegNo to openLogSegNo. However I think I should have also
changed curFileTLI to ThisTimeLineID; but I'm not so sure about that
one.
I'm not particularly fond of the (rather confusing) extensive use of
global vars throughout the xlog code. Am I the only one?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-10-31 18:27:05 | pgsql: Document that TCP keepalive settings read as 0 on Unix-socket co |
Previous Message | Alvaro Herrera | 2012-10-31 14:09:52 | pgsql: Fix erroneous choices of segNo variables |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2012-10-31 16:49:41 | Re: NOWAIT doesn't work |
Previous Message | Alvaro Herrera | 2012-10-31 14:09:52 | pgsql: Fix erroneous choices of segNo variables |