Bug of pg_receivexlog -v

Lists: pgsql-hackers
From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug of pg_receivexlog -v
Date: 2014-08-01 11:35:28
Message-ID: CAHGQGwGjt=uOZihgcSrsBqVB-ix5Jjs6wQxsd8zfzMvdz=8ePg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

In 9.2, pg_receivexlog -v has emitted the messages as follows at the
end of each WAL file.

pg_receivexlog: finished segment at 0/2000000 (timeline 1)
pg_receivexlog: finished segment at 0/3000000 (timeline 1)
pg_receivexlog: finished segment at 0/4000000 (timeline 1)

But, while reviewing the pg_receivexlog patch written by Furuya, I
found that 0b63291 had
broken this feature, and then now pg_receivexlog -v doesn't emit such
messages at all.
Attached patch fixes this problem. This needs to be back-patched to 9.3.

Regards,

--
Fujii Masao

Attachment Content-Type Size
bugfix-receivexlog.patch text/x-patch 546 bytes

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug of pg_receivexlog -v
Date: 2014-08-01 16:47:16
Message-ID: CAHGQGwHJjryCV5U3ED8jOF1UUBdO92f9jbZ279vdqRC84zJ70Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 1, 2014 at 8:35 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Hi,
>
> In 9.2, pg_receivexlog -v has emitted the messages as follows at the
> end of each WAL file.
>
> pg_receivexlog: finished segment at 0/2000000 (timeline 1)
> pg_receivexlog: finished segment at 0/3000000 (timeline 1)
> pg_receivexlog: finished segment at 0/4000000 (timeline 1)
>
> But, while reviewing the pg_receivexlog patch written by Furuya, I
> found that 0b63291 had
> broken this feature, and then now pg_receivexlog -v doesn't emit such
> messages at all.
> Attached patch fixes this problem. This needs to be back-patched to 9.3.

I found another problem on pg_receivexlog, which can cause the leak of
PGresult. The leak is small and rare, but it's better to fix that.
Patch attached.

Regards,

--
Fujii Masao

Attachment Content-Type Size
pgresult-leak.patch text/x-diff 994 bytes

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug of pg_receivexlog -v
Date: 2014-08-02 06:01:15
Message-ID: CAHGQGwE7AmuGDVmkV1XYybfHE9fmnVSin9s5EsVBJihEfzuX4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 1, 2014 at 8:35 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Hi,
>
> In 9.2, pg_receivexlog -v has emitted the messages as follows at the
> end of each WAL file.
>
> pg_receivexlog: finished segment at 0/2000000 (timeline 1)
> pg_receivexlog: finished segment at 0/3000000 (timeline 1)
> pg_receivexlog: finished segment at 0/4000000 (timeline 1)
>
> But, while reviewing the pg_receivexlog patch written by Furuya, I
> found that 0b63291 had
> broken this feature, and then now pg_receivexlog -v doesn't emit such
> messages at all.
> Attached patch fixes this problem. This needs to be back-patched to 9.3.

Applied.

Regards,

--
Fujii Masao


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug of pg_receivexlog -v
Date: 2014-08-02 06:21:00
Message-ID: CAHGQGwFo_fmUG2WY4fU-=Y=oo9n_SH8tiDE-hTQyPiM3=58pzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Aug 2, 2014 at 1:47 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Fri, Aug 1, 2014 at 8:35 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> Hi,
>>
>> In 9.2, pg_receivexlog -v has emitted the messages as follows at the
>> end of each WAL file.
>>
>> pg_receivexlog: finished segment at 0/2000000 (timeline 1)
>> pg_receivexlog: finished segment at 0/3000000 (timeline 1)
>> pg_receivexlog: finished segment at 0/4000000 (timeline 1)
>>
>> But, while reviewing the pg_receivexlog patch written by Furuya, I
>> found that 0b63291 had
>> broken this feature, and then now pg_receivexlog -v doesn't emit such
>> messages at all.
>> Attached patch fixes this problem. This needs to be back-patched to 9.3.
>
> I found another problem on pg_receivexlog, which can cause the leak of
> PGresult. The leak is small and rare, but it's better to fix that.
> Patch attached.

Applied.

Regards,

--
Fujii Masao