RE: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)

2021-11-15 Thread Chen, Yan-Jack (NSB - CN/Hangzhou)
"Tom Lane" writes: > We can see from this that the server spent 10 seconds in CommitTransaction, > so the question is what took so long. I'd wonder first about end-of-transaction triggers (have you got foreign keys on that table? maybe an event trigger?), and then second about delays in writ

Re: Managing major PostgreSQL upgrades

2021-11-15 Thread Saul Perdomo
Hey Tiff, We're in a similar boat. We currently lean on (mostly custom) ansible scripting to automate all the repeatable tasks we can, but automation of major PG version upgrades is something we are yet to tackle -- although we plan to start this effort in the short term. Would you mind sharing a

Re: pg_restore depending on user functions

2021-11-15 Thread Дмитрий Иванов
Yes, it is. I continue to extract data as promised, but I think I see some pattern. "chicken or egg" To work with the NPGSQL library, I created a cast. They are created after the views in which I use them. Here is the order 279: CREATE TYPE bpd.cclass_prop 4646: CREATE VIEW bpd.vclass_prop 4784: CR

Re: pg_restore depending on user functions

2021-11-15 Thread Дмитрий Иванов
Yes, it is. I'll leave behind the lost features, views, table definitions, and dependent objects. It will take some time. thanks, for the help. пн, 15 нояб. 2021 г. в 20:49, Tom Lane : > =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= > writes: > > Is it ok to attach a 5MB data schema or is it

Re: pg_restore depending on user functions

2021-11-15 Thread Дмитрий Иванов
Yes, it is. I did so (--schema-only). Removing unnecessary definitions. That is, you do not need to attach files? пн, 15 нояб. 2021 г. в 20:49, Tom Lane : > =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= > writes: > > Is it ok to attach a 5MB data schema or is it not possible? Copy one by > on

Re: pg_restore depending on user functions

2021-11-15 Thread Tom Lane
=?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= writes: > Is it ok to attach a 5MB data schema or is it not possible? Copy one by one > to a letter? Is it smaller if you omit the data (-s switch)? Shouldn't be relevant here. regards, tom lane

Re: pg_restore depending on user functions

2021-11-15 Thread Дмитрий Иванов
Thanks for the feedback! Is it ok to attach a 5MB data schema or is it not possible? Copy one by one to a letter? It would be nice if in the end I could rebuild the base without hindrance. Thank you in advance. Restore Windows 10 PostgreSQL 12.9, compiled by Visual C++ build 1914, 64-bit -> Debian

Re: help with a query

2021-11-15 Thread Francisco Olarte
Yarden: On Mon, 15 Nov 2021 at 10:30, yarden tamam wrote: > i have data bast that represents basketball teams. and i'm trying to find one > team that has not won yet but has gain that most points during their games > from the other team who have not won yet. > i wrote a query that is checking i

Re: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)

2021-11-15 Thread Tom Lane
"Chen, Yan-Jack (NSB - CN/Hangzhou)" writes: > We recently encounter one issue about PostgreSQL ODBC client doesn¡¯t > receive response from PostgreSQL server in time (client set 5 seconds > timeout) occasionally (1 or 2 times per 24 hours). Both PostgreSQL and its > client are deployed in V

Re: help with a query

2021-11-15 Thread Bruce Momjian
On Mon, Nov 15, 2021 at 09:30:03AM -0500, Bruce Momjian wrote: > > Due to time constraints, I do not directly answer general PostgreSQL > questions. For assistance, please join the appropriate mailing list and > post your question: > > https://www.postgresql.org/community > > You can also

Re: help with a query

2021-11-15 Thread Bruce Momjian
Due to time constraints, I do not directly answer general PostgreSQL questions. For assistance, please join the appropriate mailing list and post your question: https://www.postgresql.org/community You can also try the #postgresql IRC channel on irc.freenode.net. See the PostgreSQL FA

Managing major PostgreSQL upgrades

2021-11-15 Thread Tiffany Thang
Hi, Every year we spent a lot of time planning and manually performing major PostgreSQL upgrade on many of our on-prem and RDS instances. I’m wondering if there is a better way of managing these upgrades through automation. Can anyone share their experiences? Thanks. Tiff

help with a query

2021-11-15 Thread yarden tamam
i have data bast that represents basketball teams. and i'm trying to find one team that has not won yet but has gain that most points during their games from the other team who have not won yet. i wrote a query that is checking if a team has not won at all. but i'm trying to figure out how to coun