Re: BRIN minmax multi - incorrect distance for infinite timestamp/date

2023-10-29 Thread Ashutosh Bapat
On Fri, Oct 27, 2023 at 10:32 PM Tomas Vondra wrote: > > FWIW I've cleaned up and pushed all the patches we came up with this > thread. And I've backpatched all of them to 14+. > Thanks a lot Tomas. -- Best Wishes, Ashutosh Bapat

Re: Open a streamed block for transactional messages during decoding

2023-10-29 Thread Amit Kapila
On Thu, Oct 26, 2023 at 2:01 PM Zhijie Hou (Fujitsu) wrote: > > On Thursday, October 26, 2023 12:42 PM Amit Kapila > wrote: > > > > On Tue, Oct 24, 2023 at 5:27 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > While reviewing the test_decoding code, I noticed that when > > >

RE: A recent message added to pg_upgade

2023-10-29 Thread Zhijie Hou (Fujitsu)
On Monday, October 30, 2023 10:29 AM Kyotaro Horiguchi wrote: > > At Fri, 27 Oct 2023 14:57:10 +0530, Amit Kapila > wrote in > > On Fri, Oct 27, 2023 at 2:02 PM Alvaro Herrera > wrote: > > > > > > On 2023-Oct-27, Kyotaro Horiguchi wrote: > > > > > > > @@ -1433,8 +1433,8 @@ >

Re: COPY TO (FREEZE)?

2023-10-29 Thread Zhang Mingli
HI, Zhang Mingli www.hashdata.xyz On Oct 30, 2023 at 10:58 +0800, Bruce Momjian , wrote: > On Mon, Oct 30, 2023 at 05:07:48AM +0800, Mingli Zhang wrote: > > > > Bruce Momjian 于2023年10月30日周一03:35写道: > > > > On Sun, Oct 29, 2023 at 02:50:37PM +0800, Mingli Zhang wrote: > > > I guess you want to

Re: A recent message added to pg_upgade

2023-10-29 Thread Amit Kapila
On Mon, Oct 30, 2023 at 7:58 AM Kyotaro Horiguchi wrote: > > At Fri, 27 Oct 2023 14:57:10 +0530, Amit Kapila > wrote in > > On Fri, Oct 27, 2023 at 2:02 PM Alvaro Herrera > > wrote: > > > > > > On 2023-Oct-27, Kyotaro Horiguchi wrote: > > > > > > > @@ -1433,8 +1433,8 @@ > > > >

Re: COPY TO (FREEZE)?

2023-10-29 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 05:07:48AM +0800, Mingli Zhang wrote: > > Bruce Momjian 于2023年10月30日周一03:35写道: > > On Sun, Oct 29, 2023 at 02:50:37PM +0800, Mingli Zhang wrote: > > I guess you want to write “cannot be used with COPY TO” > > You are 100% correct.  Updated patch attached. >

Re: A recent message added to pg_upgade

2023-10-29 Thread Kyotaro Horiguchi
At Fri, 27 Oct 2023 14:57:10 +0530, Amit Kapila wrote in > On Fri, Oct 27, 2023 at 2:02 PM Alvaro Herrera > wrote: > > > > On 2023-Oct-27, Kyotaro Horiguchi wrote: > > > > > @@ -1433,8 +1433,8 @@ > > > InvalidatePossiblyObsoleteSlot(ReplicationSlotInvalidationCause cause, > > >

Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}

2023-10-29 Thread Michael Paquier
On Fri, Oct 27, 2023 at 04:58:20PM +0300, Nazir Bilal Yavuz wrote: > I think switching it to 'shared' makes sense. That shouldn't confuse > existing monitoring queries much as the numbers won't change, right? > Also, if we keep 'shared/local' there could be similar complaints to > this thread in

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-10-29 Thread David Rowley
On Sun, 29 Oct 2023 at 12:45, Bruce Momjian wrote: > Has anything been done about this issue? Nothing has been done. I was hoping to get the attention of a few people who have dealt more with postgres_fdw in the past. I've attached a patch with adjusts DEFAULT_FDW_TUPLE_COST and sets it to 0.2.

