Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-17 Thread jian he
On Mon, Dec 18, 2023 at 1:09 PM torikoshia wrote: > > Hi, > > > save the error metadata to system catalogs would be more expensive, > > please see below explanation. > > I have no knowledge of publications. > > but i feel there is a feature request: publication FOR ALL TABLES > > exclude

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-12-17 Thread Hayato Kuroda (Fujitsu)
Dear Thomas, Alexander, > Thanks for reporting. Yes, it has been already reported by me [1], and the > server > log was provided by Andrew [2]. The issue was that a file creation was failed > because the same one was unlink()'d just before but it was in > STATUS_DELETE_PENDING > status. Kindly

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Emre Hasegeli
> This change (Required in between two sentences) looks slightly odd to > me. Can we instead extend the second line to something like: "This > parameter is required, and the individual publication names are ...". > Similarly we can adjust the proto_vesion explanation. I don't think it's an

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Emre Hasegeli
> I found the existing error code appropriate because for syntax > specification, either we need to mandate this at the grammar level or > at the API level. Also, I think we should give a message similar to an > existing message: "publication_names parameter missing". For example, > we can say,

Re: Report planning memory in EXPLAIN ANALYZE

2023-12-17 Thread Ashutosh Bapat
Forgot to attach patch. Here it is On Mon, Dec 18, 2023 at 12:55 PM Ashutosh Bapat wrote: > > On Sun, Dec 17, 2023 at 10:31 PM Alvaro Herrera > wrote: > > > > OK, I propose the following further minor tweaks. (I modified the docs > > following the wording we have for COSTS and BUFFERS). > >

Re: Report planning memory in EXPLAIN ANALYZE

2023-12-17 Thread Ashutosh Bapat
On Sun, Dec 17, 2023 at 10:31 PM Alvaro Herrera wrote: > > OK, I propose the following further minor tweaks. (I modified the docs > following the wording we have for COSTS and BUFFERS). LGTM. Included in the attached patch. > > There are two things that still trouble me a bit. First, we

Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-17 Thread Xiaoran Wang
Hi, Thanks for your reply. jian he 于2023年12月18日周一 08:20写道: > Hi > ---setup. > drop table s2; > create table s2(a int); > > After apply the patch > alter table s2 add primary key (a); > > watch CatalogSnapshot > > #0 GetNonHistoricCatalogSnapshot (relid=1259) > at >

Re: Fix bug with indexes on whole-row expressions

2023-12-17 Thread ywgrit
Thanks, tom. Considering the scenario where the indexed column is a function Var on a whole expression, it's really not a good idea to disable creating index on whole expression. I tried find_composite_type_dependencies, it seems that this function can only detect dependencies created by

Re: meson: Stop using deprecated way getting path of files

2023-12-17 Thread John Naylor
On Tue, Dec 5, 2023 at 3:27 AM Tristan Partin wrote: > > On Mon Dec 4, 2023 at 2:10 PM CST, Tom Lane wrote: > > Not sure what you were using, but are you aware that SQL access to the > > buildfarm database is available to project members? My own stock > > approach to checking on this sort of

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-12-17 Thread John Naylor
On Fri, Dec 15, 2023 at 3:15 PM Masahiko Sawada wrote: > > On Fri, Dec 15, 2023 at 10:30 AM John Naylor wrote: > > parallel_vacuum_init(Relation rel, Relation *indrels, int nindexes, > > - int nrequested_workers, int max_items, > > - int elevel, BufferAccessStrategy bstrategy) > > + int

Re: introduce dynamic shared memory registry

2023-12-17 Thread Andrei Lepikhov
On 5/12/2023 10:46, Nathan Bossart wrote: I don't presently have any concrete plans to use this for anything, but I thought it might be useful for extensions for caching, etc. and wanted to see whether there was any interest in the feature. I am delighted that you commenced this thread.

Re: Change GUC hashtable to use simplehash?

2023-12-17 Thread John Naylor
I wrote: > Updated next steps: > * Add some desperately needed explanatory comments. There is a draft of this in v10-0001. I also removed the validation scaffolding and ran pgindent. This could use some review and/or bikeshedding, in particular on the name hashfn_unstable.h. I also considered

Re: Fix a comment in basic_archive about NO_INSTALLCHECK

2023-12-17 Thread Bharath Rupireddy
On Thu, Apr 6, 2023 at 9:26 AM Michael Paquier wrote: > > On Mon, Apr 03, 2023 at 08:56:10AM +0530, Bharath Rupireddy wrote: > > It looks like comments in make file and meson file about not running > > basic_archive tests in NO_INSTALLCHECK mode are wrong. The comments say the > > module needs to

Re: Transaction timeout

2023-12-17 Thread Andrey M. Borodin
> On 16 Dec 2023, at 05:58, Japin Li wrote: > > > On Fri, 15 Dec 2023 at 17:51, Andrey M. Borodin wrote: >>> On 8 Dec 2023, at 15:29, Japin Li wrote: >>> >>> Thanks for updating the patch. LGTM. >> >> PFA v9. Changes: >> 1. Added tests for idle_in_transaction_timeout >> 2. Suppress

Re: Add a perl function in Cluster.pm to generate WAL

2023-12-17 Thread Bharath Rupireddy
On Wed, Jul 19, 2023 at 4:11 PM Bharath Rupireddy wrote: > > Attached the v2 patch. Thoughts? Rebase needed, attached v3 patch. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-17 Thread torikoshia
Hi, save the error metadata to system catalogs would be more expensive, please see below explanation. I have no knowledge of publications. but i feel there is a feature request: publication FOR ALL TABLES exclude regex_pattern. Anyway, that would be another topic. I think saving error

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Amit Kapila
On Fri, Dec 15, 2023 at 7:06 PM Emre Hasegeli wrote: > > > > SUGGESTION > > -proto_version > > -publication_names > > -binary > > -messages > > -origin > > > > Requires minimum protocol version 2: > > -streaming (boolean) > > > > Requires minimum protocol version 3: > > -two_phase > > > >

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Amit Kapila
On Fri, Dec 15, 2023 at 7:06 PM Emre Hasegeli wrote: > > > I saw that the original "publication_names" error was using > > errcode(ERRCODE_INVALID_PARAMETER_VALUE), but TBH since there is no > > option given at all I felt ERRCODE_SYNTAX_ERROR might be more > > appropriate errcode for those 2

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-17 Thread torikoshia
On 2023-12-15 05:48, Masahiko Sawada wrote: Thanks for joining this discussion! I've read this thread and the latest patch. IIUC with SAVE_ERROR option, COPY FROM creates an error table for the target table and writes error information there. While I agree that the final shape of this feature

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Peter Smith
On Mon, Dec 18, 2023 at 11:35 AM Peter Smith wrote: > > Hi, I had a look at the latest v02 patches. > > On Sat, Dec 16, 2023 at 12:36 AM Emre Hasegeli wrote: > > > > > OK, to deal with that can't you just include "origin" in the first > > > group which has no special protocol requirements? > > >

Re: "pgoutput" options missing on documentation

2023-12-17 Thread Peter Smith
Hi, I had a look at the latest v02 patches. On Sat, Dec 16, 2023 at 12:36 AM Emre Hasegeli wrote: > > > OK, to deal with that can't you just include "origin" in the first > > group which has no special protocol requirements? > > I think it'd be confusing because the option is not available

Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-17 Thread jian he
Hi ---setup. drop table s2; create table s2(a int); After apply the patch alter table s2 add primary key (a); watch CatalogSnapshot #0 GetNonHistoricCatalogSnapshot (relid=1259) at ../../Desktop/pg_src/src7/postgresql/src/backend/utils/time/snapmgr.c:412 #1 0x55ba78f0d6ba in

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-17 Thread jian he
On Fri, Dec 15, 2023 at 4:49 AM Masahiko Sawada wrote: > > Hi, > > I've read this thread and the latest patch. IIUC with SAVE_ERROR > option, COPY FROM creates an error table for the target table and > writes error information there. > > While I agree that the final shape of this feature would be

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2023-12-17 Thread Matthias van de Meent
On Sun, 17 Dec 2023, 21:14 Michail Nikolaev, wrote: > > Hello! > > > I've thought about alternative solutions, too: how about getting a new > > snapshot every so often? > > We don't really care about the liveness of the already-scanned data; the > > snapshots used for RIC > > are used only

Re: Is a clearer memory lifespan for outerTuple and innerTuple useful?

2023-12-17 Thread Andy Fan
Nikita Malakhov writes: > Hi! > > Maybe, the alternative way is using a separate kind of context, say name it > 'ToastContext' for all custom data related to Toasted values? What do > you think? That should be a candidate. The latest research makes me think the 'detoast_values' should have

Re: planner chooses incremental but not the best one

2023-12-17 Thread Tomas Vondra
On 12/14/23 11:02, Richard Guo wrote: > > On Tue, Dec 12, 2023 at 4:40 PM Nicolas Lutic > wrote: > > I've come across a behaviour of the planner I can't explain. > After a migration from 11 to 15 (on RDS) we noticed a degradation in > response time on

Re: JSON Path and GIN Questions

2023-12-17 Thread David E. Wheeler
On Dec 17, 2023, at 16:08, Tom Lane wrote: > I'd waited because the discussion was still active, and then it > kind of slipped off the radar. I'll take another look and push > some form of what I suggested. Right on. > That doesn't really address the > jsonpath oddities you were on about,

Re: How to get started with contribution

2023-12-17 Thread Sukhbir Singh
Thanks a lot for sharing. I'm excited about the opportunity to contribute to your organization and apply my skills to your project, making a valuable impact. On Sun, 17 Dec, 2023, 10:04 pm Julien Rouhaud, wrote: > Hi, > > On Sun, Dec 17, 2023 at 03:09:10PM +, Sukhbir Singh wrote: > > > > I

Re: planner chooses incremental but not the best one

2023-12-17 Thread Tom Lane
Tomas Vondra writes: > Yeah, seems like that's the right thing to do. FWIW I've been often > confused by these fields, because we use tuples and rows as synonyms, > but in this particular case that's not the same. I wonder if this is > just a manifestation of this confusion. For tables, one is

Re: planner chooses incremental but not the best one

2023-12-17 Thread Tomas Vondra
On 12/15/23 09:58, Richard Guo wrote: > > On Thu, Dec 14, 2023 at 6:02 PM Richard Guo > wrote: > > It seems that we need to improve estimate of distinct values in > estimate_num_groups() when taking the selectivity of restrictions into > account. >

Re: brininsert optimization opportunity

2023-12-17 Thread Tomas Vondra
On 12/13/23 09:12, Soumyadeep Chakraborty wrote: > On Tue, Dec 12, 2023 at 3:25 AM Tomas Vondra > wrote: > > >> The attached 0001 patch fixes this by adding the call to validate_index, > which seems like the proper place as it's where the indexInfo is > allocated and destroyed. > > Yes, and

Re: Is a clearer memory lifespan for outerTuple and innerTuple useful?

2023-12-17 Thread Nikita Malakhov
Hi! Maybe, the alternative way is using a separate kind of context, say name it 'ToastContext' for all custom data related to Toasted values? What do you think? On Sun, Dec 17, 2023 at 4:52 PM Andy Fan wrote: > > Andy Fan writes: > > > Andy Fan writes: > > > >> ..., I attached the 2

Re: XID formatting and SLRU refactorings

2023-12-17 Thread Thomas Munro
On Tue, Nov 28, 2023 at 11:14 PM Heikki Linnakangas wrote: > I think it's pretty sloppy that the "short" filenames can be 4, 5 or 6 > chars long. For pg_multixact/members, which introduced the 5-char case, > I think we should always pad the filenames 5 characters, and for > commit_ts which

Re: JSON Path and GIN Questions

2023-12-17 Thread Tom Lane
"David E. Wheeler" writes: > Hey Tom, are you still thinking about adding this bit to the docs? I took a > quick look at master and didn’t see it there. I'd waited because the discussion was still active, and then it kind of slipped off the radar. I'll take another look and push some form of

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2023-12-17 Thread Michail Nikolaev
Hello! > I've thought about alternative solutions, too: how about getting a new > snapshot every so often? > We don't really care about the liveness of the already-scanned data; the > snapshots used for RIC > are used only during the scan. C/RIC's relation's lock level means vacuum > can't run

GIN-Indexable JSON Patterns

2023-12-17 Thread David E. Wheeler
Hey Hackers, Quick follow-up to my slew of questions back in [September][1]. I wanted to update [my patch][2] to note that only JSON Path equality operators are supported by indexes, as [previously discussed][3]. I thought perhaps adding a note to this bit of the docs would be useful: > For

Re: JSON Path and GIN Questions

2023-12-17 Thread David E. Wheeler
On Sep 17, 2023, at 18:09, David E. Wheeler wrote: > I think this is useful, but also that it’s worth calling out explicitly that > functions do not count as indexable operators. True by definition, of course, > but I at least had assumed that since an operator is, in a sense, syntax > sugar

Re: How to get started with contribution

2023-12-17 Thread Tomas Vondra
On 12/17/23 17:34, Julien Rouhaud wrote: > Hi, > > On Sun, Dec 17, 2023 at 03:09:10PM +, Sukhbir Singh wrote: >> >> I am Sukhbir Singh, a B.Tech undergraduate, and I am in my pre-final year at >> Punjab Engineering College (PEC). I am new to open source but know Python, >> PostgreSQL, C,

Re: Report planning memory in EXPLAIN ANALYZE

2023-12-17 Thread Alvaro Herrera
OK, I propose the following further minor tweaks. (I modified the docs following the wording we have for COSTS and BUFFERS). There are two things that still trouble me a bit. First, we assume that the planner is using an AllocSet context, which I guess is true, but if somebody runs the planner

Re: How to get started with contribution

2023-12-17 Thread Julien Rouhaud
Hi, On Sun, Dec 17, 2023 at 03:09:10PM +, Sukhbir Singh wrote: > > I am Sukhbir Singh, a B.Tech undergraduate, and I am in my pre-final year at > Punjab Engineering College (PEC). I am new to open source but know Python, > PostgreSQL, C, Javascript and node.js. I would love to contribute to

How to get started with contribution

2023-12-17 Thread Sukhbir Singh
Respected sir/madam, I am Sukhbir Singh, a B.Tech undergraduate, and I am in my pre-final year at Punjab Engineering College (PEC). I am new to open source but know Python, PostgreSQL, C, Javascript and node.js. I would love to contribute to your organization, but could you please tell me how

Re: XID formatting and SLRU refactorings

2023-12-17 Thread Alexander Korotkov
On Sun, Dec 17, 2023 at 1:48 AM Thomas Munro wrote: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=loach=2023-12-16%2005%3A25%3A18 > > TRAP: failed Assert("epoch > 0"), File: "twophase.c", Line: 969, PID: 71030 > 0xa8edcd at >

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-12-17 Thread Hayato Kuroda (Fujitsu)
Dear Thomas, Alexander, > 17.12.2023 07:02, Thomas Munro wrote: > > FYI fairywren failed in this test: > > > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren=2023-1 > 2-16%2022%3A03%3A06 > > > > ===8<=== > > Restoring database schemas in the new cluster > > *failure* > > > >

Re: Is a clearer memory lifespan for outerTuple and innerTuple useful?

2023-12-17 Thread Andy Fan
Andy Fan writes: > Andy Fan writes: > >> ..., I attached the 2 MemoryContext in >> JoinState rather than MergeJoinState, which is for the "shared detoast >> value"[0] more or less. >> In order to delimit the scope of this discussion, I attached the 2 MemoryContext to MergeJoinState. Since