Re: Page layout footprint

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Page layout footprint
Date: 2008-09-05 10:10:30
Message-ID: 48C10596.7060205@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala wrote:
> Heikki Linnakangas napsal(a):
>> I'm afraid I still fail to see the usefulness of this. gdb knows how
>> to deal with structs,
>
> If I correct that GDB knows structure only if you have debug version.
> But usually you don't have debug version on production system.

Using gdb without debug systems is pretty much a lost cause anyway.

> And
> another small advantage is that --footprint switch is easy to use. It is
> easier that work with gdb and you can easy get info from users who are
> not familiar with gdb.

AFAICS you can get all the same information from pg_controldata. We have
a pretty good idea of the alignments of all the usual platforms anyway.
If someone says in a bug report that they're running on x86_64 or 32-bit
Sparc, we know what the alignments on those platforms are.

>> And if you're working at such a low level, it's not that hard to
>> calculate the offsets within the struct manually.
>
> I'm not sure if it is so easy. Are you able do it for SPARC, PPC or
> other non x86 CPUs?

Not off the top of my head. But I am able to do it on x86 and x86_64
which are the platforms I work and debug on.

>> If we needed more information about the architectures, we could just
>> collect the output of pg_controldata. But I think the configure logs
>> already contains all the useful information.
>
> It seems to be good idea. Only what we need is extend buildfarm to parse
> config.log and shows this data for each build machine.

Well, the information is already there. I'm not convinced it's such an
important issue that it's worth the effort to add special handling to
extract that information from the log. Of course, if someone feels
otherwise and does it, I won't object.

> It could also report changes in alignment.

Huh? I would be pretty surprised if the alignment changed randomly on
some platform.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-09-05 10:32:09 Re: For what should pg_stop_backup wait?
Previous Message Zdenek Kotala 2008-09-05 09:53:08 Re: Page layout footprint