Re: LOG: invalid record length at : wanted 24, got 0

2023-03-01 Thread Harinath Kanchu
Thanks Bharath for your response, > You mentioned that > the connection to primary was lost, so you need to dive deep as to why > it got lost. If the connection was lost half-way through fetching the > WAL record, the standby may emit such a LOG message. The connection was lost due to bad network

Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()

2023-03-01 Thread Michael Paquier
On Tue, Jan 03, 2023 at 02:53:10PM +0530, Bharath Rupireddy wrote: > The proposed patch makes the inherent state change to pg_wal after > failure to read from archive in XLogFileReadAnyTLI() to explicit by > setting currentSource to XLOG_FROM_PG_WAL in the state machine. I > think it doesn't alter

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-01 Thread Amit Kapila
On Wed, Mar 1, 2023 at 12:09 AM Andres Freund wrote: > > > I see this as a way to provide this feature for users but I would > > prefer to proceed with this if we can get some more buy-in from senior > > community members (at least one more committer) and some user(s) if > > possible. So, I once a

Re: WIN32 pg_import_system_collations

2023-03-01 Thread Juan José Santamaría Flecha
On Tue, Feb 28, 2023 at 9:26 PM Andrew Dunstan wrote: > I think you missed my point, which was that the COLLATE clause above > seemed particularly pointless. But I agree that all these are not much use, > so I'll remove them as you suggest. > Maybe there has been some miscommunication, please le

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-03-01 Thread Andrei Zubkov
Hi! I've attached a new version of a patch - rebase to the current master. -- Andrei Zubkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company From 92816cfb26f0ebd35c00a6ce4f25e45f08d83790 Mon Sep 17 00:00:00 2001 From: Andrei Zubkov Date: Wed, 1 Mar 2023 11:37:53 +

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

2023-03-01 Thread Bharath Rupireddy
On Wed, Mar 1, 2023 at 12:06 AM Kuntal Ghosh wrote: > > On Tue, Feb 28, 2023 at 10:38 AM Bharath Rupireddy > wrote: > > > +/* > + * Guts of XLogReadFromBuffers(). > + * > + * Read 'count' bytes into 'buf', starting at location 'ptr', from WAL > + * fetched WAL buffers on timeline 'tli' and return

documentation updates for SQL:2023

2023-03-01 Thread Peter Eisentraut
SQL:2023 should be published within the next 2 months, so I want to update our SQL conformance information for our PostgreSQL release later this year. Attached are patches that update the keywords list and the features list as usual. (Some of the new features in the JSON area are still being

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-01 Thread Heikki Linnakangas
On 27/02/2023 23:45, Andres Freund wrote: On 2023-02-27 18:06:22 +0200, Heikki Linnakangas wrote: We also do this in freespace.c and visibilitymap.c: /* Extend as needed. */ while (fsm_nblocks_now < fsm_nblocks) { PageSetChecksumInplace((Page) pg.data, fsm_nblocks_now);

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-03-01 Thread Hayato Kuroda (Fujitsu)
Dear Sawada-san, Thank you for giving your consideration! > > We have documented at least one such case > > already where during Drop Subscription, if the network is not > > reachable then also, a similar problem can happen and users need to be > > careful about it [1]. > > Apart from a bad-use

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-03-01 Thread Jim Jones
On 01.03.23 01:47, Kirk Wolak wrote: Patch Posted with one edit, for line editings (Thanks Jim!) The patch didn't pass the SanityCheck: https://cirrus-ci.com/task/5445242183221248?logs=build#L1337 missing a header perhaps? #include "time.h" Best, Jim

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-03-01 Thread Jim Jones
On 01.03.23 01:59, Kirk Wolak wrote: I cannot get the last email to show up for the commitfest. This is version 2 of the original patch. [1] Thanks Jim! [1]https://postgr.es/m/CACLU5mSRwHr_8z%3DenMj-nXF1tmC7%2BJn5heZQNiKuLyxYUtL2fg%40mail.gmail.com Regards Kirk. The patch didn't pass the Sani

Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()

2023-03-01 Thread Kuntal Ghosh
On Tue, Feb 28, 2023 at 9:01 PM Bharath Rupireddy wrote: > > Most of the multiplexed SIGUSR1 handlers are setting latch explicitly > when the procsignal_sigusr1_handler() can do that for them at the end. > These multiplexed handlers are currently being used as SIGUSR1 > handlers, not as independen

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Jehan-Guillaume de Rorthais
Hi Justin, On Tue, 28 Feb 2023 12:25:08 -0600 Justin Pryzby wrote: > On Tue, Feb 28, 2023 at 07:06:43PM +0100, Jehan-Guillaume de Rorthais wrote: > > Hello all, > > > > A customer is facing out of memory query which looks similar to this > > situation: > > > > > > https://www.postgresql.org

Add standard collation UNICODE

2023-03-01 Thread Peter Eisentraut
The SQL standard defines several standard collations. Most of them are only of legacy interest (IMO), but two are currently relevant: UNICODE and UCS_BASIC. UNICODE sorts by the default Unicode collation algorithm specifications and UCS_BASIC sorts by codepoint. When collation support was ad

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-01 Thread wangw.f...@fujitsu.com
On Tues, Feb 28, 2023 at 9:12 AM Peter Smith wrote: > Here are some comments for the v2-0001 patch. > > (I haven't looked at the v3 that was posted overnight; maybe some of > my comments have already been addressed.) Thanks for your comments. > == > General > > 1. (Info from the commit mes

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-01 Thread wangw.f...@fujitsu.com
On Tues, Feb 28, 2023 at 11:31 AM Osumi, Takamichi/大墨 昂道 wrote: > Hi, > > > On Monday, February 27, 2023 6:30 PM wangw.f...@fujitsu.com > wrote: > > Attach the new patch. > Thanks for sharing v3. Minor review comments and question. Thanks for your comments. > (1) UpdateDecodingProgressAndKee

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-03-01 Thread Aleksander Alekseev
Hi, > I'm surprised that these patches extend the page numbering to 64 bits, > but never actually uses the high bits. The XID "epoch" is not used, and > pg_xact still wraps around and the segment names are still reused. I > thought we could stop doing that. To clarify, the idea is to let CLOG gro

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Tomas Vondra
On 3/1/23 10:46, Jehan-Guillaume de Rorthais wrote: > Hi Justin, > > On Tue, 28 Feb 2023 12:25:08 -0600 > Justin Pryzby wrote: > >> On Tue, Feb 28, 2023 at 07:06:43PM +0100, Jehan-Guillaume de Rorthais wrote: >>> Hello all, >>> >>> A customer is facing out of memory query which looks similar

Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

2023-03-01 Thread Daniel Verite
I wrote: > Here's a POC patch implementing row-by-row fetching. PFA an updated patch. Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index f907f5d4e8..ad5e8a5de9 100644 --- a/src/bin/psql/common.

Re: Minimal logical decoding on standbys

2023-03-01 Thread Drouvot, Bertrand
Hi, On 3/1/23 1:48 AM, Jeff Davis wrote: On Mon, 2023-02-27 at 09:40 +0100, Drouvot, Bertrand wrote: Please find attached V51 tiny rebase due to a6cd1fc692 (for 0001) and 8a8661828a (for 0005). [ Jumping into this thread late, so I apologize if these comments have already been covered. ] T

Re: psql: Add role's membership options to the \du+ command

2023-03-01 Thread Pavel Luzanov
Next version (v3) addresses complains from cfbot. Changed only tests. -- Pavel Luzanov Postgres Professional: https://postgrespro.com From 6db62993d4b7afbcbce3e63ce3fbe3946ec50cff Mon Sep 17 00:00:00 2001 From: Pavel Luzanov Date: Wed, 1 Mar 2023 13:29:10 +0300 Subject: [PATCH v3] psql: \du show

Re: Allow logical replication to copy tables in binary format

2023-03-01 Thread Dilip Kumar
On Mon, Feb 27, 2023 at 2:31 PM Amit Kapila wrote: > > On Mon, Feb 20, 2023 at 3:37 PM shiy.f...@fujitsu.com > wrote: > > > > On Thu, Feb 16, 2023 8:48 PM Amit Kapila wrote: > > > > > > So, doesn't this mean that there is no separate failure mode during > > > the initial copy? I am clarifying th

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-01 Thread Amit Kapila
On Wed, Feb 22, 2023 at 7:54 PM Önder Kalacı wrote: > Few comments: === 1. + identity. When replica identity FULL is specified, + indexes can be used on the subscriber side for searching the rows. These + indexes should be btree, Why only btree and not others like a hash index

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

2023-03-01 Thread Masahiko Sawada
On Wed, Mar 1, 2023 at 3:37 PM John Naylor wrote: > > On Tue, Feb 28, 2023 at 10:09 PM Masahiko Sawada > wrote: > > > > On Tue, Feb 28, 2023 at 10:20 PM Masahiko Sawada > > wrote: > > > > > > On Tue, Feb 28, 2023 at 3:42 PM John Naylor > > > wrote: > > > > > > > > > > > > On Fri, Feb 24, 2023

Re: Allow logical replication to copy tables in binary format

2023-03-01 Thread Bharath Rupireddy
On Wed, Mar 1, 2023 at 4:47 PM Dilip Kumar wrote: > > > > walsender ERROR: no binary output function available for type > > > public.myvarchar > > > walsender STATEMENT: COPY public.tbl1 (a) TO STDOUT WITH (FORMAT binary) > > > > > > > Thanks for sharing the example. I think to address this us

Re: On login trigger: take three

2023-03-01 Thread Mikhail Gribkov
Hi hackers, The attached v38 patch is a fresh rebase on master branch. Nothing has changed beyond rebasing. And just for convenience, here is a link to the exact message of the thread describing the current approach: https://www.postgresql.org/message-id/CAMEv5_vg4aJOoUC74XJm%2B5B7%2BTF1nT-Yhtg%2

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread gkokolatos
--- Original Message --- On Wednesday, March 1st, 2023 at 12:58 AM, Justin Pryzby wrote: > I found that e9960732a broke writing of empty gzip-compressed data, > specifically LOs. pg_dump succeeds, but then the restore fails: > > postgres=# SELECT lo_create(1234); > lo_create | 12

Re: libpq: PQgetCopyData() and allocation overhead

2023-03-01 Thread Jeroen Vermeulen
Update: in the latest iteration, I have an alternative that reduces CPU time by more than half, compared to PQgetCopyData(). And the code is simpler, too, both in the client and in libpq itself. The one downside is that it breaks with libpq's existing API style. PR for easy discussion: https://g

Re: Allow logical replication to copy tables in binary format

2023-03-01 Thread Melih Mutlu
Hi, Bharath Rupireddy , 1 Mar 2023 Çar, 15:02 tarihinde şunu yazdı: > On Wed, Mar 1, 2023 at 4:47 PM Dilip Kumar wrote: > > I agree with this thought, basically adding an extra option will > > always complicate things for the user. And logically it doesn't make > > much sense to copy data in te

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Tomas Vondra
On 3/1/23 08:24, Michael Paquier wrote: > On Tue, Feb 28, 2023 at 05:58:34PM -0600, Justin Pryzby wrote: >> I found that e9960732a broke writing of empty gzip-compressed data, >> specifically LOs. pg_dump succeeds, but then the restore fails: > > The number of issues you have been reporting here

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-03-01 Thread Alexander Korotkov
Hi, Andres. Thank you for your review. Sorry for the late reply. I took some time for me to figure out how to revise the patch. The revised patchset is attached. I decided to split the patch into two: 1) Avoid re-fetching the "original" row version during update and delete. 2) Save the efforts

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-01 Thread Bharath Rupireddy
On Wed, Mar 1, 2023 at 1:00 PM Bharath Rupireddy wrote: > > Hi, > > In a recent discussion [1], Michael Paquier asked if we can combine > pg_walinspect till_end_of_wal functions with other functions > pg_get_wal_records_info and pg_get_wal_stats. The code currently looks > much duplicated and the

Re: Weird failure with latches in curculio on v15

2023-03-01 Thread Stephen Frost
Greetings, * Nathan Bossart (nathandboss...@gmail.com) wrote: > On Sat, Feb 25, 2023 at 11:00:31AM -0800, Andres Freund wrote: > > TBH, I think the current archive and restore module APIs aren't useful. I > > think it was a mistake to add archive modules without having demonstrated > > that > > o

Re: Non-superuser subscription owners

2023-03-01 Thread Robert Haas
On Tue, Feb 28, 2023 at 4:01 PM Jeff Davis wrote: > You're suggesting using the SECURITY_RESTRICTED_OPERATION flag, along > with the new security flags, but not switch to the table owner, right? Correct. > Or default expressions, I presume. If we at least agree on this point, > then I think we s

RE: Allow logical replication to copy tables in binary format

2023-03-01 Thread Hayato Kuroda (Fujitsu)
Dear Melih, If we do not have to treat the case Shi pointed out[1] as code-level, I agreed to same option binary because it is simpler. I read the use-cases addressed by Bharath[2] and I cannot find advantage for case 1 and 3 expect the case that binary functions are not implemented. Previously

Re: Non-superuser subscription owners

2023-03-01 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Feb 28, 2023 at 4:01 PM Jeff Davis wrote: > > Or default expressions, I presume. If we at least agree on this point, > > then I think we should try to find a way to treat these other hunks of > > code in a secure way (which I think

Re: meson: Non-feature feature options

2023-03-01 Thread Peter Eisentraut
On 24.02.23 14:01, Nazir Bilal Yavuz wrote: Thanks for the feedback. I updated the ssl patch and if you like changes, I can apply the same logic to uuid. Maybe we can make some of the logic less nested. Right now there is if sslopt != 'none' if not ssl.found() and sslopt in ['auto'

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Tomas Vondra
On 3/1/23 14:39, gkokola...@pm.me wrote: > > > > > > --- Original Message --- > On Wednesday, March 1st, 2023 at 12:58 AM, Justin Pryzby > wrote: > > > >> I found that e9960732a broke writing of empty gzip-compressed data, >> specifically LOs. pg_dump succeeds, but then the res

Re: pg_upgrade and logical replication

2023-03-01 Thread Nikolay Samokhvalov
On Tue, Feb 28, 2023 at 4:43 PM Julien Rouhaud wrote: > > On Tue, Feb 28, 2023 at 08:02:13AM -0800, Nikolay Samokhvalov wrote: > > 0. Temporarily, forbid running any DDL on the source cluster. > > This is (at least for me) a non starter, as I want an approach that doesn't > impact the primary node

Re: Show various offset arrays for heap WAL records

2023-03-01 Thread Melanie Plageman
On Tue, Jan 31, 2023 at 5:48 PM Peter Geoghegan wrote: > > On Tue, Jan 31, 2023 at 1:52 PM Peter Geoghegan wrote: > > > I would also like to see functions like XLogRecGetBlockRefInfo() pass > > > something more useful than a stringinfo buffer so that we could easily > > > extract out the relfilen

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Tomas Vondra
On 2/27/23 15:56, gkokola...@pm.me wrote: > > > > > > --- Original Message --- > On Saturday, February 25th, 2023 at 3:05 PM, Justin Pryzby > wrote: > > >> >> >> On Fri, Feb 24, 2023 at 11:02:14PM -0600, Justin Pryzby wrote: >> >>> I have some fixes (attached) and questions whil

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-03-01 Thread Kirk Wolak
On Wed, Mar 1, 2023 at 4:41 AM Jim Jones wrote: > On 01.03.23 01:59, Kirk Wolak wrote: > > I cannot get the last email to show up for the commitfest. > > This is version 2 of the original patch. [1] > > Thanks Jim! > > > > [1] > https://postgr.es/m/CACLU5mSRwHr_8z%3DenMj-nXF1tmC7%2BJn5heZQNiKuLyx

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Tomas Vondra
On 2/25/23 15:05, Justin Pryzby wrote: > On Fri, Feb 24, 2023 at 11:02:14PM -0600, Justin Pryzby wrote: >> I have some fixes (attached) and questions while polishing the patch for >> zstd compression. The fixes are small and could be integrated with the >> patch for zstd, but could be applied i

The order of queues in row lock is changed (not FIFO)

2023-03-01 Thread Ryo Yamaji (Fujitsu)
Hi all, In pgql-general, I reported that the queue order changed in the following cases. [1] ・Multiple sessions request row locks for the same tuple ・Update occurs for target tuple I would like to hear the opinion of experts on whether it is a specification or a bug. I think row locking is a FI

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-03-01 Thread Gregory Stark
This looks like it needs a rebase. === Applying patches on top of PostgreSQL commit ID 71a75626d5271f2bcdbdc43b8c13065c4634fd9f === === applying patch ./v11-0001-libpq-Run-pgindent-after-a9e9a9f32b3.patch patching file src/interfaces/libpq/fe-auth-scram.c patching file src/interfaces/libpq/fe-auth

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-03-01 Thread Gregory Stark
It looks like this patch received some feedback from Andres and hasn't had any further work posted. I'm going to move it to "Waiting on Author". It doesn't sound like this is likely to get committed this release cycle unless responding to Andres's points simpler than I expect.

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-03-01 Thread vignesh C
On Tue, 28 Feb 2023 at 21:21, Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, > > > Few comments: > > Thank you for reviewing! PSA new version. Thanks for the updated patch, few comments: 1) Currently we have added the delay during the decode of commit, while decoding the commit walsender process w

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Tomas Vondra
On 2/27/23 05:49, Justin Pryzby wrote: > On Sat, Feb 25, 2023 at 08:05:53AM -0600, Justin Pryzby wrote: >> On Fri, Feb 24, 2023 at 11:02:14PM -0600, Justin Pryzby wrote: >>> I have some fixes (attached) and questions while polishing the patch for >>> zstd compression. The fixes are small and co

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-03-01 Thread Jim Jones
On 01.03.23 17:13, Kirk Wolak wrote: Thanks, corrected, and confirmed Unix line endings. FWIW, the simplest way to test it is with this command (I usually get it wrong on the first guess) \set PROMPT1 %T ' ' :PROMPT1 Kirk Nice. The patch applies clean and the cfbots seem much happier now -

Re: The order of queues in row lock is changed (not FIFO)

2023-03-01 Thread Tom Lane
"Ryo Yamaji (Fujitsu)" writes: > In pgql-general, I reported that the queue order changed in > the following cases. [1] > $B!&(BMultiple sessions request row locks for the same tuple > $B!&(BUpdate occurs for target tuple > I would like to hear the opinion of experts on whether it is a > spec

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-01 Thread Andres Freund
Hi, On 2023-03-01 11:12:35 +0200, Heikki Linnakangas wrote: > On 27/02/2023 23:45, Andres Freund wrote: > > But, uh, isn't this code racy? Because this doesn't go through shared > > buffers, > > there's no IO_IN_PROGRESS interlocking against a concurrent reader. We know > > that writing pages isn

Re: Add LZ4 compression in pg_dump

2023-03-01 Thread Justin Pryzby
On Wed, Mar 01, 2023 at 01:39:14PM +, gkokola...@pm.me wrote: > On Wednesday, March 1st, 2023 at 12:58 AM, Justin Pryzby > wrote: > > > The current function order avoids 3 lines of declarations, but it's > > obviously pretty useful to be able to run that diff command. I already > > argued fo

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-01 Thread Andres Freund
Hi, On 2023-03-01 09:02:00 -0800, Andres Freund wrote: > On 2023-03-01 11:12:35 +0200, Heikki Linnakangas wrote: > > On 27/02/2023 23:45, Andres Freund wrote: > > > But, uh, isn't this code racy? Because this doesn't go through shared > > > buffers, > > > there's no IO_IN_PROGRESS interlocking ag

Re: add PROCESS_MAIN to VACUUM

2023-03-01 Thread Nathan Bossart
Thanks for taking a look. On Wed, Mar 01, 2023 at 03:31:48PM +0900, Michael Paquier wrote: > PROCESS_TOAST has that: > /* sanity check for PROCESS_TOAST */ > if ((params->options & VACOPT_FULL) != 0 && > (params->options & VACOPT_PROCESS_TOAST) == 0) > ereport(ERROR, >

Re: Non-superuser subscription owners

2023-03-01 Thread Robert Haas
On Wed, Mar 1, 2023 at 10:48 AM Stephen Frost wrote: > > Yeah, or any other expressions. Basically impose restrictions when the > > user running the code is not the same as the user who provided the > > code. > > Would this have carve-outs for things like "except if the user providing > the code i

Re: Weird failure with latches in curculio on v15

2023-03-01 Thread Robert Haas
On Tue, Feb 28, 2023 at 11:29 PM Nathan Bossart wrote: > On Sat, Feb 25, 2023 at 11:00:31AM -0800, Andres Freund wrote: > > TBH, I think the current archive and restore module APIs aren't useful. I > > think it was a mistake to add archive modules without having demonstrated > > that > > one can

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Jehan-Guillaume de Rorthais
Hi Tomas, On Tue, 28 Feb 2023 20:51:02 +0100 Tomas Vondra wrote: > On 2/28/23 19:06, Jehan-Guillaume de Rorthais wrote: > > * HashBatchContext goes up to 1441MB after 240s then stay flat until the end > > (400s as the last record) > > That's interesting. We're using HashBatchContext for very

Add pg_walinspect function with block info columns

2023-03-01 Thread Melanie Plageman
Hi, When using pg_walinspect, and calling functions like pg_get_wal_records_info(), I often wish that the various information in the block_ref column was separated out into columns so that I could easily access them and pass them to various other functions to add information -- like getting the re

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Jehan-Guillaume de Rorthais
On Wed, 1 Mar 2023 18:48:40 +0100 Jehan-Guillaume de Rorthais wrote: ... > You'll find some intermediate stats I already collected in attachment: > > * break 1, 2 and 3 are from AllocSetAlloc, break 4 is from AllocSetFree. > * most of the non-free'd chunk are allocated since the very beginning, b

Re: Allow logical replication to copy tables in binary format

2023-03-01 Thread Melih Mutlu
Hi, Hayato Kuroda (Fujitsu) , 1 Mar 2023 Çar, 18:40 tarihinde şunu yazdı: > Dear Melih, > > If we do not have to treat the case Shi pointed out[1] as code-level, I > agreed to > same option binary because it is simpler. How is this an issue if we let the binary option do binary copy and not an

Re: add PROCESS_MAIN to VACUUM

2023-03-01 Thread Alvaro Herrera
On 2023-Mar-01, Michael Paquier wrote: > +-- PROCESS_MAIN option > +VACUUM (PROCESS_MAIN FALSE) vactst; > +VACUUM (PROCESS_MAIN FALSE, PROCESS_TOAST FALSE) vactst; > +VACUUM (PROCESS_MAIN FALSE, FULL) vactst; > > Thinking a bit here. This set of tests does not make sure that the > main relation

Re: Non-superuser subscription owners

2023-03-01 Thread Jeff Davis
On Wed, 2023-03-01 at 10:05 -0500, Robert Haas wrote: > For this reason, these expressions are, by > default, restricted from doing . The hard part is defining without resorting to a bunch of special cases, and also in a way that doesn't break a bunch of stuff. > You earlier > mentioned that swi

Re: PATCH: Using BRIN indexes for sorted output

2023-03-01 Thread Alvaro Herrera
On 2023-Feb-24, Tomas Vondra wrote: > On 2/24/23 16:14, Alvaro Herrera wrote: > > I think a formulation of this kind has the benefit that it works after > > BlockNumber is enlarged to 64 bits, and doesn't have to be changed ever > > again (assuming it is correct). > > Did anyone even propose doi

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-03-01 Thread Greg S
On Tue, 28 Feb 2023 at 15:59, Gregory Stark wrote: > > This looks like it needs a rebase. So I'm updating the patch to Waiting on Author

Re: [EXTERNAL] Re: Support load balancing in libpq

2023-03-01 Thread Greg S
This patch seems to need a rebase. I'll update the status to Waiting on Author for now. After rebasing please update it to either Needs Review or Ready for Committer depending on how simple the rebase was and whether there are open questions to finish it.

Re: add PROCESS_MAIN to VACUUM

2023-03-01 Thread Nathan Bossart
On Wed, Mar 01, 2023 at 07:09:53PM +0100, Alvaro Herrera wrote: > On 2023-Mar-01, Michael Paquier wrote: > >> +-- PROCESS_MAIN option >> +VACUUM (PROCESS_MAIN FALSE) vactst; >> +VACUUM (PROCESS_MAIN FALSE, PROCESS_TOAST FALSE) vactst; >> +VACUUM (PROCESS_MAIN FALSE, FULL) vactst; >> >> Thinking a

Re: meson: Optionally disable installation of test modules

2023-03-01 Thread Peter Eisentraut
On 23.02.23 19:06, Nazir Bilal Yavuz wrote: Hi, Thanks for the review. On Mon, 20 Feb 2023 at 21:44, Peter Eisentraut wrote: I tested this a bit. It works fine. The approach makes sense to me. The install_additional_files script could be simplified a bit. You could use os.makedirs(dest,

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-03-01 Thread Gregory Stark (as CFM)
On Wed, 1 Mar 2023 at 04:04, Andrei Zubkov wrote: > > Hi! > > I've attached a new version of a patch - rebase to the current master. The CFBot (http://cfbot.cputube.org/) doesn't seem to like this. It looks like all the Meson builds are failing, perhaps there's something particular about the test

Re: Allow +group in pg_ident.conf

2023-03-01 Thread Gregory Stark (as CFM)
On Wed, 11 Jan 2023 at 04:00, Jelte Fennema wrote: > > I'm working on a new patchset for my commitfest entry. So I'll set it to "Waiting on Author" pending that new patchset... -- Gregory Stark As Commitfest Manager

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Tomas Vondra
On 3/1/23 18:48, Jehan-Guillaume de Rorthais wrote: > Hi Tomas, > > On Tue, 28 Feb 2023 20:51:02 +0100 > Tomas Vondra wrote: >> On 2/28/23 19:06, Jehan-Guillaume de Rorthais wrote: >>> * HashBatchContext goes up to 1441MB after 240s then stay flat until the end >>> (400s as the last record) >

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Tomas Vondra
On 3/1/23 19:09, Jehan-Guillaume de Rorthais wrote: > On Wed, 1 Mar 2023 18:48:40 +0100 > Jehan-Guillaume de Rorthais wrote: > ... >> You'll find some intermediate stats I already collected in attachment: >> >> * break 1, 2 and 3 are from AllocSetAlloc, break 4 is from AllocSetFree. >> * most o

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-03-01 Thread Gregory Stark (as CFM)
On Thu, 9 Feb 2023 at 05:43, Aleksander Alekseev wrote: > > >> I don't buy your argument about DO UPDATE needing to be brought into > >> line with DO NOTHING. In any case I'm pretty sure that Tom's remarks > >> in 2016 about a behavioral inconsistencies (which you cited) actually > >> called for m

Re: allow meson to find ICU in non-standard localtion

2023-03-01 Thread Jacob Champion
On Sun, Feb 26, 2023 at 7:36 PM Jeff Davis wrote: > > On Sun, 2023-02-26 at 09:57 -0800, Andres Freund wrote: > > If you tell meson where to find the pkg-config file in those > > directories it'd > > also work. -Dpkg_config_path=... > > Setup is able to find it, which is good, but it seems like it

Re: Flush SLRU counters in checkpointer process

2023-03-01 Thread Gregory Stark (as CFM)
On Thu, 12 Jan 2023 at 03:46, Anthonin Bonnefoy wrote: > > > That would make sense. I've created a new patch with everything moved in > pgstat_report_checkpointer(). > I did split the checkpointer flush in a pgstat_flush_checkpointer() function > as it seemed more readable. Thought? This patch

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-01 Thread Peter Eisentraut
On 28.02.23 21:14, Daniel Gustafsson wrote: Today we have two fairly common patterns around extracting an attr from a cached tuple: a = SysCacheGetAttr(OID, tuple, Anum_pg_foo_bar, &isnull); Assert(!isnull); a = SysCacheGetAttr(OID, tuple, Anum_pg_foo_bar, &isnull); if (isnull)

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-03-01 Thread Gregory Stark (as CFM)
On Wed, 1 Mar 2023 at 14:48, Jelte Fennema wrote: > > > This looks like it needs a rebase. > > done Great. Please update the CF entry to Needs Review or Ready for Committer as appropriate :) -- Gregory Stark As Commitfest Manager

Re: Should vacuum process config file reload more often

2023-03-01 Thread Melanie Plageman
Thanks for the feedback and questions, Pavel! On Fri, Feb 24, 2023 at 3:43 AM Pavel Borisov wrote: > I have a couple of small questions: > Can this patch also read the current GUC value if it's modified by the > SET command, without editing config file? If a user sets a guc like vacuum_cost_limi

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-01 Thread Gregory Stark (as CFM)
Looks like you have a path forward on this and it's not ready to commit yet? In which case I'll mark it Waiting on Author? On Fri, 13 Jan 2023 at 13:38, Andres Freund wrote: > > On 2023-01-13 10:36:49 +0100, Drouvot, Bertrand wrote: > > > I'll first look at 1). > > Makes sense. > > > And it looks

Re: In-placre persistance change of a relation

2023-03-01 Thread Gregory Stark (as CFM)
On Mon, 6 Feb 2023 at 23:48, Kyotaro Horiguchi wrote: > > Thank you for the comment! > > At Fri, 3 Feb 2023 08:42:52 +0100, Heikki Linnakangas wrote > in > > I want to call out this part of this patch: Looks like this patch has received some solid feedback from Heikki and you have a path forwar

Re: Infinite Interval

2023-03-01 Thread Gregory Stark (as CFM)
On Sun, 15 Jan 2023 at 11:44, Joseph Koshakow wrote: > > On Sat, Jan 14, 2023 at 4:22 PM Joseph Koshakow wrote: > I've gone ahead and updated the patch to only look at the months field. > I'll submit this email and patch to the Feb commitfest. It looks like this patch needs a (perhaps trivial)

Re: [EXTERNAL] Re: Support load balancing in libpq

2023-03-01 Thread Jelte Fennema
done and updated cf entry On Wed, 1 Mar 2023 at 20:13, Greg S wrote: > > This patch seems to need a rebase. > > I'll update the status to Waiting on Author for now. After rebasing > please update it to either Needs Review or Ready for Committer > depending on how simple the rebase was and whether

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-01 Thread Tom Lane
Peter Eisentraut writes: > Yes please! > I have occasionally wondered whether just passing the isnull argument as > NULL would be sufficient, so we don't need a new function. I thought about that too. I think I prefer Daniel's formulation with the new function, but I'm not especially set on th

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-03-01 Thread Andrei Zubkov
Hi Gregory, On Wed, 2023-03-01 at 14:24 -0500, Gregory Stark (as CFM) wrote: > The CFBot (http://cfbot.cputube.org/) doesn't seem to like this. It > looks like all the Meson builds are failing, perhaps there's > something > particular about the test environment that is either not set up right > or

Re: Logical replication timeout problem

2023-03-01 Thread Gregory Stark (as CFM)
On Wed, 8 Feb 2023 at 15:04, Andres Freund wrote: > > Attached is a current, quite rough, prototype. It addresses some of the points > raised, but far from all. There's also several XXXs/FIXMEs in it. I changed > the file-ending to .txt to avoid hijacking the CF entry. It looks like this patch h

Re: Making empty Bitmapsets always be NULL

2023-03-01 Thread Nathan Bossart
On Tue, Feb 28, 2023 at 04:59:48PM -0500, Tom Lane wrote: > When I designed the Bitmapset module, I set things up so that an empty > Bitmapset could be represented either by a NULL pointer, or by an > allocated object all of whose bits are zero. I've recently come to > the conclusion that that was

Re: allow meson to find ICU in non-standard localtion

2023-03-01 Thread Jeff Davis
On Wed, 2023-03-01 at 11:43 -0800, Jacob Champion wrote: > I work around it by manually setting -Dextra_lib_dirs. I just tried > doing that with ICU 72, and it worked without a patch. Hopefully that > helps some? Yes, works, thank you. Obviously we'd like a little better solution so that others d

Re: [HACKERS] make async slave to wait for lsn to be replayed

2023-03-01 Thread Greg Stark
On Tue, 28 Feb 2023 at 05:13, Kartyshov Ivan wrote: > > Below I provide the implementation of patches for the first three types. > I propose to discuss this feature again/ Oof, that doesn't really work with the cfbot. It tries to apply all three patches and of course the second and third fail to

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-01 Thread Daniel Gustafsson
> On 1 Mar 2023, at 21:04, Tom Lane wrote: > > Peter Eisentraut writes: >> Yes please! > >> I have occasionally wondered whether just passing the isnull argument as >> NULL would be sufficient, so we don't need a new function. > > I thought about that too. I think I prefer Daniel's formulati

Re: File descriptors in exec'd subprocesses

2023-03-01 Thread Gregory Stark (as CFM)
On Mon, 20 Feb 2023 at 23:04, Thomas Munro wrote: > > Done like that in this version. This is the version I'm thinking of > committing, unless someone wants to argue for another level. FWIW the cfbot doesn't understand this patch series. I'm not sure why but it's only trying to apply the first (

Re: File descriptors in exec'd subprocesses

2023-03-01 Thread Thomas Munro
On Thu, Mar 2, 2023 at 9:49 AM Gregory Stark (as CFM) wrote: > On Mon, 20 Feb 2023 at 23:04, Thomas Munro wrote: > > > > Done like that in this version. This is the version I'm thinking of > > committing, unless someone wants to argue for another level. > > FWIW the cfbot doesn't understand this

Re: Operation log for major operations

2023-03-01 Thread Gregory Stark (as CFM)
On Thu, 19 Jan 2023 at 16:12, Dmitry Koval wrote: > > >The patch does not apply on top of HEAD ... > > Thanks! > Here is a fixed version. Sorry to say, but this needs a rebase again... Setting to Waiting on Author... Are there specific feedback needed to make progress? Once it's rebased if you

Re: Non-superuser subscription owners

2023-03-01 Thread Robert Haas
On Wed, Mar 1, 2023 at 1:13 PM Jeff Davis wrote: > I don't think it's magic, as I said above. But I assume that your more > general point is that if we take some responsibility away from the > invoker and place it on the definer, then it creates room for new kinds > of problems. And I agree. > > T

Re: WIP: Aggregation push-down - take2

2023-03-01 Thread Gregory Stark (as CFM)
On Thu, 5 Jan 2023 at 02:59, Antonin Houska wrote: > > vignesh C wrote: > > > The patch does not apply on top of HEAD as in [1], please post a rebased > > patch: And again... Setting this to Waiting on Author for the moment. Do you think this patch is likely to be ready for this release or th

Re: buildfarm + meson

2023-03-01 Thread Andrew Dunstan
On 2023-02-23 Th 10:58, Andres Freund wrote: On 2023-02-23 06:27:23 -0500, Andrew Dunstan wrote: On 2023-02-22 We 20:20, Andres Freund wrote: There is work to do to make sure we pick up the right log files, and maybe adjust a module or two. I have adopted a design where instead of trying to kn

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-03-01 Thread Kirk Wolak
On Wed, Mar 1, 2023 at 11:55 AM Jim Jones wrote: > On 01.03.23 17:13, Kirk Wolak wrote: > > Thanks, corrected, and confirmed Unix line endings. > FWIW, the simplest way to test it is with this command (I usually get it > wrong on the first guess) > > \set PROMPT1 %T ' ' :PROMPT1 > > Kirk > > Nice

Re: buildfarm + meson

2023-03-01 Thread Andres Freund
Hi, On 2023-03-01 16:21:32 -0500, Andrew Dunstan wrote: > Perhaps the latest version will be more to your taste. I'll check it out. > This is now working > on my MSVC test rig (WS2019, VS2019, Strawberry Perl), including TAP tests. > I do get a whole lot of annoying messages like this: > > Unk

Re: Making empty Bitmapsets always be NULL

2023-03-01 Thread Jacob Champion
On Tue, Feb 28, 2023 at 1:59 PM Tom Lane wrote: > I also discovered that nodeAppend.c is relying on bms_del_members > not reducing a non-empty set to NULL, because it uses the nullness > of appendstate->as_valid_subplans as a state boolean. I seem to recall that Deep and I tripped into this durin

Re: Memory leak from ExecutorState context?

2023-03-01 Thread Jehan-Guillaume de Rorthais
On Wed, 1 Mar 2023 20:34:08 +0100 Tomas Vondra wrote: > On 3/1/23 19:09, Jehan-Guillaume de Rorthais wrote: > > On Wed, 1 Mar 2023 18:48:40 +0100 > > Jehan-Guillaume de Rorthais wrote: > > ... > >> You'll find some intermediate stats I already collected in attachment: > >> > >> * break 1, 2 an

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-01 Thread Heikki Linnakangas
On 01/03/2023 09:33, Andres Freund wrote: On 2023-02-21 17:33:31 +0100, Alvaro Herrera wrote: On 2023-Feb-21, Heikki Linnakangas wrote: +static BlockNumber +BulkExtendSharedRelationBuffered(Relation rel, +SMgrRelation smgr, +

typedef struct LogicalDecodingContext

2023-03-01 Thread Peter Smith
Hi, During a recent code review, I noticed a lot of 'struct LogicalDecodingContext' usage. There are many function prototypes where the params are (for no apparent reason to me) a mixture of structs and typedef structs. AFAICT just by pre-declaring the typedef struct LogicalDecodingContext, all

  1   2   >