Re: Questions about document "Concurrenry control" section

2024-10-12 Thread Arbol One

Yes, this is IMOP, the best way.
I have set up Thunderbird to throw everything that is not in my contact 
list to Trash, thus your email will never be read by me if you don't use 
- Reply to Mailing list -. Just saying.


On 2024-10-11 11:10 p.m., admin@iseki.space wrote:
I found. Maybe we should reply to the mailing list only. Otherwise 
we'll receive multiple copies of the emails.





--
*/ArbolOne ™/*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing 
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in 
progress [ í ]

Re: Questions about document "Concurrenry control" section

2024-10-12 Thread Adrian Klaver

On 10/12/24 03:17, Peter J. Holzer wrote:

On 2024-10-11 21:21:16 -0700, Adrian Klaver wrote:

On 10/11/24 20:10, admin@iseki.space wrote:

I found. Maybe we should reply to the mailing list only. Otherwise we'll
receive multiple copies of the emails.




Not if you go here:

https://lists.postgresql.org/manage/

and check:

Don't receive an extra copy of mails when listed in To or CC fields


Yes, but that's the wrong way around. Then I get some mails only
directly and some only through the list, which makes proper filtering
hard to impossible. For me it's much better to get all the mails through
the list (so I can use the List-ID header to filter them into the
appropriate folder) and live with the extra copies in my inbox. I would
prefer to not get those extra copies, but there is nothing the list can
do about them, that's under the control of the sender.


Not following. If it goes through the list either by 'Reply to list' or 
Reply All' it is going to pick up the List-ID and be filtered. All the 
setting does is make sure you don't get extra copies when your email is 
in the To or CC fields, which is the list doing something about them. 
I've been using this for years and aside from some general list/email 
issues it has worked as advertised.





 hp



--
Adrian Klaver
adrian.kla...@aklaver.com





Re: Using FDW to connect to a more recent postgres version?

2024-10-12 Thread Tom Lane
Koen De Groote  writes:
> The documentation speaks only of compatibility in terms of connecting to
> older version:
>> postgres_fdw can be used with remote servers dating back to PostgreSQL
>> 8.3. Read-only capability is available back to 8.1.
> But what about connecting to a foreign server that is more recent? Like
> pg14 connecting to pg17?

I'd expect it to work, but it's not a scenario that we test.

regards, tom lane




Re: Naive question about multithreading/multicore

2024-10-12 Thread Thomas Munro
On Sun, Oct 13, 2024 at 6:31 AM Marc SCHAEFER
 wrote:
> template1=> SELECT COUNT(*) FROM pg_class a, pg_class b, pg_class c;
>
> I see only one 100% CPU PostgreSQL process.

If you set set min_parallel_table_scan_size = 0 then it uses
parallelism, and completes much faster.  The planner generally works
by comparing the estimated cost of various plans (it is a "cost based"
optimiser), but the decision to actually consider parallelism at all
is essentially "rule based", and the rules aren't smart enough for
this query with default settings.  pg_class is considered too small to
bother parallelising the scan, and here you have a 3-way cross-join
which generates an enormous of work for each tuple so it is actually
a good idea to parallelise it.  I guess people don't actually do that too
often.




Using FDW to connect to a more recent postgres version?

2024-10-12 Thread Koen De Groote
The documentation speaks only of compatibility in terms of connecting to
older version:

> postgres_fdw can be used with remote servers dating back to PostgreSQL
8.3. Read-only capability is available back to 8.1.

But what about connecting to a foreign server that is more recent? Like
pg14 connecting to pg17?

Are the considerations in that case simply with new data types not being
recognized? Or are there cases where the setup can be done, but queries
won't behave as expected?

Regards,
Koen De Groote


Naive question about multithreading/multicore

2024-10-12 Thread Marc SCHAEFER
Hello,

on a machine where starting two processes:
   perl -e 'while (1) { ; }'
I see two processed at 100% CPU, which is expected (with top).

Now, if I do:

template1=> SELECT COUNT(*) FROM pg_class a, pg_class b, pg_class c;

I see only one 100% CPU PostgreSQL process.

I read that while PostgreSQL connetions lead to a UNIX process model,
which is better for isolation, some operations have been parallelized
and can use more than one core/thread.

Maybe this specific case was not (yet?) parallelized, or should it
be and thus something is issing in my configuration?

Thank you.

PS: psql (13.16 (Debian 13.16-0+deb11u1))




Re: Foreign Data Wrapper behavior?

2024-10-12 Thread Koen De Groote
Ah, thanks for that

On Fri, Oct 11, 2024 at 5:59 PM Adrian Klaver 
wrote:

> On 10/11/24 04:08, Koen De Groote wrote:
> > In the release notes for postgres 17 I'm reading:
> >
> >  > The PostgreSQL foreign data wrapper (postgres_fdw), used to execute
> > queries on remote PostgreSQL instances, can now push EXISTS and IN
> > subqueries to the remote server for more efficient processing.
> >
> > I'm confused as to what this means. In older versions, are parts of
> > queries not sent to the foreign server? Or is this change meant to imply
> > the sending of only the subqueries, the result of which is then directly
> > used in pushing the entire query?
> >
> > Or am I still wrong as to what this means?
> >
> > I looked at the documentation and there doesn't seem to be any
> > indication of particular queries not being pushed to the foreign server,
> > so this wording that "can now push EXISTS and IN subqueries to the
> > remote server" is confusing.
> >
> > What am I missing?
>
> Read:
>
>
> https://www.postgresql.org/docs/current/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION
>
> F.36.5. Remote Query Optimization
>
>
> As to the change in the Release Note see the --hackers discussion:
>
>
> https://www.postgresql.org/message-id/c9e2a757cf3ac2333714eaf83a9cc184%40postgrespro.ru
>
> >
> > Regards,
> > Koen De Groote
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>
>


Re: Questions about document "Concurrenry control" section

2024-10-12 Thread Peter J. Holzer
On 2024-10-12 10:25:08 +0800, iseki zero wrote:
> So, should I use the [reply to all] button?

This mailing-list (like most lists) sets the "List-Post" header:

List-Post: 

So the best thing would be for the mail program to detect that and offer
a [reply to list] button. Not many do, though, so [reply to all] is
probably your best choice.


> I'm afraid the receipt list will growing to have too many address.

Not much of a problem since usually there won't be that many people
participating in a thread.


> BTW, I'm using Thunderbird. If you have better software, tell me please.

I'm using (neo)mutt, but these days the limitations of a text-only
mailer can be quite noticeable.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature


Re: Questions about document "Concurrenry control" section

2024-10-12 Thread Peter J. Holzer
On 2024-10-11 21:21:16 -0700, Adrian Klaver wrote:
> On 10/11/24 20:10, admin@iseki.space wrote:
> > I found. Maybe we should reply to the mailing list only. Otherwise we'll
> > receive multiple copies of the emails.
> > 
> > 
> 
> Not if you go here:
> 
> https://lists.postgresql.org/manage/
> 
> and check:
> 
> Don't receive an extra copy of mails when listed in To or CC fields

Yes, but that's the wrong way around. Then I get some mails only
directly and some only through the list, which makes proper filtering
hard to impossible. For me it's much better to get all the mails through
the list (so I can use the List-ID header to filter them into the
appropriate folder) and live with the extra copies in my inbox. I would
prefer to not get those extra copies, but there is nothing the list can
do about them, that's under the control of the sender.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature