Thread: lobj_lock_table structure

lobj_lock_table structure

From
AI Rumman
Date:
I am using Pgpool II 2.3.3 with Postgresql 8.3.8 in replication mode with SSL support.

I am facing problem in lob object replication. I found that lobj_lock_table is required.

What should be the structure of lobj_lock_table?

Re: lobj_lock_table structure

From
Shoaib Mir
Date:
On Thu, May 6, 2010 at 10:00 PM, AI Rumman <rummandba@gmail.com> wrote:
I am using Pgpool II 2.3.3 with Postgresql 8.3.8 in replication mode with SSL support.

I am facing problem in lob object replication. I found that lobj_lock_table is required.

What should be the structure of lobj_lock_table?


This is not a PgPool mailing list, please post it to the appropriate list such as http://lists.pgfoundry.org/pipermail/pgpool-general/

Re: lobj_lock_table structure

From
Tatsuo Ishii
Date:
> I am using Pgpool II 2.3.3 with Postgresql 8.3.8 in replication mode with
> SSL support.
>
> I am facing problem in lob object replication. I found that lobj_lock_table
> is required.
>
> What should be the structure of lobj_lock_table?

From the pgpool-II doc:
----------------------------------------------------------------------
lobj_lock_table

    Specify table name used for large object replication control. If
    it is specified, pgpool will lock the table specified by
    lobj_lock_table and generate large object id by looking into
    pg_largeobject system catalog and call lo_create to create large
    object. This way, it's guaranteed to use same large object id in
    all DB nodes in replication mode. Please note that PostgreSQL 8.0
    or before does not have lo_create, thus this functionality will
    not work.

    Libpq function lo_creat() call will trigger this
    functionality. Also large object creation through Java API (JDBC
    driver), PHP API(pg_lo_create, or similar API in PHP library such
    as PDO) and same API in various programing languages are known to
    use similar protocol, thus should work.

    Following large object create operation will not work:

        * lo_create of libpq
        * Any API of any language using lo_create
        * lo_import function in backend
        * SELECT lo_creat

    It does not matter what lobj_lock_table's schema is, but it should
    be writable by any user. Here is an example to create such a
    table:

    CREATE TABLE public.my_lock_table ();
    GRANT ALL ON public.my_lock_table TO PUBLIC;

    The table specified by lobj_lock_table must be created
    beforehand. If you create the table in template1, any database
    created afterward will have the table.

    If lobj_lock_table has empty string(''), the functionality is
    disabled (thus large object replication will not work). The
    default value for lobj_lock_table is ''.
----------------------------------------------------------------------

So the structure of the table does not matter at all.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp