Re: pg_xlogdump --stats
От | gotoschool6g |
---|---|
Тема | Re: pg_xlogdump --stats |
Дата | |
Msg-id | 53B68281.1080507@gmail.com обсуждение исходный текст |
Ответ на | Re: pg_xlogdump --stats (Abhijit Menon-Sen <ams@2ndQuadrant.com>) |
Ответы |
Re: pg_xlogdump --stats
|
Список | pgsql-hackers |
>
> I'm pretty sure that most committers would want to apply the
> rm_identity part in a separate commit first. Could you make it
> two patches, one introducing rm_identity, and another with
> xlogdump using it?
Carp the code:
const char *
clog_identify(uint8 info)
{
switch (info)
{
case CLOG_ZEROPAGE:
return "ZEROPAGE";
case CLOG_TRUNCATE:
return "TRUNCATE";
break;
}
return NULL;
}
clog_identify(uint8 info)
{
switch (info)
{
case CLOG_ZEROPAGE:
return "ZEROPAGE";
case CLOG_TRUNCATE:
return "TRUNCATE";
break;
}
return NULL;
}
or
const char *
clog_identify(uint8 info)
{
if(info==CLOG_ZEROPAGE)return "ZEROPAGE";
if(info==CLOG_TRUNCATE)return "TRUNCATE";
return NULL;
}
clog_identify(uint8 info)
{
if(info==CLOG_ZEROPAGE)return "ZEROPAGE";
if(info==CLOG_TRUNCATE)return "TRUNCATE";
return NULL;
}
is a bit faster than:
const char *
clog_identify(uint8 info)
{
const char *id = NULL;
clog_identify(uint8 info)
{
const char *id = NULL;
switch (info)
{
case CLOG_ZEROPAGE:
id = "ZEROPAGE";
break;
case CLOG_TRUNCATE:
id = "TRUNCATE";
break;
}
{
case CLOG_ZEROPAGE:
id = "ZEROPAGE";
break;
case CLOG_TRUNCATE:
id = "TRUNCATE";
break;
}
return id;
}
}
В списке pgsql-hackers по дате отправления: