pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
5+ messages / 2 participants
[nested] [flat]

* Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
@ 2008-12-18 20:48 Jennifer Redman <jenred@gmail.com>
  2008-12-18 23:34 ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Jennifer Redman @ 2008-12-18 20:48 UTC (permalink / raw)
  To: pgsql-admin

Running Ubuntu 8.04 LTS, with postgresql-8-3, postgresql-client-8.3,
postgresql-common - standard Ubuntu stable postgresql package.  The same
error occurs on a system with postgresql-8-2.  Both boxes are also running
python-psycopg2.  Connections limited to localhost. Nothing monitoring or
scanning port 5432 at a 5 hour interval.

I'm get the following error in the logs at startup and at the exact interval
that -x /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
appears to run in cron:

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
  2008-12-18 20:48 Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
@ 2008-12-18 23:34 ` Jennifer Redman <jenred@gmail.com>
  2008-12-20 08:26   ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron John Lister <john.lister-ps@kickstone.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Jennifer Redman @ 2008-12-18 23:34 UTC (permalink / raw)
  To: pgsql-admin

It looks like this is a problem with the Ubuntu package postgresql-common.
I opened a bug there:

https://bugs.launchpad.net/ubuntu/+source/postgresql-8.3/+bug/309496

And for those of you who may have the same issue:

Running
# /etc/init.d/postgresql-8.3 autovac-restart
 * Restarting PostgreSQL 8.3 autovacuum daemon

Results in:
 * Error: PostgreSQL 8.1 and above has an integrated autovacuum daemon which
cannot be controlled by this program.

Looks like /etc/cron.d/postgresql-common

# Run VACUUM ANALYSE on all databases every 5 hours if pg_autovacuum is not
# running
2 0,5,10,15,20 * * 1-6 root if [ -x /usr/sbin/pg_maintenance ]; then
/usr/sbin/pg_maintenance --analyze >/dev/null; fi

Is deprecated for postgresql versions 8.1 and higher and needs to be
commented out by default in those packages.

The same error message appears on start-up
( incomplete startup packet)

but I could not figure out where in
/usr/share/postgresql-common/init.d-functions the pg_maintenance script was
being called.

Additionally,

Running:

#/sbin/pg_maintenance --analyze

results in:
Skipping cluster 8.3/main since autovacuuming is enabled for it

and the subsequent:
2008-12-18 15:21:18 PST LOG: 08P01: incomplete startup packet
2008-12-18 15:21:18 PST LOCATION: ProcessStartupPacket, postmaster.c:1396

in /postgresql-8.3-main.log
On Thu, Dec 18, 2008 at 12:48 PM, Jennifer Redman <jenred@gmail.com> wrote:

> Running Ubuntu 8.04 LTS, with postgresql-8-3, postgresql-client-8.3,
> postgresql-common - standard Ubuntu stable postgresql package.  The same
> error occurs on a system with postgresql-8-2.  Both boxes are also running
> python-psycopg2.  Connections limited to localhost. Nothing monitoring or
> scanning port 5432 at a 5 hour interval.
>
> I'm get the following error in the logs at startup and at the exact
> interval that -x /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance
> --analyze appears to run in cron:
>
> From /postgresql-8.3-main.log :
>
> 2008-12-17 00:02:01 PST LOG:  incomplete startup packet
> 2008-12-17 05:02:01 PST LOG:  incomplete startup packet
> 2008-12-17 10:02:01 PST LOG:  incomplete startup packet
> 2008-12-17 15:02:01 PST LOG:  incomplete startup packet
> 2008-12-17 20:02:01 PST LOG:  incomplete startup packet
>
> Verbose on startup:
>
> 2008-12-18 12:15:48 PST LOCATION:  StartupXLOG, xlog.c:4816
> 2008-12-18 12:15:48 PST LOG:  00000: autovacuum launcher started
> 2008-12-18 12:15:48 PST LOCATION:  AutoVacLauncherMain, autovacuum.c:520
> 2008-12-18 12:15:48 PST LOG:  00000: database system is ready to accept
> connections
> 2008-12-18 12:15:48 PST LOCATION:  reaper, postmaster.c:2156
> 2008-12-18 12:15:49 PST LOG:  08P01: incomplete startup packet
> 2008-12-18 12:15:49 PST LOCATION:  ProcessStartupPacket, postmaster.c:1396
>
> From /syslog
>
> Dec 17 00:02:01 nameofserver /USR/SBIN/CRON[26124]: (root) CMD (if [ -x
> /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
> >/dev/null; fi)
> Dec 17 05:02:01 nameofserver /USR/SBIN/CRON[1879]: (root) CMD (if [ -x
> /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
> >/dev/null; fi)
> Dec 17 10:02:01 nameofserver /USR/SBIN/CRON[9264]: (root) CMD (if [ -x
> /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
> >/dev/null; fi)
> Dec 17 15:02:01 nameofserver /USR/SBIN/CRON[15886]: (root) CMD (if [ -x
> /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
> >/dev/null; fi)
> Dec 17 20:02:01 nameofserver /USR/SBIN/CRON[12183]: (root) CMD (if [ -x
> /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --analyze
> >/dev/null; fi)
>
> This seems like a missed configuration option -- but I'm not sure where.
> Any ideas?
>
> Thanks,
> Jennifer
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
  2008-12-18 20:48 Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
  2008-12-18 23:34 ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
@ 2008-12-20 08:26   ` John Lister <john.lister-ps@kickstone.com>
  2008-12-20 20:32     ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: John Lister @ 2008-12-20 08:26 UTC (permalink / raw)
  To: pgsql-admin

