[pgpool-general: 2891] Re: pgpool 3.3.2: cannot load dump
Sergey Arlashin
sergeyarl.maillist at gmail.com
Fri May 30 13:48:40 JST 2014
On May 30, 2014, at 2:45 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> Are you using streaming replication? If so, it's an expected behavior
> because it's an asynchronous replication system. If it's a problem of
> you, try native replication (replication_mode = on) instead.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
>
Ah, ok. Actually I cannot use native replication at the moment. We use streaming and it fully meets our requirements.
So I suppose in case of streaming replication I need to load the dump directly to the master postgresql backend. And therefore another question - do I need to stop pgpool before loading dump to the master directly ?
--
Best regards
Sergey Arlashin
>> Hi!
>>
>> I have a rather slow staging environment which consists of pgpool2 3.3.2 and two postgres 9.3 backends with streaming replication.
>>
>> I try to load the following dump:
>>
>>> --
>>> -- PostgreSQL database dump
>>> --
>>>
>>> SET statement_timeout = 0;
>>> SET lock_timeout = 0;
>>> SET client_encoding = 'UTF8';
>>> SET standard_conforming_strings = on;
>>> SET check_function_bodies = false;
>>> SET client_min_messages = warning;
>>>
>>> --
>>> -- Name: hr; Type: DATABASE; Schema: -; Owner: hr
>>> --
>>>
>>> CREATE DATABASE hr WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'ru_RU.UTF-8' LC_CTYPE = 'ru_RU.UTF-8';
>>>
>>>
>>> ALTER DATABASE hr OWNER TO hr;
>>>
>>> \connect hr
>>>
>>> SET statement_timeout = 0;
>>> SET lock_timeout = 0;
>>> SET client_encoding = 'UTF8';
>>> SET standard_conforming_strings = on;
>>> SET check_function_bodies = false;
>>> SET client_min_messages = warning;
>>>
>>> --
>>> -- Name: amqp; Type: SCHEMA; Schema: -; Owner: postgres
>>> --
>>>
>>> CREATE SCHEMA amqp;
>>>
>>>
>>> ALTER SCHEMA amqp OWNER TO postgres;
>>
>>
>> But it stops when it tries to connect to db hr .
>>
>> $ cat 111.sql |psql -U postgres -h pgpoolhost.site -p 9999
>> SET
>> SET
>> SET
>> SET
>> SET
>> SET
>> CREATE DATABASE
>> ALTER DATABASE
>> \connect: $
>>
>> Once it happens I see the following messages in pgpool.log
>>
>> May 29 18:11:57 lb-node2 pgpool[28053]: pool_read_kind: kind does not match between master(53) slot[1] (45)
>> May 29 18:11:57 lb-node2 pgpool[28053]: pool_read_kind: error message from 1 th backend:database "hr" does not exist
>> May 29 18:11:57 lb-node2 pgpool[28053]: pool_do_auth: failed to read kind before BackendKeyData
>>
>> So it seems pgpool doesn't have time to create the database because of slow backends or due to some other reason and therefore throws this error and disconnects the client.
>>
>> If I add "SELECT pg_sleep(5);" before "\connect hr" everything goes without problems.
>>
>> But it is very inconvenient.
>>
>> Could you please tell if this is a normal behaviour or may be this is a bug or can be fixed somehow?
>>
>> Thanks in advance.
>>
>> --
>> Best regards,
>> Sergey Arlashin
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general
More information about the pgpool-general
mailing list