Re: Question -- why is there no errhint_internal function?

2025-04-05 Thread Peter Smith
On Thu, Apr 3, 2025 at 10:26 AM Andres Freund wrote: > > Hi, > > On 2025-04-03 09:58:30 +1100, Peter Smith wrote: > > I saw that a new errhint_internal() function was recently committed > > [1]. I had also posted above asking about this same missing function a > > month ago [2]. > > > > But, your

Re: Question -- why is there no errhint_internal function?

2025-04-04 Thread Andres Freund
Hi, On 2025-04-03 09:58:30 +1100, Peter Smith wrote: > I saw that a new errhint_internal() function was recently committed > [1]. I had also posted above asking about this same missing function a > month ago [2]. > > But, your patch only added the new function -- it does not make any > use of it

Re: Question -- why is there no errhint_internal function?

2025-04-02 Thread Peter Smith
(I added Andres to this thread) Hi Andres, I saw that a new errhint_internal() function was recently committed [1]. I had also posted above asking about this same missing function a month ago [2]. But, your patch only added the new function -- it does not make any use of it for existing code tha

Re: Question about duplicate JSONTYPE_JSON check

2025-03-15 Thread Maciek Sakrejda
Thanks for the quick fix. I was able to reproduce the assertion failure and to confirm that it's resolved with the patch. Looks good to me.

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Amit Langote
On Wed, Mar 12, 2025 at 21:40 Álvaro Herrera wrote: > On 2025-Mar-12, Amit Langote wrote: > > > Patch look good for committing? > > Ah sorry, I should have said so -- yes, it looks good to me. Thanks (Maciek, Tender too) for the review. I feel a > slight dislike for using URL-escaped charact

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Álvaro Herrera
On 2025-Mar-12, Amit Langote wrote: > Patch look good for committing? Ah sorry, I should have said so -- yes, it looks good to me. I feel a slight dislike for using URL-escaped characters in the mailing list link you added, because it means I cannot directly copy/paste the message-id string into

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Amit Langote
On Wed, Mar 12, 2025 at 7:09 PM Álvaro Herrera wrote: > On 2025-Mar-12, Amit Langote wrote: > > > I was able to construct a test case that crashes due to this bug: > > > > CREATE TYPE mood AS ENUM ('happy', 'sad', 'neutral'); > > CREATE FUNCTION mood_to_json(mood) RETURNS json AS $$ > > SELECT t

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Álvaro Herrera
On 2025-Mar-12, Amit Langote wrote: > I was able to construct a test case that crashes due to this bug: > > CREATE TYPE mood AS ENUM ('happy', 'sad', 'neutral'); > CREATE FUNCTION mood_to_json(mood) RETURNS json AS $$ > SELECT to_json($1::text); > $$ LANGUAGE sql IMMUTABLE; > CREATE CAST (mood

Re: Question about duplicate JSONTYPE_JSON check

2025-03-12 Thread Amit Langote
On Wed, Mar 12, 2025 at 12:07 PM Amit Langote wrote: > On Wed, Mar 12, 2025 at 10:00 AM Tender Wang wrote: > > Maciek Sakrejda 于2025年3月11日周二 08:12写道: > >> While exploring the jsonb code, I noticed that in > >> datum_to_jsonb_internal, the tcategory checks compares against > >> JSONTYPE_JSON twic

Re: Question about duplicate JSONTYPE_JSON check

2025-03-11 Thread Amit Langote
On Wed, Mar 12, 2025 at 10:00 AM Tender Wang wrote: > Maciek Sakrejda 于2025年3月11日周二 08:12写道: >> While exploring the jsonb code, I noticed that in >> datum_to_jsonb_internal, the tcategory checks compares against >> JSONTYPE_JSON twice. There's no reason for that, right? > > Yeah, the second JSONT

Re: Question about duplicate JSONTYPE_JSON check

2025-03-11 Thread Tender Wang
Maciek Sakrejda 于2025年3月11日周二 08:12写道: > While exploring the jsonb code, I noticed that in > datum_to_jsonb_internal, the tcategory checks compares against > JSONTYPE_JSON twice. There's no reason for that, right? > Yeah, the second JSONTYPE_JSON seems redundant. > > ... > > Ok, so, to try to

Re: Question about duplicate JSONTYPE_JSON check

2025-03-11 Thread Maciek Sakrejda
I'm adding the author/committer and reviewer of 3c152a2, since I think this may be a bug (my apologies if I'm misunderstanding this). See my previous e-mail quoted below: On Mon, Mar 10, 2025 at 5:11 PM Maciek Sakrejda wrote: > > While exploring the jsonb code, I noticed that in > datum_to_jsonb_

Re: Question about UpdateFullPageWrites() at the end of recovery.

2025-02-12 Thread Fujii Masao
On 2025/02/08 8:44, Masahiko Sawada wrote: Hi, I have a question about the comment of UpdateFullPageWrites() called at the end of recovery (in StartupXLOG()): /* * Update full_page_writes in shared memory and write an XLOG_FPW_CHANGE * record before resource manager writes c

Re: Question -- why is there no errhint_internal function?

2025-02-03 Thread Tom Lane
Peter Smith writes: > I noticed today that there is no 'errhint_internal' function partner > for the 'errhint' function. > Now, it might seem that hints are always intended for user output so > of course, you'll always want them translated... Yeah, I think that was the reasoning. If it needs a

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-15 Thread Amit Kapila
On Wed, Jan 15, 2025 at 4:57 PM Amit Kapila wrote: > > LGTM. I'll push this tomorrow unless there are more comments. I am > planning to push this to HEAD as this is an improvement in existing > docs and not any bug fix. > Pushed. -- With Regards, Amit Kapila.

Re: question about relation_open

2025-01-15 Thread Giampaolo Capelli
It seems the issue was related to some misconfiguration of my postgresql server, I've migrated from pg 14 to 17 and now the issue has disappeared. Also, I replaced relation_open with table_open Le mar. 14 janv. 2025 à 15:40, Tom Lane a écrit : > Giampaolo Capelli writes: > > The function relat

Re: question about relation_open

2025-01-15 Thread Giampaolo Capelli
hi Rahila, thank you for your response, I mean Segmentation fault, this is what I see in psql SSL SYSCALL error: EOF detected The connection to the server was lost. Attempting reset: Failed. !?> this is the content of in /var/log/postgresql/postgresql-14-main.log when a segmentation fault happens

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-15 Thread Amit Kapila
On Tue, Jan 14, 2025 at 7:11 PM Robert Treat wrote: > On Tue, Jan 14, 2025 at 1:24 AM Peter Smith wrote: > > On Tue, Jan 14, 2025 at 4:46 PM Robert Treat wrote: > > > > -- > > Tables with a replica identity defined as NOTHING, > > DEFAULT without a primary key, or USING > > INDEX with a drop

Re: question about executor hooks

2025-01-14 Thread Sami Imseih
I recommend you to review the documentation in backend/executor/README. It explains in good detail how the executor works. Specifically the section "Query Processing Control Flow" explains what each of the hooks you reference are responsible for. Also, be aware that there are operations, called uti

Re: question about relation_open

2025-01-14 Thread Tom Lane
Giampaolo Capelli writes: > The function relation_open returns a non NULL pointer in my extension, but > then the last line in the following snippet crashes postgres. > Relation rel; > rel = relation_open(relid, AccessShareLock); > Assert(rel != NULL); > Assert(rel->rd_rel != NULL); > Assert(rel

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-14 Thread Robert Treat
On Tue, Jan 14, 2025 at 1:24 AM Peter Smith wrote: > On Tue, Jan 14, 2025 at 4:46 PM Robert Treat wrote: > > On Mon, Jan 13, 2025 at 8:07 PM Peter Smith wrote: > > > On Tue, Jan 14, 2025 at 8:22 AM Robert Treat wrote: > > > > On Mon, Jan 13, 2025 at 3:55 AM Amit Kapila > > > > wrote: > > > >

Re: question about executor hooks

2025-01-14 Thread jian he
On Tue, Jan 14, 2025 at 5:08 PM Luca Ferrari wrote: > > In the file backend/executor/execMain.c there are the following hook types: > > /* Hooks for plugins to get control in ExecutorStart/Run/Finish/End */ > ExecutorStart_hook_type ExecutorStart_hook = NULL; > ExecutorRun_hook_type ExecutorRun_ho

Re: question about relation_open

2025-01-14 Thread Rahila Syed
Hi, > > > I want to call the function ReadBufferExtended > to get the raw data of a given buffer > and I've read in some examples that I need to call relation_open > first, in order to get a Relation variable and also lock the relation. > > The function relation_open returns a non NULL pointer in

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-13 Thread Peter Smith
On Tue, Jan 14, 2025 at 8:22 AM Robert Treat wrote: > > On Mon, Jan 13, 2025 at 3:55 AM Amit Kapila wrote: > > On Mon, Jan 13, 2025 at 10:22 AM Robert Treat wrote: > > > On Sun, Jan 12, 2025 at 11:00 PM Amit Kapila > > > wrote: > > > > On Sat, Jan 11, 2025 at 7:28 PM Robert Treat wrote: > > >

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-13 Thread Robert Treat
On Mon, Jan 13, 2025 at 3:55 AM Amit Kapila wrote: > On Mon, Jan 13, 2025 at 10:22 AM Robert Treat wrote: > > On Sun, Jan 12, 2025 at 11:00 PM Amit Kapila > > wrote: > > > On Sat, Jan 11, 2025 at 7:28 PM Robert Treat wrote: > > > +If a table with replica identity set to NOTHING > > > +

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-13 Thread Amit Kapila
On Mon, Jan 13, 2025 at 10:22 AM Robert Treat wrote: > > On Sun, Jan 12, 2025 at 11:00 PM Amit Kapila wrote: > > > > On Sat, Jan 11, 2025 at 7:28 PM Robert Treat wrote: > > > > > > Definitely couldn't hurt; Updated patch cleans that up a bit and > > > tweaks the link to alter table replica statu

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-12 Thread Robert Treat
On Sun, Jan 12, 2025 at 11:00 PM Amit Kapila wrote: > > On Sat, Jan 11, 2025 at 7:28 PM Robert Treat wrote: > > > > Definitely couldn't hurt; Updated patch cleans that up a bit and > > tweaks the link to alter table replica status. > > > > IIUC, we have changed following to clarify the REPLICA ID

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-12 Thread Amit Kapila
On Sat, Jan 11, 2025 at 7:28 PM Robert Treat wrote: > > Definitely couldn't hurt; Updated patch cleans that up a bit and > tweaks the link to alter table replica status. > IIUC, we have changed following to clarify the REPLICA IDENTITY usage: If a table without a replica identity is - added to

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-12 Thread Peter Smith
On Sun, Jan 12, 2025 at 12:58 AM Robert Treat wrote: > > On Thu, Jan 9, 2025 at 10:41 PM Peter Smith wrote: > > > > Hi Robert. > > > > The content and rendering of patch v2 LGTM. > > > > Should the word wrapping within the file > > doc/src/sgml/logical-replication.sgml be tidied up though? > > >

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-11 Thread Robert Treat
On Thu, Jan 9, 2025 at 10:41 PM Peter Smith wrote: > > Hi Robert. > > The content and rendering of patch v2 LGTM. > > Should the word wrapping within the file > doc/src/sgml/logical-replication.sgml be tidied up though? > Definitely couldn't hurt; Updated patch cleans that up a bit and tweaks the

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-09 Thread Peter Smith
Hi Robert. The content and rendering of patch v2 LGTM. Should the word wrapping within the file doc/src/sgml/logical-replication.sgml be tidied up though? == Kind Regards, Peter Smith. Fujitsu Australia

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-09 Thread Robert Treat
On Thu, Jan 9, 2025 at 2:46 AM Peter Smith wrote: > > On Sat, Jan 4, 2025 at 4:23 AM Robert Treat wrote: > > > > On Wed, Dec 18, 2024 at 5:56 AM Amit Kapila wrote: > > > > > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe > > > wrote: > > > > > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smit

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-08 Thread Peter Smith
On Sat, Jan 4, 2025 at 4:23 AM Robert Treat wrote: > > On Wed, Dec 18, 2024 at 5:56 AM Amit Kapila wrote: > > > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe > > wrote: > > > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > > - how to set the replica identity. If a table wit

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2025-01-03 Thread Robert Treat
On Wed, Dec 18, 2024 at 5:56 AM Amit Kapila wrote: > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > - how to set the replica identity. If a table without a replica > > > identity is > > > + how to set the replica iden

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-12-18 Thread Amit Kapila
On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > - how to set the replica identity. If a table without a replica identity > > is > > + how to set the replica identity. If a table without a replica identity > > + (or with repl

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-12-18 Thread Amit Kapila
On Thu, Feb 8, 2024 at 7:24 PM James Coleman wrote: > > On Thu, Feb 8, 2024 at 4:47 AM Ashutosh Bapat > wrote: > > > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe > > wrote: > > > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > > - how to set the replica identity. If a tabl

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-12-17 Thread Peter Smith
On Wed, Dec 18, 2024 at 2:50 AM James Coleman wrote: > > On Mon, Dec 16, 2024 at 6:17 PM Peter Smith wrote: > > > > While revisiting some old threads, I found this one that seemed to > > reach a conclusion, but then it seemed nothing happened. > > > > After multiple suggestions AFAICT James prefe

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-12-17 Thread James Coleman
On Mon, Dec 16, 2024 at 6:17 PM Peter Smith wrote: > > While revisiting some old threads, I found this one that seemed to > reach a conclusion, but then it seemed nothing happened. > > After multiple suggestions AFAICT James preferred the docs [1] > modification suggested [2] by Laurenz. > > Shoul

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-12-16 Thread Peter Smith
While revisiting some old threads, I found this one that seemed to reach a conclusion, but then it seemed nothing happened. After multiple suggestions AFAICT James preferred the docs [1] modification suggested [2] by Laurenz. Should we make a CF entry for this with the status RfC, or was the whol

Re: Question about VACUUM behavior with sub-transactions in stored procedures

2024-10-31 Thread Кириллов Вячеслав
Hello everyone, I'd like to revisit the topic of auto VACUUM's interaction with stored procedures that perform transactions, with a more technical clarification as suggested earlier. Let's consider the behavior of VACUUM and system table updates after transaction commits in procedures that freq

Re: Question about VACUUM behavior with sub-transactions in stored procedures

2024-10-31 Thread Кириллов Вячеслав
egards, Vyacheslav Kirillov От: David G. Johnston Отправлено: 21 октября 2024 г. 16:55 Кому: Кириллов Вячеслав Копия: pgsql-hack...@postgresql.org Тема: Re: Question about VACUUM behavior with sub-transactions in stored procedures On Monday, October 21, 2024,

Re: Question about VACUUM behavior with sub-transactions in stored procedures

2024-10-21 Thread David G. Johnston
On Monday, October 21, 2024, Кириллов Вячеслав wrote: > I have a question regarding the behavior of the auto VACUUM in PostgreSQL > in the context of using stored procedures with sub-transactions. > > This is a general usage inquiry not suited to discussion on -hackers. We have a -general mailin

Re: Question about maxTapes & selectnewtape & dumptuples

2024-06-30 Thread Andy Fan
Heikki Linnakangas writes: > On 30/06/2024 12:48, Andy Fan wrote: >> for example, at the first use of outputTapes[x], it stores (1, 3, 5, >> 7), >> and later (2, 4, 6, 8) are put into it. so the overall of (1, 3, 5, 7, >> 2, 4, 6, 8) are not sorted? Where did I go wrong? > > There's a distincti

Re: Question about maxTapes & selectnewtape & dumptuples

2024-06-30 Thread Heikki Linnakangas
On 30/06/2024 12:48, Andy Fan wrote: merge sorts requires all the tuples in each input are pre-sorted (1), and in tuplesort.c, when the workmem is full, we dumptuples into destTape. (2). it looks to me that we need a unlimited number of Tapes if the number of input tuples is big enough. However

Re: question regarding policy for patches to out-of-support branches

2024-06-07 Thread Robert Haas
On Thu, Jun 6, 2024 at 10:04 PM Tom Lane wrote: > > I added them here with minimal copy editing an no attempt to organize or > > sort into groups: > > https://wiki.postgresql.org/wiki/Committing_checklist#Policies > > If someone has thoughts on how to improve I am happy to make more changes. > > T

Re: question regarding policy for patches to out-of-support branches

2024-06-06 Thread Tom Lane
Joe Conway writes: > On 6/6/24 14:12, Tom Lane wrote: >> To get a sense of how much of a problem we have, I grepped the git >> history for comments mentioning project policies. Ignoring ones >> that are really talking about very localized issues, what I found >> is attached. It seems like it's l

Re: question regarding policy for patches to out-of-support branches

2024-06-06 Thread Joe Conway
On 6/6/24 14:12, Tom Lane wrote: Robert Haas writes: On Thu, Jun 6, 2024 at 4:25 AM Hannu Krosing wrote: Not absolutely sure, but would at least adding a page to PostgreSQL Wiki about this make sense ? I feel like we need to do something. Tom says this is a policy, and he's made that comme

Re: question regarding policy for patches to out-of-support branches

2024-06-06 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 6, 2024 at 4:25 AM Hannu Krosing wrote: >> Not absolutely sure, but would at least adding a page to PostgreSQL >> Wiki about this make sense ? > I feel like we need to do something. Tom says this is a policy, and > he's made that comment before about other thing

Re: question regarding policy for patches to out-of-support branches

2024-06-06 Thread Robert Haas
On Thu, Jun 6, 2024 at 4:25 AM Hannu Krosing wrote: > Not absolutely sure, but would at least adding a page to PostgreSQL > Wiki about this make sense ? I feel like we need to do something. Tom says this is a policy, and he's made that comment before about other things, but the fact that they're

Re: question regarding policy for patches to out-of-support branches

2024-06-06 Thread Hannu Krosing
On Wed, Jun 5, 2024 at 8:29 PM Tom Lane wrote: > > Joe Conway writes: > > I was having a discussion regarding out-of-support branches and effort > > to keep them building, but could not for the life of me find any actual > > documented policy (although I distinctly remember that we do something..

Re: question regarding policy for patches to out-of-support branches

2024-06-05 Thread Tom Lane
Joe Conway writes: > I was having a discussion regarding out-of-support branches and effort > to keep them building, but could not for the life of me find any actual > documented policy (although I distinctly remember that we do something...). > Is the policy written down somewhere, or is it onl

Re: Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends?

2024-05-24 Thread Srinath Reddy Sadipiralla
Thanks for the reply,yeah i know about FreeWaitEventSet() but that is being used in few places but not for handling backends. i got it that FDs like FeBeWaitSet->epoll_fd will be free'd when connection is terminated but as i mentioned wouldn't it be an issue if the connection is long living let

Re: Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends?

2024-05-24 Thread Heikki Linnakangas
On 24/05/2024 15:17, Srinath Reddy Sadipiralla wrote: Hi PostgreSQL Community, when a backend process starts, pq_init is called where it opens a FD during  CreateWaitEventSet() if (!AcquireExternalFD()) { /* treat this as though epoll_create1 itself returned EMFILE */ elog(ERROR, "epoll_create1

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread James Coleman
On Thu, Feb 8, 2024 at 4:47 AM Ashutosh Bapat wrote: > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > - how to set the replica identity. If a table without a replica > > > identity is > > > + how to set the replica id

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread James Coleman
On Wed, Feb 7, 2024 at 11:27 PM Laurenz Albe wrote: > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > - how to set the replica identity. If a table without a replica identity > > is > > + how to set the replica identity. If a table without a replica identity > > + (or with rep

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread Ashutosh Bapat
On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > - how to set the replica identity. If a table without a replica identity > > is > > + how to set the replica identity. If a table without a replica identity > > + (or with repl

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Laurenz Albe
On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > - how to set the replica identity. If a table without a replica identity is > + how to set the replica identity. If a table without a replica identity > + (or with replica identity behavior the same as > NOTHING) is > added to a p

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Peter Smith
On Thu, Feb 8, 2024 at 11:12 AM James Coleman wrote: > > On Wed, Feb 7, 2024 at 6:04 PM Peter Smith wrote: > > > > On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > > > > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe > > > wrote: > > > > > > > > On Wed, 2024-02-07 at 15:12 -0500, James C

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread James Coleman
On Wed, Feb 7, 2024 at 6:04 PM Peter Smith wrote: > > On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe > > wrote: > > > > > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > > > We recently noticed some behavior that seems reaso

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Peter Smith
On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe wrote: > > > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > > We recently noticed some behavior that seems reasonable but also > > > surprised our engineers based on the docs. > > >

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread James Coleman
On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe wrote: > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > We recently noticed some behavior that seems reasonable but also > > surprised our engineers based on the docs. > > > > If we have this setup: > > create table items(i int); > > inser

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Laurenz Albe
On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > We recently noticed some behavior that seems reasonable but also > surprised our engineers based on the docs. > > If we have this setup: > create table items(i int); > insert into items(i) values (1); > create publication test_pub for all t

Re: Question on LWLockMode in dsa.c

2024-02-06 Thread Dilip Kumar
On Tue, Jan 30, 2024 at 6:24 AM Masahiko Sawada wrote: > > Hi, > > While working on radix tree patch[1], John Naylor found that dsa.c > doesn't already use shared locks even in dsa_dump(). dsa_dump() seems > a pure read-only function so I thought we could use a shared lock mode > there. Is there a

Re: Question on LWLockMode in dsa.c

2024-01-30 Thread Masahiko Sawada
On Tue, Jan 30, 2024 at 4:43 PM Bharath Rupireddy wrote: > > On Tue, Jan 30, 2024 at 6:24 AM Masahiko Sawada wrote: > > > > Hi, > > > > While working on radix tree patch[1], John Naylor found that dsa.c > > doesn't already use shared locks even in dsa_dump(). dsa_dump() seems > > a pure read-only

Re: Question on LWLockMode in dsa.c

2024-01-29 Thread Bharath Rupireddy
On Tue, Jan 30, 2024 at 6:24 AM Masahiko Sawada wrote: > > Hi, > > While working on radix tree patch[1], John Naylor found that dsa.c > doesn't already use shared locks even in dsa_dump(). dsa_dump() seems > a pure read-only function so I thought we could use a shared lock mode > there. Is there a

Re: Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-23 Thread John Naylor
On Thu, Nov 23, 2023 at 4:29 PM Xiang Gao wrote: > > Thank you for your detailed explanation. > Can I do some testing and submit this patch? Please do, thanks.

RE: Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-23 Thread Xiang Gao
On Date: Mon, 20 Nov 2023 16:05:43PM +0700, John Naylor wrote: >On Wed, Nov 8, 2023 at 2:44=E2=80=AFPM Xiang Gao wrote: >> * function. We could instead adopt the behavior of Arm's vmaxvq_u32(), i= >.e. >> * check each 32-bit element, but that would require an additional mask >> * operation on

Re: Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-20 Thread John Naylor
On Wed, Nov 8, 2023 at 2:44 PM Xiang Gao wrote: > * function. We could instead adopt the behavior of Arm's vmaxvq_u32(), i.e. > * check each 32-bit element, but that would require an additional mask > * operation on x86. > */ > But I still don't understand why the vmaxvq_u32 intrinsic is not

Re: Question about non-blocking mode in libpq

2023-11-13 Thread Bruce Momjian
On Mon, Nov 13, 2023 at 01:01:32PM -0500, Bruce Momjian wrote: > On Wed, Nov 1, 2023 at 08:47:33AM -0400, Bruce Momjian wrote: > > On Tue, Oct 31, 2023 at 10:16:07PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > > > >> What

Re: Question about non-blocking mode in libpq

2023-11-13 Thread Bruce Momjian
On Wed, Nov 1, 2023 at 08:47:33AM -0400, Bruce Momjian wrote: > On Tue, Oct 31, 2023 at 10:16:07PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > > >> What I'm objecting to is removal of the bit about "if they need to be > > >> c

Re: Question about non-blocking mode in libpq

2023-11-01 Thread Bruce Momjian
On Tue, Oct 31, 2023 at 10:16:07PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > >> What I'm objecting to is removal of the bit about "if they need to be > >> called again". That provides a hint that retry is the appropriate > >> re

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Tom Lane
Bruce Momjian writes: > On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: >> What I'm objecting to is removal of the bit about "if they need to be >> called again". That provides a hint that retry is the appropriate >> response to a failure. Admittedly, it's not 100% clear, but your >> v

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Bruce Momjian
On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > Okay, I added "_successful_ calls", attached. I am not sure what else > > to add. > > What I'm objecting to is removal of the bit about "if they need to be > called again". That provides a hint that retry is t

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Tom Lane
Bruce Momjian writes: > Okay, I added "_successful_ calls", attached. I am not sure what else > to add. What I'm objecting to is removal of the bit about "if they need to be called again". That provides a hint that retry is the appropriate response to a failure. Admittedly, it's not 100% clear

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Bruce Momjian
On Tue, Oct 31, 2023 at 01:58:34PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I modified your patch, attached, that I would like to apply to all > > supported versions. > > This seems to have lost the information about what to do if these > functions fail. I think probably the only possi

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Tom Lane
Bruce Momjian writes: > I modified your patch, attached, that I would like to apply to all > supported versions. This seems to have lost the information about what to do if these functions fail. I think probably the only possible failure cause in nonblock mode is "unable to enlarge the buffer be

Re: Question about non-blocking mode in libpq

2023-10-31 Thread Bruce Momjian
On Wed, Jul 21, 2021 at 10:15:09AM +0900, Yugo NAGATA wrote: > I understood that, although PQgetResult() also flushes the buffer, we still > should call PQflush() beforehand because we would not like get blocked after > calling PQgetResult(). Thanks. I modified your patch, attached, that I would l

Re: [question] multil-column range partition prune

2023-08-10 Thread Christoph Moench-Tegeder
## tender wang (tndrw...@gmail.com): > But I want to know why we don't prune when just have latter partition key > in whereClause. Start with the high level documentation https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARTITION where the 5th paragraph points you to h

Re: [question] multil-column range partition prune

2023-08-10 Thread Matthias van de Meent
On Thu, 10 Aug 2023 at 12:16, tender wang wrote: > > I have an range partition and query below: > create table p_range(a int, b int) partition by range (a,b); create table > p_range1 partition of p_range for values from (1,1) to (3,3); create table > p_range2 partition of p_range for values from

Re: Question about use_physical_tlist() which is applied on Scan path

2023-07-26 Thread 油屋
I had the same question recently. In addition, I looked at the results of tpch which scale factor is 1 ran on postgres REL_15_STABLE and observed no performance improvement from physical tlist. To be specific, I run two versions of tpch, one with physical tlist enabled and one with physical tlist d

Re: Question about use_physical_tlist() which is applied on Scan path

2023-07-26 Thread Alvaro Herrera
On 2023-Jul-26, Jian Guo wrote: > It looks the columns besides `ps_supplycost` and `ps_availqty` are not > necessary, but fetched from tuples all at once. For the row-based > storage such as heap, it looks fine, but for column-based storage, it > would result into unnecessary overhead and impact p

Re: [Question] Can someone provide some links related to the MemoryContext?

2023-07-11 Thread Matthias van de Meent
On Tue, 11 Jul 2023 at 15:11, Wen Yi wrote: > > Hi hackers, > I am learning the MemoryContext subsystem, but I really don't know where to > find it's document (The PostgreSQL Document just provide some spi function). > Can someone provide me some solutions? > Thanks in advance! You should take

Re: Question about error message in auth.c

2023-05-24 Thread Michael Paquier
On Wed, May 24, 2023 at 02:12:23PM -0400, Dave Cramer wrote: > The last piece of information is the encryption state. However when an SSL > connection fails to authenticate the state is not encrypted. > > When would it ever be encrypted if authentication fails ? I am not sure to follow. Under a S

Re: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-22 Thread Daniel Gustafsson
> On 22 Mar 2023, at 04:19, Hayato Kuroda (Fujitsu) > wrote: > I have also grepped to detect another wrong markups, and I think at least > "PostgreSQL" should be changed. PSA the patch. I agree with that analysis, this instance should be marked up with but not the other ones. I'll go ahead wi

RE: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-21 Thread Hayato Kuroda (Fujitsu)
Dear Daniel, Tom, > > On 20 Mar 2023, at 15:31, Tom Lane wrote: > > > > "Hayato Kuroda (Fujitsu)" writes: > >> While checking documentations, I found that one line notes our product as > >> "PostgreSQL", whereas another line notes > as just > >> "PostgreSQL". > > > > IMO the convention is to use

Re: Question about pull_up_sublinks_qual_recurse

2023-03-20 Thread Andy Fan
On Sat, Oct 15, 2022 at 3:27 AM Tom Lane wrote: > Andy Fan writes: > > After some more self review, I find my proposal has the following side > > effects. > > Yeah, I do not think this works at all. The discussion of outer join > reordering in optimizer/README says that that doesn't work

Re: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-20 Thread Daniel Gustafsson
> On 20 Mar 2023, at 15:31, Tom Lane wrote: > > "Hayato Kuroda (Fujitsu)" writes: >> While checking documentations, I found that one line notes our product as >> "PostgreSQL", whereas another line notes as just >> "PostgreSQL". > > IMO the convention is to use the tag everywhere that we > spel

Re: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-20 Thread Tom Lane
"Hayato Kuroda (Fujitsu)" writes: > While checking documentations, I found that one line notes our product as > "PostgreSQL", whereas another line notes as just > "PostgreSQL". IMO the convention is to use the tag everywhere that we spell out "PostgreSQL". I don't think it's actually rendered d

Re: [Question] Similar Cost but variable execution time in sort

2023-03-05 Thread Ankit Kumar Pandey
On 05/03/23 22:21, Tom Lane wrote: Ankit Kumar Pandey writes: > From my observation, we only account for data in cost computation but > not number of columns sorted. > Should we not account for number of columns in sort as well? I'm not sure whether simply charging more for 2 sort column

Re: [Question] Similar Cost but variable execution time in sort

2023-03-05 Thread Tom Lane
Ankit Kumar Pandey writes: > From my observation, we only account for data in cost computation but > not number of columns sorted. > Should we not account for number of columns in sort as well? I'm not sure whether simply charging more for 2 sort columns than 1 would help much. The traditional

Re: Question regarding "Make archiver process an auxiliary process. commit"

2023-01-31 Thread Michael Paquier
On Tue, Jan 31, 2023 at 08:30:13PM -0800, Nathan Bossart wrote: > I'm not sure why I thought time.h was no longer needed. time() is clearly > used elsewhere in this file. Here's a new version with that added back. Ah, I see. The key point is that curtime and last_copy_time will most likely be t

Re: Question regarding "Make archiver process an auxiliary process. commit"

2023-01-31 Thread Nathan Bossart
On Fri, Jan 20, 2023 at 11:39:56AM -0800, Nathan Bossart wrote: > I noticed that time.h is no longer needed by the archiver, so I removed > that and fixed an indentation nitpick in the attached v2. I'm going to set > the commitfest entry to ready-for-committer shortly after sending this > message.

Re: Question regarding "Make archiver process an auxiliary process. commit"

2023-01-20 Thread Nathan Bossart
On Wed, Jan 04, 2023 at 11:35:33AM +0530, Sravan Kumar wrote: > I have added the thread to the commitfest: > https://commitfest.postgresql.org/42/ > Did you get a chance to review the patch? Please let me know if you > need anything from my end. This seems like worthwhile simplification to me. U

Re: Question about initial logical decoding snapshot

2023-01-18 Thread shveta malik
Hello, I was curious as to why we need 3rd running_xact and wanted to learn more about it, so I have made a few changes to come up with a patch which builds the snapshot in 2 running_xacts. The motive is to run the tests to see the failures/issues with this approach to understand the need of readi

Re: Question regarding "Make archiver process an auxiliary process. commit"

2023-01-03 Thread Sravan Kumar
I have added the thread to the commitfest: https://commitfest.postgresql.org/42/ Did you get a chance to review the patch? Please let me know if you need anything from my end. Thanks & Regards, Sravan Velagandula EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Wed,

Re: Question about initial logical decoding snapshot

2023-01-03 Thread Amit Kapila
On Tue, Jan 3, 2023 at 4:44 PM Amit Kapila wrote: > > On Fri, Dec 30, 2022 at 11:57 PM Chong Wang wrote: > > > > I'm studying the source code about creation of initial logical decoding > > snapshot. What confused me is that why must we process 3 xl_running_xacts > > before we get to the consist

Re: Question about initial logical decoding snapshot

2023-01-03 Thread Amit Kapila
On Fri, Dec 30, 2022 at 11:57 PM Chong Wang wrote: > > I'm studying the source code about creation of initial logical decoding > snapshot. What confused me is that why must we process 3 xl_running_xacts > before we get to the consistent state. I think we only need 2 > xl_running_xacts. > > I th

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Kyotaro Horiguchi
At Wed, 7 Dec 2022 11:28:23 +0530, Sravan Kumar wrote in > On Tue, Dec 6, 2022 at 5:24 PM Bharath Rupireddy < > bharath.rupireddyforpostg...@gmail.com> wrote: > > > On Tue, Dec 6, 2022 at 4:57 PM Sravan Kumar > > wrote: > > > > > > Thank you for the feedback. > > > > > > I'll be glad to help w

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Kyotaro Horiguchi
At Tue, 6 Dec 2022 17:23:50 +0530, Bharath Rupireddy wrote in > Thanks. +1 for fixing this. > > I would like to quote recent discussions on reducing the useless > wakeups or increasing the sleep/hibernation times in various processes > to reduce the power savings [1] [2] [3] [4] [5]. With that

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Sravan Kumar
On Tue, Dec 6, 2022 at 5:24 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Tue, Dec 6, 2022 at 4:57 PM Sravan Kumar > wrote: > > > > Thank you for the feedback. > > > > I'll be glad to help with the fix. Here's the patch for review. > > Thanks. +1 for fixing this. >> I

  1   2   3   >