| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
| Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Useless "Replica Identity: NOTHING" noise from psql \d | 
| Date: | 2014-03-26 15:28:59 | 
| Message-ID: | 20140326152859.GA24628@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Wed, Mar 26, 2014 at 12:20:07PM -0300, Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > On Mon, Mar 24, 2014 at 09:07:07PM -0400, Bruce Momjian wrote:
> > > > In the "INDEX" case, should the output mention specifically which index
> > > > is being considered?
> > > 
> > > Ah, good idea.  Updated patch attached.  The output is now:
> > > 
> > > 	test=> \d+ test
> > > 	                         Table "public.test"
> > > 	 Column |  Type   | Modifiers | Storage | Stats target | Description
> > > 	--------+---------+-----------+---------+--------------+-------------
> > > 	 x      | integer | not null  | plain   |              |
> > > 	Indexes:
> > > 	    "test_pkey" PRIMARY KEY, btree (x) REPLICA IDENTITY
> > > 	    "i_test2" btree (x)
> > > -->	Replica Identity: USING INDEX "test_pkey"
> > > 	Has OIDs: no
> > > 
> > > However, now that I look at it, it seems redundant as REPLICA IDENTITY
> > > is already marked on the actual index.  Ideas?
> > 
> > Hearing nothing, I have gone back to the previous patch that just marks
> > replica identity as USING INDEX;  applied patch attached.
> 
> Not opposed to this, but it seems a bit strange; REPLICA IDENTITY is a
> property of the table, not of any individual index.  I think we should
> lose the token in the "Indexes" section.
That is an interesting idea.  It would mean that \d table would not show
anything about replica identity, because right now it does:
	test=> \d test
	     Table "public.test"
	 Column |  Type   | Modifiers
	--------+---------+-----------
	 x      | integer | not null
	Indexes:
	    "test_pkey" PRIMARY KEY, btree (x) REPLICA IDENTITY
That seems logical. So under the new plan, \d would show:
	test=> \d test
	     Table "public.test"
	 Column |  Type   | Modifiers
	--------+---------+-----------
	 x      | integer | not null
	Indexes:
	    "test_pkey" PRIMARY KEY, btree (x)
and \d+ would show:
 	test=> \d+ test
 	                         Table "public.test"
 	 Column |  Type   | Modifiers | Storage | Stats target | Description
 	--------+---------+-----------+---------+--------------+-------------
 	 x      | integer | not null  | plain   |              |
 	Indexes:
 	    "test_pkey" PRIMARY KEY, btree (x)
	Replica Identity: USING INDEX "test_pkey"
 	Has OIDs: no
-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
+ Everyone has their own god. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-03-26 15:37:28 | Re: small regression adjustment | 
| Previous Message | Alvaro Herrera | 2014-03-26 15:20:07 | Re: Useless "Replica Identity: NOTHING" noise from psql \d |