Unable to install postgresql and pgadmin

2024-01-08 Thread Innocent Ememe
Good morning,

Hey I’ve been trying to install the postgresql and pgadmin software on my
Mac book for the past three days now and have been faced with some issues
and restrictions, that won’t allow the software to run. I wanted to ask if
your software is compatible with my MacBook Air 2012,  iOS version 10.15.
Looking forward to your reply

Cheers
Innocent


Point-In-Time Recovery issue - Timeline file lost

2024-01-08 Thread Carlos Augusto Ferreira de Oliveira
Hello everyone,

My team and I have a situation and would like to know if anyone is going
through something similar.

We have several RedHat 9 virtual servers, running PostgreSQL version 14.10.

Our backup tool is Veritas Netbackup 10.1.1 WebUI.

We needed to perform a PIT Recovery last week (on a recovery server) and,
when doing so, we came across the following error:

2024-01-05 12:19:30.085 -03 [300359] LOG:  database system was interrupted;
last known up at 2023-12-29 23:30:50 -03
cp: cannot stat '/path/to/file/0002.history': No such file or directory
2024-01-05 12:19:30.468 -03 [300359] LOG:  starting point-in-time recovery
to WAL location (LSN) "7D2/15FFFEB8"
2024-01-05 12:19:30.468 -03 [300359] LOG:  invalid primary checkpoint record
2024-01-05 12:19:30.468 -03 [300359] PANIC:  could not locate a valid
checkpoint record

We found a web page that gave us an idea

http://www.sixfortwo.com/2015/09/just-quick-one-while-hes-away.html

However, when trying to reproduce it, it didn't work.
We have the wal files archived on an NFS share, but we don't understand
when we should create the timeline file. We have some questions:

1 - Should it be created at the time the base was interrupted?
2 - Should it be created based on the time of the last file archived?
3 - Is there any way to recreate a valid timeline file from the archived
wal files?
4 - Is there any more specific documentation that guides how to recreate a
timeline file?


How to \ef a function ?

2024-01-08 Thread David Gauthier
atletx7-reg017:/home/dgauthie[ 120 ] --> dvdbdev
Pager usage is off.
psql (11.5, server 11.3)
Type "help" for help.

dvdb=# \df opid.bef_ins_axi_reqs_set_trig;
 List of functions
 Schema |   Name| Result data type | Argument data
types | Type
+---+--+-+--
 opid   | bef_ins_axi_reqs_set_trig | trigger  |
  | func
(1 row)

dvdb=# \ef opid.bef_ins_axi_reqs_set_trig;
ERROR:  function "opid.bef_ins_axi_reqs_set_trig;" does not exist
dvdb=# \ef opid.bef_ins_axi_reqs_set_trig();
ERROR:  expected a right parenthesis
dvdb=#

So the function exists with \df but not \ef ?
I get the need to identify the argument list (in case there's >1 with same
name, diff arg list), but '()' doesn't work.  Does this have to do with the
returned trigger type ?


Re: How to \ef a function ?

2024-01-08 Thread Adrian Klaver

On 1/8/24 08:26, David Gauthier wrote:

atletx7-reg017:/home/dgauthie[ 120 ] --> dvdbdev
Pager usage is off.
psql (11.5, server 11.3)
Type "help" for help.

dvdb=# \df opid.bef_ins_axi_reqs_set_trig;
                                  List of functions
  Schema |           Name            | Result data type | Argument data 
types | Type

+---+--+-+--
  opid   | bef_ins_axi_reqs_set_trig | trigger          |   
       | func

(1 row)

dvdb=# \ef opid.bef_ins_axi_reqs_set_trig;
ERROR:  function "opid.bef_ins_axi_reqs_set_trig;" does not exist


Lose the ';'.

It should be:

\ef opid.bef_ins_axi_reqs_set_trig


dvdb=# \ef opid.bef_ins_axi_reqs_set_trig();
ERROR:  expected a right parenthesis
dvdb=#

So the function exists with \df but not \ef ?
I get the need to identify the argument list (in case there's >1 with 
same name, diff arg list), but '()' doesn't work.  Does this have to do 
with the returned trigger type ?




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





Re: Unable to install postgresql and pgadmin

2024-01-08 Thread Adrian Klaver

On 1/8/24 00:23, Innocent Ememe wrote:

Good morning,

Hey I’ve been trying to install the postgresql and pgadmin software on 
my Mac book for the past three days now and have been faced with some 
issues and restrictions, that won’t allow the software to run. I wanted 
to ask if your software is compatible with my MacBook Air 2012,  iOS 
version 10.15.


Where are you getting the software from?

Show the commands you are using to install.

What are the error messages you are getting?



Looking forward to your reply

Cheers
Innocent



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





Re: How to \ef a function ?

2024-01-08 Thread Tom Lane
Adrian Klaver  writes:
> On 1/8/24 08:26, David Gauthier wrote:
>> dvdb=# \ef opid.bef_ins_axi_reqs_set_trig;
>> ERROR:  function "opid.bef_ins_axi_reqs_set_trig;" does not exist

> Lose the ';'.
> It should be:
> \ef opid.bef_ins_axi_reqs_set_trig

Yeah, that's what psql is expecting, but it does seem a bit
unforgiving considering that you can write a noise semicolon
in many other backslash commands.  And this:

>> dvdb=# \ef opid.bef_ins_axi_reqs_set_trig();
>> ERROR:  expected a right parenthesis

seems outright buggy.  I've not looked at the code though.

regards, tom lane




Re: How to \ef a function ?

2024-01-08 Thread Tom Lane
I wrote:
> Yeah, that's what psql is expecting, but it does seem a bit
> unforgiving considering that you can write a noise semicolon
> in many other backslash commands.  And this:

> dvdb=# \ef opid.bef_ins_axi_reqs_set_trig();
> ERROR:  expected a right parenthesis

> seems outright buggy.  I've not looked at the code though.

Ah, I see it.  The difference in the error messages is because \ef
feeds the whole argument to regprocin to find out the function OID
if there are no parens, but regprocedurein if there are parens.
Neither of those functions like the trailing semicolon, but their
complaints are different.

More interestingly, \ef is actually trying to ignore trailing
semicolons: exec_command_ef_ev tells psql_scan_slash_option
to do so.  But it's using OT_WHOLE_LINE mode and that function
ignores the request in that mode.  So that seems like an
oversight.

regards, tom lane




Make NUM_XLOGINSERT_LOCKS configurable

2024-01-08 Thread 1111hqshj
Dear all,
I recently used benchmarksql to evaluate the performance of postgresql. I 
achievednearly 20% improvement with NUM_XLOGINSERT_LOCKS changed from 8 to 
16under some cases of high concurrency. 
I wonder whether it is feasible to make NUM_XLOGINSERT_LOCKS a 
configurationparameter, so that users can get easier to optimize their 
postgresql performancethrough this setting.
Thanks,Qingsong

postgresql custom variable in pg_settings table

2024-01-08 Thread Yi Sun
Hello,

We custom set variable

Added patroni.nodes_count = 2 in postgresql.conf

postgres=# show patroni.nodes_count;
 patroni.nodes_count
-
 2
(1 row)

postgres=# select current_setting('patroni.nodes_count');
 current_setting
-
 2
(1 row)

But can not select it from pg_settings, as we use pgwatch2 to monitor, to
avoid pgwatch2 script change prefer to use pg_setting not current_setting()
function, is it possible to get the custom variable from pg_setting please?
Thanks

Best Regards
SY