X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A6F0F5294A for ; Thu, 14 Apr 2005 12:48:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18828-04 for ; Thu, 14 Apr 2005 15:48:03 +0000 (GMT) Received: from web53505.mail.yahoo.com (web53505.mail.yahoo.com [206.190.37.66]) by svr1.postgresql.org (Postfix) with SMTP id 6DA2853BA6 for ; Thu, 14 Apr 2005 12:48:02 -0300 (ADT) Received: (qmail 85176 invoked by uid 60001); 14 Apr 2005 15:48:00 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=m7Urpehw54vbrIvfyiJK7GYmL//7+7e8XAaQ5NWNiFU8v+WTBGxy/GCc/ZKIrmzg6ExEugIN7UUZr7EpvRA47LdZwtnvNmoEFgACgEa+K+f/CufSsB+pn+GsaqhPUWxzqmit5O9zOEPoK6jqCC5cwuIU67/D7cYc2e5HBrURvZw= ; Message-ID: <20050414154800.85174.qmail@web53505.mail.yahoo.com> Received: from [209.87.238.132] by web53505.mail.yahoo.com via HTTP; Thu, 14 Apr 2005 08:48:00 PDT Date: Thu, 14 Apr 2005 08:48:00 -0700 (PDT) From: jing han Subject: questions about transaction and rollback To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.077 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS, FROM_HAS_ULINE_NUMS X-Spam-Level: * X-Archive-Number: 200504/56 X-Sequence-Number: 5472 Hello, I have questions about transaction and rollback. Question 1: In the postgresql.conf file of our running system, autocommit=true. If leave it as true, can we disable this attribute when we issue a connection to database? Such as: $db = DBI->connect ( 'DBI:Pg:dbname=xxx', 'user name', 'password', { AutoCommit => 0 } ) Question 2: If we use the following command to restore database. system("su -l postgres -c \"psql -d dbname -f /tmp/db_dump\""); Can command psql rollback if in the middle of restore power failure happens? Question 3: During restore, if power failure happens, we want to rollback everything having been inserted or updated to database. In another word, if we are restoring a database with thousands of turples changes, at the time, we restore the last turple, power failure happens, we want to rollback. Can postgres support huge data changes in one transaction block? How to configure the limit of how much we can do in one transaction block? Hope to hear from you soon and thank you in advance. Best Regards jing __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/