pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Clean up some code, comments and docs referring to Windows 2000
5+ messages / 2 participants
[nested] [flat]
* pgsql: Clean up some code, comments and docs referring to Windows 2000
@ 2020-02-19 04:21 Michael Paquier <michael@paquier.xyz>
2020-02-19 21:01 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2020-02-19 04:21 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Clean up some code, comments and docs referring to Windows 2000 and older
This fixes and updates a couple of comments related to outdated Windows
versions. Particularly, src/common/exec.c had a fallback implementation
to read a file's line from a pipe because stdin/stdout/stderr does not
exist in Windows 2000 that is removed to simplify src/common/ as there
are unlikely versions of Postgres running on such platforms.
Author: Michael Paquier
Reviewed-by: Kyotaro Horiguchi, Juan José SantamarÃa Flecha
Discussion: https://postgr.es/m/20191219021526.GC4202@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e2e02191e23379502a38a6b0436ab7f41b2efc08
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 3 +-
doc/src/sgml/installation.sgml | 2 +-
src/backend/libpq/auth.c | 6 +-
src/bin/initdb/initdb.c | 11 ++--
src/common/exec.c | 132 +-------------------------------------
src/port/getaddrinfo.c | 12 +---
6 files changed, 13 insertions(+), 153 deletions(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
2020-02-19 04:21 pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
@ 2020-02-19 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 03:02 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2020-02-19 21:01 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
Michael Paquier <michael@paquier.xyz> writes:
> Clean up some code, comments and docs referring to Windows 2000 and older
Surely this patch broke the error case in haveNativeWindowsIPv6routines()?
That is, in the admittedly unlikely case that LoadLibraryA("ws2_32")
succeeds but GetProcAddress(hLibrary, "getaddrinfo") doesn't, what you
now have will do FreeLibrary(hLibrary) and then proceed to use the
now-dangling hLibrary pointer anyway.
It looks to me like you should just remove this whole stanza now:
if (hLibrary == NULL || GetProcAddress(hLibrary, "getaddrinfo") == NULL)
{
/*
* Well, ws2_32 doesn't exist, or more likely doesn't have
* getaddrinfo.
*/
if (hLibrary != NULL)
FreeLibrary(hLibrary);
}
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
2020-02-19 04:21 pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
2020-02-19 21:01 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-20 03:02 ` Michael Paquier <michael@paquier.xyz>
2020-02-20 06:27 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2020-02-20 03:02 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On Wed, Feb 19, 2020 at 04:01:54PM -0500, Tom Lane wrote:
> Surely this patch broke the error case in haveNativeWindowsIPv6routines()?
> That is, in the admittedly unlikely case that LoadLibraryA("ws2_32")
> succeeds but GetProcAddress(hLibrary, "getaddrinfo") doesn't, what you
> now have will do FreeLibrary(hLibrary) and then proceed to use the
> now-dangling hLibrary pointer anyway.
You are right, thanks! This block has no meaning anymore, so
removed.
For the note, it looks that we could get completely rid of
src/port/getaddrinfo.c once we drop support for XP as IPv6 support is
enabled by default on Vista and Windows 7. For XP, one needs to
install an extra module manually. Do you think that there are other
platforms using our port implementation for getaddrinfo() except
Windows? That's not material for today, obviously.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../../20200220030240.GG2288@paquier.xyz/2-signature.asc)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
2020-02-19 04:21 pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
2020-02-19 21:01 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 03:02 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
@ 2020-02-20 06:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 07:04 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2020-02-20 06:27 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
Michael Paquier <michael@paquier.xyz> writes:
> For the note, it looks that we could get completely rid of
> src/port/getaddrinfo.c once we drop support for XP as IPv6 support is
> enabled by default on Vista and Windows 7. For XP, one needs to
> install an extra module manually. Do you think that there are other
> platforms using our port implementation for getaddrinfo() except
> Windows? That's not material for today, obviously.
We don't have to guess about it too much, we can check the buildfarm.
Of the configure-using animals, it looks like fairywren, gaur, and
jacana are using src/port/getaddrinfo.c. gaur's excuse is that its
libc is pre-IPv6 ;-) ... not sure about fairywren and jacana.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
2020-02-19 04:21 pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
2020-02-19 21:01 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 03:02 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
2020-02-20 06:27 ` Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-20 07:04 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Paquier @ 2020-02-20 07:04 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On Thu, Feb 20, 2020 at 01:27:53AM -0500, Tom Lane wrote:
> We don't have to guess about it too much, we can check the buildfarm.
> Of the configure-using animals, it looks like fairywren, gaur, and
> jacana are using src/port/getaddrinfo.c. gaur's excuse is that its
> libc is pre-IPv6 ;-) ...
Oh, so that's an extra argument to keep the fallback implementation
for a longer time then. I did not notice that.
> not sure about fairywren and jacana.
These two should actually be fine.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../../20200220070454.GL2288@paquier.xyz/2-signature.asc)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-02-20 07:04 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 04:21 pgsql: Clean up some code, comments and docs referring to Windows 2000 Michael Paquier <michael@paquier.xyz>
2020-02-19 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 03:02 ` Michael Paquier <michael@paquier.xyz>
2020-02-20 06:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-20 07:04 ` Michael Paquier <michael@paquier.xyz>
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