>Looks like /etc/cron.d/postgresql-common
># Run VACUUM ANALYSE on all databases every 5 hours if pg_autovacuum is not
># running
>2 0,5,10,15,20 * * 1-6 root if [ -x /usr/sbin/pg_maintenance ]; then 
>/usr/sbin/pg_maintenance --analyze >/dev/null; fi
>Is deprecated for postgresql versions 8.1 and higher and needs to be 
>commented out by default in those packages.


The pg_maintenance scripts check the state of the autovacuuum flag in the 
postgres config files. If it is enabled they simply quit and don't do 
anything. Disabling autovacuum causes them to run... So you can leave them 
uncommented...

Although why it causes the "Incomplete start-up packet" messages is a 
mystery... 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
  2008-12-18 20:48 Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
  2008-12-18 23:34 ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
  2008-12-20 08:26   ` Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron John Lister <john.lister-ps@kickstone.com>
@ 2008-12-20 20:32     ` Jennifer Redman <jenred@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Jennifer Redman @ 2008-12-20 20:32 UTC (permalink / raw)
  To: John Lister <john.lister-ps@kickstone.com>; +Cc: pgsql-admin

On Sat, Dec 20, 2008 at 12:26 AM, John Lister
<john.lister-ps@kickstone.com>wrote:

>
>
> The pg_maintenance scripts check the state of the autovacuuum flag in the
> postgres config files. If it is enabled they simply quit and don't do
> anything. Disabling autovacuum causes them to run... So you can leave them
> uncommented...


Why would you want to continue to run a cron job that is:

1) No longer applicable to the current version of software (Postgresql 8.1+)

2) Throwing an error in your logs?

The default behavior should be that this cron job is not active by default
if one is running Postgresql 8.1+


>
>
> Although why it causes the "Incomplete start-up packet" messages is a
> mystery...



Because the Debian and Debian derivative packages (Ubuntu) of
postgresql-common -- which is a required dependency for the main postgresql
package, was not rev'd correctly when the autovaccuum feature was added by
default into Postgresql.  The script, pg_maintenance, is no longer
functioning as was intended against the current version.  This is a software
bug, and I've filed bug reports in both the Debian and Ubuntu systems.

A version check needs to happen on install of postgresql-common to determine
the correct behavior of pg_maintenance based upon the version of PostgresSQL
(patch exisiting package) or a new package needs to be created for
postgresql 8.1+.

