From b_ki@hotmail.com Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id CF7BC632842 for ; Mon, 5 Jul 2010 14:00:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 92804-06 for ; Mon, 5 Jul 2010 17:00:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc1-s20.bay0.hotmail.com (bay0-omc1-s20.bay0.hotmail.com [65.54.190.31]) by mail.postgresql.org (Postfix) with ESMTP id DA94B6324D7 for ; Mon, 5 Jul 2010 14:00:45 -0300 (ADT) Received: from BAY149-W4 ([65.54.190.61]) by bay0-omc1-s20.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 5 Jul 2010 10:00:43 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_0ff6a9ce-98ed-4283-af79-9b2480bc6896_" X-Originating-IP: [69.243.212.79] From: Balkrishna Sharma To: Subject: Change to 'timing on' globally Date: Mon, 5 Jul 2010 13:00:44 -0400 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 05 Jul 2010 17:00:43.0886 (UTC) FILETIME=[9B0D20E0:01CB1C63] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/9 X-Sequence-Number: 35028 --_0ff6a9ce-98ed-4283-af79-9b2480bc6896_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I know that we can toggle the timing at session level by using \timing in p= sql. Is there a way to set the default to 'timing on' globally across the databa= se or atleast across all psql statements by a specificied user ? Thanks=2C-Bala =20 _________________________________________________________________ The New Busy is not the too busy. Combine all your e-mail accounts with Hot= mail. http://www.windowslive.com/campaign/thenewbusy?tile=3Dmultiaccount&ocid=3DP= ID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4= --_0ff6a9ce-98ed-4283-af79-9b2480bc6896_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I know that we can toggle the timing at session level by using \timing in p= sql.

Is there a way to set the default to 'timing on' gl= obally across the database or atleast across all psql statements by a speci= ficied user ?

Thanks=2C
-Bala


