pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWarnings in Standby Logs
5+ messages / 3 participants
[nested] [flat]
* Warnings in Standby Logs
@ 2012-03-18 04:29 masterchief <esimon@theiqgroup.com>
0 siblings, 0 replies; 5+ messages in thread
From: masterchief @ 2012-03-18 04:29 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm on 9.1.2 and occasionally get what are probably harmless warning
messages in my logs, but because I have the responbility of ensuring we
haven't lost a bit of data between our master and standby, I feel I should
know exactly what they mean. I occasionally see "invalid record length" and
"record with zero length" in my logs, and they almost only occur during
reboots (the "consistent recovery state reached" message gives me the
warm-fuzzy, but then when they're followed by either of those two, it leaves
me wondering). For example, I had to reboot my hot standby twice yesterday:
2012-03-16 10:23:28 CDT LOG: received smart shutdown request
2012-03-16 10:23:28 CDT FATAL: terminating walreceiver process due to
administrator command
2012-03-16 10:27:33 CDT LOG: database system was interrupted while in
recovery at log time 2012-03-16 10:14:15 CDT
2012-03-16 10:27:33 CDT HINT: If this has occurred more than once some data
might be corrupted and you might need to choose an earlier recovery target.
2012-03-16 10:27:33 CDT LOG: entering standby mode
2012-03-16 10:27:34 CDT LOG: redo starts at 9/B98D6968
2012-03-16 10:27:34 CDT LOG: consistent recovery state reached at
9/B9F171B0
2012-03-16 10:27:34 CDT LOG: database system is ready to accept read only
connections
2012-03-16 10:27:34 CDT LOG: invalid record length at 9/B9F85E78
2012-03-16 10:27:34 CDT LOG: streaming replication successfully connected
to primary
2012-03-16 10:28:07 CDT LOG: received smart shutdown request
2012-03-16 10:28:07 CDT FATAL: terminating walreceiver process due to
administrator command
2012-03-16 10:28:07 CDT LOG: shutting down
2012-03-16 10:47:00 CDT LOG: database system was interrupted while in
recovery at log time 2012-03-16 10:14:15 CDT
2012-03-16 10:47:00 CDT HINT: If this has occurred more than once some data
might be corrupted and you might need to choose an earlier recovery target.
2012-03-16 10:47:00 CDT LOG: entering standby mode
2012-03-16 10:47:01 CDT LOG: redo starts at 9/B98D6968
2012-03-16 10:47:02 CDT LOG: consistent recovery state reached at
9/BA2D3490
2012-03-16 10:47:02 CDT LOG: database system is ready to accept read only
connections
2012-03-16 10:47:02 CDT LOG: invalid record length at 9/BA2D3490
2012-03-16 10:47:02 CDT LOG: streaming replication successfully connected
to primary
Is this something I should be concerned about (and even if not, where can I
read about what these mean in detail)?
Also, is there maybe a more elegant shutdown I can use in my Linux shutdown
scripts?
P.S. I have searched the forums and the docs several times, so I apologize
if I missed the answer/tutorial on this somewhere.
Thanks,
Eric Simon
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Warnings-in-Standby-Logs-tp5574652p5574652.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Warnings in Standby Logs
@ 2012-03-30 16:20 Eric Simon <esimon@theiqgroup.com>
0 siblings, 1 reply; 5+ messages in thread
From: Eric Simon @ 2012-03-30 16:20 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm on 9.1.2 and occasionally get what are probably harmless warning messages in my logs, but because I have the responsibility of
ensuring we haven't lost a bit of data between our master and standby, I feel I should know exactly what they mean. I occasionally
see "invalid record length" and "record with zero length" in my logs, and they almost only occur during reboots (the "consistent
recovery state reached" message gives me the warm-fuzzy, but then when they're followed by either of those two, it leaves me
wondering). For example, I had to reboot my hot standby twice this month:
2012-03-16 10:23:28 CDT LOG: received smart shutdown request
2012-03-16 10:23:28 CDT FATAL: terminating walreceiver process due to administrator command
2012-03-16 10:27:33 CDT LOG: database system was interrupted while in recovery at log time 2012-03-16 10:14:15 CDT
2012-03-16 10:27:33 CDT HINT: If this has occurred more than once some data might be corrupted and you might need to choose an
earlier recovery target.
2012-03-16 10:27:33 CDT LOG: entering standby mode
2012-03-16 10:27:34 CDT LOG: redo starts at 9/B98D6968
2012-03-16 10:27:34 CDT LOG: consistent recovery state reached at 9/B9F171B0
2012-03-16 10:27:34 CDT LOG: database system is ready to accept read only connections
2012-03-16 10:27:34 CDT LOG: invalid record length at 9/B9F85E78
2012-03-16 10:27:34 CDT LOG: streaming replication successfully connected to primary
2012-03-16 10:28:07 CDT LOG: received smart shutdown request
2012-03-16 10:28:07 CDT FATAL: terminating walreceiver process due to administrator command
2012-03-16 10:28:07 CDT LOG: shutting down
2012-03-16 10:47:00 CDT LOG: database system was interrupted while in recovery at log time 2012-03-16 10:14:15 CDT
2012-03-16 10:47:00 CDT HINT: If this has occurred more than once some data might be corrupted and you might need to choose an
earlier recovery target.
2012-03-16 10:47:00 CDT LOG: entering standby mode
2012-03-16 10:47:01 CDT LOG: redo starts at 9/B98D6968
2012-03-16 10:47:02 CDT LOG: consistent recovery state reached at 9/BA2D3490
2012-03-16 10:47:02 CDT LOG: database system is ready to accept read only connections
2012-03-16 10:47:02 CDT LOG: invalid record length at 9/BA2D3490
2012-03-16 10:47:02 CDT LOG: streaming replication successfully connected to primary
Is this something I should be concerned about (and even if not, where can I read about what these mean in detail)?
Also, is there a more elegant shutdown command I can use so that when it starts up again, I don't get these "invalid record length"
type messages?
P.S. I have searched the forums and the docs several times, so I apologize if I missed the answer/tutorial on this somewhere.
Thanks,
Eric Simon
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Warnings in Standby Logs
@ 2012-03-31 15:49 Fujii Masao <masao.fujii@gmail.com>
parent: Eric Simon <esimon@theiqgroup.com>
0 siblings, 1 reply; 5+ messages in thread
From: Fujii Masao @ 2012-03-31 15:49 UTC (permalink / raw)
To: Eric Simon <esimon@theiqgroup.com>; +Cc: pgsql-admin
On Sat, Mar 31, 2012 at 1:20 AM, Eric Simon <esimon@theiqgroup.com> wrote:
> 2012-03-16 10:27:34 CDT LOG: invalid record length at 9/B9F85E78
> 2012-03-16 10:27:34 CDT LOG: streaming replication successfully connected
> to primary
Just after startup, the standby tries to read and replay the WAL files which
exist in the standby, and then if it finds invalid WAL record, IOW, it can no
longer read valid WAL record locally, it starts replication and tries to read
the WAL files from the master. So the above log message "invalid record
..." means that there is no valid WAL record in the standby, which triggers
the replication. Since valid WAL records are streamed from the master,
you don't need to worry about that log message.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Warnings in Standby Logs
@ 2012-04-02 16:44 masterchief <esimon@theiqgroup.com>
parent: Fujii Masao <masao.fujii@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: masterchief @ 2012-04-02 16:44 UTC (permalink / raw)
To: pgsql-admin
I see. Is there a more elegant way that I could shut down my standby server
so that it would be in a more clean state? For example, when I first built
the standby and began replication, I didn't get either of those record
length messages.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Warnings-in-Standby-Logs-tp5607135p5613002.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Warnings in Standby Logs
@ 2012-04-11 04:54 Fujii Masao <masao.fujii@gmail.com>
parent: masterchief <esimon@theiqgroup.com>
0 siblings, 0 replies; 5+ messages in thread
From: Fujii Masao @ 2012-04-11 04:54 UTC (permalink / raw)
To: masterchief <esimon@theiqgroup.com>; +Cc: pgsql-admin
Sorry for the delay.
On Tue, Apr 3, 2012 at 1:44 AM, masterchief <esimon@theiqgroup.com> wrote:
> I see. Is there a more elegant way that I could shut down my standby server
> so that it would be in a more clean state? For example, when I first built
> the standby and began replication, I didn't get either of those record
> length messages.
No, there is no more elegant way. Currently you cannot avoid to see those
messages.
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2012-04-11 04:54 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-03-18 04:29 Warnings in Standby Logs masterchief <esimon@theiqgroup.com>
2012-03-30 16:20 Warnings in Standby Logs Eric Simon <esimon@theiqgroup.com>
2012-03-31 15:49 ` Fujii Masao <masao.fujii@gmail.com>
2012-04-02 16:44 ` masterchief <esimon@theiqgroup.com>
2012-04-11 04:54 ` Fujii Masao <masao.fujii@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