Unexpected results from a query with UNION ALL

2025-01-04 Thread Andrey
Hi everyone, Recently I got unexpected results from a query that seems to be legit. The setup is like this: -- setup CREATE TABLE parents ( id uuidnot null primary key, revision integer not null ); CREATE TABLE children ( iduuidnot null primary key, parent_id

Re: PostgreSQL 15.5 stops processing user queries

2023-12-26 Thread Andrey Zhidenkov
://blog.csdn.net/qq_43687755/article/details/117592635 On Thu, 21 Dec 2023, 18:32 Tom Lane wrote: > Andrey Zhidenkov writes: > > We have encountered an issue with our PostgreSQL 15.5 installation. The > > problem is that > > PostgreSQL server periodically falls into a stat

PostgreSQL 15.5 stops processing user queries

2023-12-21 Thread Andrey Zhidenkov
Hello all, We have encountered an issue with our PostgreSQL 15.5 installation. The problem is that PostgreSQL server periodically falls into a state when it accepts new connections but doesn't execute any queries. The session which runs a query hangs and cannot be terminated via SIGINT (even if it

Re: Do BRIN indexes support MIN/MAX?

2023-03-30 Thread Andrey Klochkov
ented in the same way by passing all the values to a > binary heap and skipping all the ranges that are known to be less than what > we already have in a heap. > > Andrey, could you clarify the use cases for looking up of min/max record? > I am afraid, PostgreSQL has no way to

Re: Do BRIN indexes support MIN/MAX?

2023-03-29 Thread Andrey Klochkov
s per page your index read drops > to about 10Mb, plus the 1Mb range. > > Also, I suspect you will have to read all unsummarized ranges ( > probably before the summarized ones, as unsummarized can discard > summarizeds, but not the other way ). > > Francisco Olarte. > -- Andrey Klochkov

Do BRIN indexes support MIN/MAX?

2023-03-29 Thread Andrey Klochkov
ery like `SELECT max(timestamp_column) FROM table` does a sequential scan on the table instead of using the index. We're on Postgres 10.23 at the moment if that's important. -- Andrey Klochkov

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Andrey Borodin
c synchronous_standby_names on the master whenever a > failover occurs. That allows for a simpler failover mechanism as you know > they got the latest WAL location. No, synchronous standby does not necessarily own latest WAL. It has WAL point no earlier than all commits acknowledged to client. Thanks! Best regards, Andrey Borodin.

Commit to primary with unavailable sync standby

2019-12-19 Thread Andrey Borodin
treated as system failure? Best regards, Andrey Borodin.

Re: Error: rows returned by function are not all of the same row type

2019-07-09 Thread Andrey Sychev
> Please do not top post on the Postgres lists. Thank you for the advice. I will take into account this rule in the future. > See contrib/tablefunc/tablefunc.c crosstab_hash() as an example. Thank you. I hope this will be good starting point for me. -- Best regards, Andrey

Re: Error: rows returned by function are not all of the same row type

2019-07-05 Thread Andrey Sychev
as "RETURNS SETOF". Does definition of the function need to be changed if I rewrite code to return tuplestore? > Andrey Sychev writes: >> I have written C-language function that returns >> multiple composite rows. >> Generally function works as expected, bu

Error: rows returned by function are not all of the same row type

2019-07-04 Thread Andrey Sychev
{ SPI_freetuptable(table); } ereport(NOTICE, (errmsg("P6: [%s]-(%d)", (const char*)__FUNCTION__, max_calls))); ret = SPI_exec("DROP TABLE results", 0); if(ret != SPI_OK_UTILITY) { elog(ERROR, "spi_match: SPI_exec (20) returned %d", ret); } SPI_finish(); SRF_RETURN_DONE(funcctx); } PG_RETURN_VOID(); } -- Best regards, Andrey Sychev andrey.syc...@cifrasoft.com

improvement of Postgres-specific support in Ansible

2019-03-14 Thread Andrey Klychkov
Hello all ! There is the Ansible postgresql working group https://github.com/ansible/community/wiki/PostgreSQL that was created a couple of months ago (thanks Ansible engineers Dag Wieers (@dagwieers) and John R. Barcker (@gundalow) for support). Over the last 3 months we've added 4 new modul

Re: Replica string comparsion issue

2018-06-13 Thread Andrey Lizenko
> limit 5; > date_started |symbol > --+-- > 1970-01-01 | /EPRH18:XMON > 1970-01-01 | /EPRM18:XMON > 1970-01-01 | /FCEF18:XMON > 1970-01-01 | /FCEG18:XMON > 1970-01-01 | /FCEH18:XMON On Wed, Jun 13, 2018 at 10:38 PM Tom Lane wrote: &g

Replica string comparsion issue

2018-06-13 Thread Andrey Lizenko
Hello, I'm observing strange behaviour on comparing ::text field with string while quering replica. Here is the table structure: =# \dS+ raw.symbols_aggregates > Table > "raw.symbols_aggregates" >Column | Type | Collation |

Re: Error on vacuum: xmin before relfrozenxid

2018-05-23 Thread Andrey Borodin
backups and inspect it, if necessary. Though first occurrence of this error was beyond recovery window. Best regards, Andrey Borodin.