Reading from replication slot fails if publication is dropped and created.

2022-12-07 Thread G Chandrasekar
Hi,  Have a scenario, where the publication was accidentely deleted and eventhough the publication was re-created, trying to read data from the replication slot fails with the following error message. "ERROR: publication \"dbz_publication\" does not exist\n Where: slot \"s20d07aebf4204109872de5

Is there a way to know write statistics on an individual index

2022-12-07 Thread higherone
Hi, I know there's a pg_stats_user_indexes that gives statistics about the index scans/fetches, but I don't find any information about how many writes(insert/update/delete) happen on this individual index. Is there some tool that could achieve this? Thanks, Alun

Re[4]: PG 14.5 -- Impossible to restore dump due to interaction/order of views, functions, and generated columns

2022-12-07 Thread Nunya Business
Tom, Thanks for the insight, I didn't even consider the search path being an issue and I should have. I saw it explicitly specified in other parts of the dump and just assumed it was being done in the function as well. For example, the CREATE statements in the dump output all specify the sc

Re: Re[2]: PG 14.5 -- Impossible to restore dump due to interaction/order of views, functions, and generated columns

2022-12-07 Thread Tom Lane
"Nunya Business" writes: > Thanks Tom. There are indeed circular references in the schema and the > whole thing sort of doesn't pass the smell test, but this is my first > look at it. The generated column on the table calls a function which > selects from a view that references the table. Th

Re[2]: PG 14.5 -- Impossible to restore dump due to interaction/order of views, functions, and generated columns

2022-12-07 Thread Nunya Business
"Nunya Business" writes: Within my schema there is a table that has a GENERATED ALWAYS column that calls a plpgsql function. The called function has a "row type" variable declared that references a view. While the schema itself functions properly day to day, and pg_dumpall works as expecte

RE: About row locking ordering

2022-12-07 Thread Ryo Yamaji (Fujitsu)
Thank you for your comments. Sorry for the late reply. From: Kirk Wolak Sent: Friday, November 25, 2022 6:12 PM > My first question is why are you not using "WHERE CURRENT OF" cursor_name? I thought that cursors are preferred for manipulating large numbers of rows. So I did not consider using

Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2022-12-07 Thread Andres Freund
Hi, On 2022-11-28 17:22:19 -0500, Kirk Wolak wrote: > Thank you for this. We have the build working with meson (w/o readline). > I was not able to get "readline" to be recognized by meson (I've attached > the log file) > It is "there" according to vcpkg. (other projects have a .pc file thi