Thread: largeobject

largeobject

From
odbc Postgres
Date:
Hi, everyone,

    From http://odbc.postgresql.org , I looked the
following

>Another important note is that this new type is
> lacking in functionality.
>It will not cleanup after itself on updates
>and deletes, thus leaving orphans
>around and using up extra disk space.
>And currently, Postgres does not
> support the vacuuming of large objects.

    I want to use largeobject, Does this means I must
clear the lo by myself? even to now? and how to do?

        Haiquan Yang



__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

Re: largeobject

From
"Henshall, Stuart - WCP"
Date:
I believe in postgresql's contrib there's a program called vacuumlo
Hope this helps,
- Stuart

-----Original Message-----
From: odbc Postgres [mailto:psqlodbc@yahoo.com]
Sent: 05 December 2001 07:59
To: pgsql-odbc@postgresql.org
Subject: largeobject


Hi, everyone,

    From http://odbc.postgresql.org , I looked the
following

>Another important note is that this new type is
> lacking in functionality.
>It will not cleanup after itself on updates
>and deletes, thus leaving orphans
>around and using up extra disk space.
>And currently, Postgres does not
> support the vacuuming of large objects.

    I want to use largeobject, Does this means I must
clear the lo by myself? even to now? and how to do?

        Haiquan Yang



__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

Re: largeobject

From
Hiroshi Inoue
Date:
"Henshall, Stuart - WCP" wrote:
>
> I believe in postgresql's contrib there's a program called vacuumlo

Unfortunately vacuumlo doesn't take type lo into account.

I changed vacuumlo so that it takes the type lo into
account in 7.2 but it doesn't handle the following
type created by
 create type lo (
   internallength=4,
   externallength=10,
   input=int4in,
   output=int4out,
   default='',
   passedbyvalue
 );

The type is incomplete and hard to handle in vacuumlo
or pg_restore. In 7.2 both vacuumlo and pg_restore
could handle the type lo defined in contrib/lo which
contains the definitions of input/output functions
etc.
Probably I had better recommend to use the type lo
in contrib/lo and change the documentation at http:
//odbc.postgresql.org/. However PostgreSQL hasn't
had a proper BLOB type yet and I don't know what
would occur about BLOB in the future.

regards,
Hiroshi Inoue

> Hope this helps,
> - Stuart
>
> -----Original Message-----
> From: odbc Postgres [mailto:psqlodbc@yahoo.com]
> Sent: 05 December 2001 07:59
> To: pgsql-odbc@postgresql.org
> Subject: largeobject
>
> Hi, everyone,
>
>     From http://odbc.postgresql.org , I looked the
> following
>
> >Another important note is that this new type is
> > lacking in functionality.
> >It will not cleanup after itself on updates
> >and deletes, thus leaving orphans
> >around and using up extra disk space.
> >And currently, Postgres does not
> > support the vacuuming of large objects.
>
>     I want to use largeobject, Does this means I must
> clear the lo by myself? even to now? and how to do?
>
>         Haiquan Yang
>
> __________________________________________________
> Do You Yahoo!?
> Buy the perfect holiday gifts at Yahoo! Shopping.
> http://shopping.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

Re: largeobject

From
odbc Postgres
Date:
Hi, Inoue,

   Thank you very much.
I use the following definition in my ODBC program.
  create type lo (
    internallength=4,
    externallength=10,
    input=int4in,
    output=int4out,
    default='',
    passedbyvalue
  );
Another question: If I "Drop type lo", does the lo
object exist yet?

           Haiquan Yang


--- Hiroshi Inoue <Inoue@tpf.co.jp> wrote:
> "Henshall, Stuart - WCP" wrote:
> >
> > I believe in postgresql's contrib there's a
> program called vacuumlo
>
> Unfortunately vacuumlo doesn't take type lo into
> account.
>
> I changed vacuumlo so that it takes the type lo into
> account in 7.2 but it doesn't handle the following
> type created by
>  create type lo (
>    internallength=4,
>    externallength=10,
>    input=int4in,
>    output=int4out,
>    default='',
>    passedbyvalue
>  );
>
> The type is incomplete and hard to handle in
> vacuumlo
> or pg_restore. In 7.2 both vacuumlo and pg_restore
> could handle the type lo defined in contrib/lo which
> contains the definitions of input/output functions
> etc.
> Probably I had better recommend to use the type lo
> in contrib/lo and change the documentation at http:
> //odbc.postgresql.org/. However PostgreSQL hasn't
> had a proper BLOB type yet and I don't know what
> would occur about BLOB in the future.
>
> regards,
> Hiroshi Inoue
>
> > Hope this helps,
> > - Stuart
> >
> > -----Original Message-----
> > From: odbc Postgres [mailto:psqlodbc@yahoo.com]
> > Sent: 05 December 2001 07:59
> > To: pgsql-odbc@postgresql.org
> > Subject: largeobject
> >
> > Hi, everyone,
> >
> >     From http://odbc.postgresql.org , I looked the
> > following
> >
> > >Another important note is that this new type is
> > > lacking in functionality.
> > >It will not cleanup after itself on updates
> > >and deletes, thus leaving orphans
> > >around and using up extra disk space.
> > >And currently, Postgres does not
> > > support the vacuuming of large objects.
> >
> >     I want to use largeobject, Does this means I
> must
> > clear the lo by myself? even to now? and how to
> do?
> >
> >         Haiquan Yang
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Buy the perfect holiday gifts at Yahoo! Shopping.
> > http://shopping.yahoo.com
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

Re: largeobject

From
Hiroshi Inoue
Date:
odbc Postgres wrote:
>
> Hi, Inoue,
>
>    Thank you very much.
> I use the following definition in my ODBC program.
>   create type lo (
>     internallength=4,
>     externallength=10,
>     input=int4in,
>     output=int4out,
>     default='',
>     passedbyvalue
>   );
> Another question: If I "Drop type lo", does the lo
> object exist yet?

Please wait to drop the type lo.
The largeobjects still exist even after you drop
the type but you would no longer be able to refer
to them using the type.
I'm thinking how to handle it now.

regards,
Hiroshi Inoue

Re: largeobject

From
"Matteo Cavalleri"
Date:
On 10 Dec 2001, at 15:54, Hiroshi Inoue wrote:

> Unfortunately vacuumlo doesn't take type lo into account.

In latest pgreplicator distribution we set up an alpha stage large
object replication. The system works both on oid and lo types.
We develop the following set of utilities that you can find useful if
you are working on lo types:

* vacuumlo.tcl script that can vaccum lo types.

* prepg_dump.tcl & postpg_restore.tcl can dump and restore
correctly lo types. (simply run prepg_dump.tcl BEFORE your
pg_dump command, run postpg_restore.tcl AFTER your pg_restore
commad:-)))

* editschema & getdata.tcl can rearrange the table structure using
vi (eg. dropping column names, changing data types..  How to use
editschema is reported in
http://pgreplicator.sourceforge.net/stuff.html)


some of that code was not release to the public yet, since it is still
remarked in Italian language, however here it is a preview.
I hope this can help

Regards,


Matteo Cavalleri
IRCCS E.Medea
Bioengineering Lab.
Via D.L.Monza 20
23842 Bosisio Parini (LC) - ITALY
Tel. +39-031-877 274 / 111
Fax +39-031-877499
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  pg_lo_utilities.tar.gz
     Date:  12 Dec 2001, 12:44
     Size:  3699 bytes.
     Type:  Unknown

Attachment

Re: largeobject

From
Hiroshi Inoue
Date:
Matteo Cavalleri wrote:
>
> On 10 Dec 2001, at 15:54, Hiroshi Inoue wrote:
>
> > Unfortunately vacuumlo doesn't take type lo into account.
>
> In latest pgreplicator distribution we set up an alpha stage large
> object replication. The system works both on oid and lo types.
> We develop the following set of utilities that you can find useful if
> you are working on lo types:

What lo type are you using ?

There's a lo type in contrib/lo.
The type could be restored using pg_restore in 7.2
and vacuumlo in 7.2 also could handle the type
properly.

There's another lo type described in FAQ(Advanced)
at http://odbc.postgresql.org/. Unfortunately the
type is hard to handle for pg_restore or vacuumlo.

I've been thinking how to change from the latter to
the former but not found the solution yet.

regards,
Hiroshi Inoue