In the meantime, if you are here because you want to know how to get rid of
the 'incomplete start-up packet' message in your postgresql logs (thrown at
the exact same interval as the referenced cron job) are running a derivative
of Debian (not sure if this happens with other distros or OS's) comment out
the cron job.

Unfortunately, the message is still thrown when starting and stopping
postgresql, since the init script in postgresql-common is also running the
pg_maintenance check.  Hopefully, a patch will fix.  This is something much
more reasonable to live with then a cron job that doesn't work running every
5 hours.

Me, I like to bring up new systems with completely clean logs, and identify,
fix any errors in those logs if running an existing system, and not run cron
jobs that are not needed. ;>

Regards,
Jennifer

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
@ 2008-12-21 08:03 John Lister <john.lister-ps@kickstone.com>
  0 siblings, 0 replies; 5+ messages in thread

From: John Lister @ 2008-12-21 08:03 UTC (permalink / raw)
  To: pgsql-admin

It is applicable in my instance because i have turned autovacuum off because 
of issues in 8.2. These may be solved in 8.3 but i haven't turned it back on 
yet. So having the cron job run automatically for me is great and saved me 
having to right my own.

Ideally i would like to get rid of the "incomplete startup packet errors" 
and after reading below you may be implying that the bug is related to that 
(debian implementation) and not the cron job itself. However i used to get 
the same error from other clients and never even suspected the vacuum 
scripts although looking now it does seem to be the only thing generating 
them.

A cursory glance at the perl pg-common modules would suggest it connects to 
the port to check it is alive but doesn't do anything, hence the error...


I'd love to have clean logs :)  unfortuntately sometimes it is quicker to 
check a warning/error is harmless and filter it out rather than fix
it and i don't have a lot of time left in the day for fixing messages i can 
live with :(


 On Sat, Dec 20, 2008 at 12:26 AM, John Lister
 <john.lister-ps@kickstone.com <mailto:john.lister-ps@kickstone.com>>
>  wrote:
>
>
>
>     The pg_maintenance scripts check the state of the autovacuuum flag
>     in the postgres config files. If it is enabled they simply quit
>     and don't do anything. Disabling autovacuum causes them to run...
>     So you can leave them uncommented...
>
>
> Why would you want to continue to run a cron job that is:
>
> 1) No longer applicable to the current version of software (Postgresql 
> 8.1+)
>
> 2) Throwing an error in your logs?
>
> The default behavior should be that this cron job is not active by default 
> if one is running Postgresql 8.1+
>
>
>
>     Although why it causes the "Incomplete start-up packet" messages
>     is a mystery...
>
>
> Because the Debian and Debian derivative packages (Ubuntu) of 
> postgresql-common -- which is a required dependency for the main 
> postgresql package, was not rev'd correctly when the autovaccuum feature 
> was added by default into Postgresql.  The script, pg_maintenance, is no 
> longer functioning as was intended against the current version.  This is a 
> software bug, and I've filed bug reports in both the Debian and Ubuntu 
> systems.
>
> A version check needs to happen on install of postgresql-common to 
> determine the correct behavior of pg_maintenance based upon the version of 
> PostgresSQL (patch exisiting package) or a new package needs to be created 
> for postgresql 8.1+.
>
> In the meantime, if you are here because you want to know how to get rid 
> of the 'incomplete start-up packet' message in your postgresql logs 
> (thrown at the exact same interval as the referenced cron job) are running 
> a derivative of Debian (not sure if this happens with other distros or 
> OS's) comment out the cron job.
>
> Unfortunately, the message is still thrown when starting and stopping 
> postgresql, since the init script in postgresql-common is also running the 
> pg_maintenance check.  Hopefully, a patch will fix.  This is something 
> much more reasonable to live with then a cron job that doesn't work 
> running every 5 hours.
>
> Me, I like to bring up new systems with completely clean logs, and 
> identify, fix any errors in those logs if running an existing system, and 
> not run cron jobs that are not needed. ;>
>
> Regards,
> Jennifer




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2008-12-21 08:03 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18 20:48 Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron Jennifer Redman <jenred@gmail.com>
2008-12-18 23:34 ` Jennifer Redman <jenred@gmail.com>
2008-12-20 08:26   ` John Lister <john.lister-ps@kickstone.com>
2008-12-20 20:32     ` Jennifer Redman <jenred@gmail.com>
2008-12-21 08:03 Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron John Lister <john.lister-ps@kickstone.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