Thread: Backend sent 0x45 type while idle
The message is a bit off. I had a database working fine on one system under 6.3.x. The software I had written to use it worked WONDERFULLY as well. I then brought up a new machine using RedHat 6.0. I installed the 6.4.2 that came with it. I recompiled my app on that machine. I did a pgdump of the database (cannot remember command line options... data and schema I remember that much). I then loaded it into a newly created database on the new machine. I get the error above (or something VERY similar...). I have posted a bug report, but I want to know what the heck the message really means. What is type 0x45? Does this mean my app has a problem or? I have searched deja.com, I have used postgresql.org's search engines. No help. The database is kind of on the private side, but if it must be shared, it can be. A slightly older version of the code (should be current in a few days) is the webgen tool at http://nueorder.netpedia.net. I really need to get this cleared up. Any help, any pointers, any info on what this all means would be GREATLY appreciated. Thank you, Trever Adams trever_Adams@bigfoot.com
Trever Adams <trever_Adams@bigfoot.com> writes: > did a pgdump of the database (cannot remember command line options... > data and schema I remember that much). I then loaded it into a newly > created database on the new machine. > I get the error above (or something VERY similar...). When exactly? While trying to reload the pg_dump script, or during subsequent usage of the database? > I have posted a > bug report, but I want to know what the heck the message really means. > What is type 0x45? Does this mean my app has a problem or? It's probably a symptom of a backend bug :-(. It means that libpq wasn't expecting a backend message when it got one. 0x45 = 'E' which would be the start of an Error message, which ordinarily shouldn't be emitted except in response to a frontend query. Try looking in the postmaster log --- the error message should be logged there as well. Knowing what the backend is trying to tell us would be helpful... Another possibility is that the frontend and backend got out of sync, which is particularly likely during COPY commands --- does your pg_dump script use COPY or INSERT to reload data into tables? regards, tom lane
Probably means you have the old binaries in your path somewhere. > The message is a bit off. I had a database working fine on one system > under 6.3.x. The software I had written to use it worked WONDERFULLY as > well. I then brought up a new machine using RedHat 6.0. I installed > the 6.4.2 that came with it. I recompiled my app on that machine. I > did a pgdump of the database (cannot remember command line options... > data and schema I remember that much). I then loaded it into a newly > created database on the new machine. > > I get the error above (or something VERY similar...). I have posted a > bug report, but I want to know what the heck the message really means. > What is type 0x45? Does this mean my app has a problem or? I have > searched deja.com, I have used postgresql.org's search engines. No > help. > > The database is kind of on the private side, but if it must be shared, > it can be. A slightly older version of the code (should be current in a > few days) is the webgen tool at http://nueorder.netpedia.net. > > I really need to get this cleared up. Any help, any pointers, any info > on what this all means would be GREATLY appreciated. Thank you, > > Trever Adams > trever_Adams@bigfoot.com > > -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
Tom Lane wrote: > > Trever Adams <trever_Adams@bigfoot.com> writes: > > did a pgdump of the database (cannot remember command line options... > > data and schema I remember that much). I then loaded it into a newly > > created database on the new machine. > > > I get the error above (or something VERY similar...). > > When exactly? While trying to reload the pg_dump script, or during > subsequent usage of the database? Ah, sorry. I could have down a query, but the machine went down. It is my program that gets this. It is after the first query I believe. > > I have posted a > > bug report, but I want to know what the heck the message really means. > > What is type 0x45? Does this mean my app has a problem or? > > It's probably a symptom of a backend bug :-(. It means that libpq > wasn't expecting a backend message when it got one. 0x45 = 'E' which > would be the start of an Error message, which ordinarily shouldn't be > emitted except in response to a frontend query. Try looking in the > postmaster log --- the error message should be logged there as well. > Knowing what the backend is trying to tell us would be helpful... Ok, this is going to sound very dumb: Where is this log kept? Is it kept through syslogd? If so, I apparently have it turned off somewhere. > Another possibility is that the frontend and backend got out of sync, > which is particularly likely during COPY commands --- does your pg_dump > script use COPY or INSERT to reload data into tables? > > regards, tom lane Again, it isn't using pg_dump or pgsql. Just my program. I do insert and update from my program. The rest is all select. No copy. I will get a good ltrace/strace, modify some private data that WILL show in it, and then post it to you. Thanks for the help, Trever
Bruce Momjian wrote: > > Probably means you have the old binaries in your path somewhere. > No. As I said this new box is completely installed fresh from RedHat 6.0. Even my programs are recompiled on this box. The only thing old on the entire system is some configs I have laying around in user directories that I Am using to update the new style configs for various programs. Trever
Trever Adams <trever_Adams@bigfoot.com> writes: >> Try looking in the >> postmaster log --- the error message should be logged there as well. >> Knowing what the backend is trying to tell us would be helpful... > Ok, this is going to sound very dumb: Where is this log kept? Is it > kept through syslogd? If so, I apparently have it turned off > somewhere. With the default configuration of Postgres, this logfile is just the postmaster's stderr output --- that should be getting put into a file somewhere, if you are using recommended procedures for starting the postmaster. ~postgres/server.log is the usual place. I think it is possible to redirect the postmaster log to syslogd, but you have to specifically configure things that way to make it happen. regards, tom lane
Tom Lane wrote: > > Trever Adams <trever_Adams@bigfoot.com> writes: > >> Try looking in the > >> postmaster log --- the error message should be logged there as well. > >> Knowing what the backend is trying to tell us would be helpful... > > > Ok, this is going to sound very dumb: Where is this log kept? Is it > > kept through syslogd? If so, I apparently have it turned off > > somewhere. > > With the default configuration of Postgres, this logfile is just the > postmaster's stderr output --- that should be getting put into a file > somewhere, if you are using recommended procedures for starting the > postmaster. ~postgres/server.log is the usual place. > > I think it is possible to redirect the postmaster log to syslogd, but > you have to specifically configure things that way to make it happen. > > regards, tom lane It seems libpq is crazy. I was incorrect. The password and user name are indeed bogus. At least the password was. It seems that libpq for 6.4.2 doesn't return the correct return code for invalid login (compared to 6.3). I am going to be checking further into this, but it may be a day or two. Unfortunately, the brakes on my vehicle have failed and I am rebuilding the system for one wheel to fix the problem. I will post my findings as soon as possible. Trever
Trever Adams <trever_Adams@bigfoot.com> writes: > It seems that libpq for 6.4.2 doesn't return the correct return code > for invalid login (compared to 6.3). Hard to believe ... not only do I recall checking that for 6.4, but if it *were* broken you would not be the first one to discover it. I am guessing there is some other contributing factor in your situation. Not sure what. regards, tom lane