Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* dbm size limit in OSF
@ 1996-10-25  4:00 Andrew Daviel
  1996-10-25  4:00 ` Alan Lehotsky
  1996-10-26  4:00 ` Mike Iglesias
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Daviel @ 1996-10-25  4:00 UTC (permalink / raw)



I've ported an application written in Perl4 using dbmopen
to OSF (it uses LIBWWW_PERL 4, which bombs under Perl 5, and it
was easier to build Perl 4 than rewrite the app using LWP 5).

Anyhow, it works fine under Linux but under OSF I get 
"dbm store returned -1, errno 28, key "whatever" at TRbot line 1232

I figure  28 is ENOSPC No space left on device.

In "man ndbm" is
  [ENOSPC]  [Digital]  An attempt was made to store a key (and its associated
            contents) whose size exceeds the page block size limit as defined
            by PBLKSIZE in /usr/include/ndbm.h.

In ndbm.h is defined 
#ifdef _XOPEN_SOURCE_EXTENDED
#define DBM_PBLKSIZ 1024
#define DBM_DBLKSIZ 4096

        char    dbm_pagbuf[DBM_PBLKSIZ];/* page file block buffer */
        char    dbm_dirbuf[DBM_DBLKSIZ];/* directory file block buffer */
#else /* _OSF_SOURCE */
#define PBLKSIZ 1024
#define DBLKSIZ 4096
        char    dbm_dirbuf[DBLKSIZ];    /* directory file block buffer */
        char    dbm_pagbuf[PBLKSIZ];    /* page file block buffer */
#endif

So Digital have in their wisdom imposed some arbitrary small limit
on record lengths in a dbm database.

Can I just change this value?
Is it feasible to make a custom version of ndbm and link it
with Perl? Should I just install gdbm ?

--
Andrew Daviel         mailto:advax@triumf.ca 
TRIUMF                voice: 604-222-7376 
4004 Wesbrook Mall    fax:   604-222-7307 
Vancouver BC          http://andrew.triumf.ca/~andrew 
Canada   V6T 2A3      49D14.7N 123D13.6W



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

* Re: dbm size limit in OSF
  1996-10-25  4:00 dbm size limit in OSF Andrew Daviel
@ 1996-10-25  4:00 ` Alan Lehotsky
  1996-10-26  4:00 ` Mike Iglesias
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Lehotsky @ 1996-10-25  4:00 UTC (permalink / raw)



In article <54rfks$581@nntp.ucs.ubc.ca>, advax@triumf.ca wrote:

>>>
>>>So Digital have in their wisdom imposed some arbitrary small limit
>>>on record lengths in a dbm database.
>>>

   Don't blame Digital.  The header file you showed (minus the copyright
information (tsk,tsk..) is right out of BSD 4.3 (or maybe 4.2...)
with only minor modifications for name-space pollution by OSF.

   NDBM is not supposed to be a general-purpose database, it was intended
for fairly limited things....

   The new XPG4.2 standards raise the size of keys and data,  but they're
still not exactly enormous.  I think the requirement went up to maybe
4kb for the key+data...

   I implemented a rather clever hack that allowed backwards compatible
access to existing ndbm files while allowing new files to dynamically
grow to the larger size.  It's in the next release of OSF/1 source from
the OSF....


>>>Can I just change this value?

   It's pretty tricky; there's a lot of magic hacking going on that
(if I remember right) wasn't parameterized very well.


>>>Is it feasible to make a custom version of ndbm and link it
>>>with Perl? Should I just install gdbm ?

   Yes, or get the new database code from BSD 4.4; it's very nicely
done from my quick look at it a year ago...


Regards,
Al Lehotsky

-- 
                    Quality Software Management
                  (617)862-5418 (617)674-1096 FAX
                        lehotsky@tiac.net
                 http://www.tiac.net/users/lehotsky
        Software Process Improvement / Management Consulting
            Language Design and Compiler Construction
                      Management Consulting



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

* Re: dbm size limit in OSF
  1996-10-25  4:00 dbm size limit in OSF Andrew Daviel
  1996-10-25  4:00 ` Alan Lehotsky
@ 1996-10-26  4:00 ` Mike Iglesias
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Iglesias @ 1996-10-26  4:00 UTC (permalink / raw)



In article <54rfks$581@nntp.ucs.ubc.ca>, Andrew Daviel <advax@triumf.ca> wrote:
>#define PBLKSIZ 1024
>
>So Digital have in their wisdom imposed some arbitrary small limit
>on record lengths in a dbm database.

It's the same on SunOS and Solaris 2.

>Can I just change this value?
>Is it feasible to make a custom version of ndbm and link it
>with Perl? Should I just install gdbm ?

You could use Berkeley DB instead, which I believe does away with
those limits.  I think you can get it from ftp.cs.berkeley.edu.
It works fine with Perl v5 and DUnix.


-- 
Mike Iglesias                        Internet:    iglesias@draco.acs.uci.edu
University of California, Irvine     phone:       (714) 824-6926
Office of Academic Computing         FAX:         (714) 824-2069




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

end of thread, other threads:[~1996-10-26  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-25  4:00 dbm size limit in OSF Andrew Daviel
1996-10-25  4:00 ` Alan Lehotsky
1996-10-26  4:00 ` Mike Iglesias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox