Re: Synchronizing slots from primary to standby

2023-10-27 Thread Amit Kapila
On Fri, Oct 27, 2023 at 9:00 PM Drouvot, Bertrand wrote: > > On 10/27/23 10:35 AM, Amit Kapila wrote: > > On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand > > > > I think even if we provide such an API, we need to have logic to get > > the slots from the primary and create them. > > Yeah, my

Re: PATCH: Add REINDEX tag to event triggers

2023-10-27 Thread jian he
On Fri, Oct 27, 2023 at 3:15 PM Michael Paquier wrote: > > On Mon, Sep 04, 2023 at 08:00:52PM +0200, Jim Jones wrote: > > LGTM. It applies and builds cleanly, all tests pass and documentation also > > builds ok. The CFbot seems also much happier now :) > > + /* > +* Open and lock

Re: maybe a type_sanity. sql bug

2023-10-27 Thread Tom Lane
Michael Paquier writes: > On Fri, Oct 27, 2023 at 11:45:44AM +0800, jian he wrote: >> The test seems to assume the following sql query should return zero row. >> but it does not. I don't know much about the "relreplident" column. > The problem is about relkind, as 'I' refers to a partitioned

Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml

2023-10-27 Thread Bruce Momjian
On Fri, Aug 12, 2022 at 12:58:28PM -0700, David G. Johnston wrote: > I dislike using the word accurate here now, it will be accurate, but we don't > promise perfect timeliness.  So it needs to change: > >  diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml > index

Re: race condition in pg_class

2023-10-27 Thread Noah Misch
On Fri, Oct 27, 2023 at 06:40:55PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Fri, Oct 27, 2023 at 03:32:26PM -0400, Tom Lane wrote: > >> I'm inclined to propose that heap_inplace_update should check to > >> make sure that it's operating on the latest version of the tuple > >> (including,

Re: unnest multirange, returned order

2023-10-27 Thread Jeff Davis
On Fri, 2023-10-27 at 08:48 +0200, Laurenz Albe wrote: > On Fri, 2023-10-13 at 15:33 -0400, Daniel Fredouille wrote: > > sorry it took me some time to reply. Yes, the patch is perfect if > > this is indeed the behavior. > > I'm sending a reply to the hackers list so that I can add the patch > to

Re: [PATCH v1] [doc] polish the comments of reloptions

2023-10-27 Thread Bruce Momjian
Patch applied. --- On Tue, Aug 30, 2022 at 11:56:30AM +0800, Junwang Zhao wrote: > When adding an option, we have 5 choices (bool, integer, real, enum, string), > so the comments seem stale. > > There are some sentences

Re: Fix search_path for all maintenance commands

2023-10-27 Thread Jeff Davis
On Fri, 2023-07-21 at 15:32 -0700, Jeff Davis wrote: > Attached is a new version. Do we still want to do this? Right now, the MAINTAIN privilege is blocking on some way to prevent malicious users from abusing the MAINTAIN privilege and search_path to acquire the table owner's privileges. The

Re: [PATCH] minor bug fix for pg_dump --clean

2023-10-27 Thread Bruce Momjian
FYI, this was improved in a recent commit: commit 75af0f401f Author: Tom Lane Date: Fri Sep 29 13:13:54 2023 -0400 Doc: improve description of dump/restore's --clean and --if-exists. Try to make these option descriptions a

Re: request clarification on pg_restore documentation

2023-10-27 Thread Tom Lane
Bruce Momjian writes: > Does anyone have a suggestion on how to handle this issue? It might be that the later decision to change the representation of sequence dumps would make it possible to undo 4317e0246c and go back to having --schema-only/--data-only be true aliases for --section. But it'd

Re: race condition in pg_class

2023-10-27 Thread Tom Lane
Noah Misch writes: > On Fri, Oct 27, 2023 at 03:32:26PM -0400, Tom Lane wrote: >> I'm inclined to propose that heap_inplace_update should check to >> make sure that it's operating on the latest version of the tuple >> (including, I guess, waiting for an uncommitted update?) and throw >> error if

Re: request clarification on pg_restore documentation

2023-10-27 Thread Bruce Momjian
Does anyone have a suggestion on how to handle this issue? The report is a year old. --- On Thu, Oct 6, 2022 at 10:28:15AM -0400, Bruce Momjian wrote: > On Thu, Sep 29, 2022 at 02:30:13PM +, PG Doc comments form

Re: race condition in pg_class

2023-10-27 Thread Noah Misch
On Fri, Oct 27, 2023 at 03:32:26PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Thu, Oct 26, 2023 at 09:44:04PM -0700, Noah Misch wrote: > >> We'll likely need to change how we maintain relhasindex or perhaps take a > >> lock > >> in GRANT. > > > The main choice is accepting more DDL

Re: Fwd: Annoying corruption in PostgreSQL.

2023-10-27 Thread Tomas Vondra
On 10/27/23 23:10, Kirill Reshke wrote: > > Sorry, seems that i replied only to Tomas, so forwarding message. > -- Forwarded message - > From: *Kirill Reshke* > > Date: Sat, 28 Oct 2023 at 02:06 > Subject: Re: Annoying corruption in PostgreSQL. >

Re: Pre-proposal: unicode normalized text

2023-10-27 Thread Jeff Davis
On Mon, 2023-10-16 at 20:32 -0700, Jeff Davis wrote: > On Wed, 2023-10-11 at 08:56 +0200, Peter Eisentraut wrote: > > We need to be careful about precise terminology.  "Valid" has a > > defined > > meaning for Unicode.  A byte sequence can be valid or not as UTF- > > 8.  > > But > > a string

Fwd: Annoying corruption in PostgreSQL.

2023-10-27 Thread Kirill Reshke
Sorry, seems that i replied only to Tomas, so forwarding message. -- Forwarded message - From: Kirill Reshke Date: Sat, 28 Oct 2023 at 02:06 Subject: Re: Annoying corruption in PostgreSQL. To: Tomas Vondra Hi Tomas! Thanks for the explanation! 1) 11 to 15. This week there

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-10-27 Thread Jeff Davis
On Thu, 2023-09-21 at 14:33 -0700, Jeff Davis wrote: > I have attached an updated patch. Changes: Withdrawing this from CF due to lack of consensus. I'm happy to resume this discussion if someone sees a path forward to make it easier to secure the search_path; or at least help warn users when a

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-10-27 Thread Jeff Davis
On Fri, 2023-10-27 at 03:46 +0530, Bharath Rupireddy wrote: > > Almost all the available backend > page_read callbacks read_local_xlog_page_no_wait, > read_local_xlog_page, logical_read_xlog_page except XLogPageRead > (which is used for recovery when WAL buffers aren't used at all) have > one

Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-10-27 Thread Jeff Davis
On Thu, 2023-10-26 at 16:28 -0500, Nathan Bossart wrote: > On Fri, Aug 18, 2023 at 02:44:31PM -0700, Jeff Davis wrote: > > +    SET search_path = admin, "!pg_temp"; > > I think it's unfortunate that these new identifiers must be quoted.  > I > wonder if we could call these something like

Re: race condition in pg_class

2023-10-27 Thread Tom Lane
Noah Misch writes: > On Thu, Oct 26, 2023 at 09:44:04PM -0700, Noah Misch wrote: >> We'll likely need to change how we maintain relhasindex or perhaps take a >> lock >> in GRANT. > The main choice is accepting more DDL blocking vs. accepting inefficient > relcache builds. Options I'm seeing:

Buf fix: update-po for PGXS does not work

2023-10-27 Thread Ryo Matsumura (Fujitsu)
Hi hackers, I found that 'make update-po' for PGXS does not work. Even if execute 'make update-po', but xx.po.new is not generated. I don't test and check for meson build system, but I post it tentatively. I attached patch and test set. 'update-po' tries to find *.po files $top_srcdir, but there

Re: race condition in pg_class

2023-10-27 Thread Noah Misch
On Thu, Oct 26, 2023 at 09:44:04PM -0700, Noah Misch wrote: > On Wed, Oct 25, 2023 at 01:39:41PM +0300, Smolkin Grigory wrote: > > We are running PG13.10 and recently we have encountered what appears to be > > a bug due to some race condition between ALTER TABLE ... ADD CONSTRAINT and > > some

Re: Annoying corruption in PostgreSQL.

2023-10-27 Thread Tomas Vondra
On 10/27/23 14:19, Kirill Reshke wrote: > Hi hackers! > > We run a large amount of PostgreSQL clusters in our production. They > differ by versions (we have 11-16 pg), load, amount of data, schema, > etc. From time to time, postgresql corruption happens. It says > ERROR,XX001,"missing chunk

Re: Enderbury Island disappeared from timezone database

2023-10-27 Thread Tom Lane
Victor Wagner writes: > Tom Lane пишет: >> Fun. I bet that breaks more than just Pacific/Enderbury. >> Can you try changing that entry to Pacific/Kanton, and repeat? > I did. No more problems. > I.e. I've invoked > sed -i 's/Enderburry/Kanton/' $prefix/share/timezonesets/* > and rerun tests.

Re: Add recovery to pg_control and remove backup_label

2023-10-27 Thread David G. Johnston
On Fri, Oct 27, 2023 at 7:10 AM David Steele wrote: > On 10/26/23 17:27, David G. Johnston wrote: > > > Can we not figure out some way to place the relevant files onto the > > server somewhere so that a simple "cp" command would work? Have > > pg_backup_stop return paths instead of contents,

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

2023-10-27 Thread Tomas Vondra
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+. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Enderbury Island disappeared from timezone database

2023-10-27 Thread Victor Wagner
В Fri, 27 Oct 2023 11:17:03 -0400 Tom Lane пишет: > Victor Wagner writes: > > Tom Lane пишет: > >> Did Ubuntu decide to remove *all* backzone links from their data? > >> Or just that one? Either way, I think they're going to get a > >> tsunami of pushback pretty quickly. People like their

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-10-27 Thread Laurenz Albe
On Fri, 2023-10-27 at 11:34 +0200, Michael Banck wrote: > On Fri, Oct 27, 2023 at 09:03:04AM +0200, Laurenz Albe wrote: > > On Fri, 2022-11-04 at 10:49 +0100, Laurenz Albe wrote: > > > On Thu, 2022-11-03 at 11:32 +0100, Laurenz Albe wrote: > > > > On Wed, 2022-11-02 at 19:29 +, David Burns

Re: Synchronizing slots from primary to standby

2023-10-27 Thread Drouvot, Bertrand
Hi, On 10/27/23 10:35 AM, Amit Kapila wrote: On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand I think even if we provide such an API, we need to have logic to get the slots from the primary and create them. Yeah, my idea was to add an API (in addition to what is already in place). Say,

Re: Synchronizing slots from primary to standby

2023-10-27 Thread Drouvot, Bertrand
Hi, On 10/27/23 10:51 AM, shveta malik wrote: On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand wrote: I discussed this with my colleague Hou-San and we think that one possibility could be to somehow accelerate the increment of restart_lsn on primary. This can be achieved by connecting to

Re: Enderbury Island disappeared from timezone database

2023-10-27 Thread Tom Lane
Victor Wagner writes: > Tom Lane пишет: >> Did Ubuntu decide to remove *all* backzone links from their data? >> Or just that one? Either way, I think they're going to get a tsunami >> of pushback pretty quickly. People like their obsolete zone names. > They split tzdata packages into tzdata

Re: Synchronizing slots from primary to standby

2023-10-27 Thread Drouvot, Bertrand
Hi, On 10/27/23 11:56 AM, shveta malik wrote: On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand wrote: Hi, On 10/25/23 5:00 AM, shveta malik wrote: On Tue, Oct 24, 2023 at 11:54 AM Drouvot, Bertrand wrote: Hi, On 10/23/23 2:56 PM, shveta malik wrote: On Mon, Oct 23, 2023 at 5:52 PM

Re: pg_stat_statements and "IN" conditions

2023-10-27 Thread Dmitry Dolgov
> On Thu, Oct 26, 2023 at 09:08:42AM +0900, Michael Paquier wrote: > typedef struct ArrayExpr > { > + pg_node_attr(custom_query_jumble) > + > > Hmm. I am not sure that this is the best approach > implementation-wise. Wouldn't it be better to invent a new > pg_node_attr (these can include

Re: Enderbury Island disappeared from timezone database

2023-10-27 Thread Victor Wagner
В Fri, 27 Oct 2023 10:25:57 -0400 Tom Lane пишет: > Victor Wagner writes: > > I've encountered following problem compiling PostgreSQL 15.4 with > > just released Ubuntu 23.10. > > > I'm compiling postgres with --with-system-tzdata and then regression > > test sysviews fails with following

Re: MERGE ... RETURNING

2023-10-27 Thread Dean Rasheed
On Wed, 25 Oct 2023 at 02:07, Merlin Moncure wrote: > > On Tue, Oct 24, 2023 at 2:11 PM Jeff Davis wrote: >> >> Can we revisit the idea of a per-WHEN RETURNING clause? The returning >> clauses could be treated kind of like a UNION, which makes sense >> because it really is a union of different

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Tom Lane
Dean Rasheed writes: > On Fri, 27 Oct 2023 at 13:56, Ashutosh Bapat > wrote: >> Should we change this to call INTERVAL_NOBEGIN() to be added by >> infinite interval patches? > Given that this is a bug that can lead to incorrect query results, I > plan to back-patch it, and INTERVAL_NOBEGIN()

Re: Enderbury Island disappeared from timezone database

2023-10-27 Thread Tom Lane
Victor Wagner writes: > I've encountered following problem compiling PostgreSQL 15.4 with just > released Ubuntu 23.10. > I'm compiling postgres with --with-system-tzdata and then regression > test sysviews fails with following diff: > +ERROR: time zone "Pacific/Enderbury" not recognized >

Re: Add recovery to pg_control and remove backup_label

2023-10-27 Thread David Steele
On 10/26/23 17:27, David G. Johnston wrote: On Thu, Oct 26, 2023 at 2:02 PM David Steele > wrote: Are we planning on dealing with torn writes in the back branches in some way or are we just throwing in the towel and saying the old method is too error-prone to

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

2023-10-27 Thread Nazir Bilal Yavuz
Hi, On Thu, 19 Oct 2023 at 08:26, Michael Paquier wrote: > > On Wed, Oct 18, 2023 at 02:56:42PM +0900, Michael Paquier wrote: > > Thanks for the new versions. I have applied 0001 and backpatched it > > for now. 0002 and 0003 look in much cleaner shape than previously. > > 0002 and 0003 have

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-27 Thread David Steele
On 10/27/23 03:22, Michael Paquier wrote: On Mon, Oct 16, 2023 at 02:54:35PM +0900, Michael Paquier wrote: On Sat, Oct 14, 2023 at 03:45:33PM -0400, David Steele wrote: On 9/28/23 19:59, Michael Paquier wrote: Another idea I had was to force the creation of recovery.signal by pg_basebackup

Re: Reducing connection overhead in pg_upgrade compat check phase

2023-10-27 Thread Daniel Gustafsson
Attached is a v10 rebase of this patch which had undergone significant bitrot due to recent changes in the pg_upgrade check phase. This brings in the changes into the proposed structure without changes to queries, with no additional changes to the proposed functionality. Testing with a

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Dean Rasheed
On Fri, 27 Oct 2023 at 13:56, Ashutosh Bapat wrote: > > Should we change this to call INTERVAL_NOBEGIN() to be added by > infinite interval patches? > Given that this is a bug that can lead to incorrect query results, I plan to back-patch it, and INTERVAL_NOBEGIN() wouldn't make sense in

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Ashutosh Bapat
On Fri, Oct 27, 2023 at 2:57 PM Dean Rasheed wrote: > > In contrib/btree_gin, leftmostvalue_interval() does this: > > leftmostvalue_interval(void) > { > Interval *v = palloc(sizeof(Interval)); > > v->time = DT_NOBEGIN; > v->day = 0; > v->month = 0; > return

Re: RFC: Logging plan of the running query

2023-10-27 Thread Étienne BERSAC
> Hi, > > If we use client log message, that message is shown on the target > process whose pid is specified by the parameter of > pg_log_query_plan(): > >    (pid:1000)=# select pg_sleep(60); >    (pid:1001)=# select pg_log_query_plan(1000); >    (pid:1000)=# LOG:  query plan running on

Re: btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Heikki Linnakangas
On 27/10/2023 12:26, Dean Rasheed wrote: In contrib/btree_gin, leftmostvalue_interval() does this: leftmostvalue_interval(void) { Interval *v = palloc(sizeof(Interval)); v->time = DT_NOBEGIN; v->day = 0; v->month = 0; return IntervalPGetDatum(v); } which is a long

Re: RFC: Logging plan of the running query

2023-10-27 Thread torikoshia
On 2023-10-27 16:06, Étienne BERSAC wrote: Hi Torikoshia, If so, we once tried to implement such function for getting memory contexts. However, this attempt didn't succeed because it could lead dead lock situation[1]. Thanks for the pointer. Why not use client log message to allow client to

Enderbury Island disappeared from timezone database

2023-10-27 Thread Victor Wagner
Collegues, I've encountered following problem compiling PostgreSQL 15.4 with just released Ubuntu 23.10. I'm compiling postgres with --with-system-tzdata and then regression test sysviews fails with following diff: --- /home/test/pg-tests/postgresql-15.4/src/test/regress/expected/sysviews.out

Annoying corruption in PostgreSQL.

2023-10-27 Thread Kirill Reshke
Hi hackers! We run a large amount of PostgreSQL clusters in our production. They differ by versions (we have 11-16 pg), load, amount of data, schema, etc. From time to time, postgresql corruption happens. It says ERROR,XX001,"missing chunk number 0 for toast value 18767319 in

Re: run pgindent on a regular basis / scripted manner

2023-10-27 Thread Andrew Dunstan
On 2023-10-27 Fr 03:14, Étienne BERSAC wrote: Hello, Yes, there's a lot to look out for, and you're a damn sight better at it than I am. But we should try to automate the things that can be automated, even if that leaves many tasks that can't be. I have three things in my pre-commit hook: a

Re: Infinite Interval

2023-10-27 Thread Ashutosh Bapat
On Fri, Oct 27, 2023 at 2:07 PM Dean Rasheed wrote: > > On Wed, 4 Oct 2023 at 14:29, Ashutosh Bapat > wrote: > > > > I think we should introduce interval_out_of_range_error() function on > > the lines of float_overflow_error(). Later patches introduce more > > places where we raise that error.

Re: race condition in pg_class

2023-10-27 Thread Smolkin Grigory
> This is going to be a problem with any operation that does a transactional > pg_class update without taking a lock that conflicts with ShareLock. GRANT > doesn't lock the table at all, so I can reproduce this in v17 as follows: > > == session 1 > create table t (c int); > begin; > grant select

Re: pg_upgrade and logical replication

2023-10-27 Thread Amit Kapila
On Fri, Oct 27, 2023 at 12:09 PM vignesh C wrote: > > Apart from this I'm still checking that the old cluster's subscription > relations states are READY state still, but there is a possibility > that SYNCDONE or FINISHEDCOPY could work, this needs more thought > before concluding which is the

partitioning and identity column

2023-10-27 Thread Ashutosh Bapat
Hi All, Reading [1] I have been experimenting with behaviour of identity columns and serial column in case of partitioned tables. My observations related to serial column can be found at [2]. This email is about identity column behaviour with partitioned tables. Serial and identity columns have

Re: gcc 12.1.0 warning

2023-10-27 Thread Nazir Bilal Yavuz
Hi, On Fri, 27 Oct 2023 at 12:34, Erik Rijkers wrote: > > Hi, > > Not sure if these compiler-mutterings are worth reporting but I guess > we're trying to get a silent compile. > > System: Debian 4.9.303-1 (2022-03-07) x86_64 GNU/Linux > Compiling with gcc 12.1.0 causes the below 'warning' and

Re: Synchronizing slots from primary to standby

2023-10-27 Thread shveta malik
On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand wrote: > > Hi, > > On 10/25/23 5:00 AM, shveta malik wrote: > > On Tue, Oct 24, 2023 at 11:54 AM Drouvot, Bertrand > > wrote: > >> > >> Hi, > >> > >> On 10/23/23 2:56 PM, shveta malik wrote: > >>> On Mon, Oct 23, 2023 at 5:52 PM Drouvot, Bertrand

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-10-27 Thread Michael Banck
Hi, On Fri, Oct 27, 2023 at 09:03:04AM +0200, Laurenz Albe wrote: > On Fri, 2022-11-04 at 10:49 +0100, Laurenz Albe wrote: > > On Thu, 2022-11-03 at 11:32 +0100, Laurenz Albe wrote: > > > On Wed, 2022-11-02 at 19:29 +, David Burns wrote: > > > > > > > Some additional clarity in the versions

Re: A recent message added to pg_upgade

2023-10-27 Thread Amit Kapila
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, > > { > > ereport(ERROR, > >

btree_gin: Incorrect leftmost interval value

2023-10-27 Thread Dean Rasheed
In contrib/btree_gin, leftmostvalue_interval() does this: leftmostvalue_interval(void) { Interval *v = palloc(sizeof(Interval)); v->time = DT_NOBEGIN; v->day = 0; v->month = 0; return IntervalPGetDatum(v); } which is a long way short of the minimum possible interval value.

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2023-10-27 Thread tender wang
Hi Alvaro, I re-analyzed this issue, and here is my analysis process. step 1: CREATE TABLE p ( id bigint PRIMARY KEY ) PARTITION BY list (id); step2: CREATE TABLE p_1 PARTITION OF p FOR VALUES IN (1); step3: CREATE TABLE r_1 ( id bigint PRIMARY KEY, p_id bigint NOT NULL,

Re: Use virtual tuple slot for Unique node

2023-10-27 Thread Ashutosh Bapat
On Fri, Oct 27, 2023 at 8:48 AM David Rowley wrote: > > On Wed, 25 Oct 2023 at 22:48, Ashutosh Bapat > wrote: > > We may save the size of data in VirtualTupleTableSlot, thus avoiding > > the first loop. I assume that when allocating > > VirtualTupleTableSlot->data, we always know what size we

Invalid Path with UpperRel

2023-10-27 Thread Alena Rybakina
Hi, hackers! I recently encountered strange behavior when, after running the create_ms.sql test, I ran the last query from this test. In general, the playback looks like this: \i src/test/regress/sql/create_misc.sql I added Assert(0) in create_sort_plan() before calling create_plan_recurse

Re: Synchronizing slots from primary to standby

2023-10-27 Thread shveta malik
On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand wrote: > > Hi, > > On 10/25/23 5:00 AM, shveta malik wrote: > > On Tue, Oct 24, 2023 at 11:54 AM Drouvot, Bertrand > > wrote: > >> > >> Hi, > >> > >> On 10/23/23 2:56 PM, shveta malik wrote: > >>> On Mon, Oct 23, 2023 at 5:52 PM Drouvot, Bertrand

Re: pg_upgrade's object listing

2023-10-27 Thread Daniel Gustafsson
> On 27 Oct 2023, at 10:44, Alvaro Herrera wrote: > I honestly doubt that this sort of message is in any way useful, other > than for program debugging. Maybe listing databases and perhaps slots > in verbose mode is OK, but tables? I don't think so. Outputting this in verbose mode is unlikely

Re: pg_upgrade's object listing

2023-10-27 Thread Alvaro Herrera
Hi, On 2023-Oct-27, Kyotaro Horiguchi wrote: > I found the following message recently introduced in pg_upgrade: > > > pg_log(PG_VERBOSE, "slot_name: \"%s\", plugin: \"%s\", > > two_phase: %s", > >slot_info->slotname, > >

Re: Infinite Interval

2023-10-27 Thread Dean Rasheed
On Wed, 4 Oct 2023 at 14:29, Ashutosh Bapat wrote: > > I think we should introduce interval_out_of_range_error() function on > the lines of float_overflow_error(). Later patches introduce more > places where we raise that error. We can introduce the function as > part of those patches. > I'm not

Re: Synchronizing slots from primary to standby

2023-10-27 Thread Amit Kapila
On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand wrote: > > On 10/25/23 5:00 AM, shveta malik wrote: > > On Tue, Oct 24, 2023 at 11:54 AM Drouvot, Bertrand > > wrote: > >> > >> Hi, > >> > >> On 10/23/23 2:56 PM, shveta malik wrote: > >>> On Mon, Oct 23, 2023 at 5:52 PM Drouvot, Bertrand > >>>

Re: A recent message added to pg_upgade

2023-10-27 Thread Alvaro Herrera
On 2023-Oct-27, Kyotaro Horiguchi wrote: > @@ -1433,8 +1433,8 @@ > InvalidatePossiblyObsoleteSlot(ReplicationSlotInvalidationCause cause, > { > ereport(ERROR, > > errcode(ERRCODE_INVALID_PARAMETER_VALUE), > -

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

2023-10-27 Thread Laurenz Albe
On Fri, 2023-10-27 at 18:05 +1100, Philip Warner wrote: > I as far as I can tell, pg_dump does not dup the ‘run_as_owner` setting for a > subscription. > > Should it? Should I submit a patch? It seems pretty trivial to fix if anyone > else is working on it. Yes, it certainly should. That is

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

2023-10-27 Thread Michael Paquier
On Fri, Oct 27, 2023 at 09:45:52AM +0200, Drouvot, Bertrand wrote: > Oh I see, yeah I do agree to set tablestatus->trans to NULL to avoid > any undesired interference with tabentry->trans. > > Done in V8 attached (pgindent has been run on pgstatfuncs.c and > pgstat_relation.c). LGTM. -- Michael

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

2023-10-27 Thread Drouvot, Bertrand
Hi, On 10/27/23 8:07 AM, Michael Paquier wrote: The part that I found disturbing is here: + tabentry = (PgStat_TableStatus *) entry_ref->pending; + tablestatus = palloc(sizeof(PgStat_TableStatus)); + *tablestatus = *tabentry; This causes tablestatus->trans to point to the

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

2023-10-27 Thread Hayato Kuroda (Fujitsu)
Dear Amit, I found several machines on BF got angry (e.g. [1]), because of missing update meson.build. Sorry for that. PSA the patch to fix it. [1]: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rorqual=2023-10-27%2006%3A08%3A31 Best Regards, Hayato Kuroda FUJITSU LIMITED

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-27 Thread Michael Paquier
On Mon, Oct 16, 2023 at 02:54:35PM +0900, Michael Paquier wrote: > On Sat, Oct 14, 2023 at 03:45:33PM -0400, David Steele wrote: >> On 9/28/23 19:59, Michael Paquier wrote: >>> Another idea I had was to force the creation of recovery.signal by >>> pg_basebackup even if -R is not used. All the

Re: PATCH: Add REINDEX tag to event triggers

2023-10-27 Thread Michael Paquier
On Mon, Sep 04, 2023 at 08:00:52PM +0200, Jim Jones wrote: > LGTM. It applies and builds cleanly, all tests pass and documentation also > builds ok. The CFbot seems also much happier now :) + /* +* Open and lock the relation. ShareLock is sufficient since we only need +*

Re: run pgindent on a regular basis / scripted manner

2023-10-27 Thread Étienne BERSAC
Hello, > Yes, there's a lot to look out for, and you're a damn sight better at > it > than I am. But we should try to automate the things that can be > automated, even if that leaves many tasks that can't be. I have three > things in my pre-commit hook: a check for catalog updates, a check >

Re: RFC: Logging plan of the running query

2023-10-27 Thread Étienne BERSAC
Hi Torikoshia, > If so, we once tried to implement such function for getting memory > contexts. > However, this attempt didn't succeed because it could lead dead lock > situation[1]. Thanks for the pointer. Why not use client log message to allow client to get plan without locking backend

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

2023-10-27 Thread Philip Warner
Further to this: it seems that `Alter Subscription X Set(Run_As_Owner=True);` has no influence on the `subrunasowner` column of pg_subscriptions. Sent from Mail for Windows From: Philip Warner Sent: Friday, 27 October 2023 3:26 PM To: pgsql-hackers@lists.postgresql.org Subject: pg_dump not

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-10-27 Thread Laurenz Albe
On Fri, 2022-11-04 at 10:49 +0100, Laurenz Albe wrote: > On Thu, 2022-11-03 at 11:32 +0100, Laurenz Albe wrote: > > On Wed, 2022-11-02 at 19:29 +, David Burns wrote: > > > > > Some additional clarity in the versions 14/15 documentation would be > > > helpful specifically > > > surrounding

RE: CRC32C Parallel Computation Optimization on ARM

2023-10-27 Thread Xiang Gao
On Thu, 26 Oct, 2023 11:37:52AM -0500, Nathan Bossart wrote: >> We consider that a runtime check needs to be done in any scenario. >> Here we only confirm that the compilation can be successful. > >A runtime check will be done when choosing which algorithm. > >You can think of us as merging

Re: Postgres Partitions Limitations (5.11.2.3)

2023-10-27 Thread Laurenz Albe
On Mon, 2023-01-09 at 16:40 +0100, Laurenz Albe wrote: > > "Using ONLY to add or drop a constraint on only the partitioned table is > > supported as long as there are no partitions. Once partitions exist, using > > ONLY will result in an error. Instead, constraints on the partitions > > themselves

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-27 Thread Michael Paquier
On Tue, May 23, 2023 at 01:47:52PM +0300, Aleksander Alekseev wrote: > That's me still talking to myself :) Let's be two then. > Evidently this works differently from what I initially thought on > Windows due to lack of fork() on this system. This comes down to the fact that processes executed

Re: unnest multirange, returned order

2023-10-27 Thread Laurenz Albe
On Fri, 2023-10-13 at 15:33 -0400, Daniel Fredouille wrote: > sorry it took me some time to reply. Yes, the patch is perfect if this is > indeed the behavior. I'm sending a reply to the hackers list so that I can add the patch to the commitfest. Tiny as the patch is, I don't want it to fall

Re: pg_upgrade and logical replication

2023-10-27 Thread vignesh C
On Thu, 21 Sept 2023 at 11:27, Michael Paquier wrote: > > On Fri, Sep 15, 2023 at 03:08:21PM +0530, vignesh C wrote: > > On Tue, 12 Sept 2023 at 14:25, Hayato Kuroda (Fujitsu) > > wrote: > >> Is there a possibility that apply worker on old cluster connects to the > >> publisher during the

Re: On login trigger: take three

2023-10-27 Thread Mikhail Gribkov
Hi Alexander, >> Thank you for catching it. Please, post this. 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/ -- best regards, Mikhail A. Gribkov

Re: pg_upgrade's object listing

2023-10-27 Thread Kyotaro Horiguchi
At Fri, 27 Oct 2023 05:56:31 +, "Zhijie Hou (Fujitsu)" wrote in > On Friday, October 27, 2023 1:21 PM Kyotaro Horiguchi > wrote: > > > > Hello. > > > > I found the following message recently introduced in pg_upgrade: > > > > > pg_log(PG_VERBOSE, "slot_name: \"%s\", plugin:

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

2023-10-27 Thread Michael Paquier
On Thu, Oct 26, 2023 at 10:04:25AM +0200, Drouvot, Bertrand wrote: > By "used in an unexpected way in the future", what do you mean exactly? Do > you mean > the caller forgetting it is working on a copy and then could work with > "stale" counters? (Be careful about the code indentation.) The