pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[PATCH] Remove redundant if clause in standbydesc.c
5+ messages / 3 participants
[nested] [flat]
* [PATCH] Remove redundant if clause in standbydesc.c
@ 2016-09-23 09:08 Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 09:35 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Aleksander Alekseev @ 2016-09-23 09:08 UTC (permalink / raw)
To: pgsql-hackers
Hello.
Very simple small patch - see attachment.
--
Best regards,
Aleksander Alekseev
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Attachments:
patch-1.patch (text/x-diff, 676B) download
diff --git a/src/backend/access/rmgrdesc/standbydesc.c b/src/backend/access/rmgrdesc/standbydesc.c
index 13797a3..77983e5 100644
--- a/src/backend/access/rmgrdesc/standbydesc.c
+++ b/src/backend/access/rmgrdesc/standbydesc.c
@@ -122,8 +122,6 @@ standby_desc_invalidations(StringInfo buf,
appendStringInfoString(buf, " smgr");
/* not expected, but print something anyway */
else if (msg->id == SHAREDINVALRELMAP_ID)
- appendStringInfoString(buf, " relmap");
- else if (msg->id == SHAREDINVALRELMAP_ID)
appendStringInfo(buf, " relmap db %u", msg->rm.dbId);
else if (msg->id == SHAREDINVALSNAPSHOT_ID)
appendStringInfo(buf, " snapshot %u", msg->sn.relId);
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] Remove redundant if clause in standbydesc.c
2016-09-23 09:08 [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
@ 2016-09-23 09:35 ` Michael Paquier <michael.paquier@gmail.com>
2016-09-23 09:54 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2016-09-23 09:35 UTC (permalink / raw)
To: Aleksander Alekseev <a.alekseev@postgrespro.ru>; +Cc: pgsql-hackers
On Fri, Sep 23, 2016 at 6:08 PM, Aleksander Alekseev
<a.alekseev@postgrespro.ru> wrote:
> Very simple small patch - see attachment.
/* not expected, but print something anyway */
else if (msg->id == SHAREDINVALRELMAP_ID)
- appendStringInfoString(buf, " relmap");
- else if (msg->id == SHAREDINVALRELMAP_ID)
appendStringInfo(buf, " relmap db %u", msg->rm.dbId);
Looking at inval.c, dbId can be InvalidOid.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] Remove redundant if clause in standbydesc.c
2016-09-23 09:08 [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 09:35 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
@ 2016-09-23 09:54 ` Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 13:46 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Aleksander Alekseev @ 2016-09-23 09:54 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-hackers
> > Very simple small patch - see attachment.
>
> /* not expected, but print something anyway */
> else if (msg->id == SHAREDINVALRELMAP_ID)
> - appendStringInfoString(buf, " relmap");
> - else if (msg->id == SHAREDINVALRELMAP_ID)
> appendStringInfo(buf, " relmap db %u", msg->rm.dbId);
>
> Looking at inval.c, dbId can be InvalidOid.
Frankly I'm not very familiar with this part of code. InvalidOid is just
zero. Does it create some problem in this case?
--
Best regards,
Aleksander Alekseev
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] Remove redundant if clause in standbydesc.c
2016-09-23 09:08 [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 09:35 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
2016-09-23 09:54 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
@ 2016-09-23 13:46 ` Michael Paquier <michael.paquier@gmail.com>
2016-09-23 14:38 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2016-09-23 13:46 UTC (permalink / raw)
To: Aleksander Alekseev <a.alekseev@postgrespro.ru>; +Cc: pgsql-hackers
On Fri, Sep 23, 2016 at 6:54 PM, Aleksander Alekseev
<a.alekseev@postgrespro.ru> wrote:
>> > Very simple small patch - see attachment.
>>
>> /* not expected, but print something anyway */
>> else if (msg->id == SHAREDINVALRELMAP_ID)
>> - appendStringInfoString(buf, " relmap");
>> - else if (msg->id == SHAREDINVALRELMAP_ID)
>> appendStringInfo(buf, " relmap db %u", msg->rm.dbId);
>>
>> Looking at inval.c, dbId can be InvalidOid.
>
> Frankly I'm not very familiar with this part of code. InvalidOid is just
> zero. Does it create some problem in this case?
Not really but my guess is that the two conditions have been left for
this purpose.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] Remove redundant if clause in standbydesc.c
2016-09-23 09:08 [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 09:35 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
2016-09-23 09:54 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 13:46 ` Re: [PATCH] Remove redundant if clause in standbydesc.c Michael Paquier <michael.paquier@gmail.com>
@ 2016-09-23 14:38 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2016-09-23 14:38 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Aleksander Alekseev <a.alekseev@postgrespro.ru>; pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Fri, Sep 23, 2016 at 6:54 PM, Aleksander Alekseev
> <a.alekseev@postgrespro.ru> wrote:
>>> Very simple small patch - see attachment.
>>>
>>> /* not expected, but print something anyway */
>>> else if (msg->id == SHAREDINVALRELMAP_ID)
>>> - appendStringInfoString(buf, " relmap");
>>> - else if (msg->id == SHAREDINVALRELMAP_ID)
>>> appendStringInfo(buf, " relmap db %u", msg->rm.dbId);
> Not really but my guess is that the two conditions have been left for
> this purpose.
I think it's a pretty obvious copy-and-pasteo.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-09-23 14:38 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 09:08 [PATCH] Remove redundant if clause in standbydesc.c Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 09:35 ` Michael Paquier <michael.paquier@gmail.com>
2016-09-23 09:54 ` Aleksander Alekseev <a.alekseev@postgrespro.ru>
2016-09-23 13:46 ` Michael Paquier <michael.paquier@gmail.com>
2016-09-23 14:38 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox