Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C2E779FA0EE for ; Fri, 8 Dec 2006 11:47:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 13999-09 for ; Fri, 8 Dec 2006 11:46:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.225]) by postgresql.org (Postfix) with ESMTP id DAFBD9FA040 for ; Fri, 8 Dec 2006 11:46:55 -0400 (AST) Received: by nz-out-0102.google.com with SMTP id i11so522537nzh for ; Fri, 08 Dec 2006 07:46:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=n9hYEnHWa0fV8jc0tbEKA9qvJZPzjIeeKMA30iNpmBdhsYQs66ZVmiJ8vBvwaywhRrfs33PAlry79s0sgdZduN2IHclsP5LnzCvEpDW/3cpHrQg0W4GsOXL+ntadJFycf34Bxg5h4GOCmN+SkJDfZp+u9DWlx/VyZbWmGaILxVc= Received: by 10.35.126.7 with SMTP id d7mr6029230pyn.1165592814296; Fri, 08 Dec 2006 07:46:54 -0800 (PST) Received: by 10.35.80.8 with HTTP; Fri, 8 Dec 2006 07:46:54 -0800 (PST) Message-ID: Date: Fri, 8 Dec 2006 21:16:54 +0530 From: "Rajesh Kumar Mallah" To: "Tom Lane" Subject: Re: Should clients abort in case of server version mismatch ? [ subject modf: as they already warn ] Cc: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/76 X-Sequence-Number: 23868 On 12/8/06, Tom Lane wrote: > "Rajesh Kumar Mallah" writes: > > IMHO for major version mismatch psql should not present the > > user with a prompt at all as certain commands are most likely > > not work. > > The analogy you're drawing with pg_dump is faulty. There are at least > three good reasons for psql to be more forgiving of version mismatches > than pg_dump is: Overall there was no damage at all. > > 1. pg_dump is commonly run noninteractively (eg, from a cron job) where > any mere warning will likely go unnoticed. So it has to raise a hard > error to get the DBA's attention. psql's backslash commands are far > less likely to be used noninteractively, and a failure is usually pretty > obvious to a human user. yep if the scope of problem is limited to \d commands *only* its a nonissue (i was not knowing it). in most automations i think psql would only be acting as a conduit for SQL commands. hence the concerns were not well founded. Warm Regds Mallah. > > 2. pg_dump is critical: if it dumps an unusable backup due to not > understanding the system catalogs of a newer server, the DBA who needs > that backup later will be badly screwed. psql's backslash commands, > again, are not so critical. > > 3. psql offers a pretty decent amount of functionality even if some of > its backslash commands don't work, whereas a dump that is wrong is worse > than useless. So the use-case for operating with a version mismatch is > much wider for psql. > > So I think we have the right tradeoffs in this regard now. > > regards, tom lane >