The New Busy is not the too busy. Combine all your e-mail accounts = with Hotmail. Get busy. = --_0ff6a9ce-98ed-4283-af79-9b2480bc6896_-- From alvherre@commandprompt.com Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DA546632A67 for ; Mon, 5 Jul 2010 14:11:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 63196-01 for ; Mon, 5 Jul 2010 17:11:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (unknown [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id A129F632842 for ; Mon, 5 Jul 2010 14:11:19 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 004C2348037; Mon, 5 Jul 2010 10:10:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9D2+Y9-YUKQL; Mon, 5 Jul 2010 10:10:52 -0700 (PDT) Received: from alvh.no-ip.org (unknown [186.10.215.251]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 7BC6C348035; Mon, 5 Jul 2010 10:10:51 -0700 (PDT) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 3E5B6438219; Mon, 5 Jul 2010 13:10:30 -0400 (CDT) Content-Type: text/plain; charset=utf8 Cc: pgsql-admin Subject: Re: Change to 'timing on' globally From: Alvaro Herrera To: Balkrishna Sharma In-reply-to: References: Date: Mon, 05 Jul 2010 13:10:30 -0400 Message-Id: <1278349811-sup-6775@alvh.no-ip.org> User-Agent: Sup/0.11 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.593 tagged_above=-10 required=5 tests=BAYES_50=0.8, RDNS_NONE=0.793 X-Spam-Level: * X-Archive-Number: 201007/10 X-Sequence-Number: 35029 Excerpts from Balkrishna Sharma's message of lun jul 05 13:00:44 -0400 2010: > > I know that we can toggle the timing at session level by using \timing in psql. > Is there a way to set the default to 'timing on' globally across the database or atleast across all psql statements by a specificied user ? .psqlrc ? From b_ki@hotmail.com Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 817FA632EFC for ; Mon, 5 Jul 2010 16:40:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 33528-02 for ; Mon, 5 Jul 2010 19:40:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc1-s19.bay0.hotmail.com (bay0-omc1-s19.bay0.hotmail.com [65.54.190.30]) by mail.postgresql.org (Postfix) with ESMTP id 6C9C363274F for ; Mon, 5 Jul 2010 16:40:49 -0300 (ADT) Received: from BAY149-W7 ([65.54.190.61]) by bay0-omc1-s19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 5 Jul 2010 12:40:47 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_aab748b3-5cf0-42bd-8aa9-5ad86b924587_" X-Originating-IP: [69.243.212.79] From: Balkrishna Sharma To: CC: Subject: Re: Change to 'timing on' globally Date: Mon, 5 Jul 2010 15:40:47 -0400 Importance: Normal In-Reply-To: <1278349811-sup-6775@alvh.no-ip.org> References: , <1278349811-sup-6775@alvh.no-ip.org> MIME-Version: 1.0 X-OriginalArrivalTime: 05 Jul 2010 19:40:47.0370 (UTC) FILETIME=[F72C7EA0:01CB1C79] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/11 X-Sequence-Number: 35030 --_aab748b3-5cf0-42bd-8aa9-5ad86b924587_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks. If I want to do at system-wide level=2C where do I store the psqlrc= file (assuming I want to change the timing behavior system-wide)? (CentOS 5=2C Postgres 8.4) $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just creatin= g the directory and putting a psqlrc file over there does not seem to work. On a side-note=2C I observered that timing value in ~/.psqlrc was ignored b= y psql -c "..." command but not by echo "...."|psqlThought it was strange. > CC: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Change to 'timing on' globally > From: alvherre@commandprompt.com > To: b_ki@hotmail.com > Date: Mon=2C 5 Jul 2010 13:10:30 -0400 >=20 > Excerpts from Balkrishna Sharma's message of lun jul 05 13:00:44 -0400 20= 10: > >=20 > > I know that we can toggle the timing at session level by using \timing = in psql. > > Is there a way to set the default to 'timing on' globally across the da= tabase or atleast across all psql statements by a specificied user ? >=20 > .psqlrc ? >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin =20 _________________________________________________________________ Hotmail has tools for the New Busy. Search=2C chat and e-mail from your inb= ox. http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O= N:WL:en-US:WM_HMP:042010_1= --_aab748b3-5cf0-42bd-8aa9-5ad86b924587_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks. If I want to do at system-wide level=2C where do I store the psqlrc= file (assuming I want to change the timing behavior system-wide)?

=
(CentOS 5=2C Postgres 8.4)

$ ./pg_config= --sysconfdir
/opt/PostgreSQL/8.4/etc/postgresql

But I don't have =3B/opt/PostgreSQL/8.4/etc/postgresql directo= ry. Just creating the directory and putting a psqlrc file over there does n= ot seem to work.


On a side-note=2C = I observered that timing value in ~/.psqlrc was ignored by psql -c "..." co= mmand but not by echo "...."|psql
Thought it was strange.




>=3B CC: pgsql-admin@postg= resql.org
>=3B Subject: Re: [ADMIN] Change to 'timing on' globally
= >=3B From: alvherre@commandprompt.com
>=3B To: b_ki@hotmail.com
&= gt=3B Date: Mon=2C 5 Jul 2010 13:10:30 -0400
>=3B
>=3B Excerpts = from Balkrishna Sharma's message of lun jul 05 13:00:44 -0400 2010:
>= =3B >=3B
>=3B >=3B I know that we can toggle the timing at sessio= n level by using \timing in psql.
>=3B >=3B Is there a way to set th= e default to 'timing on' globally across the database or atleast across all= psql statements by a specificied user ?
>=3B
>=3B .psqlrc ?
= >=3B
>=3B --
>=3B Sent via pgsql-admin mailing list (pgsql-ad= min@postgresql.org)
>=3B To make changes to your subscription:
>= =3B http://www.postgresql.org/mailpref/pgsql-admin
=

Hotmail has tools for the New Busy. Search=2C chat and e-mai= l from your inbox. L= earn more. = --_aab748b3-5cf0-42bd-8aa9-5ad86b924587_-- From tim@tim-landscheidt.de Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 017E4632672 for ; Mon, 5 Jul 2010 17:16:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 08249-01 for ; Mon, 5 Jul 2010 20:16:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 2A2736332BE for ; Mon, 5 Jul 2010 17:16:30 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OVs5b-0005c2-AU for pgsql-docs@postgresql.org; Mon, 05 Jul 2010 22:16:27 +0200 Received: from d222146.adsl.hansenet.de ([80.171.222.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Jul 2010 22:16:27 +0200 Received: from tim by d222146.adsl.hansenet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Jul 2010 22:16:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-docs@postgresql.org To: pgsql-docs@postgresql.org From: Tim Landscheidt Subject: "Localizing" paths? Date: Mon, 05 Jul 2010 20:16:15 +0000 Organization: Lines: 21 Message-ID: References: <1278349811-sup-6775@alvh.no-ip.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: d222146.adsl.hansenet.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:O3kb7YYY1gRq/urTnGrKv/2jmKc= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/52 X-Sequence-Number: 5708 Balkrishna Sharma wrote on -admin: > Thanks. If I want to do at system-wide level, where do I store the psqlrc file (assuming I want to change the timing behavior system-wide)? > (CentOS 5, Postgres 8.4) > $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql > But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just creating the directory and putting a psqlrc file over there does not seem to work. > [...] This got me wondering: With the 8.4 RPMs, in psql's man page, there is an unexplained "*PREFIX*/share/psqlrc.sample"; the sample psqlrc installed in /usr/share/pgsql/psqlrc.sample (sic!) says: | -- Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and | -- rename it psqlrc. Would it be feasible and desirable to "localize" the paths in the configure stage? Pro: Fewer guesses by new users. Con: Adds another level of complexity to the build system. Tim From tgl@sss.pgh.pa.us Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 08672635DDC for ; Mon, 5 Jul 2010 21:13:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 25669-04-2 for ; Tue, 6 Jul 2010 00:13:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7C5D8635371 for ; Mon, 5 Jul 2010 21:08:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o6608dDY013258; Mon, 5 Jul 2010 20:08:39 -0400 (EDT) To: Tim Landscheidt cc: pgsql-docs@postgresql.org Subject: Re: "Localizing" paths? In-reply-to: References: <1278349811-sup-6775@alvh.no-ip.org> Comments: In-reply-to Tim Landscheidt message dated "Mon, 05 Jul 2010 20:16:15 -0000" Date: Mon, 05 Jul 2010 20:08:39 -0400 Message-ID: <13257.1278374919@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/53 X-Sequence-Number: 5709 Tim Landscheidt writes: > Would it be feasible and desirable to "localize" the paths > in the configure stage? Pro: Fewer guesses by new users. > Con: Adds another level of complexity to the build system. The bigger "con" is that anyone reading the docs on-line would be given information that might be inappropriate for their platform. regards, tom lane From tim@tim-landscheidt.de Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 59E79633387 for ; Tue, 6 Jul 2010 09:39:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 12829-07 for ; Tue, 6 Jul 2010 12:38:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id EB291632CAA for ; Tue, 6 Jul 2010 09:38:53 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OW7QJ-0005mi-52 for pgsql-docs@postgresql.org; Tue, 06 Jul 2010 14:38:51 +0200 Received: from d222146.adsl.hansenet.de ([80.171.222.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 14:38:51 +0200 Received: from tim by d222146.adsl.hansenet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 14:38:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-docs@postgresql.org To: pgsql-docs@postgresql.org From: Tim Landscheidt Subject: [PATCH] Clarify that "psql -c" ignores psqlrc files Date: Tue, 06 Jul 2010 12:38:39 +0000 Organization: Lines: 53 Message-ID: References: <1278349811-sup-6775@alvh.no-ip.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: d222146.adsl.hansenet.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:NlQJOfz09KZAyVOu7MoX5xYIdos= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01, T_TVD_MIME_NO_HEADERS=0.01 X-Spam-Level: X-Archive-Number: 201007/56 X-Sequence-Number: 5712 --=-=-= Balkrishna Sharma wrote on -admin: > Thanks. If I want to do at system-wide level, where do I store the psqlrc file (assuming I want to change the timing behavior system-wide)? > (CentOS 5, Postgres 8.4) > $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql > But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just creating the directory and putting a psqlrc file over there does not seem to work. > On a side-note, I observered that timing value in ~/.psqlrc was ignored by psql -c "..." command but not by echo "...."|psqlThought it was strange. > [...] Patch attached to clarify the latter. Tim --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=psql-clarify-c-option.patch Content-Description: Patch to clarify that \"psql -c\" ignores psqlrc files diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index df06517..4f3ef5c 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -79,7 +79,9 @@ PostgreSQL documentation Specifies that psql is to execute one command string, command, - and then exit. This is useful in shell scripts. + and then exit. This is useful in shell scripts. Start-up files + (psqlrc and ~/.psqlrc) are + ignored with this option. command must be either @@ -3090,10 +3092,12 @@ $endif - Before starting up, psql attempts to + Unless it is passed an + or option, + psql attempts to read and execute commands from the system-wide psqlrc file and the user's - ~/.psqlrc file. + ~/.psqlrc file before starting up. (On Windows, the user's startup file is named %APPDATA%\postgresql\psqlrc.conf.) See PREFIX/share/psqlrc.sample --=-=-=-- From tim@tim-landscheidt.de Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B7A1663237A for ; Tue, 6 Jul 2010 09:54:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 82281-05 for ; Tue, 6 Jul 2010 12:54:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 3D88F632198 for ; Tue, 6 Jul 2010 09:54:01 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OW7ew-0005gr-Ml for pgsql-docs@postgresql.org; Tue, 06 Jul 2010 14:53:58 +0200 Received: from d222146.adsl.hansenet.de ([80.171.222.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 14:53:58 +0200 Received: from tim by d222146.adsl.hansenet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 14:53:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-docs@postgresql.org To: pgsql-docs@postgresql.org From: Tim Landscheidt Subject: Re: "Localizing" paths? Date: Tue, 06 Jul 2010 12:53:45 +0000 Organization: Lines: 25 Message-ID: References: <1278349811-sup-6775@alvh.no-ip.org> <13257.1278374919@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: d222146.adsl.hansenet.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:5A1ZzHoB57I+trAy0EbsuFR6KG4= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-5 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/57 X-Sequence-Number: 5713 Tom Lane wrote: >> Would it be feasible and desirable to "localize" the paths >> in the configure stage? Pro: Fewer guesses by new users. >> Con: Adds another level of complexity to the build system. > The bigger "con" is that anyone reading the docs on-line would be > given information that might be inappropriate for their platform. Why? That would only be the case if the on-line docs were copied verbatim from some developer's working directory (or a buildfarm box). I don't know the current workflow, but it shouldn't be a problem to "./configure --host=DOC-DUMMY && make www-install". The biggest con I see is with the generation. If I under- stood the discussion on the diagrams correctly, the tar balls for the packagers have the documentation already done, so the generation of the docs would either have to be pushed to a later stage, or the users of packages wouldn't have any benefit at all. So, looking at the pro: Shelved it. Tim From tgl@sss.pgh.pa.us Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4710D632871 for ; Tue, 6 Jul 2010 11:25:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 71904-03 for ; Tue, 6 Jul 2010 14:25:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A741462F51F for ; Tue, 6 Jul 2010 11:25:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o66EPHUJ027368; Tue, 6 Jul 2010 10:25:17 -0400 (EDT) To: Tim Landscheidt cc: pgsql-docs@postgresql.org Subject: Re: "Localizing" paths? In-reply-to: References: <1278349811-sup-6775@alvh.no-ip.org> <13257.1278374919@sss.pgh.pa.us> Comments: In-reply-to Tim Landscheidt message dated "Tue, 06 Jul 2010 12:53:45 -0000" Date: Tue, 06 Jul 2010 10:25:17 -0400 Message-ID: <27367.1278426317@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/58 X-Sequence-Number: 5714 Tim Landscheidt writes: > Tom Lane wrote: >> The bigger "con" is that anyone reading the docs on-line would be >> given information that might be inappropriate for their platform. > Why? That would only be the case if the on-line docs were > copied verbatim from some developer's working directory (or > a buildfarm box). They have to be built *somewhere* ... regards, tom lane From bruce@momjian.us Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 72ECD632871 for ; Tue, 6 Jul 2010 11:49:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 86620-08 for ; Tue, 6 Jul 2010 14:48:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 114A062F51F for ; Tue, 6 Jul 2010 11:48:52 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o66EmmF10095; Tue, 6 Jul 2010 10:48:48 -0400 (EDT) From: Bruce Momjian Message-Id: <201007061448.o66EmmF10095@momjian.us> Subject: Re: Change to 'timing on' globally In-Reply-To: To: Balkrishna Sharma Date: Tue, 6 Jul 2010 10:48:48 -0400 (EDT) CC: alvherre@commandprompt.com, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/14 X-Sequence-Number: 35033 Balkrishna Sharma wrote: > > Thanks. If I want to do at system-wide level, where do I store the > psqlrc file (assuming I want to change the timing behavior system-wide)? > (CentOS 5, Postgres 8.4) > $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql > But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just > creating the directory and putting a psqlrc file over there does not > seem to work. I just tested it here on Ubuntu and it worked: $ sudo mkdir etc $ sudo mkdir etc/postgresql $ cd etc/postgresql/ $ sudo vi psqlrc # add \echo test $ pwd /opt/PostgreSQL/8.4/etc/postgresql $ ../../bin/psql -U postgres postgres --> test psql (8.4.2) Type "help" for help. postgres=# > On a side-note, I observered that timing value in ~/.psqlrc was > ignored by psql -c "..." command but not by echo "...."|psqlThought > it was strange. Yeah, that is odd. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + From tim@tim-landscheidt.de Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D431E634343 for ; Tue, 6 Jul 2010 12:01:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 42733-04 for ; Tue, 6 Jul 2010 15:01:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id BEEF4632B87 for ; Tue, 6 Jul 2010 12:01:00 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OW9dq-00064q-IV for pgsql-docs@postgresql.org; Tue, 06 Jul 2010 17:00:58 +0200 Received: from d222146.adsl.hansenet.de ([80.171.222.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 17:00:58 +0200 Received: from tim by d222146.adsl.hansenet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 17:00:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-docs@postgresql.org To: pgsql-docs@postgresql.org From: Tim Landscheidt Subject: Re: "Localizing" paths? Date: Tue, 06 Jul 2010 15:00:49 +0000 Organization: Lines: 22 Message-ID: References: <1278349811-sup-6775@alvh.no-ip.org> <13257.1278374919@sss.pgh.pa.us> <27367.1278426317@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: d222146.adsl.hansenet.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:AhDsEriXOIAtETfbsxuivpHtPxY= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-5 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/59 X-Sequence-Number: 5715 Tom Lane wrote: > Tim Landscheidt writes: >> Tom Lane wrote: >>> The bigger "con" is that anyone reading the docs on-line would be >>> given information that might be inappropriate for their platform. >> Why? That would only be the case if the on-line docs were >> copied verbatim from some developer's working directory (or >> a buildfarm box). > They have to be built *somewhere* ... That's why the paragraph read: | Why? That would only be the case if the on-line docs were | copied verbatim from some developer's working directory (or | a buildfarm box). I don't know the current workflow, but it | shouldn't be a problem to "./configure --host=DOC-DUMMY && | make www-install". Tim From b_ki@hotmail.com Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6F2DE6332AE for ; Tue, 6 Jul 2010 12:21:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 42583-01 for ; Tue, 6 Jul 2010 15:20:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc4-s25.bay0.hotmail.com (bay0-omc4-s25.bay0.hotmail.com [65.54.190.227]) by mail.postgresql.org (Postfix) with ESMTP id BA3DF63327D for ; Tue, 6 Jul 2010 12:20:53 -0300 (ADT) Received: from BAY149-W56 ([65.54.190.199]) by bay0-omc4-s25.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 6 Jul 2010 08:20:51 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_b8345835-e341-4b04-83a3-b28dc25b1ffe_" X-Originating-IP: [129.44.63.215] From: Balkrishna Sharma To: CC: , Subject: Re: Change to 'timing on' globally Date: Tue, 6 Jul 2010 11:20:52 -0400 Importance: Normal In-Reply-To: <201007061448.o66EmmF10095@momjian.us> References: , <201007061448.o66EmmF10095@momjian.us> MIME-Version: 1.0 X-OriginalArrivalTime: 06 Jul 2010 15:20:51.0969 (UTC) FILETIME=[D200E710:01CB1D1E] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/15 X-Sequence-Number: 35034 --_b8345835-e341-4b04-83a3-b28dc25b1ffe_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > I just tested it here on Ubuntu and it worked:I followed your steps and i= t worked in the way you indicated=2C on CentOS as well. But it still does n= ot:a. work with psql -c "query" syntax. (Works in echo mode or in interact= ive mode.)b. it does not still seem to work if you fire the queries from a = client box (in any mode - interactive or otherwise)ON SERVER I get:Timing i= s on. now------------------------------ 2010-07-06 11:06:13.167= 34-04(1 row)Time: 0.574 ms ON CLIENT I just get: now------------------------------- 2010-= 07-06 11:06:28.455395-04(1 row) ~~~~~~~~~~~~~~~~~~~~Basically I am firing a lot of psql through unix script= on several client machines and a lot of the psql are hanging for some othe= r reasons. I also need to capture the timing of each query. So I need timin= g to be on. Doing the following captures the timing but I don't know which psql stateme= nt is hanging when I do ps aux|grep psqlecho '\timing \\select * from ....= ....' | psqlOn ps aux|grep psql I just see:> ps aux|grep psql2255 0.0 0.0= 155636 1668 pts/1 S Jul05 0:00 psql3883 0.0 0.0 155636 1676 pt= s/1 S Jul05 0:00 psql4672 0.0 0.0 155636 1672 pts/1 S Jul0= 5 0:00 psql4713 0.0 0.0 155636 1672 pts/1 S Jul05 0:00 psql473= 7 0.0 0.0 155636 1672 pts/1 S Jul05 0:00 psql4798 0.0 0.0 1556= 36 1668 pts/1 S Jul05 0:00 psql5050 0.0 0.0 155636 1676 pts/1 = S Jul05 0:00 psql5086 0.0 0.0 155636 1668 pts/1 S Jul05 0= :00 psql5405 0.0 0.0 155636 1668 pts/1 S Jul05 0:00 psql7255 0.= 0 0.0 155644 1796 pts/1 S Jul05 0:00 psql psql -c 'select * from "DAPP".student_common_data where student_id =3D 100= 0 and field_id =3D1988=3B' does make the ps aux more informative but it do= es not capture the query timing. From what I understand you cannot mix ('t= iming + query') in "-c" mode. So trying to set 'timing on' outside the individual queries (and preferably= outside the client machines) somewhere on the server so that psql -c on cl= ient would capture the timing automatically. > From: bruce@momjian.us > Subject: Re: [ADMIN] Change to 'timing on' globally > To: b_ki@hotmail.com > Date: Tue=2C 6 Jul 2010 10:48:48 -0400 > CC: alvherre@commandprompt.com=3B pgsql-admin@postgresql.org >=20 > Balkrishna Sharma wrote: > >=20 > > Thanks. If I want to do at system-wide level=2C where do I store the > > psqlrc file (assuming I want to change the timing behavior system-wide)= ? >=20 > > (CentOS 5=2C Postgres 8.4) > > $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql >=20 > > But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just > > creating the directory and putting a psqlrc file over there does not > > seem to work. >=20 > I just tested it here on Ubuntu and it worked: >=20 > $ sudo mkdir etc > $ sudo mkdir etc/postgresql > $ cd etc/postgresql/ > $ sudo vi psqlrc > # add \echo test > $ pwd > /opt/PostgreSQL/8.4/etc/postgresql > $ ../../bin/psql -U postgres postgres > --> test > psql (8.4.2) > Type "help" for help. > =09 > postgres=3D#=20 >=20 > > On a side-note=2C I observered that timing value in ~/.psqlrc was > > ignored by psql -c "..." command but not by echo "...."|psqlThought > > it was strange. >=20 > Yeah=2C that is odd. >=20 > --=20 > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com >=20 > + None of us is going to be here forever. + =20 _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your = inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O= N:WL:en-US:WM_HMP:042010_2= --_b8345835-e341-4b04-83a3-b28dc25b1ffe_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >=3B I just tested it here on Ubuntu and it worked:
I followed your s= teps and it worked in the way you indicated=2C on CentOS as well. But it st= ill does not:
a. work with psql -c "query" syntax. (Works  = =3Bin echo mode or in interactive mode.)
b. it does not still see= m to work if you fire the queries from a client box (in any mode - interact= ive or otherwise)
ON SERVER I get:
Timing is on.
 =3B =3B  =3B  =3B  =3B  =3B  =3B now<= /div>
------------------------------
 =3B2010-07-06 11:06= :13.16734-04
(1 row)
Time: 0.574 ms

ON CLIENT I just get:
 =3B&nb= sp=3B  =3B  =3B  =3B  =3B  =3B  =3Bnow
--= -----------------------------
 =3B2010-07-06 11:06:28.455395-= 04
(1 row)


~~~~~~~~= ~~~~~~~~~~~~
Basically I am firing a lot of psql through unix scr= ipt on several client machines and a lot of the psql are hanging for some o= ther reasons. I also need to capture the timing of each query. So I need ti= ming to be on.

Doing the following captures the ti= ming but I don't know which psql statement is hanging when I do ps aux|grep= psql
echo '\timing \\select * from  =3B........' | psql
On ps aux|grep psql I just see:
>=3B ps aux|grep psq= l
2255  =3B0.0  =3B0.0 155636  =3B1668 pts/1  =3B=  =3BS  =3B  =3BJul05  =3B 0:00 psql
3883  = =3B0.0  =3B0.0 155636  =3B1676 pts/1  =3B  =3BS  =3B &n= bsp=3BJul05  =3B 0:00 psql
4672  =3B0.0  =3B0.0 15563= 6  =3B1672 pts/1  =3B  =3BS  =3B  =3BJul05  =3B 0:0= 0 psql
4713  =3B0.0  =3B0.0 155636  =3B1672 pts/1 &nb= sp=3B  =3BS  =3B  =3BJul05  =3B 0:00 psql
4737 &n= bsp=3B0.0  =3B0.0 155636  =3B1672 pts/1  =3B  =3BS  =3B=  =3BJul05  =3B 0:00 psql
4798  =3B0.0  =3B0.0 15= 5636  =3B1668 pts/1  =3B  =3BS  =3B  =3BJul05  =3B = 0:00 psql
5050  =3B0.0  =3B0.0 155636  =3B1676 pts/1 =  =3B  =3BS  =3B  =3BJul05  =3B 0:00 psql
5086=  =3B0.0  =3B0.0 155636  =3B1668 pts/1  =3B  =3BS  = =3B  =3BJul05  =3B 0:00 psql
5405  =3B0.0  =3B0.0= 155636  =3B1668 pts/1  =3B  =3BS  =3B  =3BJul05  = =3B 0:00 psql
7255  =3B0.0  =3B0.0 155644  =3B1796 pt= s/1  =3B  =3BS  =3B  =3BJul05  =3B 0:00 psql


psql -c 'select * from  =3B"DAPP".s= tudent_common_data where student_id =3D 1000 and field_id =3D1988=3B'  = =3Bdoes make the ps aux more informative but it does not capture the query = timing. From what I understand you cannot mix  =3B('timing + query') in= "-c" mode.

So trying to set 'timing on' outside t= he individual queries (and preferably outside the client machines) somewher= e on the server so that psql -c on client would capture the timing automati= cally.




>=3B From: bruce@m= omjian.us
>=3B Subject: Re: [ADMIN] Change to 'timing on' globally
= >=3B To: b_ki@hotmail.com
>=3B Date: Tue=2C 6 Jul 2010 10:48:48 -040= 0
>=3B CC: alvherre@commandprompt.com=3B pgsql-admin@postgresql.org>=3B
>=3B Balkrishna Sharma wrote:
>=3B >=3B
>=3B >= =3B Thanks. If I want to do at system-wide level=2C where do I store the>=3B >=3B psqlrc file (assuming I want to change the timing behavior s= ystem-wide)?
>=3B
>=3B >=3B (CentOS 5=2C Postgres 8.4)
>= =3B >=3B $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql
= >=3B
>=3B >=3B But I don't have /opt/PostgreSQL/8.4/etc/postgresq= l directory. Just
>=3B >=3B creating the directory and putting a psq= lrc file over there does not
>=3B >=3B seem to work.
>=3B
&= gt=3B I just tested it here on Ubuntu and it worked:
>=3B
>=3B = $ sudo mkdir etc
>=3B $ sudo mkdir etc/postgresql
>=3B $ cd etc= /postgresql/
>=3B $ sudo vi psqlrc
>=3B # add \echo test
>= =3B $ pwd
>=3B /opt/PostgreSQL/8.4/etc/postgresql
>=3B $ ../..= /bin/psql -U postgres postgres
>=3B -->=3B test
>=3B psql (8.4= .2)
>=3B Type "help" for help.
>=3B
>=3B postgres=3D# >=3B
>=3B >=3B On a side-note=2C I observered that timing value= in ~/.psqlrc was
>=3B >=3B ignored by psql -c "..." command but not= by echo "...."|psqlThought
>=3B >=3B it was strange.
>=3B
= >=3B Yeah=2C that is odd.
>=3B
>=3B --
>=3B Bruce Momj= ian <=3Bbruce@momjian.us>=3B http://momjian.us
>=3B Ente= rpriseDB http://enterprisedb.com
>=3B
= >=3B + None of us is going to be here forever. +
<= br />
Hotmail is redefining busy with tools for the New Busy. Get more= from your inbox. Se= e how. = --_b8345835-e341-4b04-83a3-b28dc25b1ffe_-- From bruce@momjian.us Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 128D1632B87 for ; Tue, 6 Jul 2010 12:29:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 17299-05 for ; Tue, 6 Jul 2010 15:29:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 4806D62F51F for ; Tue, 6 Jul 2010 12:29:14 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o66FTCX15444; Tue, 6 Jul 2010 11:29:12 -0400 (EDT) From: Bruce Momjian Message-Id: <201007061529.o66FTCX15444@momjian.us> Subject: Re: Change to 'timing on' globally In-Reply-To: To: Balkrishna Sharma Date: Tue, 6 Jul 2010 11:29:12 -0400 (EDT) CC: alvherre@commandprompt.com, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/16 X-Sequence-Number: 35035 Balkrishna Sharma wrote: > > > I just tested it here on Ubuntu and it worked:I followed your steps and it worked in the way you indicated, on CentOS as well. But it still does not:a. work with psql -c "query" syntax. (Works in echo mode or in interactive mode.)b. it does not still seem to work if you fire the queries from a client box (in any mode - interactive or otherwise)ON SERVER I get:Timing is on. now------------------------------ 2010-07-06 11:06:13.16734-04(1 row)Time: 0.574 ms > > ON CLIENT I just get: now------------------------------- 2010-07-06 11:06:28.455395-04(1 row) > > ~~~~~~~~~~~~~~~~~~~~Basically I am firing a lot of psql through unix script on several client machines and a lot of the psql are hanging for some other reasons. I also need to capture the timing of each query. So I need timing to be on. > Doing the following captures the timing but I don't know which psql statement is hanging when I do ps aux|grep psqlecho '\timing \\select * from ........' | psqlOn ps aux|grep psql I just see:> ps aux|grep psql2255 0.0 0.0 155636 1668 pts/1 S Jul05 0:00 psql3883 0.0 0.0 155636 1676 pts/1 S Jul05 0:00 psql4672 0.0 0.0 155636 1672 pts/1 S Jul05 0:00 psql4713 0.0 0.0 155636 1672 pts/1 S Jul05 0:00 psql4737 0.0 0.0 155636 1672 pts/1 S Jul05 0:00 psql4798 0.0 0.0 155636 1668 pts/1 S Jul05 0:00 psql5050 0.0 0.0 155636 1676 pts/1 S Jul05 0:00 psql5086 0.0 0.0 155636 1668 pts/1 S Jul05 0:00 psql5405 0.0 0.0 155636 1668 pts/1 S Jul05 0:00 psql7255 0.0 0.0 155644 1796 pts/1 S Jul05 0:00 psql > > psql -c 'select * from "DAPP".student_common_data where student_id = 1000 and field_id =1988;' does make the ps aux more informative but it does not capture the query timing. From what I understand you cannot mix ('timing + query') in "-c" mode. > So trying to set 'timing on' outside the individual queries (and preferably outside the client machines) somewhere on the server so that psql -c on client would capture the timing automatically. I think you need to look at postgresql.conf variables like log_min_duration_statement, and you are right that psqlrc is only going to be read for clients on the server machine, and only via psql. --------------------------------------------------------------------------- > > > > > From: bruce@momjian.us > > Subject: Re: [ADMIN] Change to 'timing on' globally > > To: b_ki@hotmail.com > > Date: Tue, 6 Jul 2010 10:48:48 -0400 > > CC: alvherre@commandprompt.com; pgsql-admin@postgresql.org > > > > Balkrishna Sharma wrote: > > > > > > Thanks. If I want to do at system-wide level, where do I store the > > > psqlrc file (assuming I want to change the timing behavior system-wide)? > > > > > (CentOS 5, Postgres 8.4) > > > $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql > > > > > But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just > > > creating the directory and putting a psqlrc file over there does not > > > seem to work. > > > > I just tested it here on Ubuntu and it worked: > > > > $ sudo mkdir etc > > $ sudo mkdir etc/postgresql > > $ cd etc/postgresql/ > > $ sudo vi psqlrc > > # add \echo test > > $ pwd > > /opt/PostgreSQL/8.4/etc/postgresql > > $ ../../bin/psql -U postgres postgres > > --> test > > psql (8.4.2) > > Type "help" for help. > > > > postgres=# > > > > > On a side-note, I observered that timing value in ~/.psqlrc was > > > ignored by psql -c "..." command but not by echo "...."|psqlThought > > > it was strange. > > > > Yeah, that is odd. > > > > -- > > Bruce Momjian http://momjian.us > > EnterpriseDB http://enterprisedb.com > > > > + None of us is going to be here forever. + > > _________________________________________________________________ > Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + From peter_e@gmx.net Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A3CC06332AE for ; Tue, 6 Jul 2010 12:36:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 41355-02 for ; Tue, 6 Jul 2010 15:36:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id DA17463327D for ; Tue, 6 Jul 2010 12:36:12 -0300 (ADT) Received: (qmail invoked by alias); 06 Jul 2010 15:36:11 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp069) with SMTP; 06 Jul 2010 17:36:11 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX19jvQRzhnhjgbJ+nK8fgi/zJfDSzhp8ddP0glbr+m MP7cZ4DCljVKry Subject: Re: "Localizing" paths? From: Peter Eisentraut To: Tim Landscheidt Cc: pgsql-docs@postgresql.org In-Reply-To: References: <1278349811-sup-6775@alvh.no-ip.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 06 Jul 2010 18:36:10 +0300 Message-ID: <1278430570.24375.0.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/60 X-Sequence-Number: 5716 On mån, 2010-07-05 at 20:16 +0000, Tim Landscheidt wrote: > Would it be feasible and desirable to "localize" the paths > in the configure stage? Pro: Fewer guesses by new users. > Con: Adds another level of complexity to the build system. The documentation is shipped pre-built in the source tarball. So other than with a sed, we can't really change it to match local situations. From robertmhaas@gmail.com Tue Jun 2 01:38:59 2026 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8DAAB63242D for ; Fri, 9 Jul 2010 21:51:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 10459-03 for ; Sat, 10 Jul 2010 00:51:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 50D76633384 for ; Fri, 9 Jul 2010 21:51:01 -0300 (ADT) Received: by iwn7 with SMTP id 7so2791079iwn.19 for ; Fri, 09 Jul 2010 17:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=DhR0aJMLdJP5hER0SXL6wZvnsPJ544uL6hTCKfrdtqI=; b=XNVYHj5OvLmazJMn6qLcbj7LWRLL3s24C/kyyWOwHebWWHJab3kt68oRsjr1KqgZ0C CvmadXWIAg+XpkRGG6Ono3bNDQaN3DH5S80ndCkZdEMnyTiRtpMLTa5ZtUNRpVDntqO6 onk77nx1GsFiJZ+MGiYl3YTpfNQ/UotSyqha4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nlEjcJR+Qmytu564OysxKkG54QoPW0QxZwm2useiuq7Dawa7YzYnpjm4NMeiDQ3HsA BVslM/mGphJlXWeW+urzR3fEY6ZSfV36V5QXM4tldVT8kGfTqZv/p4dqR764iPmM3EdC l0NuVevTPkWyJq1e2QGugPDYlPNjKA6ibS0lw= MIME-Version: 1.0 Received: by 10.231.30.129 with SMTP id u1mr11280121ibc.63.1278723059446; Fri, 09 Jul 2010 17:50:59 -0700 (PDT) Received: by 10.231.30.131 with HTTP; Fri, 9 Jul 2010 17:50:59 -0700 (PDT) In-Reply-To: References: <1278349811-sup-6775@alvh.no-ip.org> Date: Fri, 9 Jul 2010 20:50:59 -0400 Message-ID: Subject: Re: [PATCH] Clarify that "psql -c" ignores psqlrc files From: Robert Haas To: pgsql-docs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201007/88 X-Sequence-Number: 5744 On Tue, Jul 6, 2010 at 8:38 AM, Tim Landscheidt wrote: > Balkrishna Sharma wrote on -admin: > >> Thanks. If I want to do at system-wide level, where do I store the psqlrc file (assuming I want to change the timing behavior system-wide)? >> (CentOS 5, Postgres 8.4) >> $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql >> But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just creating the directory and putting a psqlrc file over there does not seem to work. > >> On a side-note, I observered that timing value in ~/.psqlrc was ignored by psql -c "..." command but not by echo "...."|psqlThought it was strange. >> [...] > > Patch attached to clarify the latter. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company