How to send patch with so many files changes?

2024-09-24 Thread Tony Wayne
Hi hackers, I am new in contributing to postgres. I have a doubt regarding if we want to send a patch which has an extension and also has changes in pg source also,what's the way to do it? It seems odd right ? we are doing extension then ,then why changes in pg? This is the 1st version of the idea

Re: How to send patch with so many files changes?

2024-09-24 Thread Tony Wayne
On Wed, Sep 25, 2024 at 6:02 AM Tony Wayne wrote: > > I am new in contributing to postgres. I have a doubt regarding if we want > to send a patch which has an extension and also has changes in pg source > also,what's the way to do it? > > is git diff enough?

Re: race condition in pg_class

2024-09-24 Thread Noah Misch
On Thu, Sep 19, 2024 at 02:33:46PM -0700, Noah Misch wrote: > On Mon, Sep 09, 2024 at 10:55:32AM +0530, Nitin Motiani wrote: > > On Sat, Sep 7, 2024 at 12:25 AM Noah Misch wrote: > > > https://commitfest.postgresql.org/49/5090/ remains in status="Needs > > > review". > > > When someone moves it t

Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges

2024-09-24 Thread Michael Banck
Hi, On Tue, Oct 24, 2023 at 11:42:15AM -0400, Tom Lane wrote: > Christoph Berg writes: > > Anyway, if this doesn't raise any "oh we didn't think of this" > > concerns, we'll just remove the old operators in pgsphere. > > Well, the idea was exactly to forbid that sort of setup. > However, if we g

Re: Add contrib/pg_logicalsnapinspect

2024-09-24 Thread Peter Smith
On Wed, Sep 25, 2024 at 2:51 AM Bertrand Drouvot wrote: > > Hi, > > On Mon, Sep 23, 2024 at 12:27:27PM +1000, Peter Smith wrote: > > My review comments for v8-0001 > > > > == > > contrib/pg_logicalinspect/pg_logicalinspect.c > > > > 1. > > +/* > > + * Lookup table for SnapBuildState. > > + */

Re: How to send patch with so many files changes?

2024-09-24 Thread David G. Johnston
On Tue, Sep 24, 2024 at 5:37 PM Tony Wayne wrote: > > On Wed, Sep 25, 2024 at 6:02 AM Tony Wayne > wrote: > >> >> I am new in contributing to postgres. I have a doubt regarding if we want >> to send a patch which has an extension and also has changes in pg source >> also,what's the way to do it?

Re: How to send patch with so many files changes?

2024-09-24 Thread David G. Johnston
On Tue, Sep 24, 2024 at 5:32 PM Tony Wayne wrote: > > This is the 1st version of the idea,if it goes well 🤞 we can move the > changes from extension to pg. > > If you are saying you are planning to add something to the contrib directly then you should just post the patch(es) that do it. Your abi

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Thomas Munro
On Wed, Sep 25, 2024 at 8:30 AM Andres Freund wrote: > Just ran that. There probably is a performance difference, but it's small > (<0.5%) making it somewhat hard to be certain. It looks like the main reason > for that is ConditionVariableBroadcast() on the iocv shows up even though > nobody is wa

Re: How to send patch with so many files changes?

2024-09-24 Thread Tony Wayne
These changes are for core ,I think it would be better to either move whole changes to core or contrib as an extension. On Wed, Sep 25, 2024 at 6:09 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Sep 24, 2024 at 5:37 PM Tony Wayne > wrote: > >> >> On Wed, Sep 25, 2024 at 6:0

Re: How to send patch with so many files changes?

2024-09-24 Thread Michael Paquier
On Wed, Sep 25, 2024 at 06:19:39AM +0530, Tony Wayne wrote: > These changes are for core ,I think it would be better to either move whole > changes to core or contrib as an extension. Please avoid top-posting. The community mailing lists use bottom-posting, to ease discussions. See: https://en.w

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Noah Misch
On Tue, Sep 24, 2024 at 04:30:25PM -0400, Andres Freund wrote: > On 2024-09-24 12:43:40 -0700, Noah Misch wrote: > > On Tue, Sep 24, 2024 at 11:55:08AM -0400, Andres Freund wrote: > > > Besides that, the need to copy the buffers makes checkpoints with AIO > > > noticeably slower when checksums are

Re: Add on_error and log_verbosity options to file_fdw

2024-09-24 Thread Fujii Masao
On 2024/09/24 20:08, torikoshia wrote: Thanks for the explanation and suggestion. Since there is almost the same code in copyfrom.c, attached 0003 patch for refactoring both. Thanks for updating the patches! Regarding 0002.patch, I think it’s better to include the refactored code from the

Re: pgsql: Improve default and empty privilege outputs in psql.

2024-09-24 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane >> Improve default and empty privilege outputs in psql. > I'm sorry to report this when 17.0 has already been wrapped, but this > change is breaking `psql -l` against 9.3-or-earlier servers: > FEHLER: 42883: Funktion pg_catalog.cardinality(aclitem[]) existie

Re: Add llvm version into the version string

2024-09-24 Thread Andres Freund
Hi, On 2024-09-24 13:53:49 +0100, Alastair Turner wrote: > Since the build and runtime versions may differ for some things like llvm, > libxml2 and the interpreters behind some of the PLs, it may be valuable to > expand the view and show two values - a build time (or configure time) > value and a

RE: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-09-24 Thread Amonson, Paul D
Hi all, I will be retiring from Intel at the end of this week. I wanted to introduce the engineer who will be taking over the CRC32c proposal and commit fest entry. Devulapalli, Raghuveer I have brought him up to speed and he will be the go-to for technical review comments and questions. Plea

Re: Conflict detection for update_deleted in logical replication

2024-09-24 Thread Masahiko Sawada
On Fri, Sep 20, 2024 at 2:46 AM Amit Kapila wrote: > > On Fri, Sep 20, 2024 at 8:25 AM Zhijie Hou (Fujitsu) > wrote: > > > > Apart from the vacuum_defer_cleanup_age idea. > > > > I think you meant to say vacuum_committs_age idea. > > > we’ve given more thought to our > > approach for retaining de

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Tom Lane
Peter Eisentraut writes: > On 23.09.24 22:51, Shayon Mukherjee wrote: >> I am happy to draft a patch for this as well. I think I have a working >> idea so far of where the necessary checks might go. However if you don’t >> mind, can you elaborate further on how the effect would be similar to >> en

Re: [PATCH] Add native windows on arm64 support

2024-09-24 Thread Dave Cramer
On Tue, 13 Feb 2024 at 16:28, Dave Cramer wrote: > > > > On Tue, 13 Feb 2024 at 12:52, Andres Freund wrote: > >> Hi, >> >> On 2024-02-13 12:49:33 -0500, Dave Cramer wrote: >> > > I think I might have been on to something - if my human emulation of a >> > > preprocessor isn't wrong, we'd end up w

Re: [PATCH] Support Int64 GUCs

2024-09-24 Thread Aleksander Alekseev
Hi, Alexander! > Thank you for your work on this subject. Thanks for your feedback. > It doesn't look like these *_age GUCs could benefit from being 64-bit, > before 64-bit transaction ids get in. However, I think there are some > better candidates. > > autovacuum_vacuum_threshold > autovacuum_

Re: Add contrib/pg_logicalsnapinspect

2024-09-24 Thread Bertrand Drouvot
Hi, On Tue, Sep 24, 2024 at 09:15:31AM +0530, shveta malik wrote: > On Fri, Sep 20, 2024 at 12:22 PM Bertrand Drouvot > wrote: > > > > > > Please find attached v8, that: > > > > Thank You for the patch. In one of my tests, I noticed that I got > negative checksum: > > postgres=# SELECT * FROM p

Re: not null constraints, again

2024-09-24 Thread Alvaro Herrera
On 2024-Sep-24, jian he wrote: > sql-createtable.html > SECTION: LIKE source_table [ like_option ... ] > INCLUDING CONSTRAINTS > CHECK constraints will be copied. No distinction is made between > column constraints and table constraints. Not-null constraints are > always copied to the new table. >

Re: Cleaning up ERRCODE usage in our XML code

2024-09-24 Thread Tom Lane
Daniel Gustafsson writes: > On 23 Sep 2024, at 19:17, Tom Lane wrote: >> Yeah, I looked at that but wasn't sure what to do with it. We should >> have validated the decl header when the XML value was created, so if >> we get here then either the value got corrupted on-disk or in-transit, >> or so

