[HACKERS] shebang for tcl postgresql modules

2015-03-12 Thread Jozef Mlich
Dear hackers,

I would like to ask you if is there any reason to pretend tcl scripts
are shell scripts?

I am speaking namely about these files

http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/tcl/modules/pltcl_delmod.in;hb=HEAD
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/tcl/modules/pltcl_listmod.in;hb=HEAD
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/tcl/modules/pltcl_loadmod.in;hb=HEAD


Here is the part of code I am speaking about:

#! /bin/sh
# Start tclsh \
exec @TCLSH@ $0 $@

instead of
#! /usr/bin/tclsh

or 
#! @TCLSH@

I am asking because our test suite is triggering errors on this [1]. In
this case, it seems easier to modify code rather then test suite. Please
apply attached patch if there is no particular reason for use
of /bin/sh.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1199464


-- 
Jozef Mlich jml...@redhat.com
Associate Software Engineer - EMEA ENG Developer Experience
Mobile: +420 604 217 719
http://cz.redhat.com/
Red Hat, Inc.
diff --git a/src/pl/tcl/modules/pltcl_delmod.in b/src/pl/tcl/modules/pltcl_delmod.in
index daa4fac..6b8cda4 100644
--- a/src/pl/tcl/modules/pltcl_delmod.in
+++ b/src/pl/tcl/modules/pltcl_delmod.in
@@ -1,8 +1,6 @@
-#! /bin/sh
+#! @TCLSH@
 # src/pl/tcl/modules/pltcl_delmod.in
 #
-# Start tclsh \
-exec @TCLSH@ $0 $@
 
 #
 # Code still has to be documented
diff --git a/src/pl/tcl/modules/pltcl_listmod.in b/src/pl/tcl/modules/pltcl_listmod.in
index 7d930ff..c3ea138 100644
--- a/src/pl/tcl/modules/pltcl_listmod.in
+++ b/src/pl/tcl/modules/pltcl_listmod.in
@@ -1,8 +1,6 @@
-#! /bin/sh
+#! @TCLSH@
 # src/pl/tcl/modules/pltcl_listmod.in
 #
-# Start tclsh \
-exec @TCLSH@ $0 $@
 
 #
 # Code still has to be documented
diff --git a/src/pl/tcl/modules/pltcl_loadmod.in b/src/pl/tcl/modules/pltcl_loadmod.in
index 645c6bb..06b459b 100644
--- a/src/pl/tcl/modules/pltcl_loadmod.in
+++ b/src/pl/tcl/modules/pltcl_loadmod.in
@@ -1,6 +1,5 @@
-#! /bin/sh
-# Start tclsh \
-exec @TCLSH@ $0 $@
+#! @TCLSH@
+#
 
 #
 # Code still has to be documented

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] 9a57858f1103b89a5674f0d50c5fe1f756411df6

2014-03-13 Thread Jozef Mlich
On Thu, 2014-03-13 at 12:00 +0100, Andres Freund wrote:
 On 2014-03-12 20:09:23 -0400, Robert Haas wrote:
  On the pgsql-packagers list, there has been some (OT for that list)
  discussion of whether commit 9a57858f1103b89a5674f0d50c5fe1f756411df6
  is sufficiently serious to justify yet another immediate minor release
  of 9.3.x.  The relevant questions seem to be:
  
  1. Is it really bad?
 
 It breaks the ctid of concurrently updated/locked tuples during WAL
 replay. Which can lead to all sorts of nastiness like indexes not
 finding any rows. Since that kind of locking/updating is pretty common
 with foreign keys, it's not an unlikely scenario.
 Unfortunately FPIs won't save the day in all that many scenarios because
 there'll normally a XLOG_HEAP2_LOCK_UPDATED before the XLOG_HEAP_LOCK
 record which is replayed badly.
 
 Now, one could argue that it only affects replicas or servers that
 crashed at some point, but I think that's not much comfort.
 
  2. Does it affect a lot of people or only a few?
 
 It's been reported twice (Peter Geoghegan, Greg Stark) by Heroku and one
 person on IRC could reproduce it repeatedly. The latter was what made me
 look into it again and find the bug. Greg has confirmed that it fixes
 the bug when replaying the WAL again.
 
  3. Are there more, equally bad bugs that are unfixed, or perhaps even
  unreported, yet?
 
 Uh. I have no idea. I don't know of any reports that can't be attributed
 to any of these, but as you're also include unreported bugs in that
 question...
 

Does this affect also other branches? 9.2 ?

regards,
-- 
Jozef Mlich jml...@redhat.com
Associate Software Engineer - EMEA ENG Developer Experience
Mobile: +420 604 217 719
http://cz.redhat.com/
Red Hat, Inc.





-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers