Re: bug in psql?

2020-08-14 Thread Tom Lane
"Aleksey M Boltenkov" writes: > Is this a bug? > pg01:5432 postgres@db=# select 'any expression'any expression\d+; No. The "\d+;" is taken as a backslash command, and is executed. The rest of what you typed is still waiting in the query buffer. It's bit weird perhaps, since \d seems like a

Re: bug in psql?

2020-08-14 Thread Pavel Stehule
so 15. 8. 2020 v 7:35 odesílatel Aleksey M Boltenkov napsal: > Is this a bug? > > Executing of malformed (quote symbols) select in psql results in > unexpected behaviour: > > pg01:5432 postgres@db=# select 'any expression'any expression\d+; > List of relations > Schema │ Name │ Type │ Owner │

bug in psql?

2020-08-14 Thread Aleksey M Boltenkov
Is this a bug? Executing of malformed (quote symbols) select in psql results in unexpected behaviour: pg01:5432 postgres@db=# select 'any expression'any expression\d+; List of relations Schema │ Name │ Type │ Owner │ Size │ Description

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread Tom Lane
PegoraroF10 writes: > CREATE FUNCTION public.fntextonumero(finteger public.i32, ftext text) > RETURNS boolean > LANGUAGE sql STABLE > AS $$ > SELECT ftext = finteger::text; > $$; Huh. The crash goes away if you change that to SELECT finteger::text = ftext; It looks like

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
Well, I didn´t know where was the problem exactly, then ... The entire script to see that problem is create domain public.i32 as integer; CREATE FUNCTION public.fntextonumero(ftext text, finteger public.i32) RETURNS boolean LANGUAGE sql STABLE AS $$ SELECT ftext = finteger::text; $$;

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread Alvaro Herrera
On 2020-Aug-14, PegoraroF10 wrote: > CREATE FUNCTION public.fntextonumero(ftext text, finteger public.i32) How is public.i32 defined? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
And the operator function, just to you know, is only a conversion to text CREATE FUNCTION public.fntextonumero(ftext text, finteger public.i32) RETURNS boolean LANGUAGE sql STABLE AS $$ SELECT ftext = finteger::text; $$; CREATE FUNCTION public.fntextonumero(finteger public.i32, ftext

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread Tom Lane
PegoraroF10 writes: > And I have created these two operators a long time ago. > CREATE OPERATOR public.= ( > FUNCTION = public.fntextonumero, > LEFTARG = text, > RIGHTARG = public.i32 > ); > CREATE OPERATOR public.= ( > FUNCTION = public.fntextonumero, > LEFTARG =

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
It works, shouldn´t but works. Results False And I have created these two operators a long time ago. CREATE OPERATOR public.= ( FUNCTION = public.fntextonumero, LEFTARG = text, RIGHTARG = public.i32 ); CREATE OPERATOR public.= ( FUNCTION = public.fntextonumero, LEFTARG =

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread Tom Lane
PegoraroF10 writes: > So, how can I know which custom operator is being used on that comparison ? You tell us. I don't know of any common extension that would create a "smallint = text" operator. (A variant theory is that you didn't make a new operator, but an implicit cast from smallint to

Re: index numbers in pg_restore list

2020-08-14 Thread Ben Madin
Thanks Tom and Adrian, The clarity is helpful - We'll run up a solution to specifically choose the elements. cheers Ben On Sat, 15 Aug 2020 at 00:45, Tom Lane wrote: > Ben Madin writes: > > " Is the index number ( the archive ID) assigned at the time of creation > > of the archive and not

Re: index numbers in pg_restore list

2020-08-14 Thread Tom Lane
Ben Madin writes: > " Is the index number ( the archive ID) assigned at the time of creation > of the archive and not otherwise related to the item in the > original database?" Yes, it's just assigned internally during pg_dump. I think the numbers would hold still as long as you make no DDL

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
Correct, on yours it gives an error message, but on mine it tries to execute and goes to recovery. So, how can I know which custom operator is being used on that comparison ? -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
Ok, it works if I cast TipoRecebimento to text. (TipoRecebimento::text in (select substring(VarValue from 3) from Var where Name = '/Config/TipoRecebimentoCancelamento')) But now, how can I know what custom operator it´s trying to use, because some day I can get in troubles again because that.

Re: index numbers in pg_restore list

2020-08-14 Thread Adrian Klaver
On 8/14/20 9:16 AM, Ben Madin wrote: Dear all, I was hoping for some quick guidance on the structure of the pg_restore list. We have a database which we are restoring each day for a data warehouse. For efficiency, we are not restoring a number of tables and functions, just the tables,

index numbers in pg_restore list

2020-08-14 Thread Ben Madin
Dear all, I was hoping for some quick guidance on the structure of the pg_restore list. We have a database which we are restoring each day for a data warehouse. For efficiency, we are not restoring a number of tables and functions, just the tables, indexes and data. (the database is being

Re: Fwd: changing password pgagent service account

2020-08-14 Thread Diego
yep, or the password does not meet the windows requirements. On 2020-08-13 14:31, Adrian Klaver wrote: On 8/13/20 10:19 AM, Henry Francisco Garcia Cortez wrote: Good morning I need to help I installed pgagent but I want to change password pgagent service account r5w83.png To me it looks

Re: PostgreSQL 10.12. background writer not cleaning buffers, small working set, big shared_buffers

2020-08-14 Thread Rene Romero Benavides
Any ideas on this guys? Thank you. On Fri, Aug 14, 2020 at 1:39 AM Rene Romero Benavides < rene.romer...@gmail.com> wrote: > Hello Postgres community. > In a few words I'm figuring out this stats from the background writer > where you can see buffers_clean is 0 and buffers_backend = 44849371, I

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread Tom Lane
PegoraroF10 writes: > This is the way you can test to push your server immediatelly to recovery > mode. This one you´ll get the problem instantaneously, differently from the > last one which you have to wait a long time to happen. When I try this I get ERROR: operator does not exist: smallint

Postgres Clusterisation best choice ?

2020-08-14 Thread Anass El Bouanani
Hi, Please, can you help me to choose the best way to install an postres clustersation architecture, with replication sites ? can I use Openshift ? or there is a better solution ? Thanks a lot for your help. Best regards,

Re: Server goes to Recovery Mode when run a SQL

2020-08-14 Thread PegoraroF10
This is the way you can test to push your server immediatelly to recovery mode. This one you´ll get the problem instantaneously, differently from the last one which you have to wait a long time to happen. A master detail relation with an additional table of configurations. Usually this master has

Block Corruption Resolution

2020-08-14 Thread Brajendra Pratap Singh
Hi , Is it possible to recover only corrupted blocks in postgresql versions 9.6/10/11/12? Is the pg_healer extension supported by postgresql or good for the corrupted block recovery? If yes then is this compatible with all postgresql versions 9.6/10/11/12? Thanks, Brajendra

Re: PostgreSQL 10.12. background writer not cleaning buffers, small working set, big shared_buffers

2020-08-14 Thread Rene Romero Benavides
Btw, these are its wal / checkpoint related settings: activemq1=# select name,setting,unit from pg_settings where category = 'Write-Ahead Log / Checkpoints'; name | setting | unit --+-+-- checkpoint_completion_target | 0.9 |

PostgreSQL 10.12. background writer not cleaning buffers, small working set, big shared_buffers

2020-08-14 Thread Rene Romero Benavides
Hello Postgres community. In a few words I'm figuring out this stats from the background writer where you can see buffers_clean is 0 and buffers_backend = 44849371, I would like it to be the other way around, that's more efficient, right? -[ RECORD 1 ]-+--