Re: Conflict detection for update_deleted in logical replication

2024-09-24 Thread Masahiko Sawada
On Tue, Sep 24, 2024 at 12:14 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 24, 2024 2:42 PM Masahiko Sawada > wrote: > > > > On Mon, Sep 23, 2024 at 8:32 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Tuesday, September 24, 2024 5:05 AM Masahiko Sawada > > wrote: > > > > I'm sti

Re: Add new COPY option REJECT_LIMIT

2024-09-24 Thread Fujii Masao
On 2024/09/24 14:25, torikoshia wrote: Updated the patch. Thanks for updating the patch! +REJECT_LIMIT { integer } The curly braces {} seem unnecessary here. + When a positive integer value is specified, COPY limits + the maximum tolerable number of errors while converting

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-24 Thread Nathan Bossart
On Tue, Sep 24, 2024 at 07:33:24PM +, Max Johnson wrote: > I have found an instance of a time overflow with the start time that is > written in "postmaster.pid". On a 32-bit Linux system, if the system date > is past 01/19/2038, when you start Postgres with `pg_ctl start -D > {datadir} ...`, t

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Andres Freund
Hi, On 2024-09-24 12:43:40 -0700, Noah Misch wrote: > On Tue, Sep 24, 2024 at 11:55:08AM -0400, Andres Freund wrote: > > So far the AIO patchset has solved this by introducing a set of "bounce > > buffers", which can be acquired and used as the source/target of IO when > > doing > > it in-place i

Re: [PATCH] Add native windows on arm64 support

2024-09-24 Thread Andres Freund
On 2024-09-24 16:01:30 -0400, Dave Cramer wrote: > I have a dmp file with a stack trace if anyone is interested /me raises his hand

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-24 Thread Tom Lane
Nathan Bossart writes: > I think we should use INT64_FORMAT here. That'll choose the right length > modifier for the platform. And I don't think we need to cast MyStartTime, > since it's a pg_time_t (which is just an int64). Agreed. However, a quick grep finds half a dozen other places that ar

Re: Clock-skew management in logical replication

2024-09-24 Thread Nisha Moond
On Mon, Sep 23, 2024 at 4:00 PM Nisha Moond wrote: > > On Fri, Sep 20, 2024 at 7:51 PM Tom Lane wrote: > > > > Nisha Moond writes: > > > While considering the implementation of timestamp-based conflict > > > resolution (last_update_wins) in logical replication (see [1]), there > > > was a feedba

Re: Primary and standby setting cross-checks

2024-09-24 Thread Noah Misch
On Thu, Aug 29, 2024 at 09:52:06PM +0300, Heikki Linnakangas wrote: > Currently, if you configure a hot standby server with a smaller > max_connections setting than the primary, the server refuses to start up: > > LOG: entering standby mode > FATAL: recovery aborted because of insufficient param

Re: Normalize queries starting with SET for pg_stat_statements

2024-09-24 Thread Michael Paquier
On Tue, Sep 24, 2024 at 04:57:28PM +0900, Michael Paquier wrote: > 0001 is straight-forward and that was I think a mistake to not include > that from the start when I've expanded these tests in the v16 cycle > (well, time..). 0002 also is quite conservative at the end, and this > design can be use

Re: Eager aggregation, take 3

2024-09-24 Thread Richard Guo
On Wed, Aug 28, 2024 at 9:01 PM Robert Haas wrote: > On Tue, Aug 27, 2024 at 11:57 PM Tender Wang wrote: > > I haven't look all of them. I just pick few simple plan test(e.g. 19.sql, > > 45.sql). > > For example, 19.sql, eager agg pushdown doesn't get large gain, but a little > > performance reg

Re: Clock-skew management in logical replication

2024-09-24 Thread Michael Paquier
On Fri, Sep 20, 2024 at 10:21:34AM -0400, Tom Lane wrote: > FWIW, I cannot see why we would do anything beyond suggesting that > people run NTP. That's standard anyway on the vast majority of > machines these days. Why would we add complexity that we have > to maintain (and document) in order to

Re: Recovering from detoast-related catcache invalidations

2024-09-24 Thread Noah Misch
On Sun, Jan 14, 2024 at 12:14:11PM -0800, Noah Misch wrote: > On Fri, Jan 12, 2024 at 03:47:13PM -0500, Tom Lane wrote: > > Oh! After nosing around a bit more I remembered systable_recheck_tuple, > > which is meant for exactly this purpose. So v4 attached. > > systable_recheck_tuple() is blind t

Re: How to send patch with so many files changes?

2024-09-24 Thread Tony Wayne
On Wed, Sep 25, 2024 at 6:36 AM Michael Paquier wrote: > On Wed, Sep 25, 2024 at 06:19:39AM +0530, Tony Wayne wrote: > > These changes are for core ,I think it would be better to either move > whole > > changes to core or contrib as an extension. > > Please avoid top-posting. The community maili

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-24 Thread Michael Paquier
On Tue, Sep 24, 2024 at 02:26:08PM -0500, Nathan Bossart wrote: > I gave this a try and, unsurprisingly, found a bunch of other problems. I > hastily hacked together the attached patch that should fix all of them, but > I'd still like to comb through the code a bit more. The three catalogs > with

Re: AIX support

2024-09-24 Thread Heikki Linnakangas
On 24/09/2024 14:25, Srirama Kucherlapati wrote: Hi Heikki & team, Could you please let me know your comments on the previous details? Attached are the individual patches for AIX and gcc(__sync) routines. Repeating what I said earlier: Ok, if we don't need the assembler code at all, that's

index_delete_sort: Unnecessary variable "low" is used in heapam.c

2024-09-24 Thread btnakamurakoukil
Hi hackers, I noticed unnecessary variable "low" in index_delete_sort() (/postgres/src/backend/access/heap/heapam.c), patch attached. What do you think? Regards, Koki Nakamura From c0bf7f8468cb0e4f74c41e434adf70bdbfb3ad6d Mon Sep 17 00:00:00 2001 From: KokiNaka Date: Tue, 24 Sep 2024 10:46:0

Re: Documentation to upgrade logical replication cluster

2024-09-24 Thread Amit Kapila
On Fri, Sep 20, 2024 at 5:46 PM vignesh C wrote: > > I didn’t include a note because each disable/enable statement > specifies: a) Disable all subscriptions on the node, b) Enable all > subscriptions on the node. The attached v11 version patch just to show > the examples with one subscription. >

Re: Documentation to upgrade logical replication cluster

2024-09-24 Thread Amit Kapila
On Tue, Sep 24, 2024 at 4:20 PM Amit Kapila wrote: > > On Fri, Sep 20, 2024 at 5:46 PM vignesh C wrote: > > > > I didn’t include a note because each disable/enable statement > > specifies: a) Disable all subscriptions on the node, b) Enable all > > subscriptions on the node. The attached v11 vers

Re: not null constraints, again

2024-09-24 Thread Alvaro Herrera
On 2024-Sep-24, jian he wrote: > static void > set_attnotnull(List **wqueue, Relation rel, AttrNumber attnum, bool recurse, >LOCKMODE lockmode) > { > What do you think of the above refactor? > (I intentionally deleted empty new line) Looks nicer ... but you know what? After spen

Re: [PATCH] Support Int64 GUCs

2024-09-24 Thread Li Japin
Hi, Aleksander Alekseev Thanks for updating the patch. > On Sep 24, 2024, at 17:27, Aleksander Alekseev > wrote: > > Hi, Alexander! > >> Thank you for your work on this subject. > > Thanks for your feedback. > >> It doesn't look like these *_age GUCs could benefit from being 64-bit, >> befo

Re: pgbench: Improve result outputs related to failed transactinos

2024-09-24 Thread Yugo NAGATA
On Tue, 24 Sep 2024 19:00:04 +0900 (JST) Tatsuo Ishii wrote: > > I overlooked the "NaN% of total" in per-script results. > > I think this NaN also should be avoided. > > > > I fixed the number of transactions in per-script results to include > > skipped and failed transactions. It prevents to p

Re: index_delete_sort: Unnecessary variable "low" is used in heapam.c

2024-09-24 Thread Daniel Gustafsson
> On 24 Sep 2024, at 10:32, btnakamurakoukil > wrote: > I noticed unnecessary variable "low" in index_delete_sort() > (/postgres/src/backend/access/heap/heapam.c), patch attached. What do you > think? That variable does indeed seem to not be used, and hasn't been used since it was committed i

Re: Add llvm version into the version string

2024-09-24 Thread Alastair Turner
On Mon, 23 Sept 2024 at 19:45, Tom Lane wrote: ... > Maybe another idea could be a new system view? > > => select * from pg_system_version; > property | value > > core version | 18.1 > architecture | x86_64-pc-linux-gnu > word size

Re: Why don't we consider explicit Incremental Sort?

2024-09-24 Thread Tomas Vondra
On 9/24/24 00:21, David Rowley wrote: > On Tue, 24 Sept 2024 at 02:01, Tomas Vondra wrote: >> >> On 9/23/24 05:03, Richard Guo wrote: >>> On Sun, Sep 22, 2024 at 1:38 PM David Rowley wrote: Just looking at the commit message: > The rationale is based on the assumption that increm

Re: [PATCH] Support Int64 GUCs

2024-09-24 Thread Aleksander Alekseev
Hi, > PFA the updated patch. It is worth mentioning that v2 should not be merged as is. Particularly although it changes the following GUCs: > autovacuum_vacuum_threshold > autovacuum_vacuum_insert_threshold > autovacuum_analyze_threshold ... it doesn't affect the code that uses these GUCs whic

Re: not null constraints, again

2024-09-24 Thread Alvaro Herrera
On 2024-Sep-24, jian he wrote: > static Oid > StoreRelNotNull(Relation rel, const char *nnname, AttrNumber attnum, > bool is_validated, bool is_local, int inhcount, > bool is_no_inherit) > { > OidconstrOid; > Assert(attnum > InvalidAttrNumber); >

Re: Compress ReorderBuffer spill files using LZ4

2024-09-24 Thread Tomas Vondra
On 9/23/24 21:58, Julien Tachoires wrote: > Hi Tomas, > > Le lun. 23 sept. 2024 à 18:13, Tomas Vondra a écrit : >> >> Hi, >> >> I've spent a bit more time on this, mostly running tests to get a better >> idea of the practical benefits. > > Thank you for your code review and testing! > >> Fir

Re: pgbench: Improve result outputs related to failed transactinos

2024-09-24 Thread Tatsuo Ishii
> I overlooked the "NaN% of total" in per-script results. > I think this NaN also should be avoided. > > I fixed the number of transactions in per-script results to include > skipped and failed transactions. It prevents to print "total of NaN%" > when any transactions are not successfully proce

Re: Normalize queries starting with SET for pg_stat_statements

2024-09-24 Thread Michael Paquier
On Mon, Aug 19, 2024 at 03:28:52PM +0900, Michael Paquier wrote: > FWIW, I'm OK with hiding the value when it comes to a SET clause in a > CREATE FUNCTION. We already hide the contents of SQL queries inside > the SQL functions when these are queries that can be normalized, so > there is a kind of

Re: Add on_error and log_verbosity options to file_fdw

2024-09-24 Thread torikoshia
On 2024-09-20 11:27, Fujii Masao wrote: Thanks for your comments! On 2024/09/19 23:16, torikoshia wrote: -   COPY_LOG_VERBOSITY_DEFAULT = 0, /* logs no additional messages, default */ -   COPY_LOG_VERBOSITY_VERBOSE, /* logs additional messages */ +   COPY_LOG_VERBOSITY_SILENT = -1

Re: Index AM API cleanup

2024-09-24 Thread Mark Dilger
> On Sep 24, 2024, at 10:50 AM, Peter Eisentraut wrote: > > Next, I have reviewed patches > > v17-0010-Track-sort-direction-in-SortGroupClause.patch > v17-0011-Track-scan-reversals-in-MergeJoin.patch > > Both of these seem ok and sensible to me. > > They take the concept of the "reverse" fl

Re: Increase of maintenance_work_mem limit in 64-bit Windows

2024-09-24 Thread Vladlen Popolitov
David Rowley писал(а) 2024-09-24 01:07: On Tue, 24 Sept 2024 at 02:47, Vladlen Popolitov wrote: I agree, it is better to fix all them together. I also do not like this hack, it will be removed from the patch, if I check and change all at once. I think, it will take about 1 week to fix and tes

RE: Conflict detection for update_deleted in logical replication

2024-09-24 Thread Zhijie Hou (Fujitsu)
On Tuesday, September 24, 2024 2:42 PM Masahiko Sawada wrote: > > On Mon, Sep 23, 2024 at 8:32 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Tuesday, September 24, 2024 5:05 AM Masahiko Sawada > wrote: > > > I'm still studying this idea but let me confirm the following scenario. > > > > > > Supp

Re: not null constraints, again

2024-09-24 Thread jian he
On Fri, Sep 20, 2024 at 8:08 PM Alvaro Herrera wrote: > > On 2024-Sep-20, jian he wrote: > > > about set_attnotnull. > > > > we can make set_attnotnull look less recursive. > > instead of calling find_inheritance_children, > > let's just one pass, directly call find_all_inheritors > > overall, I

Re: Index AM API cleanup

2024-09-24 Thread Peter Eisentraut
Next, I have reviewed patches v17-0010-Track-sort-direction-in-SortGroupClause.patch v17-0011-Track-scan-reversals-in-MergeJoin.patch Both of these seem ok and sensible to me. They take the concept of the "reverse" flag that already exists in the affected code and just apply it more consistent

Re: not null constraints, again

2024-09-24 Thread jian he
static Oid StoreRelNotNull(Relation rel, const char *nnname, AttrNumber attnum, bool is_validated, bool is_local, int inhcount, bool is_no_inherit) { OidconstrOid; Assert(attnum > InvalidAttrNumber); constrOid = CreateConstraintEntry(n

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Shayon Mukherjee
Hello, Regarding GUC implementation for index disabling, I was imagining something like the attached PATCH. The patch compiles and can be applied for testing. It's not meant to be production ready, but I am sharing it as a way to get a sense of the nuts and bolts. It requires more proper test case

Re: Documentation to upgrade logical replication cluster

2024-09-24 Thread vignesh C
On Tue, 24 Sept 2024 at 16:20, Amit Kapila wrote: > > On Fri, Sep 20, 2024 at 5:46 PM vignesh C wrote: > > > > I didn’t include a note because each disable/enable statement > > specifies: a) Disable all subscriptions on the node, b) Enable all > > subscriptions on the node. The attached v11 versi

Re: Add contrib/pg_logicalsnapinspect

2024-09-24 Thread Bertrand Drouvot
Hi, On Mon, Sep 23, 2024 at 12:27:27PM +1000, Peter Smith wrote: > My review comments for v8-0001 > > == > contrib/pg_logicalinspect/pg_logicalinspect.c > > 1. > +/* > + * Lookup table for SnapBuildState. > + */ > + > +#define SNAPBUILD_STATE_INCR 1 > + > +static const char *const SnapBuildS

Re: Detect buffer underflow in get_th()

2024-09-24 Thread Alexander Kuznetsov
Hello, is there anything else we can help with or discuss in order to apply this fix? 24.07.2024 18:53, Alexander Kuznetsov пишет: 24.07.2024 18:39, Peter Eisentraut wrote: If it can't happen in practice, maybe an assertion would be enough? In practice, the function should not receive non-

Re: [PATCH] Add native windows on arm64 support

2024-09-24 Thread Dave Cramer
On Tue, 24 Sept 2024 at 14:31, Dave Cramer wrote: > > > On Tue, 13 Feb 2024 at 16:28, Dave Cramer > wrote: > >> >> >> >> On Tue, 13 Feb 2024 at 12:52, Andres Freund wrote: >> >>> Hi, >>> >>> On 2024-02-13 12:49:33 -0500, Dave Cramer wrote: >>> > > I think I might have been on to something - if

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-24 Thread Nathan Bossart
On Tue, Sep 24, 2024 at 01:21:45PM +0900, Michael Paquier wrote: > On Mon, Sep 23, 2024 at 10:50:21AM -0500, Nathan Bossart wrote: >> I carefully inspected all the code paths this patch touches, and I think >> I've got all the details right, but I would be grateful if someone else >> could take a l

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Shayon Mukherjee
Thank you for the historical context and working, I understand what you were referring to before now. Shayon > On Sep 24, 2024, at 2:08 PM, Peter Eisentraut wrote: > > On 23.09.24 22:51, Shayon Mukherjee wrote: >> I am happy to draft a patch for this as well. I think I have a working >> idea

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Noah Misch
On Tue, Sep 24, 2024 at 11:55:08AM -0400, Andres Freund wrote: > So far the AIO patchset has solved this by introducing a set of "bounce > buffers", which can be acquired and used as the source/target of IO when doing > it in-place into shared buffers isn't viable. > > I am worried about that solu

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-09-24 Thread Alexander Kuznetsov
Hello, is there anything else we can help with or discuss in order to apply this fix? 26.07.2024 12:16, Alexander Kuznetsov пишет: 25.07.2024 20:07, Alvaro Herrera wrote: Maybe for sanity (and perhaps for Svace compliance) we could do it the other way around, i.e. by testing events->tail for n

pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-24 Thread Max Johnson
Hello hackers, I have found an instance of a time overflow with the start time that is written in "postmaster.pid". On a 32-bit Linux system, if the system date is past 01/19/2038, when you start Postgres with `pg_ctl start -D {datadir} ...`, the start time will have rolled back to approximat

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-09-24 Thread Alvaro Herrera
On 2024-Sep-24, Alexander Kuznetsov wrote: > Hello, > > is there anything else we can help with or discuss in order to apply this fix? I don't think so, it seems a no-brainer to me and there are no objections. I'll get it pushed tomorrow. -- Álvaro Herrera PostgreSQL Developer — htt

Re: pgsql: Improve default and empty privilege outputs in psql.

2024-09-24 Thread Christoph Berg
Re: Tom Lane > Improve default and empty privilege outputs in psql. I'm sorry to report this when 17.0 has already been wrapped, but this change is breaking `psql -l` against 9.3-or-earlier servers: $ /usr/lib/postgresql/17/bin/psql psql (17rc1 (Debian 17~rc1-1.pgdg+2), Server 9.3.25) Geben Sie »

Re: Add llvm version into the version string

2024-09-24 Thread Joe Conway
On 9/24/24 09:52, Andres Freund wrote: Hi, On 2024-09-24 13:53:49 +0100, Alastair Turner wrote: Since the build and runtime versions may differ for some things like llvm, libxml2 and the interpreters behind some of the PLs, it may be valuable to expand the view and show two values - a build tim

Re: pgsql: Improve default and empty privilege outputs in psql.

2024-09-24 Thread Tom Lane
I wrote: > Yes, that's the expectation. I'm sure we can think of a more > backwards-compatible way to test for empty datacl, though. Looks like the attached should be sufficient. As penance, I tried all the commands in describe.c against 9.2 (or the oldest supported server version), and none of

Re: CSN snapshots in hot standby

2024-09-24 Thread Andres Freund
Hi, On 2024-08-13 23:13:39 +0300, Heikki Linnakangas wrote: > I added a tiny cache of the CSN lookups into SnapshotData, which can hold > the values of 4 XIDs that are known to be visible to the snapshot, and 4 > invisible XIDs. This is pretty arbitrary, but the idea is to have something > very sm

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Peter Eisentraut
On 23.09.24 22:51, Shayon Mukherjee wrote: I am happy to draft a patch for this as well. I think I have a working idea so far of where the necessary checks might go. However if you don’t mind, can you elaborate further on how the effect would be similar to enable_indexscan? Planner settings l

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Peter Eisentraut
On 24.09.24 02:30, David Rowley wrote: I understand the last discussion went down that route too. For me, it seems strange that adding some global variable is seen as cleaner than storing the property in the same location as all the other index properties. It's arguably not actually a property

Re: AIX support

2024-09-24 Thread Bruce Momjian
On Tue, Sep 24, 2024 at 04:09:39PM +0300, Heikki Linnakangas wrote: > On 24/09/2024 14:25, Srirama Kucherlapati wrote: > > Hi Heikki & team, > > > > Could you please let me know your comments on the previous details? > > > > Attached are the individual patches for AIX and gcc(__sync) routines. >

Re: [PATCH] Support Int64 GUCs

2024-09-24 Thread Nathan Bossart
On Tue, Sep 24, 2024 at 12:27:20PM +0300, Aleksander Alekseev wrote: >> It doesn't look like these *_age GUCs could benefit from being 64-bit, >> before 64-bit transaction ids get in. However, I think there are some >> better candidates. >> >> autovacuum_vacuum_threshold >> autovacuum_vacuum_inser

AIO writes vs hint bits vs checksums

2024-09-24 Thread Andres Freund
Hi, Currently we modify pages while just holding a share lock, for hint bit writes. Writing a buffer out only requires a share lock. Because of that we can't compute checksums and write out pages in-place, as a concurent hint bit write can easily corrupt the checksum. That's not great, but not aw

Re: Why mention to Oracle ?

2024-09-24 Thread Marcos Pegoraro
Em dom., 22 de set. de 2024 às 12:49, Roberto Mello escreveu: > If you're volunteering to add a MySQL, SQL Server, Mongo, etc porting to > the docs, I'm sure it could be a > nice addition. > And if we create a page like https://www.postgresql.org/about/featurematrix/ But instead of Postgres vers

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-24 Thread Nathan Bossart
On Tue, Sep 24, 2024 at 04:44:41PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> I think we should use INT64_FORMAT here. That'll choose the right length >> modifier for the platform. And I don't think we need to cast MyStartTime, >> since it's a pg_time_t (which is just an int64). > > Agr

Re: Add contrib/pg_logicalsnapinspect

2024-09-24 Thread shveta malik
On Tue, Sep 24, 2024 at 10:23 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Sep 24, 2024 at 09:15:31AM +0530, shveta malik wrote: > > On Fri, Sep 20, 2024 at 12:22 PM Bertrand Drouvot > > wrote: > > > > > > > > > Please find attached v8, that: > > > > > > > Thank You for the patch. In one of my

Re: Syncrep and improving latency due to WAL throttling

2024-09-24 Thread Soumyadeep Chakraborty
Hey Tomas, Shirisha had posted a recent re-attempt here [1] and then we were graciously redirected here by Jakub. We took a look at v5-0001-v4.patch and also a brief look at v5-0002-rework.patch. We feel that it might be worth considering throttling based on the remote standby to begin with for s

Re: Add llvm version into the version string

2024-09-24 Thread Dmitry Dolgov
> On Mon, Sep 23, 2024 at 02:45:18PM GMT, Tom Lane wrote: > Maybe another idea could be a new system view? > > => select * from pg_system_version; > property | value > > core version | 18.1 > architecture | x86_64-pc-linux-gnu > word

RE: AIX support

2024-09-24 Thread Srirama Kucherlapati
Hi Heikki & team, Could you please let me know your comments on the previous details? Attached are the individual patches for AIX and gcc(__sync) routines. Thanks, Sriram. 0001-AIX-support-revert-the-changes-from-0b16bb8776bb8.v5.patch Description: 0001-AIX-support-revert-the-changes-from-0b

RE: AIX support

2024-09-24 Thread Srirama Kucherlapati
Hi Heikki, As requested earlier, I need some assistance from the Postgres side to identify any tool or testcase to calibrate the sync routine performance in Postgres. I see the below tools for benchmarking. * Pgbench https://www.postgresql.org/docs/current/pgbench.html * Pg_test_fsync h

Re: Eager aggregation, take 3

2024-09-24 Thread Richard Guo
On Thu, Sep 5, 2024 at 9:40 AM Tender Wang wrote: > 1. in setup_eager_aggregation(), before calling create_agg_clause_infos(), > it does > some checks if eager aggregation is available. Can we move those checks into > a function, > for example, can_eager_agg(), like can_partial_agg() does? We

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-09-24 Thread Jelte Fennema-Nio
On Fri, 16 Aug 2024 at 07:43, Tom Lane wrote: > However, there are other ways to accomplish that. I liked the > suggestion of extending the CF webapp with a way to search for entries > mentioning a particular mail message ID. I dunno how hard it'd be to > get it to recognize *any* message-ID fro

RE: Conflict detection for update_deleted in logical replication

2024-09-24 Thread Zhijie Hou (Fujitsu)
On Friday, September 20, 2024 11:59 AM Hou, Zhijie/侯 志杰 wrote: > > On Friday, September 20, 2024 10:55 AM Zhijie Hou (Fujitsu) > wrote: > > On Friday, September 20, 2024 2:49 AM Masahiko Sawada > wrote: > > > > > > > > > I think that such a time-based configuration parameter would be a > > > rea