Re: JDBC: ERROR: portal "C_2" does not exist

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема Re: JDBC: ERROR: portal "C_2" does not exist
Дата
Msg-id CAH7T-aoUuUO3EYHzcdW8QnyYsbeonk1YLpHOyHZwJfipomYxLA@mail.gmail.com
обсуждение исходный текст
Ответ на JDBC: ERROR: portal "C_2" does not exist  (Blake McBride <blake1024@gmail.com>)
Ответы Re: JDBC: ERROR: portal "C_2" does not exist  (Dave Cramer <davecramer@postgres.rocks>)
Re: JDBC: ERROR: portal "C_2" does not exist  (Blake McBride <blake1024@gmail.com>)
Список pgsql-jdbc
When auto commit is diabled and using a non-zero fetch size, the pgjdbc driver creates a portal to read the query results from the server in chunks of fetch size. The portals have a string identifier and the driver generates them sequentially per connection with a "C_" prefix, so "C_1", "C_2", "C_3", ... etc.

As you read results via ResultSet.next(), the driver checks if it has the next row already buffered. If not, it reads from the named portal to retrieve the next chunk of fetchSize quantity of rows.

A fetch size of 50 and the error happening at row 51 likely means that something either closed the portal or the connection itself is not correct.

Are you using a connection pool like pgbouncer in between your Java application and the database server?

If so, the connection pooler must be transaction aware to ensure that the same connection is used throughout the entire transaction.

If not, try creating a minimal example that reproduces the error.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/


 

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Blake McBride
Дата:
Сообщение: JDBC: ERROR: portal "C_2" does not exist
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: JDBC: ERROR: portal "C_2" does not exist