pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Further portability hacking in pg_upgrade's test script. 7+ messages / 1 participants [nested] [flat]
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/04269320aed30d3e37c10ae77775954eae234d45 Modified Files -------------- src/bin/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/04e3492c5c46822c756f575d6105a8a6ff76d4f2 Modified Files -------------- src/bin/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dfbad3f454103e7cd379595fdcdce3952effbd5f Modified Files -------------- src/bin/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2cc81f95e698b9da07a98cfb63257f2ae635416a Modified Files -------------- src/bin/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b73ab5b4b585c2ee675fc4d1c61299d8d9e1c2db Modified Files -------------- src/bin/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ab57f48f682458cb691ee2c02e219ce0d762c7c9 Modified Files -------------- contrib/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Further portability hacking in pg_upgrade's test script. @ 2018-07-21 19:41 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-07-21 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Further portability hacking in pg_upgrade's test script. I blew the dust off a Bourne shell (file date 1996, yea verily) and tried to run test.sh with it. It mostly worked, but I found that the temp-directory creation code introduced by commit be76a6d39 was not compatible, for a couple of reasons: this shell thinks "set -e" should force an exit if a command within backticks fails, and it also thinks code within braces should be executed by a sub-shell, meaning that variable settings don't propagate back up to the parent shell. In view of Victor Wagner's report that Solaris is still using pre-POSIX shells, seems like we oughta make this case work. It's not like the code is any less idiomatic this way; the prior coding technique appeared nowhere else. (There is a remaining bash-ism here, which is that $RANDOM doesn't do what the code hopes in non-bash shells. But the use of $$ elsewhere in that path should be enough to ensure uniqueness and some amount of randomness, so I think it's okay as-is.) Back-patch to all supported branches, as the previous commit was. Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b782b7c57fe84762a9065f59b7ca52babe281fcb Modified Files -------------- contrib/pg_upgrade/test.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2018-07-21 19:41 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. Tom Lane <tgl@sss.pgh.pa.us> 2018-07-21 19:41 pgsql: Further portability hacking in pg_upgrade's test script. 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