Re: cursor with hold must be save to disk?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: 黄宁 <huangning0722(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: cursor with hold must be save to disk?
Date: 2023-04-14 15:30:29
Message-ID: 2c62dd64316c1cf8b49bb4298603a73488e5d7be.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2023-04-14 at 19:04 +0800, 黄宁 wrote:
> i want to use cursor with hold ,but when I declare a curosr , it takes a long
> time to save the result set to disk. can i save the query state in memory?
> and fetch forward the next result.

The complete result set has to be materialized. It only spills to disk if it
is large. That cannot be avoided.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message GF 2023-04-14 16:03:54 Re: [Extern] Re: Is a logical replication crash recovery safe?
Previous Message Adrian Klaver 2023-04-14 15:11:06 Re: cursor with hold must be save to disk?