[BUGS] Unable to delete rows...
Hello. I'm Using PostgreSQL v. 7.3.2 on FreeBSD 4.7-RELEASE-p7. I was unable to delete several rows : void=> select * from banners where banner is NULL; id | count | max | banner_group | banner +---+---+--+ 25 | 2328 | 10008 |2 | 4 | 477 | 3336 | 33554438 | (2 rows) void=> delete from banners where banner is NULL; DELETE 0 void=> select * from banners where banner is NULL; id | count | max | banner_group | banner +---+---+--+ 25 | 2328 | 10008 |2 | 4 | 477 | 3336 | 33554438 | (2 rows) void=> Is it bug or there are some errors in my queries ? Thanks. Krok. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] Unable to delete rows...
> I'm Using PostgreSQL v. 7.3.2 on FreeBSD 4.7-RELEASE-p7. > > I was unable to delete several rows : > > void=> select * from banners where banner is NULL; > id | count | max | banner_group | banner > +---+---+--+ > 25 | 2328 | 10008 |2 | > 4 | 477 | 3336 | 33554438 | > (2 rows) > > void=> delete from banners where banner is NULL; > DELETE 0 > void=> select * from banners where banner is NULL; > id | count | max | banner_group | banner > +---+---+--+ > 25 | 2328 | 10008 |2 | > 4 | 477 | 3336 | 33554438 | > (2 rows) > You must have triggers or rules on DELETE event which conflict the action. regards, bhuvaneswaran ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[BUGS] Bug #923: psql can't read file prepaired by pg_dumpall
Krzysztof Czuma ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description psql can't read file prepaired by pg_dumpall Long Description I can't move databases from PostgreSQL 7.0 to PostgreSQL 7.3 When I try to execute: psql -d template1 -f zbior I see: - You are now connected to database template1. SELECT DELETE 0 DROP TABLE psql:zbior:5: ERROR: copy: line 1, Bad abstime external representation 'xjtyscak' psql:zbior:5: lost synchronization with server, resetting connection DELETE 1 psql:zbior:32: \connect: FATAL: user "user3" does not exist - 5th line in zbior: copy pg_shadow from stdin; 6th line in zbior: user1124 f f f f xjtyscak\N 11th line in zbior: user2132 f f f f hcveiahz2038-01-18 00:00:00+01 Sample Code No file was uploaded with this report ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[BUGS] Bug #924: Segmentation fault in libpq/PQconsumeInput on SSL connection
Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description Segmentation fault in libpq/PQconsumeInput on SSL connection Long Description When I start SSL connection and try to handle async query: // run query action handler void SqlDialog::sendQuery (const QString &_query) { PQsendQuery (m_conn, _query.utf8 ()); connect(m_idle_timer, SIGNAL(timeout()), this, processQuery()) } // run in idle loop void SqlDialog::processQuery () { // load data from server PQconsumeInput (conn); // if data not ready yet - return if (PQisBusy (conn)) return; // process next query result when data completly loaded PQresult *res = PQgetResult (conn); if (res) { ... // wait next result return; } // all results handled disconnect(m_idle_timer, SIGNAL(timeout()), this, processQuery()); } I get segmentation fault in PQconsumeInput. I run gdb and found that pqsecure_read recursive call itself infinite on SSL_ERROR_WANT_READ return code from libssl. I don't know why but this code don't work well for me and cause Stack Overflow (reported by OS (ALTLinux) as Segmentation Fault) error. I solve this problem easy: instead recirsive call pqsecure_read on SSL_ERROR_WANT_READ I simple return 0 as count of readed bytes. n = pqsecure_read (...) replace with n = 0; in pqsecure_read. I do that in pqsecure_write on SSL_ERROR_WANT_WRITE also. I check all places where pqsecure_* called and found that 0 handled currectly at all. OS: ALTLinux - Sisyphus Kernel: Linux-2.4.20 PostgreSQL: 7.3.2 Qt: 3.0.5, 3.1.2 libssl: 0.9.6i Sample Code No file was uploaded with this report ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c ???
Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 4 The lower the number the more severe it is. Short Description typing error in src/backend/libpq/be-secure.c ??? Long Description In src/backend/libpq/be-secure.c: secure_write on SSL_ERROR_WANT_WRITE call secure_read instead secure_write again. May be is this a typing error? Sample Code No file was uploaded with this report ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c
Yep, typo. Patched to CVS current and backpatched to 7.3.X. --- [EMAIL PROTECTED] wrote: > Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 4 > The lower the number the more severe it is. > > Short Description > typing error in src/backend/libpq/be-secure.c ??? > > Long Description > In src/backend/libpq/be-secure.c: secure_write > on SSL_ERROR_WANT_WRITE call secure_read instead > secure_write again. May be is this a typing error? > > > Sample Code > > > No file was uploaded with this report > > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/backend/libpq/be-secure.c === RCS file: /cvsroot/pgsql-server/src/backend/libpq/be-secure.c,v retrieving revision 1.26 diff -c -c -r1.26 be-secure.c *** src/backend/libpq/be-secure.c 14 Feb 2003 00:18:41 - 1.26 --- src/backend/libpq/be-secure.c 29 Mar 2003 03:55:09 - *** *** 338,344 port->count += n; break; case SSL_ERROR_WANT_WRITE: ! n = secure_read(port, ptr, len); break; case SSL_ERROR_SYSCALL: if (n == -1) --- 338,344 port->count += n; break; case SSL_ERROR_WANT_WRITE: ! n = secure_write(port, ptr, len); break; case SSL_ERROR_SYSCALL: if (n == -1) ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c
Bruce Momjian <[EMAIL PROTECTED]> writes: > Yep, typo. Patched to CVS current and backpatched to 7.3.X. I think this fix is exactly backward. Why would SSL_write need to return ERROR_WANT_WRITE? It couldn't. The correct fix is that SSL_write might return ERROR_WANT_READ, for which reading would be the right response. BTW the real problem, both here and elsewhere in this file, is the lack of a "default: elog-out" case in the switch statements. This code will simply break if any unexpected case occurs. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c
Actually, the docs say SSL_read/write can error needing READ or WRITE: http://www.openssl.org/docs/ssl/SSL_read.html# The SSL_write docs are the same. I have applied the following patch to handle both new cases. Does this help the SSL test program you have? --- Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Yep, typo. Patched to CVS current and backpatched to 7.3.X. > > I think this fix is exactly backward. Why would SSL_write need to > return ERROR_WANT_WRITE? It couldn't. The correct fix is that > SSL_write might return ERROR_WANT_READ, for which reading would be > the right response. > > BTW the real problem, both here and elsewhere in this file, is the > lack of a "default: elog-out" case in the switch statements. This > code will simply break if any unexpected case occurs. > > regards, tom lane > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/backend/libpq/be-secure.c === RCS file: /cvsroot/pgsql-server/src/backend/libpq/be-secure.c,v retrieving revision 1.27 diff -c -c -r1.27 be-secure.c *** src/backend/libpq/be-secure.c 29 Mar 2003 03:56:44 - 1.27 --- src/backend/libpq/be-secure.c 29 Mar 2003 04:59:01 - *** *** 285,290 --- 285,293 case SSL_ERROR_WANT_READ: n = secure_read(port, ptr, len); break; + case SSL_ERROR_WANT_WRITE: + n = secure_write(port, ptr, len); + break; case SSL_ERROR_SYSCALL: if (n == -1) elog(COMMERROR, "SSL SYSCALL error: %s", strerror(errno)); *** *** 336,341 --- 339,347 { case SSL_ERROR_NONE: port->count += n; + break; + case SSL_ERROR_WANT_READ: + n = secure_read(port, ptr, len); break; case SSL_ERROR_WANT_WRITE: n = secure_write(port, ptr, len); ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c
Bruce Momjian <[EMAIL PROTECTED]> writes: > Actually, the docs say SSL_read/write can error needing READ or WRITE: > http://www.openssl.org/docs/ssl/SSL_read.html# Only when using a non-blocking BIO, which the backend had better not be doing. But a few lines of useless code aren't a big deal... > The SSL_write docs are the same. I have applied the following patch to > handle both new cases. Does this help the SSL test program you have? Where is the "default:" case to preserve sanity when the SSL call returns an error code other than the ones the switch knows about? ISTM the lack of this defense *is* a big deal. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org