pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17394: pg_dump: query returned 0 rows instead of one:
5+ messages / 4 participants
[nested] [flat]

* BUG #17394: pg_dump: query returned 0 rows instead of one:
@ 2022-02-03 21:40  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 5+ messages in thread

From: PG Bug reporting form @ 2022-02-03 21:40 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: suryasp1010@gmail.com

The following bug has been logged on the website:

Bug reference:      17394
Logged by:          Surya Prakash
Email address:      suryasp1010@gmail.com
PostgreSQL version: 11.13
Operating system:   Windows server 2019
Description:        

pg_dump: saving database definition
pg_dump: query returned 0 rows instead of one: 
SELECT proretset, prosrc, probin, pg_catalog.pg_get_function_arguments(oid)
AS funcargs,pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs,
pg_catalog.pg_get_function_result(oid) AS funcresult,
array_to_string(protrftypes, ' ') AS protrftypes, prokind, provolatile,
proisstrict, prosecdef, proleakproof, proconfig, procost, prorows,
proparallel, (SELECT lanname FROM pg_catalog.pg_language WHERE oid =
prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid =
'1046460'::pg_catalog.oid


I am getting this above error while taking backup of a database.



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

* Re: BUG #17394: pg_dump: query returned 0 rows instead of one:
@ 2022-02-04 12:49  Julien Rouhaud <rjuju123@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 1 reply; 5+ messages in thread

From: Julien Rouhaud @ 2022-02-04 12:49 UTC (permalink / raw)
  To: suryasp1010@gmail.com; pgsql-bugs@lists.postgresql.org

Hi,

On Thu, Feb 03, 2022 at 09:40:07PM +0000, PG Bug reporting form wrote:
> 
> pg_dump: saving database definition
> pg_dump: query returned 0 rows instead of one: 
> SELECT proretset, prosrc, probin, pg_catalog.pg_get_function_arguments(oid)
> AS funcargs,pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs,
> pg_catalog.pg_get_function_result(oid) AS funcresult,
> array_to_string(protrftypes, ' ') AS protrftypes, prokind, provolatile,
> proisstrict, prosecdef, proleakproof, proconfig, procost, prorows,
> proparallel, (SELECT lanname FROM pg_catalog.pg_language WHERE oid =
> prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid =
> '1046460'::pg_catalog.oid
> 
> 
> I am getting this above error while taking backup of a database.

Is the problem reproducible?

Can you try to execute the query on the target database, before and after
executing those queries:

SET enable_indexscan = off;
SET enable_indexonlyscan = off;
SET enable_bitmapscan = off;

If you the query returns a result after the 3 SET enable_* queries, it means
that you have at least one corrupted index.  You could fix the situation (at
least for this specific problem) with a
REINDEX TABLE pg_proc;

But you will have to investigate how you get a corruption in the first place
(faulty hardware, inadequate configuration...), and maybe do more thorough
checks on your database(s).  See for instance
https://www.postgresql.org/docs/11/amcheck.html.





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

* Re: BUG #17394: pg_dump: query returned 0 rows instead of one:
@ 2022-02-04 14:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2022-02-04 14:47 UTC (permalink / raw)
  To: suryasp1010@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> pg_dump: query returned 0 rows instead of one: 
> SELECT proretset, prosrc, probin, pg_catalog.pg_get_function_arguments(oid)
> AS funcargs,pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs,
> pg_catalog.pg_get_function_result(oid) AS funcresult,
> array_to_string(protrftypes, ' ') AS protrftypes, prokind, provolatile,
> proisstrict, prosecdef, proleakproof, proconfig, procost, prorows,
> proparallel, (SELECT lanname FROM pg_catalog.pg_language WHERE oid =
> prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid =
> '1046460'::pg_catalog.oid

If it's repeatable, maybe reindexing pg_proc would help.

			regards, tom lane





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

* Re: BUG #17394: pg_dump: query returned 0 rows instead of one:
@ 2022-02-05 21:28  Surya Prakash <suryasp1010@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Surya Prakash @ 2022-02-05 21:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

Hi Tom,

That works for me, Thanks alot.

Thanks,
Surya

On Fri, 4 Feb 2022 at 20:17, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> PG Bug reporting form <noreply@postgresql.org> writes:
> > pg_dump: query returned 0 rows instead of one:
> > SELECT proretset, prosrc, probin,
> pg_catalog.pg_get_function_arguments(oid)
> > AS funcargs,pg_catalog.pg_get_function_identity_arguments(oid) AS
> funciargs,
> > pg_catalog.pg_get_function_result(oid) AS funcresult,
> > array_to_string(protrftypes, ' ') AS protrftypes, prokind, provolatile,
> > proisstrict, prosecdef, proleakproof, proconfig, procost, prorows,
> > proparallel, (SELECT lanname FROM pg_catalog.pg_language WHERE oid =
> > prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid =
> > '1046460'::pg_catalog.oid
>
> If it's repeatable, maybe reindexing pg_proc would help.
>
>                         regards, tom lane
>

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

* Re: BUG #17394: pg_dump: query returned 0 rows instead of one:
@ 2022-02-05 21:29  Surya Prakash <suryasp1010@gmail.com>
  parent: Julien Rouhaud <rjuju123@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Surya Prakash @ 2022-02-05 21:29 UTC (permalink / raw)
  To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

Hi Julien,

Thanks a lot, that worked for me.

Thanks,
Surya

On Fri, 4 Feb 2022 at 18:19, Julien Rouhaud <rjuju123@gmail.com> wrote:

> Hi,
>
> On Thu, Feb 03, 2022 at 09:40:07PM +0000, PG Bug reporting form wrote:
> >
> > pg_dump: saving database definition
> > pg_dump: query returned 0 rows instead of one:
> > SELECT proretset, prosrc, probin,
> pg_catalog.pg_get_function_arguments(oid)
> > AS funcargs,pg_catalog.pg_get_function_identity_arguments(oid) AS
> funciargs,
> > pg_catalog.pg_get_function_result(oid) AS funcresult,
> > array_to_string(protrftypes, ' ') AS protrftypes, prokind, provolatile,
> > proisstrict, prosecdef, proleakproof, proconfig, procost, prorows,
> > proparallel, (SELECT lanname FROM pg_catalog.pg_language WHERE oid =
> > prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid =
> > '1046460'::pg_catalog.oid
> >
> >
> > I am getting this above error while taking backup of a database.
>
> Is the problem reproducible?
>
> Can you try to execute the query on the target database, before and after
> executing those queries:
>
> SET enable_indexscan = off;
> SET enable_indexonlyscan = off;
> SET enable_bitmapscan = off;
>
> If you the query returns a result after the 3 SET enable_* queries, it
> means
> that you have at least one corrupted index.  You could fix the situation
> (at
> least for this specific problem) with a
> REINDEX TABLE pg_proc;
>
> But you will have to investigate how you get a corruption in the first
> place
> (faulty hardware, inadequate configuration...), and maybe do more thorough
> checks on your database(s).  See for instance
> https://www.postgresql.org/docs/11/amcheck.html.
>

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


end of thread, other threads:[~2022-02-05 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 21:40 BUG #17394: pg_dump: query returned 0 rows instead of one: PG Bug reporting form <noreply@postgresql.org>
2022-02-04 12:49 ` Julien Rouhaud <rjuju123@gmail.com>
2022-02-05 21:29   ` Surya Prakash <suryasp1010@gmail.com>
2022-02-04 14:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-02-05 21:28   ` Surya Prakash <suryasp1010@gmail.com>

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