Re: system variable can be edited by all user?
Hello, You ccan try to use my extension pg_set_acl: https://github.com/pierreforstmann/pg_set_acl Le mar. 22 nov. 2022 à 09:07, chris navarroza a écrit : > Hi, > > Ive created a read only user (SELECT PRIVILEGE) but it turns out that this > user can do this queries: SHOW work_mem; SET work_mem='40MB'; How do I > limit him? > > Thanks, > > Butching > >
WAL contains references to invalid pages in hot standby
Hi! WAL playback in hot standby server crashes with "WAL contains references to invalid pages" error : 2022-11-26 17:48:12.889 EET [497] LOG: restored log file "000105790064" from archive 2022-11-26 17:48:20.897 EET [497] LOG: restored log file "000105790065" from archive 2022-11-26 17:48:26.564 EET [497] LOG: restored log file "000105790066" from archive 2022-11-26 17:48:32.019 EET [497] LOG: consistent recovery state reached at 579/66954858 2022-11-26 17:48:32.019 EET [495] LOG: database system is ready to accept read only connections 2022-11-26 17:48:32.019 EET [497] WARNING: page 11 of relation base/54455050/83221012 is uninitialized 2022-11-26 17:48:32.019 EET [497] CONTEXT: WAL redo at 579/66967DB0 for Heap2/VISIBLE: cutoff xid 167913422 flags 0x01 2022-11-26 17:48:32.019 EET [497] PANIC: WAL contains references to invalid pages 2022-11-26 17:48:32.019 EET [497] CONTEXT: WAL redo at 579/66967DB0 for Heap2/VISIBLE: cutoff xid 167913422 flags 0x01 2022-11-26 17:48:34.315 EET [495] LOG: startup process (PID 497) was terminated by signal 6: Aborted 2022-11-26 17:48:34.315 EET [495] LOG: terminating any other active server processes 2022-11-26 17:48:34.330 EET [495] LOG: database system is shut down It looks like file 000105790067 is corrupted. I looked into this file and it contains data like other WAL files. How to fix this error so that Wal playback can continue? Master server is in Postgres 12 in Debian 10.3 Hot standby in Postgres 12 in WSL Debian 11.5 Can Debian version 10.3/11.5 difference cause this exception? Andrus.
collect2: error: ld returned 1 exit status
I am using libpq: the C application programmer's interface to PostgreSQL. Compile the code: > *sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq* > But i get the following error: *collect2: error: ld returned 1 exit status* > -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄
Re: collect2: error: ld returned 1 exit status
> On Nov 26, 2022, at 3:43 PM, William Torrez Corea > wrote: > > > I am using libpq: the C application programmer's interface to PostgreSQL. > > Compile the code: > >> sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq > > But i get the following error: > >> collect2: error: ld returned 1 exit status > > -- And do you have at hand why the loader (ld) failed? >
Re: collect2: error: ld returned 1 exit status
On Sat, Nov 26, 2022 at 5:00 PM Rob Sargent wrote: > > > On Nov 26, 2022, at 3:43 PM, William Torrez Corea > wrote: > > > I am using libpq: the C application programmer's interface to PostgreSQL. > > Compile the code: > > >> *sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq* >> > > But i get the following error: > > *collect2: error: ld returned 1 exit status* >> > > -- > > > And do you have at hand why the loader (ld) failed? > > > Package libpq was not found in the pkg-config search path. Perhaps you should add the directory containing `libpq.pc' to the PKG_CONFIG_PATH environment variable No package 'libpq' found -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄
Re: collect2: error: ld returned 1 exit status
On Nov 26, 2022, at 4:17 PM, William Torrez Corea wrote:On Sat, Nov 26, 2022 at 5:00 PM Rob Sargentwrote:On Nov 26, 2022, at 3:43 PM, William Torrez Corea wrote:I am using libpq: the C application programmer's interface to PostgreSQL. Compile the code:sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpqBut i get the following error:collect2: error: ld returned 1 exit status-- And do you have at hand why the loader (ld) failed? Package libpq was not found in the pkg-config search path.Perhaps you should add the directory containing `libpq.pc'to the PKG_CONFIG_PATH environment variableNo package 'libpq' found-- So libpq is not in -L/usr/local/pgsql/lib ? Do you know that libpq is installed? You may need to use the Debian package installer to get the “dev” environment With kindest regards, William.⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org⠈⠳⣄
Re: collect2: error: ld returned 1 exit status
William Torrez Corea writes: > On Sat, Nov 26, 2022 at 5:00 PM Rob Sargent wrote: >> On Nov 26, 2022, at 3:43 PM, William Torrez Corea >> wrote: >>> Compile the code: >>> *sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq* >>> But i get the following error: >>> *collect2: error: ld returned 1 exit status* The useful info would be in the lines right before that one. That one just tells you that cc is giving up because of prior errors. >> And do you have at hand why the loader (ld) failed? > Package libpq was not found in the pkg-config search path. > Perhaps you should add the directory containing `libpq.pc' > to the PKG_CONFIG_PATH environment variable I do not believe that a bare cc invocation would produce any complaints about pkg-config. Are you showing us something unrelated to the stated command? BTW, it's pretty hard to believe that you need to use sudo for this. regards, tom lane
Re: collect2: error: ld returned 1 exit status
On Sat, Nov 26, 2022 at 5:25 PM Rob Sargent wrote: > > On Nov 26, 2022, at 4:17 PM, William Torrez Corea > wrote: > > > > > On Sat, Nov 26, 2022 at 5:00 PM Rob Sargent wrote: > >> >> >> On Nov 26, 2022, at 3:43 PM, William Torrez Corea >> wrote: >> >> >> I am using libpq: the C application programmer's interface to PostgreSQL. >> >> Compile the code: >> >> >>> *sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq* >> >> >> But i get the following error: >> >> *collect2: error: ld returned 1 exit status* >>> >> >> -- >> >> And do you have at hand why the loader (ld) failed? > > >> > Package libpq was not found in the pkg-config search path. > Perhaps you should add the directory containing `libpq.pc' > to the PKG_CONFIG_PATH environment variable > No package 'libpq' found > > -- > > > So libpq is not in *-L/usr/local/pgsql/lib ?* Do you know that libpq is > installed? You may need to use the Debian package installer to get the > “dev” environment > > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org > ⠈⠳⣄ > > > header files for libpq5 (PostgreSQL library), the package is broken. -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄
Re: collect2: error: ld returned 1 exit status
header files for libpq5 (PostgreSQL library), the package is broken. -- With kindest regards, William.⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org⠈⠳⣄ I’m confused. Is that ‘package is broken’ coming from dpkg.
Re: collect2: error: ld returned 1 exit status
On Sat, Nov 26, 2022 at 7:55 PM Rob Sargent wrote: > > header files for libpq5 (PostgreSQL library), the package is broken. > -- > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org > ⠈⠳⣄ > > > I’m confused. Is that ‘package is broken’ coming from dpkg. > > > The package is in Synaptic Package Manager -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