Lists: | pgsql-hackers |
---|
From: | Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | How to generate specific WAL records? |
Date: | 2010-04-13 11:18:28 |
Message-ID: | z2wa778a7261004130418y4c063a8v7dc8523110678c50@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
Does anyone know how to generate the following WAL records from psql?
I'm now fixing pg_lesslog, which I reported a bug. Now code is
almost okay and I'd like to add test tools to show pg_lesslog can
handle all the WAL record correctly.
XLOG_MULTIXACT_ZERO_OFF_PAGE
XLOG_MULTIXACT_ZERO_MEM_PAGE
XLOG_MULTIXACT_CREATE_ID
XLOG_HEAP_LOCK
XLOG_HEAP_INIT_PAGE
XLOG_BTREE_INSERT_META
XLOG_BTREE_DELETE_PAGE
XLOG_BTREE_DELETE_PAGE_META
XLOG_BTREE_DELETE_PAGE_HALF
XLOG_GIN_CREATE_PTREE
XLOG_GIN_SPLIT
XLOG_GIN_VACUUM_PAGE
XLOG_GIN_DELETE_PAGE
XLOG_GIN_DELETE_LISTPAGE
XLOG_GIST_PAGE_DELETE
So far, I'm using conventional BTREE, btree_gin and btree_gist for
the test, as well as 2PC and savepoint.
Any information is welcome.
Thank you very much in advance;
------
Koichi Suzuki
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com>, f(at)alvh(dot)no-ip(dot)org |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-13 22:00:20 |
Message-ID: | 20100413220020.GJ2990@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 사이트 추천SQL |
Koichi Suzuki escribió:
> Hi,
>
> Does anyone know how to generate the following WAL records from psql?
>
> I'm now fixing pg_lesslog, which I reported a bug. Now code is
> almost okay and I'd like to add test tools to show pg_lesslog can
> handle all the WAL record correctly.
>
> XLOG_MULTIXACT_ZERO_OFF_PAGE
> XLOG_MULTIXACT_ZERO_MEM_PAGE
> XLOG_MULTIXACT_CREATE_ID
For these, you need to do SELECT FOR SHARE of a tuple in more than one
concurrent session.
I think HEAP_LOCK is SELECT FOR UPDATE.
> XLOG_BTREE_DELETE_PAGE
> XLOG_BTREE_DELETE_PAGE_META
> XLOG_BTREE_DELETE_PAGE_HALF
These are caused during vacuum of a btree. Create an index, populate
it, then remove all items. Then vacuum twice.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | f(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-14 02:13:22 |
Message-ID: | p2vef4f49ae1004131913ia8dadf14t9392f8f0e458b10d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Alvaro-san;
Thank you for a great advice. I successfully generated all the WAL
records listed below. By deleteing and VACUUMing a table with
btree_gist based index, I was successful to generate all the GIST WAL
records.
Still have the following WAL record to create:
CLOG_TRUNCATE
XLOG_HEAP_INIT_PAGE
XLOG_BTREE_INSERT_META
XLOG_GIN_CREATE_PTREE
XLOG_GIN_DELETE_PAGE
I have to run good amount of transactions before VACUUM FREEZE to
create CLOG_TRUNCATE. I'll try.
It's very helpful if anybody knows how to generate XLOG_HEAP_INIT_PAGE
and XLOG_BTREE_INSERT_META.
I'll ask Oleg-san how to generate GIN-related WALs.
Thank you very much;
----------
Koichi Suzuki
2010/4/14 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Koichi Suzuki escribió:
>> Hi,
>>
>> Does anyone know how to generate the following WAL records from psql?
>>
>> I'm now fixing pg_lesslog, which I reported a bug. Now code is
>> almost okay and I'd like to add test tools to show pg_lesslog can
>> handle all the WAL record correctly.
>>
>> XLOG_MULTIXACT_ZERO_OFF_PAGE
>> XLOG_MULTIXACT_ZERO_MEM_PAGE
>> XLOG_MULTIXACT_CREATE_ID
>
> For these, you need to do SELECT FOR SHARE of a tuple in more than one
> concurrent session.
>
> I think HEAP_LOCK is SELECT FOR UPDATE.
>
>
>> XLOG_BTREE_DELETE_PAGE
>> XLOG_BTREE_DELETE_PAGE_META
>> XLOG_BTREE_DELETE_PAGE_HALF
>
> These are caused during vacuum of a btree. Create an index, populate
> it, then remove all items. Then vacuum twice.
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | koichi(dot)szk(at)gmail(dot)com |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, f(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-14 12:10:14 |
Message-ID: | 1271247014.8305.1298.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, 2010-04-14 at 11:13 +0900, Koichi Suzuki wrote:
> Thank you for a great advice. I successfully generated all the WAL
> records listed below. By deleteing and VACUUMing a table with
> btree_gist based index, I was successful to generate all the GIST WAL
> records.
It would be a very useful test case to publish. There are already a
number of standby related tests, this would be very useful for general
case testing, not just for pg_lesslog.
--
Simon Riggs www.2ndQuadrant.com
From: | Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, f(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-14 12:19:07 |
Message-ID: | g2wef4f49ae1004140519v7d921ec7r72f3ba425a07feb@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 사이트 추천SQL |
Thanks for encouraging comment. I'm still struggling to generate
remaing WAL records.
----------
Koichi Suzuki
2010/4/14 Simon Riggs <simon(at)2ndquadrant(dot)com>:
> On Wed, 2010-04-14 at 11:13 +0900, Koichi Suzuki wrote:
>
>> Thank you for a great advice. I successfully generated all the WAL
>> records listed below. By deleteing and VACUUMing a table with
>> btree_gist based index, I was successful to generate all the GIST WAL
>> records.
>
> It would be a very useful test case to publish. There are already a
> number of standby related tests, this would be very useful for general
> case testing, not just for pg_lesslog.
>
> --
> Simon Riggs www.2ndQuadrant.com
>
>
From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>,<koichi(dot)szk(at)gmail(dot)com> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-14 14:04:50 |
Message-ID: | 4BC585320200002500030851@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> wrote:
> 2010/4/14 Simon Riggs <simon(at)2ndquadrant(dot)com>:
>> It would be a very useful test case to publish.
> I'm still struggling to generate remaing WAL records.
Sure, but when you've got it all, please share. I'd like to see us
have a much larger set of tests than the "make check" regression
tests which would get run less frequently but test a lot more. This
sounds like a good one to include.
-Kevin
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, koichi(dot)szk(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-15 02:25:59 |
Message-ID: | 201004150225.o3F2PxS05351@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Kevin Grittner wrote:
> Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> wrote:
> > 2010/4/14 Simon Riggs <simon(at)2ndquadrant(dot)com>:
>
> >> It would be a very useful test case to publish.
>
> > I'm still struggling to generate remaing WAL records.
>
> Sure, but when you've got it all, please share. I'd like to see us
> have a much larger set of tests than the "make check" regression
> tests which would get run less frequently but test a lot more. This
> sounds like a good one to include.
Agreed. This test belongs in our CVS tree so we can maintain it as we
add new WAL types.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
From: | Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to generate specific WAL records? |
Date: | 2010-04-19 00:29:43 |
Message-ID: | s2tef4f49ae1004181729ob1e6a6f9g4a60be0bd05b0f87@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Now I've tested almost all WAL record, including CLOG_TRUNCATE and all
the GIST and GIN-related WALs.
I'm still struggling to find how to have XLOG_HEAP_INIT_PAGE and
XLOG_BTREE_INSERT_META. I'm trying to find how to have these WAL
records but it's a great help if anyone suggests me how.
Thank you very much in advance;
----------
Koichi Suzuki
2010/4/15 Bruce Momjian <bruce(at)momjian(dot)us>:
> Kevin Grittner wrote:
>> Koichi Suzuki <koichi(dot)szk(at)gmail(dot)com> wrote:
>> > 2010/4/14 Simon Riggs <simon(at)2ndquadrant(dot)com>:
>>
>> >> It would be a very useful test case to publish.
>>
>> > I'm still struggling to generate remaing WAL records.
>>
>> Sure, but when you've got it all, please share. I'd like to see us
>> have a much larger set of tests than the "make check" regression
>> tests which would get run less frequently but test a lot more. This
>> sounds like a good one to include.
>
> Agreed. This test belongs in our CVS tree so we can maintain it as we
> add new WAL types.
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>