Bind 9.3.1 Beta 2 and SDB PostgreSQL

Michael Lang michi+bind-users at relay3.jackal-net.at
Thu Feb 17 17:07:44 UTC 2005


On Thu, 2005-02-17 at 04:19, murali.krishn at wipro.com wrote:
> Hi Michael,
> 
> I am also facing the same problem as u have mentioned in this mail.
> Did you get any answer so far.
> Please let me know if you have any work around.

it seems that the query itself screws up the Database ...

SELECT * FROM "rbl-plus.mail-abuse.org" WHERE lower(NAME) =
lower('rbl-plus.mail-abuse.org');

ist requested on startup and doesnt return a result ....
where 

SELECT * FROM "rbl-plus.mail-abuse.org" WHERE name =
lower('rbl-plus.mail-abuse.org');

does what it should do ....
as i didnt find out and currently dont know what 'lower(columnname)'
exactly does, but as i interpret it it will lower all data in
tablecolumn, you must take a look at how you insert your data, as having
uppercase names these wont be returned on query.

since SDB only works for "master" Zones it shouldnt be a Problem :)

Kind regards
Michael Lang

Possible feature/performance increase Feature for PgSDB on big Zones
SELECT count(*) FROM "rbl-plus.mail-abuse.org";
  count
---------
 5143088
(1 row)

--- ../../contrib/sdb/pgsql/pgsqldb.c   2005-02-15 17:05:54.000000000
+0100
+++ pgsqldb.c   2005-02-17 17:49:36.000000000 +0100
@@ -130,7 +130,7 @@
        quotestring(name, canonname);
        snprintf(str, sizeof(str),
                 "SELECT TTL,RDTYPE,RDATA FROM \"%s\" WHERE "
-                "lower(NAME) = lower('%s')", dbi->table, canonname);
+                "name = lower('%s')", dbi->table, canonname);
        isc_mem_put(ns_g_mctx, canonname, strlen(name) * 2 + 1);
  
        result = maybe_reconnect(dbi);

--

> Regards
> pilla
> 
> -----Original Message-----
> From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On
> Behalf Of Michael Lang
> Sent: Wednesday, February 16, 2005 4:23 AM
> To: bind-users at isc.org
> Subject: Bind 9.3.1 Beta 2 and SDB PostgreSQL
> 
> 
> Hi all,
> 
> can someone tell me why Bind 9.3.1beta2 does take nearly 2 minutes to
> answer the query when using SDB PostgreSQL ?
> # dig +time=300 @127.0.0.1 -t soa rbl-plus.mail-abuse.org.
> ;; Warning: ID mismatch: expected ID 56422, got 49575
> ;; Warning: ID mismatch: expected ID 56422, got 49575
> 
> 15-Feb-2005 23:44:05.451 socket 0x8e6c6d0 127.0.0.1#46442: packet
> received correctly
> 15-Feb-2005 23:44:05.451 socket 0x8e6c6d0: processing cmsg 0x8e42388
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: UDP request
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: using view '_default'
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: request is not signed
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: recursion available
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: query
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: ns_client_attach: ref =
> 1
> 15-Feb-2005 23:44:05.451 client 127.0.0.1#46442: query 'rbl-plus.mail-
> abuse.org/SOA/IN' approved
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: send
> ^^^^^^^^^^^^^^^^^^^^^^^ last Log 1 Minute 20 Seconds ago, and thats one
> of the faster ones ...
> 
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: sendto
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: senddone
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: next
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: ns_client_detach: ref =
> 0
> 15-Feb-2005 23:45:25.959 client 127.0.0.1#46442: endrequest
> 
> Zones defined with File are no problem
> ]# dig @127.0.0.1 -t soa localhost.localdomain.
> 
> ; <<>> DiG 9.3.0 <<>> @127.0.0.1 -t soa localhost.localdomain.
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20030
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
> 
> ;; QUESTION SECTION:
> ;localhost.localdomain.         IN      SOA
> 
> ;; ANSWER SECTION:
> localhost.localdomain.  86400   IN      SOA     localhost.localdomain.
> hostmaster.localhost.localdomain. 2003010115 10800 3600 604800 86400
> 
> ;; AUTHORITY SECTION:
> localhost.localdomain.  86400   IN      NS      localhost.localdomain.
> 
> ;; ADDITIONAL SECTION:
> localhost.localdomain.  86400   IN      A       127.0.0.1
> 
> ;; Query time: 29 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Tue Feb 15 23:42:43 2005
> ;; MSG SIZE  rcvd: 116
> 
> also the Database is running localy Config Host is set to 127.0.0.1 so
> no Resolution Problem should occur.
> The Database itself returns the query in 'normal' Response time ...
>  SELECT ttl, rdtype, rdata FROM "rbl-plus.mail-abuse.org" WHERE name =
> 'rbl-plus.mail-abuse.org';
>   ttl   | rdtype |                                    rdata
> --------+--------
> +-----------------------------------------------------------------------
> ------
>     300 | SOA    | zb2.mail-abuse.org. rbl-plus.mail-abuse.org.
> 1108478460 1200 300 604800 300
>     300 | TXT    | "Copyright 2005 Kelkea, Inc."
>     300 | MX     | 10 mx01.mail-abuse.com.
>     300 | MX     | 10 mx02.mail-abuse.com.
>     300 | MX     | 10 mx03.mail-abuse.com.
>     300 | MX     | 10 mx04.mail-abuse.com.
>  581400 | NS     | east1.mail-abuse.org.
>  581400 | NS     | east2.mail-abuse.org.
>  581400 | NS     | west1.mail-abuse.org.
>  581400 | NS     | west2.mail-abuse.org.
>  581400 | NS     | west3.mail-abuse.org.
>  581400 | NS     | west4.mail-abuse.org.
>  581400 | NS     | west5.mail-abuse.org.
>  581400 | NS     | west6.mail-abuse.org.
> (14 rows)
> 
> Time: 0.670 ms
> 
> the hole named is blocking when query the database, no rndc no other dig
> and nothing else works ...
> 
> any suggestions ?
> I found a way to Load rbl-plus.mail-abuse.org in nearly 25 Minutes into
> PostgreSQL but now the Server lacks doing what it should be ... ;(
> 
> Kind regards
> Michael Lang
> 
> 
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately
> and destroy all copies of this message and any attachments.
-- 
Michael Lang <michi+bind-users at relay3.jackal-net.at>



More information about the bind-users mailing list