Re: lobj_lock_table structure

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: rummandba(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: lobj_lock_table structure
Date: 2010-05-06 13:06:01
Message-ID: 20100506.220601.15613462.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-06 14:13:44 Re: Please help me debug regular segfaults on 8.3.10
Previous Message Shoaib Mir 2010-05-06 12:40:35 Re: lobj_lock_table structure