pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18112: pgstattuple of sequence failed
2+ messages / 2 participants
[nested] [flat]

* BUG #18112: pgstattuple of sequence failed
@ 2023-09-15 10:47 PG Bug reporting form <noreply@postgresql.org>
  2023-09-20 08:26 ` Re: BUG #18112: pgstattuple of sequence failed Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2023-09-15 10:47 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: bchen90@163.com

The following bug has been logged on the website:

Bug reference:      18112
Logged by:          Bo Chen
Email address:      bchen90@163.com
PostgreSQL version: 15.2
Operating system:   euleros
Description:        

I found pgstattuple of sequence will be failed but not PG11.x, for the code
of pgstattuple it looks like still support of sequence, but the
"rel->rd_rel->relam now is 0, not HEAP_TABLE_AM_OID", so the error report

postgres=# drop Sequence test;
DROP SEQUENCE
postgres=# create Sequence test;
CREATE SEQUENCE
postgres=# select pgstattuple('test');
ERROR:  SQLSTATE 0A000: only heap AM is supported
LOCATION:  pgstat_heap, pgstattuple.c:322
postgres=#



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #18112: pgstattuple of sequence failed
  2023-09-15 10:47 BUG #18112: pgstattuple of sequence failed PG Bug reporting form <noreply@postgresql.org>
@ 2023-09-20 08:26 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2023-09-20 08:26 UTC (permalink / raw)
  To: bchen90@163.com; pgsql-bugs@lists.postgresql.org

On 2023-Sep-15, PG Bug reporting form wrote:

> I found pgstattuple of sequence will be failed but not PG11.x, for the code
> of pgstattuple it looks like still support of sequence, but the
> "rel->rd_rel->relam now is 0, not HEAP_TABLE_AM_OID", so the error report
> 
> postgres=# select pgstattuple('test');
> ERROR:  SQLSTATE 0A000: only heap AM is supported

OK, but so what?  I mean, what useful information are you extracting
using pgstattuple from a sequence?  What decisions can you make based on
these results?

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"We're here to devour each other alive"            (Hobbes)





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-09-20 08:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15 10:47 BUG #18112: pgstattuple of sequence failed PG Bug reporting form <noreply@postgresql.org>
2023-09-20 08:26 ` Alvaro Herrera <alvherre@alvh.no-ip.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox