Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-17 Thread Masahiko Sawada
On Thu, Sep 14, 2017 at 11:00 PM, Craig Ringer wrote: > On 14 September 2017 at 19:57, Ashutosh Sharma > wrote: > >> >> >> Are you planning to work on the review comments from Robert, Moon >> Insung and supply the new patch. I just had a quick glance

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-16 Thread Peter Geoghegan
On Sat, Oct 14, 2017 at 2:47 PM, Peter Geoghegan wrote: > I am working on an experimental version of pg_filedump, customized to > output XML that can be interpreted by an open source hex editor. The > XML makes the hex editor produce color coded, commented > tags/annotations for any

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-15 Thread Vik Fearing
On 10/14/2017 11:47 PM, Peter Geoghegan wrote: > On Sat, Oct 14, 2017 at 10:58 AM, Robert Haas wrote: >> I think it's perfectly sensible to view those 2 bits as making up a >> 2-bit field with 4 states rather than displaying each bit >> individually, but you obviously

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-14 Thread Peter Geoghegan
On Sat, Oct 14, 2017 at 10:58 AM, Robert Haas wrote: > I think it's perfectly sensible to view those 2 bits as making up a > 2-bit field with 4 states rather than displaying each bit > individually, but you obviously disagree. Fair enough. I guess it is that simple. > I

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-14 Thread Robert Haas
On Fri, Oct 13, 2017 at 4:36 PM, Peter Geoghegan wrote: > No, I'm arguing that they're just bits. Show the bits, rather than > interpreting what is displayed. Document that there are other logical > states that are represented as composites of contradictory/mutually > exclusive

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-13 Thread Peter Geoghegan
On Fri, Oct 13, 2017 at 1:02 PM, Robert Haas wrote: >> I don't think it's our place to "interpret" the bits. Are we *also* >> going to show HEAP_XMIN_FROZEN when xmin is physically set to >> FrozenTransactionId? > > No, of course not. We're talking about how to display the

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-13 Thread Robert Haas
On Thu, Oct 12, 2017 at 7:35 PM, Peter Geoghegan wrote: > On Tue, Aug 15, 2017 at 10:54 AM, Robert Haas wrote: >>> Or at least make the filtering optional. >> >> I don't think "filtering" is the right way to think about it. It's >> just labeling each

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-12 Thread Peter Geoghegan
On Tue, Aug 15, 2017 at 10:54 AM, Robert Haas wrote: >> Or at least make the filtering optional. > > I don't think "filtering" is the right way to think about it. It's > just labeling each combination of bits with the meaning appropriate to > that combination of bits. I

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-09-14 Thread Craig Ringer
On 14 September 2017 at 19:57, Ashutosh Sharma wrote: > > Are you planning to work on the review comments from Robert, Moon > Insung and supply the new patch. I just had a quick glance into this > mail thread (after a long time) and could understand Robert's concern >

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-09-14 Thread Ashutosh Sharma
Hi Craig, On Thu, Aug 17, 2017 at 5:50 AM, Craig Ringer wrote: > On 16 August 2017 at 23:14, Robert Haas wrote: >> >> On Tue, Aug 15, 2017 at 4:36 PM, Tomas Vondra >> wrote: >> > You might say that people investigating

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-16 Thread Craig Ringer
On 16 August 2017 at 23:14, Robert Haas wrote: > On Tue, Aug 15, 2017 at 4:36 PM, Tomas Vondra > wrote: > > You might say that people investigating issues in this area of code > should > > be aware of how HEAP_XMIN_FROZEN is defined, and

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-16 Thread Robert Haas
On Tue, Aug 15, 2017 at 4:36 PM, Tomas Vondra wrote: > You might say that people investigating issues in this area of code should > be aware of how HEAP_XMIN_FROZEN is defined, and perhaps you're right ... Yes, I think that's what I would say. I mean, if you happen

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Craig Ringer
On 16 August 2017 at 03:42, Tomas Vondra wrote: > > > On 08/15/2017 07:54 PM, Robert Haas wrote: > >> On Tue, Aug 15, 2017 at 9:59 AM, Tomas Vondra >> wrote: >> >>> I don't think so -- the "committed" and "invalid" meanings are

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Moon Insung
presented to the user should inform us which flags was entered. Regards. Moon > -Original Message- > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tomas Vondra > Sent: Wednesday, August 16, 2017 5:36 AM > To: Robert Haas &

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Tomas Vondra
On 08/15/2017 09:55 PM, Robert Haas wrote: On Tue, Aug 15, 2017 at 3:42 PM, Tomas Vondra wrote: What I think we should not do is interpret the bitmasks (omitting some of the information) assuming all the bits were set correctly. I'm still confused.

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Robert Haas
On Tue, Aug 15, 2017 at 3:42 PM, Tomas Vondra wrote: > What I think we should not do is interpret the bitmasks (omitting some of > the information) assuming all the bits were set correctly. I'm still confused. HEAP_XMIN_COMMITTED|HEAP_XMIN_ABORTED ==

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Tomas Vondra
On 08/15/2017 07:54 PM, Robert Haas wrote: On Tue, Aug 15, 2017 at 9:59 AM, Tomas Vondra wrote: I don't think so -- the "committed" and "invalid" meanings are effectively canceled when the "frozen" mask is present. I mean, "committed" and "invalid" contradict

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Robert Haas
On Tue, Aug 15, 2017 at 9:59 AM, Tomas Vondra wrote: >> I don't think so -- the "committed" and "invalid" meanings are >> effectively canceled when the "frozen" mask is present. >> >> I mean, "committed" and "invalid" contradict each other... > > FWIW I agree with

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Masahiko Sawada
On Tue, Aug 15, 2017 at 10:59 PM, Tomas Vondra wrote: > > > On 08/15/2017 03:24 PM, Robert Haas wrote: >> >> On Mon, Aug 14, 2017 at 9:59 PM, Craig Ringer >> wrote: >>> >>> The bits are set, those macros just test to exclude the special

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Tomas Vondra
On 08/15/2017 03:24 PM, Robert Haas wrote: On Mon, Aug 14, 2017 at 9:59 PM, Craig Ringer wrote: The bits are set, those macros just test to exclude the special meaning of both bits being set at once to mean "frozen". I was reluctant to filter out HEAP_XMIN_COMMITTED

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-15 Thread Robert Haas
On Mon, Aug 14, 2017 at 9:59 PM, Craig Ringer wrote: > The bits are set, those macros just test to exclude the special meaning of > both bits being set at once to mean "frozen". > > I was reluctant to filter out HEAP_XMIN_COMMITTED and HEAP_XMIN_INVALID > when we detect

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-14 Thread Craig Ringer
On 15 August 2017 at 09:11, Moon Insung wrote: > Dear Craig Ringer > > > > Frist, thank you for implementing the necessary function. > > > > but, i have some question. > > > > question 1) vacuum freeze hint bits > > If run a vacuum freeze, bits in the infomask will

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-08-14 Thread Moon Insung
ouhaud; Pavan Deolasee; Álvaro Herrera; Peter Eisentraut; Masahiko Sawada; abhijit Menon-Sen; Peter Geoghegan Subject: Re: [HACKERS] [PATCH] pageinspect function to decode infomasks On 20 Jul. 2017 19:09, "Ashutosh Sharma" <ashu.coe...@gmail.com <mailto:ashu.coe...@g

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-20 Thread Craig Ringer
On 20 July 2017 at 19:09, Ashutosh Sharma wrote: > I had a quick look into this patch and also tested it and following > are my observations. > > 1) I am seeing a server crash when passing any non meaningful value > for t_infomask2 to heap_infomask_flags(). > > postgres=#

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-20 Thread Craig Ringer
On 20 Jul. 2017 19:09, "Ashutosh Sharma" wrote: I had a quick look into this patch and also tested it and following are my observations. Thanks very much. I'll expand the tests to cover various normal and nonsensical masks and combinations and fix the identified issues.

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-20 Thread Ashutosh Sharma
I had a quick look into this patch and also tested it and following are my observations. 1) I am seeing a server crash when passing any non meaningful value for t_infomask2 to heap_infomask_flags(). postgres=# SELECT heap_infomask_flags(2816, 3); server closed the connection unexpectedly

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-20 Thread Masahiko Sawada
On Thu, Jul 20, 2017 at 3:13 PM, Julien Rouhaud wrote: > On Thu, Jul 20, 2017 at 5:44 AM, Peter Geoghegan wrote: >> On Wed, Jul 19, 2017 at 8:33 PM, Craig Ringer wrote: >>> That's silly, so here's a patch to teach pageinspect how to

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-20 Thread Julien Rouhaud
On Thu, Jul 20, 2017 at 5:44 AM, Peter Geoghegan wrote: > On Wed, Jul 19, 2017 at 8:33 PM, Craig Ringer wrote: >> That's silly, so here's a patch to teach pageinspect how to decode infomasks >> to a human readable array of flag names. >> >> Example: >> >>

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 8:33 PM, Craig Ringer wrote: > That's silly, so here's a patch to teach pageinspect how to decode infomasks > to a human readable array of flag names. > > Example: > > SELECT t_infomask, t_infomask2, flags > FROM heap_page_items(get_raw_page('test1',

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-19 Thread Craig Ringer
On 20 July 2017 at 11:33, Craig Ringer wrote: > Hi > > Whenever I'm debugging some kind of corruption incident, possible > visibility bug, etc, I always land up staring at integer infomasks or using > a SQL helper function to decode them. > > That's silly, so here's a