Re: Introduce a new view for checkpointer related stats

2023-10-29 Thread Michael Paquier
On Fri, Oct 27, 2023 at 10:23:34AM +0530, Bharath Rupireddy wrote: > +1. Changed in the attached v10-001. FWIW, having a test case in > stats.sql emitting this error message and hint would have helped here. > If okay, I can add one. That may be something to do. At least it was missed on this

Re: SQL:2011 application time

2023-10-29 Thread jian he
hi. * The attached patch makes foreign keys with PERIOD fail if any of the foreign key columns is "generated columns". * The following queries will cause segmentation fault. not sure the best way to fix it. the reason in LINE: numpks = transformColumnNameList(RelationGetRelid(pkrel),

Re: Cleaning up array_in()

2023-10-29 Thread jian he
rebase after commit (https://git.postgresql.org/cgit/postgresql.git/commit/?id=611806cd726fc92989ac918eac48fd8d684869c7) From d37081ba00743585dae35c70e293ce2385201c9c Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Sat, 8 Jul 2023 22:19:48 +0300 Subject: [PATCH v9 5/7] Determine array

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-10-29 Thread Michael Paquier
On Fri, Oct 27, 2023 at 09:45:52AM +0200, Drouvot, Bertrand wrote: > Done in V8 attached (pgindent has been run on pgstatfuncs.c and > pgstat_relation.c). And applied that after editing a bit the comments. -- Michael signature.asc Description: PGP signature

Re: On login trigger: take three

2023-10-29 Thread Tom Lane
Alexander Korotkov writes: > On Sun, Oct 29, 2023 at 6:16 PM Tom Lane wrote: >> It looks to me that what happened here is that the backend completed the >> authentication handshake, and then the login trigger caused a FATAL exit, >> and after than the connected psql session tried to send "SELECT

Re: On login trigger: take three

2023-10-29 Thread Alexander Korotkov
On Sun, Oct 29, 2023 at 6:16 PM Tom Lane wrote: > Mikhail Gribkov writes: > > Just for a more complete picture of the final state here. > > I have posted the described fix (for avoiding race condition in the tests) > > separately: > > https://commitfest.postgresql.org/45/4616/ > > It turns out

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
Bruce Momjian 于2023年10月30日 周一03:35写道: > On Sun, Oct 29, 2023 at 02:50:37PM +0800, Mingli Zhang wrote: > > I guess you want to write “cannot be used with COPY TO” > > You are 100% correct. Updated patch attached. > > -- > Bruce Momjian https://momjian.us > EDB

Re: COPY TO (FREEZE)?

2023-10-29 Thread Bruce Momjian
On Sun, Oct 29, 2023 at 02:50:37PM +0800, Mingli Zhang wrote: > I guess you want to write “cannot be used with COPY TO” You are 100% correct. Updated patch attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you

Re: pg_resetwal tests, logging, and docs update

2023-10-29 Thread Peter Eisentraut
On 29.09.23 10:02, Peter Eisentraut wrote: On 26.09.23 17:19, Aleksander Alekseev wrote: Attached is an updated patch set where I have split the changes into smaller pieces.  The last two patches still have some open questions about what certain constants mean etc.  The other patches should be

Re: Supporting MERGE on updatable views

2023-10-29 Thread Dean Rasheed
On Sat, 28 Oct 2023 at 09:35, jian he wrote: > > hi. > Excellent work! regress test passed! The code looks so intuitive! > Thanks for looking! > doc/src/sgml/ref/create_view.sgml. > Do we need to add > If the view or any of its base > relations has an

Re: pg_dump not dumping the run_as_owner setting from version 16?

2023-10-29 Thread Tom Lane
Philip Warner writes: > Please find attached a patch for pg_dump to honour the setting of > `run_as_owner`; I believe that effective pre-16 behavious was to run as > owner, so I have set the flag to ‘t’ for pre-16 versions. Please let me know > if you would prefer the opposite. I think that's

Re: POC, WIP: OR-clause support for indexes

2023-10-29 Thread Alena Rybakina
Hi! On 27.10.2023 00:04, Peter Geoghegan wrote: On Thu, Oct 26, 2023 at 12:59 PM Robert Haas wrote: Alexander's example seems to show that it's not that simple. If I'm reading his example correctly, with things like aid = 1, the transformation usually wins even if the number of things in the

Re: Use virtual tuple slot for Unique node

2023-10-29 Thread Denis Smirnov
I have taken a look at this discussion, at the code and I am confused how we choose tuple table slot (TTS) type in PG. May be you can clarify this topic or me. 1. Brief intro. There are four types of TTS. Plan tree «leaves»: - buffer heap (produced by index and table scans, has system columns

Re: On login trigger: take three

2023-10-29 Thread Tom Lane
Mikhail Gribkov writes: > Just for a more complete picture of the final state here. > I have posted the described fix (for avoiding race condition in the tests) > separately: > https://commitfest.postgresql.org/45/4616/ It turns out that the TAP test for this feature (006_login_trigger.pl) also

Re: Issues with Information_schema.views

2023-10-29 Thread Tom Lane
Erki Eessaar writes: > My question is - is all of this the intended behaviour by the implementers? Yes, I'd say so. If you are expecting that the is_updatable flag will check to see if the behavior provided by the view's rules corresponds to something that a human would call a corresponding

Re: run pgindent on a regular basis / scripted manner

2023-10-29 Thread Andrew Dunstan
On 2023-10-28 Sa 12:09, Tom Lane wrote: Andrew Dunstan writes: Based on recent experience, where a lot koel's recent complaints seem to be about comments, I'd like to suggest a modest adjustment. First, we should provide a mode of pgindent that doesn't reflow comments. pg_bsd_indent has a

Re: Issues with Information_schema.views

2023-10-29 Thread jian he
On Sun, Oct 29, 2023 at 4:05 PM Erki Eessaar wrote: > > Hello > > Thank you! I know that. > > > Secondly, the rule you demonstrated does not alone change IS_UPDATABLE value > to YES. I have to create two rules: > > CREATE OR REPLACE RULE emps_update AS ON UPDATE > TO Emps > DO INSTEAD

Re: Use virtual tuple slot for Unique node

2023-10-29 Thread David Rowley
On Fri, 27 Oct 2023 at 22:05, Ashutosh Bapat wrote: > > On Fri, Oct 27, 2023 at 8:48 AM David Rowley wrote: > > I was uncertain if the old behaviour of when srcslot contains fewer > > attributes than dstslot was intended or not. What happens there is > > that we'd leave the additional old

Re: Issues with Information_schema.views

2023-10-29 Thread Erki Eessaar
Hello Thank you! I know that. DO INSTEAD NOTHING rules on updatable views could be used as a way to implement WITH READ ONLY constraint (one can define such constraint in Oracle). However, one could accidentally add such rule to non-updatable view as well. I tried to construct a

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
Mingli Zhang 于2023年10月29日 周日14:35写道: > > > Bruce Momjian 于2023年10月29日 周日10:04写道: > >> On Sat, Oct 28, 2023 at 09:54:05PM -0400, Tom Lane wrote: >> > Bruce Momjian writes: >> > > On Sat, Oct 28, 2023 at 09:39:53PM -0400, Tom Lane wrote: >> > >> Not thrilled by the wording here. >> > >> > > I

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
Bruce Momjian 于2023年10月29日 周日10:04写道: > On Sat, Oct 28, 2023 at 09:54:05PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > On Sat, Oct 28, 2023 at 09:39:53PM -0400, Tom Lane wrote: > > >> Not thrilled by the wording here. > > > > > I think it is modeled after: > > > > > errmsg("COPY