"Siew Hui, Wong" <shwong@sebasasia.com> writes: > Is it possible that there is a permission problem etc that don't allow > plperlu function that calls a pg_dump command? I am still stumped, trying to > solve the problem of "Standard in must be a tty" whenever i triggered the > plperlu function :( I'd guess that that complaint is coming from /bin/su because it's not finding anyplace to ask for the password. But why are you trying to su to postgres at all? Anything the backend launches will be running as the postgres user to start with. The entire project seems fatally flawed anyway ... you can't seriously think it's a good idea to launch a complete-database pg_dump after every row insertion. Quite aside from the performance implications, you won't even manage to achieve what you presumably want, because the pg_dump run is executed before the row-inserting transaction commits, and so it won't include that new row. I'd counsel thinking about launching periodic pg_dumps via a cron job, or some such, instead. Also see the various replication tools that are available. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend