Re: Cannot find a working 64-bit integer type on Illumos

2024-10-13 Thread Peter Eisentraut
To move this along a bit, I have committed the "Remove traces of BeOS." patch.

Re: Adding OLD/NEW support to RETURNING

2024-10-13 Thread jian he
typedef struct ReturningOption { NodeTagtype; boolisNew; char *name; intlocation; } ReturningOption; location should be type ParseLoc? in process_sublinks_mutator else if (IsA(node, ReturningExpr)) { if (((ReturningExpr *) node)->

Re: Add contrib/pg_logicalsnapinspect

2024-10-13 Thread Bertrand Drouvot
Hi, On Mon, Oct 14, 2024 at 09:57:22AM +1100, Peter Smith wrote: > Here are some minor review comments for v15-0002. > > == > contrib/pg_logicalinspect/pg_logicalinspect.c > > 1. > +pg_get_logical_snapshot_meta(PG_FUNCTION_ARGS) > +{ > +#define PG_GET_LOGICAL_SNAPSHOT_META_COLS 3 > + SnapBui

Re: Add contrib/pg_logicalsnapinspect

2024-10-13 Thread Bertrand Drouvot
Hi, On Fri, Oct 11, 2024 at 04:48:26PM -0700, Masahiko Sawada wrote: > On Fri, Oct 11, 2024 at 11:15 AM Masahiko Sawada > wrote: > > > > On Fri, Oct 11, 2024 at 6:15 AM Bertrand Drouvot > > wrote: > > > > > > Hi, > > > > > > On Thu, Oct 10, 2024 at 05:38:43PM -0700, Masahiko Sawada wrote: > > >

Re: Missing deconstruct_array_builtin usage

2024-10-13 Thread Bertrand Drouvot
Hi, On Fri, Oct 11, 2024 at 05:43:04PM -0700, Masahiko Sawada wrote: > Hi, > > On Thu, Oct 10, 2024 at 10:37 PM Bertrand Drouvot > wrote: > > > > Hi hackers, > > > > While working on [1], I noticed that we missed using > > deconstruct_array_builtin() > > in 062a8444242. > > > > Indeed, d746021d

Re: Using per-transaction memory contexts for storing decoded tuples

2024-10-13 Thread Amit Kapila
On Fri, Oct 11, 2024 at 3:40 AM Masahiko Sawada wrote: > > Please find the attached patches. > @@ -343,9 +343,9 @@ ReorderBufferAllocate(void) */ buffer->tup_context = GenerationContextCreate(new_ctx, "Tuples", - SLAB_LARGE_BLOCK_SIZE, - SLAB_LARGE_BLOCK_SIZE, - SLAB_LARGE_BLOCK_SIZ

mingw64 built pg_sphere not loadable in VC++ PostgreSQL builds - double_to_shortest_decimal_buf

2024-10-13 Thread Regina Obe
I'm not sure what the issue is here exactly, if it's a bug in Meson VC++ or something in pgSphere code. I've managed to build pg_sphere binaries under mingw64 and load them and regress fine In PostgreSQL EDB VC++ for versions 14-16. However when I tried PG17, the create extension pg_sphere fails

Re: Enhance create subscription reference manual

2024-10-13 Thread Amit Kapila
On Thu, Oct 3, 2024 at 8:53 AM Tatsuo Ishii wrote: > > > parameter in this case (it is an "optional" parameter, though). However, > > when we refer to the stored catalog value, we should call it an option or > > a property and calling it parameter is not suitable. > > Not sure. The stored catalog

Re: Remove obsolete comment in reorderbuffer.h

2024-10-13 Thread Amit Kapila
On Sat, Oct 12, 2024 at 5:42 AM Masahiko Sawada wrote: > > I realized an obsolete comment in the definition of ReorderBufferTXN. > > Commit 9fab40ad32e changed ReorderBuffer to use Slab Context for > allocating ReorderBufferTXN entries instead of using a caching > mechanism, so the txn->node is no

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-10-13 Thread Tom Lane
jian he writes: > So if we are in script_error_callback > `intlocation = callback_arg->stmt_location;` > location >= 0 will be always true? No, not if the grammar threw an error. regards, tom lane

RE: Conflict detection for update_deleted in logical replication

2024-10-13 Thread Zhijie Hou (Fujitsu)
On Friday, October 11, 2024 4:35 PM Zhijie Hou (Fujitsu) wrote: > > Attach the V4 patch set which addressed above comments. > While reviewing the patch, I noticed that the current design could not work in a non-bidirectional cluster (publisher -> subscriber) when the publisher is also a physic

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-10-13 Thread jian he
On Mon, Oct 14, 2024 at 1:13 AM Tom Lane wrote: > > Pavel Stehule writes: > > so 12. 10. 2024 v 9:33 odesílatel jian he > > napsal: > >> + /* > >> + * If we have a location (which, as said above, we really always should) > >> + * then report a line number to aid in localizing problems in big scr

Re: \watch 0 or \watch 0.00001 doesn't do what I want

2024-10-13 Thread Michael Paquier
On Sun, Oct 13, 2024 at 12:04:23PM +0900, Michael Paquier wrote: > + /* Tight loop, no wait needed */ > + if (sleep_ms == 0) > > Okay about this addition. > > +psql_like($node, sprintf('SELECT 1 \watch c=3 i=%g', 0.0001), > + qr/1\n1\n1/, '\watch with 3 iterations'); > > And I am f

Re: Add contrib/pg_logicalsnapinspect

2024-10-13 Thread Peter Smith
Here are some minor review comments for v15-0002. == contrib/pg_logicalinspect/pg_logicalinspect.c 1. +pg_get_logical_snapshot_meta(PG_FUNCTION_ARGS) +{ +#define PG_GET_LOGICAL_SNAPSHOT_META_COLS 3 + SnapBuildOnDisk ondisk; + HeapTuple tuple; + Datum values[PG_GET_LOGICAL_SNAPSHOT_META_COLS]

Re: general purpose array_sort

2024-10-13 Thread Tom Lane
Junwang Zhao writes: > It seems there is not much meaning to sort composite type, > so are you proposing we should error on that? It's hardly "general purpose" if it randomly refuses to sort certain types. I would say it should be able to sort anything that ORDER BY will handle --- and that cert

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-10-13 Thread Tom Lane
Pavel Stehule writes: > so 12. 10. 2024 v 9:33 odesílatel jian he > napsal: >> + /* >> + * If we have a location (which, as said above, we really always should) >> + * then report a line number to aid in localizing problems in big scripts. >> + */ >> + if (location >= 0) >> so this part will alwa

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-10-13 Thread Pavel Stehule
so 12. 10. 2024 v 9:33 odesílatel jian he napsal: > On Wed, Oct 9, 2024 at 4:18 AM Tom Lane wrote: > > > > > In the attached v4 > > > in the upper code two branch, both will call CleanQuerytext > so in script_error_callback > > + /* > + * If we have a location (which, as said above, we really al

Worker parallelism on EXECUTE with a non-zero fetch count

2024-10-13 Thread Rohit Sivakumar
Hi Hackers, Quoting an excerpt from Chapter 15.2 of postgres' official documentation (versions 12 through latest), *"Even when a parallel query plan is generated for a particular query, there are several circumstances under which it will be impossible to execute that plan in parallel at execution

Re: general purpose array_sort

2024-10-13 Thread Junwang Zhao
Hi Jian, On Fri, Oct 11, 2024 at 1:12 PM jian he wrote: > > tricky case: > should we allow array element type to be composite/domain? > currently seems to work fine. > > > create table t(b int[]); > insert into t values ('{{1,3}}'), ('{{1,2}}'); > > select array_sort((select array_agg(t) from t)

Re: New "raw" COPY format

2024-10-13 Thread Joel Jacobson
On Sun, Oct 13, 2024, at 11:52, Tatsuo Ishii wrote: > After copy imported the "unstructured text file" in "row" COPY format, > what the column type is? text? or bytea? If it's text, how do you > handle encoding conversion if the "unstructured text file" is encoded > in server side unsafe encoding

Re: pg_upgrade check for invalid databases

2024-10-13 Thread Thomas Krennwallner
On Fri, 11 Oct 2024 at 04:01, Daniel Gustafsson wrote: > > > On 7 Oct 2024, at 22:04, Nathan Bossart wrote: > > > > On Mon, Oct 07, 2024 at 03:37:35PM -0400, Bruce Momjian wrote: > >> On Tue, Oct 1, 2024 at 09:28:54AM +0200, Daniel Gustafsson wrote: > >>> Correct, sorry for being unclear. The c

Re: type cache cleanup improvements

2024-10-13 Thread Alexander Korotkov
Hi, Arthur! Thank you so much for your review! On Thu, Oct 10, 2024 at 6:54 PM Artur Zakirov wrote: > On Fri, 13 Sept 2024 at 01:38, Alexander Korotkov > wrote: > > > > 0001 - adds comment about concurrent invalidation handling > > 0002 - revised c14d4acb8. Now we track type oids, whose > > T

Re: New "raw" COPY format

2024-10-13 Thread Tatsuo Ishii
> Hi hackers, > > This thread is about implementing a new "raw" COPY format. > > This idea came up in a different thread [1], moved here. > > [1] > https://postgr.es/m/47b5c6a7-5c0e-40aa-8ea2-c7b95ccf296f%40app.fastmail.com > > The main use-case for the raw format, is when needing to import ar