pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2830

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

Hey guys,

I have patroni and ETCD to manage my postgreSQL cluster. However, replication sometimes doesn't work, however I put all the parameter needed for replication, and also they both not synced together at all. any solution for that pls?? Pls anyone DM me if having experience in patroni pls, Thanks...

Читать полностью…

PostgreSQL

It's not unacceptable, I just sincerely believe that we can (and should!) do better than some sophisticated bot ;-)

Читать полностью…

PostgreSQL

I reckon @standart_soft got the message... right, @standart_soft ?

Читать полностью…

PostgreSQL

Isn't there something like lmgtfy.com for ChatGPT? Pasting walls of text with probably questionable quality shouldn't be our level here IMHO.

Читать полностью…

PostgreSQL

Indeed, the docs are well written and always the most up to date documentation you can find.
A member of this channel setup another channel that provides links to PostgreSQL documentation / tips and tricks. You can browse through them here: /channel/postgresql_lib
And the original documentation is here for free:
https://www.postgresql.org/docs/

Читать полностью…

PostgreSQL

Yes it is
I've checked the conf file too

Читать полностью…

PostgreSQL

You'll need to:
- disconnect the secondary from the primary
- upgrade the secondary
- stop the secondary
- upgrade the primary
- stop the primary (or use pg_start_backup to freeze the data folder)
- use rsync to sync the data folder from the primary to the secondary
- rejoin the primary and secondary and start everything back up

Читать полностью…

PostgreSQL

Unable to open the link

Читать полностью…

PostgreSQL

u sure the database is listening to this port on this host? recheck your configuration settings

Читать полностью…

PostgreSQL

Hi everyone, could you suggest the best approach to upgrade db if I am using standby?

Читать полностью…

PostgreSQL

The first step would be to answer the question you've been asked...

Читать полностью…

PostgreSQL

hi how to solve this ?

Читать полностью…

PostgreSQL

Thanks Nick for pinpointing this

Читать полностью…

PostgreSQL

Like i can use replication slot instead of wal keep segment if I have my wals keep sending from one server to another, and vice versa I can use wal keep segment instead of replication slot

Читать полностью…

PostgreSQL

Let's say the _outcome_ is the same in case the replica gets disconnected: WAL segments are kept around for some time.
But the whole reasoning behind it and the purpose is wildly different, so yeah, they're somewhat related (as in "they affect WAL recycling"), but very different.

Читать полностью…

PostgreSQL

The instructions written by the bot still need to be understood. For me, this is the same text as technical documentation or examples from a selection of search engines.

Читать полностью…

PostgreSQL

OK, I'll delete the message if it's unacceptable. I sometimes use gpt, it answers simple questions, or helps to take the first step.

Читать полностью…

PostgreSQL

I would suggest just to ban users translating GPT-crap.

Читать полностью…

PostgreSQL

I am new here
How can I start postgreSQL from beginning?

ChatGPT 4:
Welcome! Getting started with PostgreSQL is a great choice for managing databases. Here’s a step-by-step guide to help you begin:

1. Install PostgreSQL

On Windows:
- Download the installer from the [official PostgreSQL website](https://www.postgresql.org/download/windows/).
- Run the installer and follow the prompts to install PostgreSQL and pgAdmin (a graphical interface).

On macOS:
- You can use Homebrew:
 

  brew install postgresql
 

- Alternatively, download the installer from the [official website](https://www.postgresql.org/download/macosx/).

On Linux:
- For Debian/Ubuntu:
 
  sudo apt update
  sudo apt install postgresql postgresql-contrib
 

- For CentOS/RHEL:
 
  sudo yum install postgresql-server postgresql-contrib
 


2. Start PostgreSQL Service

On Windows:
The service usually starts automatically. You can check its status in the Services app.

On macOS:
brew services start postgresql


On Linux:
sudo systemctl start postgresql


3. Access PostgreSQL

You can access PostgreSQL via the command line or pgAdmin.

Command Line:
1. Open your terminal.
2. Switch to the postgres user (default superuser):
  
   sudo -i -u postgres
  

3. Start the PostgreSQL prompt:
  
   psql
  


pgAdmin:
- Open pgAdmin from your applications.
- Connect to your PostgreSQL server using the credentials you set during installation.

4. Create a Database

Once you're in the PostgreSQL prompt (psql), you can create a new database:

CREATE DATABASE mydatabase;


5. Connect to Your Database

To connect to your new database:

\c mydatabase;


6. Create a Table

Here’s an example of creating a simple table:

CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(100)
);


7. Insert Data

You can insert data into your table like this:

INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');


8. Query Data

To retrieve data from your table:

SELECT * FROM users;


9. Learn More

- Documentation: The [PostgreSQL documentation](https://www.postgresql.org/docs/) is an excellent resource.
- Tutorials: Websites like [W3Schools](https://www.w3schools.com/sql/sql_intro.asp) and [TutorialsPoint](https://www.tutorialspoint.com/postgresql/index.htm) offer beginner-friendly tutorials.

10. Practice

Try building small projects or practicing SQL queries to get comfortable with PostgreSQL.

If you have any specific questions or need further assistance, feel free to ask!

Читать полностью…

PostgreSQL

I am new here
How can I start postgreSQL from beginning
No Video Lectures
Provide me only book according to 2024 era edition

Читать полностью…

PostgreSQL

If you upgrade primary and secondary the timelines will diverge, so there is no way to make indipendent upgrades

Читать полностью…

PostgreSQL

Pg_upgrade is fine do we start upgrading first to standby after revoke connection from primary or we setup new standby after upgrade primary

Читать полностью…

PostgreSQL

sometimes there is a problem in binding the host ip, try using the other ip assigned to your machine instead

Читать полностью…

PostgreSQL

https://www.postgresql.org/docs/current/pgupgrade.html#PGUPGRADE-STEP-REPLICAS

Читать полностью…

PostgreSQL

Hello and welcome to this chat. Here we discuss PostgreSQL and provide best-effort voluntary support on Postgresql issues.
If you have any question, try asking kindly, including log files, error descriptions and perhaps what you're trying to do.

- 🚫 photos and screenshots
- 🚫 spam and offtopic
- ✅ questions with log files and clear explanation of what's gone wrong

⬇️ Press the button down here ⬇️

Читать полностью…

PostgreSQL

Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?

Читать полностью…

PostgreSQL

psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

Читать полностью…

PostgreSQL

wal_keep_segments is more like a safety net for non-slot/non-archive replication setups.
If you can't use an archive and can't afford an occasional basebackup after longer outages, you're better off with a replication slot. At the risk of running out of disk space...

Читать полностью…

PostgreSQL

different in what pls, nick?

Читать полностью…

PostgreSQL

Btw,is there any Postgres certification that one can do?

Читать полностью…
Subscribe to a channel